text
stringlengths
14
5.77M
meta
dict
__index_level_0__
int64
0
9.97k
<?php namespace Google\Service\Contentwarehouse; class ImageRepositoryShoppingProductInformationProductInformation extends \Google\Collection { protected $collection_key = 'tokenGroups'; /** * @var int[] */ public $categoryId; /** * @var int[] */ public $clusterIds; /** * @var float */ public $detectionScore; /** * @var string */ public $embedding; protected $entitiesType = ImageRepositoryShoppingProductInformationEntity::class; protected $entitiesDataType = 'array'; /** * @var string */ public $featureType; protected $productLocationType = ImageRepositoryShoppingProductInformationBoundingBox::class; protected $productLocationDataType = ''; protected $tokenGroupsType = ImageRepositoryShoppingProductInformationProductInformationTokenGroup::class; protected $tokenGroupsDataType = 'array'; /** * @param int[] */ public function setCategoryId($categoryId) { $this->categoryId = $categoryId; } /** * @return int[] */ public function getCategoryId() { return $this->categoryId; } /** * @param int[] */ public function setClusterIds($clusterIds) { $this->clusterIds = $clusterIds; } /** * @return int[] */ public function getClusterIds() { return $this->clusterIds; } /** * @param float */ public function setDetectionScore($detectionScore) { $this->detectionScore = $detectionScore; } /** * @return float */ public function getDetectionScore() { return $this->detectionScore; } /** * @param string */ public function setEmbedding($embedding) { $this->embedding = $embedding; } /** * @return string */ public function getEmbedding() { return $this->embedding; } /** * @param ImageRepositoryShoppingProductInformationEntity[] */ public function setEntities($entities) { $this->entities = $entities; } /** * @return ImageRepositoryShoppingProductInformationEntity[] */ public function getEntities() { return $this->entities; } /** * @param string */ public function setFeatureType($featureType) { $this->featureType = $featureType; } /** * @return string */ public function getFeatureType() { return $this->featureType; } /** * @param ImageRepositoryShoppingProductInformationBoundingBox */ public function setProductLocation(ImageRepositoryShoppingProductInformationBoundingBox $productLocation) { $this->productLocation = $productLocation; } /** * @return ImageRepositoryShoppingProductInformationBoundingBox */ public function getProductLocation() { return $this->productLocation; } /** * @param ImageRepositoryShoppingProductInformationProductInformationTokenGroup[] */ public function setTokenGroups($tokenGroups) { $this->tokenGroups = $tokenGroups; } /** * @return ImageRepositoryShoppingProductInformationProductInformationTokenGroup[] */ public function getTokenGroups() { return $this->tokenGroups; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(ImageRepositoryShoppingProductInformationProductInformation::class, 'Google_Service_Contentwarehouse_ImageRepositoryShoppingProductInformationProductInformation');
{ "redpajama_set_name": "RedPajamaGithub" }
8,048
{"url":"http:\/\/mathhelpforum.com\/calculus\/18731-derivatives.html","text":"# Math Help - derivatives\n\n1. ## derivatives\n\nif f(1)=2 and f'(1)=5, use the equation of the line tangent to the graph of f at x=1 to approximate f(1.2).\n\n2. Originally Posted by asnxbbyx113\nif f(1)=2 and f'(1)=5, use the equation of the line tangent to the graph of f at x=1 to approximate f(1.2).\nPoint-Slope Form?\n\nf(1) = 2 gives the point\nf'(1) = 5 gives the slope.\n\ny - 2 = 5(x-1)\n\nSubstitute x = 1.2\n\n3. Originally Posted by asnxbbyx113\nif f(1)=2 and f'(1)=5, use the equation of the line tangent to the graph of f at x=1 to approximate f(1.2).\nOr you can think of it as a truncated Taylor series.\n$f(1.2) \\approx f(1) + \\frac{1}{1!}f^{\\prime}(1) \\cdot 0.2$\n\nSo\n$f(1.2) \\approx 2 + 5 \\cdot 0.2$\netc.\n\n-Dan\n\n4. Originally Posted by topsquark\nOr you can think of it as a truncated Taylor series.\n$f(1.2) \\approx f(1) + \\frac{1}{1!}f^{\\prime}(1) \\cdot 0.2$\n\nSo\n$f(1.2) \\approx 2 + 5 \\cdot 0.2$\netc.\n\n-Dan\nThat is not the best explanation to give this poster. Because he will not hear the term \"Taylor Series\" for another year.","date":"2014-11-27 23:41:52","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 4, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.7381879091262817, \"perplexity\": 547.8050230686588}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2014-49\/segments\/1416931009292.37\/warc\/CC-MAIN-20141125155649-00208-ip-10-235-23-156.ec2.internal.warc.gz\"}"}
null
null
RPK Bochnia – publiczny przewoźnik komunikacji rejonowej w Bochni. Powstało w wyniku podziału Wojewódzkiego Przedsiębiorstwa Komunikacyjnego w Tarnowie, działa od 01.04.1993. Obsługuje 10 linii. Właścicielami spółki są Gmina Bochnia w 87% i w 13% Miasto i Gmina Nowy Wiśnicz. Linie Tabor aktualnie eksploatowany Tabor wycofany z eksploatacji Przypisy Linki zewnętrzne Strona internetowa RPK Bochnia Galeria pojazdów przedsiębiorstwa na stronie phototrans.eu Bochnia Transport w Bochni Przedsiębiorstwa w Bochni
{ "redpajama_set_name": "RedPajamaWikipedia" }
2,754
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.11"/> <title>ItMayBeAHack OOD Exercises: Member List</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { init_search(); }); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">ItMayBeAHack OOD Exercises </div> <div id="projectbrief">An exercise in OOD as guided by ItMayBeAHack.com.</div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.11 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li><a href="namespaces.html"><span>Packages</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class&#160;List</span></a></li> <li><a href="classes.html"><span>Class&#160;Index</span></a></li> <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li> <li><a href="functions.html"><span>Class&#160;Members</span></a></li> </ul> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespace_roulette.html">Roulette</a></li><li class="navelem"><a class="el" href="namespace_roulette_1_1_tests.html">Tests</a></li><li class="navelem"><a class="el" href="class_roulette_1_1_tests_1_1_bin_builder_u_s___tests.html">BinBuilderUS_Tests</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="headertitle"> <div class="title">Roulette.Tests.BinBuilderUS_Tests Member List</div> </div> </div><!--header--> <div class="contents"> <p>This is the complete list of members for <a class="el" href="class_roulette_1_1_tests_1_1_bin_builder_u_s___tests.html">Roulette.Tests.BinBuilderUS_Tests</a>, including all inherited members.</p> <table class="directory"> <tr class="even"><td class="entry"><a class="el" href="class_roulette_1_1_tests_1_1_bin_builder_u_s___tests.html#ac4b0c399571b9cb5de8b9abeb3f5bab6">BinBuilderUS_Tests</a>(IOutputService console)</td><td class="entry"><a class="el" href="class_roulette_1_1_tests_1_1_bin_builder_u_s___tests.html">Roulette.Tests.BinBuilderUS_Tests</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="class_roulette_1_1_tests_1_1_bin_builder_u_s___tests.html#a8963a23c635de8c4c9d2f2433ad0ea69">DisplayAll</a>()</td><td class="entry"><a class="el" href="class_roulette_1_1_tests_1_1_bin_builder_u_s___tests.html">Roulette.Tests.BinBuilderUS_Tests</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="class_roulette_1_1_tests_1_1_bin_builder_u_s___tests.html#ad4e4e9a6a05931a233de16be48774b8a">DisplayColumnBets</a>()</td><td class="entry"><a class="el" href="class_roulette_1_1_tests_1_1_bin_builder_u_s___tests.html">Roulette.Tests.BinBuilderUS_Tests</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="class_roulette_1_1_tests_1_1_bin_builder_u_s___tests.html#a7e2461248527ea39632054b1ca6b5c38">DisplayCornerBets</a>()</td><td class="entry"><a class="el" href="class_roulette_1_1_tests_1_1_bin_builder_u_s___tests.html">Roulette.Tests.BinBuilderUS_Tests</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="class_roulette_1_1_tests_1_1_bin_builder_u_s___tests.html#a9b4045b08981666f002694529ea4d8b6">DisplayDozenBets</a>()</td><td class="entry"><a class="el" href="class_roulette_1_1_tests_1_1_bin_builder_u_s___tests.html">Roulette.Tests.BinBuilderUS_Tests</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="class_roulette_1_1_tests_1_1_bin_builder_u_s___tests.html#a847477371760d868f58b3b7a9b40b0f4">DisplayEvenMoneyBets</a>()</td><td class="entry"><a class="el" href="class_roulette_1_1_tests_1_1_bin_builder_u_s___tests.html">Roulette.Tests.BinBuilderUS_Tests</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="class_roulette_1_1_tests_1_1_bin_builder_u_s___tests.html#aa228cac8ca21fac56274ed6ac60fee1d">DisplayFiveBet</a>()</td><td class="entry"><a class="el" href="class_roulette_1_1_tests_1_1_bin_builder_u_s___tests.html">Roulette.Tests.BinBuilderUS_Tests</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="class_roulette_1_1_tests_1_1_bin_builder_u_s___tests.html#a1e9301470bc8af0938bb85ad086d9277">DisplayLineBets</a>()</td><td class="entry"><a class="el" href="class_roulette_1_1_tests_1_1_bin_builder_u_s___tests.html">Roulette.Tests.BinBuilderUS_Tests</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="class_roulette_1_1_tests_1_1_bin_builder_u_s___tests.html#ae34752fed0fb751a0f26a8f32479459f">DisplaySplitBets</a>()</td><td class="entry"><a class="el" href="class_roulette_1_1_tests_1_1_bin_builder_u_s___tests.html">Roulette.Tests.BinBuilderUS_Tests</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="class_roulette_1_1_tests_1_1_bin_builder_u_s___tests.html#ae4279b188c8879f9d11fd2d05f54242d">DisplayStraightBets</a>()</td><td class="entry"><a class="el" href="class_roulette_1_1_tests_1_1_bin_builder_u_s___tests.html">Roulette.Tests.BinBuilderUS_Tests</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="class_roulette_1_1_tests_1_1_bin_builder_u_s___tests.html#a2ef4bc0574c3abe9b0ff8afea3a60dbe">DisplayStreetBets</a>()</td><td class="entry"><a class="el" href="class_roulette_1_1_tests_1_1_bin_builder_u_s___tests.html">Roulette.Tests.BinBuilderUS_Tests</a></td><td class="entry"></td></tr> </table></div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by &#160;<a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.11 </small></address> </body> </html>
{ "redpajama_set_name": "RedPajamaGithub" }
2,232
When your water heater needs repairs, choosing the right plumbing contractor can make all the difference. At Plumbing Boys, we're well-versed in water heater repairs. When you call on us, we'll take the time to diagnose the problem with your heater and implement a reliable fix. And if we determine that your water heater is beyond repair or that it simply doesn't pay to fix it, we'll walk you through your options for finding a replacement. Remember, water heaters don't come cheap, so when yours needs to be serviced, it's best to call in a seasoned professional. To schedule an estimate or appointment for dependable water heater repair work, call Plumbing Boys today.
{ "redpajama_set_name": "RedPajamaC4" }
1,683
{"url":"http:\/\/www.goodmath.org\/blog\/2018\/10\/","text":"# Introduction and Motivation\n\nOne thing that I keep bumping up against as an engineer who loves functional a programming is category theory. It often seems like there are two kinds of functional programmers: people who came into functional programming via engineering, and people who came into functional programming via math. The problem is that a lot of the really interesting work in languages and libraries for functional programming are being built from the mathematical side, but for people on the engineering side, it\u2019s impenetrable: it\u2019s like it\u2019s written in a whole different language, and even basic discussions about programming go off the rails, because the basic abstractions don\u2019t make any sense if you don\u2019t know category theory.\n\nBut how do you learn category theory? It seems impenetrable to mere humans. For example, one of the textbooks on category theory that several people told me was the most approachable starts chapter one with the line:\n\nA group extension of an abelian group $H$ by an abelian group $G$ consists of a group $E$ together with an inclusion of $G \\hookrightarrow E$ as a normal subgroup and a surjective homomorphism $E \\twoheadrightarrow H$ that displays $H$ as the quotient group $E|G$.\n\nIf you\u2019re not a professional mathematician, then that is pure gobbledigook. But that seems to be typical of how initiates of category theory talk about it. But the basic concepts, while abstract, really aren\u2019t all that tricky. In many ways, it feels a lot like set theory: there\u2019s a simple conceptual framework, on which you can build extremely complicated formalisms. The difference is that while many people have spent years figuring out how to make the basics of set theory accessible to lay-people, but that effort hasn\u2019t been applied to set theory.\n\n## What\u2019s the point?\n\nOk, so why should you care about category theory?\n\nCategory theory is a different way of thinking, and it\u2019s a language for talking about abstractions. The heart of engineering is abstraction. We take problems, and turn them into abstract structures. We look at the structures we create, and recognize commonalities between those structures, and then we create new abstractions based on the commonalities. The hardest part of designing a good library is identifying the right abstractions.\n\nCategory theory is a tool for talking about structures, which is particularly well suited to thinking about software. In category theory, we think in terms of arrows, where arrows are mappings between objects. We\u2019ll see what that means in detail later, but the gist of it is that one example of arrows mapping between objects is functions mapping between data types in a computer program.\n\nCategory theory is built on thinking with orrows, and building structures using arrows. It\u2019s about looking at mathematical constructions built with arrows, and in those structures, figuring out what the fundamental parts are. When we abstract enough, we can start to see that things that look very different are really just different realizations of the same underlying structure. Category theory gives us a language and a set of tools for doing that kind of abstraction \u2013 and then we can take the abstract structures that we identify, and turn them into code \u2013 into very generic libraries that express deep, fundamental structure.\n\n## Monoids in Code\n\nWe\u2019ll get started by looking at a simple mathematical structure called a monoid, and how we can implement it in code; and then, we\u2019ll move on to take an informal look at how it works in terms of categories.\n\nMost of the categorical abstractions in Scala are implemented using something called a typeclass, so we\u2019ll start by looking at typeclasses. Typeclasses aren\u2019t a category theoretical notion, but they make it much, much easier to build categorical structures. And they do give us a bit of categorical flavor: a typeclass defines a kind of metatype \u2013 that is, a type of type \u2013 and we\u2019ll see, that kind of self-reflective abstraction is a key part of category theory.\n\nThe easiest way to think about typeclasses is that they\u2019re a kind of metatype \u2013 literally, as the name suggests, they define classes where the elements of those classes are types. So a typeclass provides an interface that a type must provide in order to be an instance of the metatype. Just like you can implement an interface in a type by providing implementations of its methods, you can implement a typeclass by providing implementations of its operations.\n\nIn Scala, you implement the operations of a typeclasses using a language construct called an implicit parameter. The implicit parameter attaches the typeclass operations to a meta-object that can be passed around the program invisibly, providing the typeclass\u2019s operations.\n\nLet\u2019s take a look at an example. An operation that comes up very frequently in any kind of data processing code is reduction: taking a collection of values of some type, and combining them into a single value. Taking the sum of a list of integers, the product of an array of floats, and the concatenation of a list of strings are all examples of reduction. Under the covers, these are all similar: they\u2019re taking an ordered group of values, and performing an operation on them. Let\u2019s look at a couple of examples of this:\n\ndef reduceFloats(floats: List[Float]): Float =\nfloats.foldRight(0)((x, y) => x + y)\n\ndef reduceStrings(strings: Seq[String]): String =\nstrings.foldRight(\"\")((x, y) => x.concat(y))\n\n\nWhen you look at the code, they look very similar. They\u2019re both just instantiations of the same structural pattern:\n\ndef reduceX(xes: List[X]): X =\nxes.foldRight(xIdentity)((a, b) => Xcombiner(a, b))\n\n\nThe types are different; the actual operation used to combine the values is different; the base value in the code is different. But they\u2019re both built on the same pattern:\n\n\u2022 There\u2019s a type of values we want to combine: Float or String. Everything we care about in reduction is a connected with this type.\n\u2022 There\u2019s a collection of values that we want to combine, from left to right. In one case, that\u2019s a List[Float], and in the other, it\u2019s a Seq[String]. The type doesn\u2019t matter, as long as we can iterate over it.\n\u2022 There\u2019s an identity value that we can use as a starting point for building the result; 0 for the floats, and \"\" (the empty string) for the strings.\n\u2022 There\u2019s an operation to combine two values: + for the floats, and concat for the strings.\n\nWe can capture that concept by writing an interface (a trait, in Scala terms) that captures it; that interface is called a typeclass. It happens that this concept of reducible values is called a monoid in abstract algebra, so that\u2019s the name we\u2019ll use.\n\ntrait Monoid[A] {\ndef empty: A\ndef combine(x: A, y: A): A\n}\n\n\nWe can read that as saying \u201cA is a monoid if there are implementations of empty and combine that meet these constraints\u201d. Given the declaration of the typeclass, we can implement it as an object which provides those operations for a particular type:\n\nobject FloatAdditionMonoid extends Monoid[Float] {\ndef empty: Float = 0.0\ndef combine(x: Float, y: Float): Float = x + y\n}\n\nobject StringConcatMonoid extends Monoid[String] {\ndef empty: String = \"\"\ndef combine(x: String, y: String): String = x.concat(y)\n}\n\n\nFloatAdditionMonoid implements the typeclass Monoid for the type Float. And since we can write an implementation of Monoid for Float or String, we can say that the types Float and String are instances of the typeclass Monoid.\n\nUsing our implementation of Monoid, we can write a single, generic reduction operator now:\n\ndef reduce[A](values: Seq[A], monoid: Monoid[A]): A =\nvalues.foldRight(monoid.empty)(monoid.combine)\n\n\nWe can use that to reduce a list of floats:\n\nreduce([1.0, 3.14, 2.718, 1.414, 1.732], FloatAdditionMonoid)\n\n\nAnd we can do a bit better than that! We can set up an implicit, so that we don\u2019t need to pass the monoid implementation around. In Scala, an implicit is a kind of dynamically scoped value. For a given type, there can be one implicit value of that type in effect at any point in the code. If a function takes an implicit parameter of that type, then the nearest definition in the execution stack will automatically be inserted if the parameter isn\u2019t passed explicitly.\n\ndef reduce[A](values: Seq[A])(implicit A: Monoid[A]): A =\nlist.foldRight(A.empty)(A.combine)\n\n\nAnd as long as there\u2019s a definition of the Monoid for a type A in scope, we can can use that now by just writing:\n\nimplicit object FloatAdditionMonoid extends Monoid[Float] {\ndef empty: Float = 0.0\ndef combine(x: Float, y: Float): Float = x + y\n}\n\nval floats: List[Float] = ...\nval result = reduce(floats)\n\n\nNow, anywhere that the FloatAdditionMonoid declaration is imported, you can call reduce on any sequence of floats, and the implicit value will automatically be inserted.\n\nUsing this idea of a monoid, we\u2019ve captured the concept of reduction in a common abstraction. Our notion of reduction doesn\u2019t care about whether we\u2019re reducing strings by concatenation, integers by addition, floats by multiplication, sets by union. Those are all valid uses of the concept of a monoid, and they\u2019re all easy to implement using the monoid typeclass. The concept of monoid isn\u2019t a difficult one, but at the same time, it\u2019s not necessarily something that most of us would have thought about as an abstraction.\n\nWe\u2019ve got a typeclass for a monoid; now, we\u2019ll try to connect it into category theory. It\u2019s a bit tricky, so we won\u2019t cover it all at once. We\u2019ll look at it a little bit now, and we\u2019ll come back to it in a later lesson, after we\u2019ve absorbed a bit more.\n\n### From Sets to Arrows\n\nFor most of us, if we\u2019ve heard of monoids, we\u2019ve heard of them in terms of set theory and abstract algebra. So in that domain, what\u2019s a monoid?\n\nA monoid is a triple $(V, 1, *)$, where:\n\n\u2022 $V$ is a set of values;\n\u2022 $1$ is a value in $V$;\n\u2022 $*$ is a total binary operator where:\n\u2022 $1$ is an identity of $*$: For any value $v \\in V: v*1 = 1*v = v$.\n\u2022 $*$ is associative: for any values $v, w, x \\in V: (v * w) * x = v * (w * x)$\n\nThat\u2019s all just a formal way of saying that a monoid is a set with a binary associative operator and an identity value. The set of integers can form a monoid with addition as the operator, and 0 as identity. Real numbers can be a monoid with multiplication and 1. Strings can be a monoid with concatenation as the operator, and empty string as identity.\n\nBut we can look at it in a different way, too, by thinking entirely in terms of function.\nLet\u2019s forget about the numbers as individual values, and instead, let\u2019s think about them in functional terms. Every number is a function which adds itself to its parameter. So \u201c2\u201d isn\u2019t a number, it\u2019s a function which adds two to anything.\n\nHow can we tell that 2 is a function which adds two to things?\n\nIf we compose it with 3 (the function that adds three to things), we get 5 (the function that adds five to things). And how do we know that? Because it\u2019s the same thing that we get if we compose 3 with 1, and then compose the result of that with 1 again. 3+1+1=5, and 3+2=5. We can also tell that it\u2019s 2, because if we just take 1, and compose it with itself, what we\u2019ll get back is the object that we call 2.\n\nIn this scheme, all of the numbers are related not by arithmetic, not by an underlying concept of quantity or cardinality or ordinality, but only by how they compose with each other. We can\u2019t see anything else \u2013 all we have are these functions. But we can recognize that they are the natural numbers that we\u2019re familiar with.\n\nLooking at it this way, we can think of the world of natural numbers as a single point, which represents the set of all natural numbers. And around that point, we\u2019ve got lots and lots of arrows, each of which goes from that point back to itself. Each of those arrows represents one number. The way we tell them apart is by understanding which arrow we get back when we compose them. Take any arrow from that point back to that point, and compose it with the arrow 0, and what do you get? The arrow you started with. Take any arrow that you want, and compose it with 2. What do you get? You get the same thing that you\u2019d get if you composed it with 1, and then composed it with one again.\n\nThat dot, with those arrows, is a category.\n\nWhat kind of advantage do we get in going from the algebraic notion of a set with a binary operation, to the categorical notion of an object with a bunch of composable arrows? It allows to understand a monoid purely as a structure, without having the think about what the objects are, or what the operator means.\n\nNow, let\u2019s jump back to our monoid typeclass for a moment.\n\ntrait Monoid[A] {\ndef empty: A\ndef combine(x: A, y: A): A\n}\n\n\nWe can understand this as being a programmable interface for the categorical object that we just described. All we need to do is read \u201c:\u201d as \u201cis an arrow in\u201d: It says that A is a monoid if:\n\n\u2022 It has an element called empty which is an arrow in A.\n\u2022 It has an operation called combine which, given any two arrows in A, composes them into a new arrow in A.\n\nThere are, of course, other conditions \u2013 combine needs to be associative, and empty needs to behave as the identity value. But just like when we write an interface for, say, a binary search tree, the interface only defines the structure not the ordering condition, the typeclass defines the functional structure of the categorical object, not the logical conditions.\n\nThis is what categories are really all about: tearing things down to a simple core, where everything is expressed in terms of arrows. It\u2019s almost reasoning in functions, except that it\u2019s even more abstract than that: the arrows don\u2019t need to be functions \u2013 they just need to be composable mappings from things to things.\n\n## Deeper Into Arrows\n\nWe can abstract a bit more, and look at the entire construction, including the identity and associativity constraints entirely in terms of arrows. To really understand this, we\u2019ll need to spend some time diving deeper into the actual theory of categories, but as a preview, we can describe a monoid with the following pair of diagrams (copied from wikipedia):\n\nIn these diagrams, any two paths between the same start and end-nodes are equivalent (up to isomorphism). When you understand how to read this diagrams, these really do define everything that we care about for monoids.\n\nFor now, we\u2019ll just run through and name the parts \u2013 and then later, in another lesson, we\u2019ll come back, and we\u2019ll look at this in more detail.\n\n\u2022 $\\mu$ is an arrow from $M\\times M \\rightarrow M$, which we\u2019ll call a multiplication operator.\n\u2022 $\\eta$ is an arrow from $I \\rightarrow M$, called unit.\n\u2022 $\\alpha$ is an arrow from $(M\\times M)\\times M \\rightarrow M \\times (M\\times M)$ which represents the associativity property of the monoid.\n\u2022 $\\lambda$ is a morphism which represents the left identity property of the monoid (that is, $1*x=x$), and $\\rho$ is a morphism representing the right identity property $(x*1=x)$.\n\nThis diagram, using these arrows, is a way of representing all of the key properties of a monoid via nothing but arrows and composition. It says, among other things, that:\n\n\u2022 $(M \\times M) \\times M$ composes with multiplication to be $M \\times M$.\nThat is, applying multiplication to $(M \\times M) \\times M$ evaluates to (M \\times M).\n\u2022 $(M \\times M) \\times M$ composed with associativity can become $M \\times (M \\times M)$.\n\nSo it\u2019s a monoid \u2013 but it\u2019s a higher level monoid. In this, $M$ isn\u2019t just an object in a category: it\u2019s an entire category. These arrows are arrows between categories in a category of categories.\n\nWhat we\u2019ll see when we get deeper into category theory is how powerful this kind of abstraction can get. We\u2019ll often see a sequence of abstractions, where we start with a simple concept (like monoid), and find a way to express it in terms of arrows between objects in a category. But then, we\u2019ll lift it up, and look at how we can see in not just as a relation between objects in a category, but as a different kind of relation between categories, by constructing the same thing using a category of categories. And then we\u2019ll abstract even further, and construct the same thing using mappings between categories of categories.\n\n(You can find the next lesson <a href=\u201dhttp:\/\/www.goodmath.org\/blog\/2019\/02\/20\/category-theory-lesson-2-basics-of-categorical-abstraction\/\u201d>here<\/a>.)\n\n# Mental Health Day: A Taste of Living with Social Anxiety\n\nIt\u2019s world mental health day. I\u2019ve been meaning to do some more writing about social anxiety, and this seems like an appropriate day for that.\n\nThis isn\u2019t easy to write about. A big part of social anxiety, to me, is that I\u2019m afraid of how people will react to me. So talking about the things that are wrong with me is hard, and not exactly a lot of fun. But I try to do it, because I think it\u2019s important. It\u2019s useful for me to confront this; it\u2019s important for other people with social anxiety to see and hear that they\u2019re not alone; and it\u2019s important to fight the general stigma against mental illness. I still struggle with my social anxiety \u2013 but I\u2019m also happily married, with a great job and a successful career: I\u2019m a walking demonstration of the fact that you can have mental illnesses like depression and social anxiety disorder, and still have a good, happy, full life.\n\nIn the past, I\u2019ve tried to explain what it\u2019s like to live with social anxiety. I\u2019m going to try to expand on that a bit, and walk you through a particularly hard example of it that I\u2019m trying to deal with right now.\n\nWhat I\u2019ve said before is that SA, for me, is a deeply seated belief that there\u2019s something wrong with me, and whenever I\u2019m socially interacting with people, I\u2019m afraid that they\u2019re going to realize what a freak I am.\n\nThat\u2019s kind-of true, and it\u2019s also kind-of not. This is difficult to put into words, because the actually feeling is almost a physical reaction, not a thought, so it\u2019s not really linguistic. Yes, I am constantly on edge when I\u2019m interacting socially. I am constantly afraid in social situations. The hard part to explain is that I don\u2019t even know what I\u2019m afraid of. There\u2019s no specific bad outcome that I\u2019m imagining. I can often relate the fear back to things that I\u2019ve experienced in the past \u2013 but I don\u2019t experience the fear and anxiety now as being fear\/anxiety that those specific things, or things like them, will re-occur. I\u2019m just afraid.\n\nHere\u2019s where I\u2019ve got a good example.\n\nI recently injured my back. I\u2019ve got a herniated disk, which has been causing me a lot of pain. (In fact, this has caused me more pain that I knew it was possible to experience.) I would go to great lengths to make sure that I never wake up feeling that kind of pain again.\n\nI\u2019m seeing a doctor and getting physical therapy, and it\u2019s getting much better. But my doctor strongly recommends that I take up swimming as a regular exercise \u2013 to prevent this from re-occurring, I need to strengthen a particular group of core muscles, and swimming is the best low-impact exercise for strengthening those muscles.\n\nSo even though I\u2019ve sworn, in the past, that I would never join a gym, I went ahead and joined a gym. My employer has a deal with a local chain of gyms that have pools, and I signed up for the gym three weeks ago.\n\nI still haven\u2019t gone to the gym. Honestly, the thought of going to a gym makes me feel physically ill. It\u2019s terrifying.\n\nI\u2019ve got good reasons for hating gyms. I\u2019ve mentioned before on this blog how badly I was abused in school. The center of that torment was the gym. I\u2019ve been beaten up in gyms. I\u2019ve had stuff stolen. I\u2019ve had things stuck in my face. I\u2019ve had bones broken. I was repeatedly, painfully humiliated in a gym about my body, my clothes, my family, my religion, my home, my hobbies, my size (I was very short for most of high school). I\u2019m straight and cis, but I have many memories of that damned gym, being confronted and tormented by people who were trying to force me to \u201cadmit\u201d that I was gay, so that they could beat the gay out of me. (Or at least that\u2019s what they said; what they really wanted was just an excuse to beat me up more.) Someone literally burned a swastika on the street in front of my house so that they could brag about it where? In that god-damned gym.\n\nI could go on for pages: the catalog of abuse I suffered in gyms is insane. But it\u2019s enough to say that in my experience, gyms are bad places, and I\u2019ve got an incredibly strong aversion to them.\n\nIntellectually, I know that the gym I joined isn\u2019t like that. It\u2019s not a high school gym. It\u2019s a gym in the Flatiron district of Manhattan. I know that at the times I\u2019ll be going, the gym is likely to be nearly empty. I know that the majority of the people who go there are, like me, adult professionals. I know that if anyone tried anything like the abusive stuff that was done to me in school, the gym would throw them out. I know that if anyone tried any of those things, I could have them arrested for assault. I know that nothing like that abuse would ever happen. I\u2019m honestly not really afraid that it will.\n\nAnd yet \u2013 it\u2019s been a month, and I still haven\u2019t been to the gym. I\u2019m scared of going to the gym. I can\u2019t tell you what I\u2019m scared of. I can just tell you that I am scared.\n\nThis is part of what makes social anxiety so hard to fight and overcome. If I understood what I was afraid of, I could reason about it. If I was afraid of something happening, I could come up with reasons why it wouldn\u2019t happen now, or I could make plans to deal with it if it did. But that\u2019s not how anxiety works. I\u2019m not afraid or anxious of those old experiences re-occuring. I\u2019m afraid and anxious because those things did happen in the past, and they left scars. I\u2019m not afraid of something; I\u2019m just afraid.","date":"2021-04-15 15:23:28","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 1, \"img_math\": 33, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.5230476260185242, \"perplexity\": 695.3566003550442}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.3, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2021-17\/segments\/1618038085599.55\/warc\/CC-MAIN-20210415125840-20210415155840-00551.warc.gz\"}"}
null
null
\section{Introduction} Many studies focus on the cost of astronomical facilities while very little work is done trying to evaluate the returns of telescopes and satellites used in astronomy (Saleh et al. 2007). We analyze the most cited papers published in 2006 and cited during the last two years to derive a ranking of the telescopes with the highest impact in astronomy during that year. Objective measurements of productivity and impact are necessary in order to take informed decisions about science policies, scientific directions, funding and lifetime extension of a given telescope. This particular ranking has been widely used in the past to support the work of various committees and these results were incorporated in their reports, a fresh study on a newer dataset of high-impact papers is due. \section{Methodology} We draw the ranking of the most influencial astronomical facilities based on their contribution of data to the most cited papers on a given year. The technique described below was implemented during the development of a series of tools to estimate the overall impact of the Hubble Space Telescope in astronomy (Meylan et al. 2004). This particular technique of telescope evaluation was created based on the method set forth by Benn \& Sanchez (2001). A detailed account of the method used to derive the ranking of the observatories with the highest impact, and results of this exercise in previous years, was given in Madrid \& Macchetto (2006). In the following paragraphs we will give a brief summary of the approach that we use to generate the aforementionned ranking. The 200 most cited papers published in a given year constitute a sample large enough to provide a snapshot of the most influencial papers published in astronomy for that particular year. In fact the 200 most cited papers in 2006 constitute only 0.2\% of all the references indexed by the ADS but they account for 9.5\% of the citations. Moreover, as shown in Madrid \& Macchetto (2006), the 200 most cited papers stand out from the rest of publications in the distribution of citations per paper on a given year. We obtained the 200 most cited papers published in 2006 through the SAO/NASA Astrophysics Data System (ADS). The ADS is the most widely used bibliographic database in astronomy. We went through the onerous process of downloading each of these 200 most cited papers. Each paper was then analyzed and we determine whether the paper was observational or theoretical. Theoretical papers usually present models and do not contain any data taken with a telescope. On the other hand, an observational paper is a paper that presents data obtained with a telescope or several telescopes. For those observational papers we determine which facility, or more often, which facilities the authors used to gather their data. The number of citations of each paper is credited to the telescope used to take the data. The telescope that accumulates the largest number of citations will thus end up on the top of our ranking. When several telescopes provide data for a publication a percentage of participation, or weight, is established and a fractional number of citations is credited to each contributing facility proportional to their participation. Examples of these basic arithmetics are given in Madrid \& Macchetto (2006). \begin{center} \begin{tabular}{llcc} \multicolumn{4}{c}{\sc Table 1}\\ \noalign{\smallskip} \multicolumn{4}{c}{\sc High-Impact Observatories}\\ \\ \hline \noalign{\smallskip} \hline \noalign{\smallskip} {\bf Rank} & {\bf Facility} & {\bf Citations} & {\bf Participation}\\ \noalign{\smallskip} \tableline \noalign{\smallskip} 1 & SDSS & 1892 & 14.3\% \\ 2 & Swift & 1523 & 11.5\% \\ 3 & HST & 1078 & 8.2\% \\ 4 & ESO & 813 & 6.1\% \\ 5 & Keck & 572 & 4.3\% \\ 6 & CFHT & 521 & 3.9\% \\ 7 & Spitzer & 469 & 3.5\% \\ 8 & Chandra & 381 & 2.9\% \\ 9 & Boomerang& 376 & 2.8\% \\ 10& HESS & 297 & 2.2\% \\ \noalign{\smallskip} \hline \end{tabular} \bigskip \end{center} \section{Results} The results of this study are summarized in Table 1 which presents the top-ten high impact astronomical observatories. The Sloan Digital Sky Survey is once again the telescope with the highest impact in astronomy, see Madrid \& Macchetto (2006, and references therein) for previous rankings. The SDSS published its fourth data released in 2006. Swift, a telescope dedicated to the science of GRB, ranks second, the findings made by this telescope has clearly transcended the field of GRBs and has had a broad impact in astronomy. The Hubble Space Telescope ranks third. Several papers from the Advanced Camera for Surveys Virgo Cluster Survey, as well as the publication in 2006 of the Hubble Ultra Deep Field, contributed to rank HST as the third telescope with the highest impact. Ground based optical and infrared astronomy has an important share of participation in the high impact papers with ESO, Keck, and the CFHT. Spitzer and Chandra rank 7th and 8th, it is worth noting that all active NASA Great Observatories belong to the top ten high impact astronomical telescopes. The High Energy Stereoscopic System (HESS) ranks 10th. This system of imaging atmospheric Cerenkov telescopes is located in Namibia and aims to image very high energy phenomena. The facilities that rank 11th to 15th and thus do not appear on Table1 are WMAP, 2MASS, Gemini, Subaru, and NOAO (CTIO+KPNO). \acknowledgments We have made extensive use of the NASA Astrophysics Data System Bibliographic services.
{ "redpajama_set_name": "RedPajamaArXiv" }
2,184
Villate puede hacer referencia a: Villate (Cuba), localidad de la provincia de Artemisa, Cuba. Villate (Occitania), localidad y comuna del cantón de Portet-sur-Garonne, distrito de Muret, departamento de Alto Garona, región de Occitania, Francia. Villate (Países del Loira), localidad de la comuna de Issé, cantón de Châteaubriant, distrito de Châteaubriant-Ancenis, departamento de Loira Atlántico, región de Países del Loira, Francia. Villate (Haití), localidad de la comuna de San Rafael, distrito de San Rafael de la Angostura, departamento de Norte, Haití. Villate (España), localidad del municipio de Medina de Pomar, provincia de Burgos, España. Villate (Italia), localidad de la comuna de Mercenasco, provincia de Turín, región de Piamonte, Italia.
{ "redpajama_set_name": "RedPajamaWikipedia" }
1,623
HEIDELBERG, 30 December 2014 - Researchers in the United States have identified a molecular network that comprises many of the genes previously shown to contribute to autism spectrum disorders. The findings provide a map of some of the crucial protein interactions that contribute to autism and will help uncover novel candidate genes for the disease. The results are published in Molecular Systems Biology.
{ "redpajama_set_name": "RedPajamaC4" }
7,902
Q: Change page content throught javascript in gmail I want to attach one label below Inbox in gmail with some name, and on click it should show some content in content area, problem is gmail do not have id of left pane how can i do this using javascript? please seen attached picture A: You can go down through structure like: $('div[tabindex=0]:first > div:nth-child(2) > div > div:nth-child(2) > div:first > div:first > div:first > div:nth-child(2) > div > div > div:nth-child(2)') Or you can use :contains selector like (I have Polish version): $('h2:contains(Etykiety)').parent() By the way - isn't messing with gmail with use of some scripting injected into site against their user agreement rules?
{ "redpajama_set_name": "RedPajamaStackExchange" }
7,250
Q: A recursive function "game" in Haskell I don't quite understand the following code: game :: ([Move], Towers) -> Towers game ([], towers) = towers game situation = game (move situation) situation here has never mentioned in any part of the codes (there are a long code before this, called the tower of Hanoi, I suppose a lot of people here know it). Why can we directly use situation here? I know this is correct and the code works very well, but I don't know why. A: situation is an argument to the function game. It would have the type ([Move], Towers). Essentially, what you're saying is "if situation has no moves then return the towers, otherwise perform a move and then pass that result to game". It would be perfectly legal to write this function as game ([], towers) = towers game (moves, towers) = game (move (moves, towers)) But this requires taking apart a tuple then constructing a new one exactly like it, or you could use any other name for this value: game ([], towers) = towers game foobar = game (move foobar) It's nothing more than a name for the argument to the function game, what it's actually called isn't important (so long as it's not a reserved keyword, of course, you couldn't name it import, for example).
{ "redpajama_set_name": "RedPajamaStackExchange" }
8,942
package com.amazonaws.services.cloudtrail.model; import java.io.Serializable; import javax.annotation.Generated; /** * <p> * Returns the objects or data listed below if successful. Otherwise, returns an error. * </p> * * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys" target="_top">AWS API * Documentation</a> */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ListPublicKeysResult extends com.amazonaws.AmazonWebServiceResult<com.amazonaws.ResponseMetadata> implements Serializable, Cloneable { /** * <p> * Contains an array of PublicKey objects. * </p> * <note> * <p> * The returned public keys may have validity time ranges that overlap. * </p> * </note> */ private com.amazonaws.internal.SdkInternalList<PublicKey> publicKeyList; /** * <p> * Reserved for future use. * </p> */ private String nextToken; /** * <p> * Contains an array of PublicKey objects. * </p> * <note> * <p> * The returned public keys may have validity time ranges that overlap. * </p> * </note> * * @return Contains an array of PublicKey objects.</p> <note> * <p> * The returned public keys may have validity time ranges that overlap. * </p> */ public java.util.List<PublicKey> getPublicKeyList() { if (publicKeyList == null) { publicKeyList = new com.amazonaws.internal.SdkInternalList<PublicKey>(); } return publicKeyList; } /** * <p> * Contains an array of PublicKey objects. * </p> * <note> * <p> * The returned public keys may have validity time ranges that overlap. * </p> * </note> * * @param publicKeyList * Contains an array of PublicKey objects.</p> <note> * <p> * The returned public keys may have validity time ranges that overlap. * </p> */ public void setPublicKeyList(java.util.Collection<PublicKey> publicKeyList) { if (publicKeyList == null) { this.publicKeyList = null; return; } this.publicKeyList = new com.amazonaws.internal.SdkInternalList<PublicKey>(publicKeyList); } /** * <p> * Contains an array of PublicKey objects. * </p> * <note> * <p> * The returned public keys may have validity time ranges that overlap. * </p> * </note> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setPublicKeyList(java.util.Collection)} or {@link #withPublicKeyList(java.util.Collection)} if you want * to override the existing values. * </p> * * @param publicKeyList * Contains an array of PublicKey objects.</p> <note> * <p> * The returned public keys may have validity time ranges that overlap. * </p> * @return Returns a reference to this object so that method calls can be chained together. */ public ListPublicKeysResult withPublicKeyList(PublicKey... publicKeyList) { if (this.publicKeyList == null) { setPublicKeyList(new com.amazonaws.internal.SdkInternalList<PublicKey>(publicKeyList.length)); } for (PublicKey ele : publicKeyList) { this.publicKeyList.add(ele); } return this; } /** * <p> * Contains an array of PublicKey objects. * </p> * <note> * <p> * The returned public keys may have validity time ranges that overlap. * </p> * </note> * * @param publicKeyList * Contains an array of PublicKey objects.</p> <note> * <p> * The returned public keys may have validity time ranges that overlap. * </p> * @return Returns a reference to this object so that method calls can be chained together. */ public ListPublicKeysResult withPublicKeyList(java.util.Collection<PublicKey> publicKeyList) { setPublicKeyList(publicKeyList); return this; } /** * <p> * Reserved for future use. * </p> * * @param nextToken * Reserved for future use. */ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** * <p> * Reserved for future use. * </p> * * @return Reserved for future use. */ public String getNextToken() { return this.nextToken; } /** * <p> * Reserved for future use. * </p> * * @param nextToken * Reserved for future use. * @return Returns a reference to this object so that method calls can be chained together. */ public ListPublicKeysResult withNextToken(String nextToken) { setNextToken(nextToken); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getPublicKeyList() != null) sb.append("PublicKeyList: ").append(getPublicKeyList()).append(","); if (getNextToken() != null) sb.append("NextToken: ").append(getNextToken()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ListPublicKeysResult == false) return false; ListPublicKeysResult other = (ListPublicKeysResult) obj; if (other.getPublicKeyList() == null ^ this.getPublicKeyList() == null) return false; if (other.getPublicKeyList() != null && other.getPublicKeyList().equals(this.getPublicKeyList()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPublicKeyList() == null) ? 0 : getPublicKeyList().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); return hashCode; } @Override public ListPublicKeysResult clone() { try { return (ListPublicKeysResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }
{ "redpajama_set_name": "RedPajamaGithub" }
6,623
\section{Introduction} \label{sec_intro} Deuteron-induced reactions, in particular (d,p) one-neutron transfer reactions, have been used for decades to investigate the structure of nuclei. These reactions, carried out in inverse kinematics, are expected to play a central role in the study of weakly-bound systems at modern radioactive beam facilities~\cite{Jones:10}. While the theoretical framework and its computational implementation for describing (d,p) reactions have seen much progress over the decades, open questions remain and need to be addressed. Resonances, for example, occur in all nuclei, and are of special interest in the low-energy spectra of weakly-bound nuclei. Their properties, in particular their energies and widths, are of great interest to nuclear astrophysics, as many reaction that occur in astrophysical environments proceed through resonances. Furthermore, resonances provide both challenges and stringent tests for nuclear structure models, as predicting their properties involves a proper treatment of the nuclear many-body system including the continuum~\cite{Volya:06a}. Current theoretical descriptions of transfer reactions that populate resonance states suffer from two major shortcomings. On the practical side, one has to deal with numerical convergence issues, as the matrix element that describes the transition to the final state includes contributions from very large distances outside the nucleus. Conceptually, it is also not clear what spectroscopic information can be extracted from a transfer to a resonance. A clear connection between experimental transfer observables and typical resonance parameters remains to be established. Recently, a new formalism that utilizes concepts known from the successful and popular R-matrix theory was proposed for the description of deuteron-induced reactions~\cite{Mukhamedzhanov:11a}. R-matrix theory is a standard tool for extracting resonance properties such as energies and widths from nucleon capture and scattering experiments~\cite{Lane:58,Descouvemont:10}, and the new approach establishes a similar link between resonance properties and transfer reactions. The formalism covers transfers to bound and resonance states, and is general enough to include deuteron breakup. A central tenet of the formalism proposed in Ref.~\cite{Mukhamedzhanov:11a} is the recasting of the reaction amplitude, a volume integral, in terms of a surface integral plus (presumably small) remnant terms that contain contributions from the interior and exterior of the final nucleus. Interior and exterior are defined with respect to the distance between the transferred nucleon and the target nucleus. The surface-integral formalism, as we will refer to it here, holds the potential to overcome present difficulties in describing transfers to resonance states and to become a practical method for extracting structure information from transfer experiments, since: 1) it reduces the dependence of the cross section calculations on the model used for the nuclear interior; 2) it avoids the convergence problems that affect traditional calculations of transfers to resonances; and 3) it establishes a useful link between resonance properties and transfer observables, since the cross section obtained from the surface integral can be parameterized in terms of quantities that are familiar from traditional R-matrix approaches. It is the purpose of this paper to test the formalism proposed in Ref.~\cite{Mukhamedzhanov:11a}. In particular, we study the role of interior and exterior contributions to the cross sections, for both post and prior formulations of the transfer amplitudes. This allows us to draw some conclusions about the sensitivity of the post and prior expressions to model assumptions made about the nuclear interior. We then investigate the relative contributions from the surface term and the residual interior and exterior terms to the transfer cross section and the dependence of these contributions on the chosen radius $a$ at which the surface integral is evaluated. This is done in order to assess to which extent the surface term captures the essentials of the reaction and reproduces the full cross section. The calculations are carried out in the framework of the DWBA formalism. The implications for generalizing the study to the Continuum-Discretized Coupled-Channels (CDCC) formalism~\cite{Austern:87}, which incorporates effects of deuteron breakup in the reaction, are briefly considered. In the next section, Section~\ref{sec_formalism}, we summarize the formalism developed in Ref.~\cite{Mukhamedzhanov:11a}, in particular the introduction of `exterior' and `interior' contributions to the transfer matrix element and the emergence of a surface term. In Section~\ref{sec_study}, we investigate the contributions of the interior, surface, and exterior terms to the transfer cross sections. Our findings are summarized in Section~\ref{sec_summary}. \section{Review of the Formalism} \label{sec_formalism} In the R-matrix approach for a binary reaction~\cite{Lane:58,Descouvemont:10}, the configuration space is separated into two regions: an exterior region, in which the reaction partners are well-separated and interact only via the Coulomb interaction (for charged particles), and an interior region, where a confined compound system exists that is governed by nuclear and Coulomb forces. Formally, the nuclear wave function in the interior is expanded in some suitable set of basis functions, while in the exterior, it takes the form of a scattering wave function, and matching conditions are imposed at the surface. In typical applications, the parameters (resonance energies and width parameters) are adjusted to reproduce measured cross sections. This approach makes it possible to parameterize the collision matrix, and thus the calculated cross section, in terms of a few formal R-matrix parameters, which can then be related to observed quantities. R-matrix theory~\cite{Lane:58} is typically employed in the description of binary reactions, such as elastic or inelastic scattering, or capture reactions, but the underlying ideas can be applied more generally. For reactions of the type $A$(d,p)$F$, where $A$ denotes the target and $F$ the residual nucleus, Mukhamedzhanov~\cite{Mukhamedzhanov:11a} introduced an analogous separation of the model space into interior and exterior regions. The separation into the different regions is based on the distance $r_{nA}$ of the deposited neutron from the center of the target nucleus. The standard distorted-wave Born Approximation (DWBA) transition matrix element can be written in post or prior form~\cite{Satchler:Book}: \begin{eqnarray} M^{(post)} &=& \left< \varphi_F \chi_{pF}^{(-)} | \Delta V_{pF} | \varphi_d \varphi_A \chi_{dA}^{(+)} \right> \nonumber \\ &=& \left< I_A^F \chi_{pF}^{(-)} | \Delta V_{pF} | \varphi_d \chi_{dA}^{(+)} \right> \label{eq:MPost} \\ M^{(prior)} &=& \left< \varphi_F \chi_{pF}^{(-)} | \Delta V_{dA} | \varphi_d \varphi_A \chi_{dA}^{(+)} \right> \nonumber \\ &=& \left< I_A^F \chi_{pF}^{(-)} | \Delta V_{dA} | \varphi_d \chi_{dA}^{(+)} \right> \label{eq:MPrior} \end{eqnarray} where $\varphi_A$ and $\varphi_F$ denote the wave functions of the initial ($A$) and final ($F = A+n$) nuclei, respectively, and $I_A^F (r_{nA})$ $=\left< \varphi_A | \varphi_F \right>$ is the associated overlap function, which depends on the coordinate of interest, $r_{nA}$. In applications, this is typically approximated by a single-particle wave function obtained from a potential-model calculation~\cite{Escher:01PRC, Escher:02PRC}. The distorted waves in the entrance and exit channels are given by $\chi_{dA}$ and $\chi_{pF}$, respectively, and $\varphi_d$ is the deuteron wave function. Post and prior forms require different transition operators \begin{eqnarray} \Delta V_{pF} &=& V_{pn} + V_{pA} - U_{pF}, \; \mbox{(post)} \label{eq_transOp_post} \\ \Delta V_{dA} &=& V_{nA} + V_{pA} - U_{dA}, \; \mbox{(prior)} \label{eq_transOp_prior} \end{eqnarray} respectively. In the post form, $\Delta V_{pF}$ contains the interaction between the proton and the target nucleus ($V_{pA}$), the proton-neutron interaction ($V_{pn}$), and the optical potential for the exit channel ($U_{pF}$), while in the prior form, $\Delta V_{dA}$ contains the interaction between the neutron and the target ($V_{nA}$), the proton and the target ($V_{pA}$), and the optical potential in the entrance channel ($U_{dA}$). The interactions include both nuclear and Coulomb terms. In the first-order distorted-wave approach, post and prior formulations give identical matrix elements, provided the interactions and wave functions are chosen consistently~\cite{Satchler:Book}. This implies, e.g., that the deuteron wave function $\varphi_d$ has to be an eigenfunction of the potential $V_{pn}$ (prior form), and that the overlap function $I_A^F$ has to be an eigenfunction of $V_{nA}$ (post form). Similarly, $U_{dA}$ and $U_{pF}$ have to be consistent with the distorted waves $\chi_{dA}$ and $\chi_{pF}$, respectively. While post and prior forms are equivalent, historically there has been a preference for using the post formalism for describing (d,p) reactions. One advantage of using the transition operator in Eq.~\ref{eq_transOp_post} over using the one in Eq.~\ref{eq_transOp_prior} is that it lends itself to the approximation $V_{pA} - U_{pF} \approx 0$ and $V_{pn}$ is short-ranged, which makes it possible to treat the interaction between proton and neutron inside the deuteron in a zero-range approximation~\cite{Satchler:Book}. In addition, the Johnson-Soper model~\cite{Johnson:70}, an early description of deuteron stripping and elastic scattering that includes the effects of deuteron breakup, is formulated in the post form and makes use of the zero-range approximation. Similarly, the Johnson-Tandy~\cite{Johnson:74} extension of the model to finite range uses the post form. One disadvantage of the post form, however, is that for stripping reactions that populate resonance final states, convergence becomes difficult. Unlike in the prior case, where contributions from the long tails of resonance wave functions are suppressed by the short-range nature of the interactions in Eq.~\ref{eq_transOp_prior}, post calculations typically have contributions from the resonance wave function at very large distances $r_{nA}$, due to the $V_{pn}$ term. In both the post and prior formulations, the transition matrix element can be separated into two parts, \begin{eqnarray} M^{(DWBA)} = M_{int}(0,a) + M_{ext}(a,\infty), \label{eq_intext} \end{eqnarray} where $a$ refers to the specific value chosen for the coordinate $r_{nA}$, for which to carry out the separation. The interior term involves an integration from $r_{nA}=0$ to $r_{nA}=a$, while the exterior term involves an integration from $r_{nA}=a$ to very large radii, $r_{nA} \rightarrow \infty$. In Section~\ref{sec_study}, we will illustrate that for typical (d,p) transfer reactions and separation radii roughly equal to the size of the target nucleus, the main contributions to the post form matrix element come from the exterior region, while the prior form matrix element is dominated by interior contributions from further inside the nucleus. This is significant, as in Ref.~\cite{Mukhamedzhanov:11a}, it was further demonstrated that Green's Theorem can be employed to convert the post-form exterior matrix element into a surface integral plus a prior-form exterior matrix element: \begin{eqnarray} \label{eq_extPoToSurfPlusPri} M^{(post)}_{ext}(a,\infty) &=& M_{surf}(a) + M^{(prior)}_{ext}(a,\infty). \end{eqnarray} Using this in the post version of Eq.~\ref{eq_intext}, the full DWBA matrix element becomes: \begin{eqnarray} \label{eq_intsurext} \label{eq_MSurf} \lefteqn{M^{(DWBA)} =} \\ && M^{(post)}_{int}(0,a) + M_{surf}(a) + M^{(prior)}_{ext}(a,\infty). \nonumber \end{eqnarray} The same result is obtained if one starts with a consideration of the prior form and expresses the interior part in terms of a surface integral and remaining contributions from the interior, \begin{eqnarray} M_{int}^{(prior)}(0,a) &=& M_{surf} (a) + M_{int}^{(post)}(0,a) . \label{eq_intPoToSurfPlusPri} \end{eqnarray} The interior post term in Eq.~\ref{eq_MSurf} involves an integration over the overlap function $I_A^F (r_{nA})$ for small $r_{nA}$, {\it i.e.\ } it depends on a model for the nuclear interior. The exterior prior and surface terms, on the other hand, are related to the asymptotic properties of the overlap function, as long as $a$ is outside the boundary of the neutron binding potential. For transfer reactions that populate resonance reactions, this surface formulation is particularly attractive. In Ref.~\cite{Mukhamedzhanov:11a}, it was shown that the surface term $M_{surf}(a)$, which is evaluated at a specific radius $a$, can be parameterized by quantities that are familiar from traditional R-matrix approaches, namely a channel radius (here the separation radius $a$), logarithmic boundary conditions (here logarithmic derivatives of known Hankel functions), and reduced-width amplitudes (here related to the asymptotic normalization of the overlap function). Thus, a useful link between resonance properties and transfer observables could be established. A dominant surface matrix element would reduce the dependence of the cross section calculations on the model used for the interior portion of the overlap function. In the next section we investigate the relative contributions of interior, surface, and exterior terms, for various target nuclei and at various reaction energies. We will focus on the DWBA implementation. \section{Interior, surface, and exterior contributions to the transfer cross section} \label{sec_study} Transfer cross sections calculated in the DWBA framework are proportional to the square of the full matrix element $M^{(DWBA)}$ given in Eqs.~\ref{eq_intext} and \ref{eq_intsurext}. To better assess the relevance of the various contributions for realistic situations, we begin with a full cross section calculation, with model parameters selected to reasonably reproduce measured (d,p) cross sections. We then repeat each cross section calculation with all contributions other than the term of interest set to zero and compare the resulting cross section to the full calculation. This comparison is made in one of two ways: 1) We compare the peak cross section obtained in the restricted calculation to that obtained in the full calculation. This is done when we are interested in the dependence of the contribution on the separation radius $a$. In that case we plot the ratio \begin{eqnarray} R_{X(a)} &=& \frac{\hat{\sigma}^{(DWBA)}_{X(a)}}{\hat{\sigma}^{(DWBA)}_{exact}} \; , \label{eq_ratio} \end{eqnarray} where $\hat{\sigma}^{(DWBA)}_{exact}$ denotes the peak value of the full cross section, and $\hat{\sigma}^{(DWBA)}_{X(a)}$ is the peak value of the cross section obtained by including only the term $X(a)$, for $X(a) = $ $M_{int}(0,a)$, $M_{surf}(a)$, or $M_{ext}(a,\infty)$. We consider the first (smallest-angle) peak, as this peak plays a prominent role in comparisons of calculations with experimental data. 2) For specific cases of interest, we also compare the angular behavior of the cross section $\sigma^{(DWBA)}_{X(a)}$ to $\sigma^{(DWBA)}_{exact}$. Focusing in particular on $\sigma_{M_{surf}(a)}^{(DWBA)}$ allows us to assess to which extent the surface term is able to describe the reaction considered. In our study, we included target nuclei from different mass regions and considered different beam energies. Here, we present representative calculations for the target nuclei $^{20}$O, $^{48}$Ca, and $^{90}$Zr. Additional cases ($^{12}$C, $^{40}$Ca, $^{208}$Pb) give similar results. For the $^{90}$Zr case, we considered transfer reactions with $E_d$ = 11 MeV~\cite{Michelman:69}. We calculated cross sections for transfers to the $5/2^+$ ground state, the $1/2^+$ first excited state, and to a narrow $f_{7/2}$ resonance state that lies about 1 MeV above the neutron separation threshold of 7.195 MeV. For $^{48}$Ca, we studied three different beam energies, $E_d$ = 13, 19.3, and 56 MeV~\cite{Metz:75,Uozumi:94}, and considered reactions involving both the $3/2^-$ ground and first excited $1/2^-$ state in $^{49}$Ca. The $^{20}$O(d,p) reaction was recently studied in inverse kinematics, at equivalent deuteron energy $E_d$ = 21 MeV. Measurements were carried out for transfers to two bound states ($5/2^+$ ground state and $1/2^+$ first excited state) and two resonance states (a $3/2^+$ resonance at $E_{ex}$ = 4.77 MeV and a resonance at $E_{ex}$ = 6.17 MeV, which has either $3/2^+$ or $7/2^-$ character.) We carried out calculations for the two bound states and the two resonances, considering both spin-parity assignments for the second resonance. Finite-range DWBA calculations were carried out with a modified version of the reaction code {\sc Fresco}~\cite{Thompson:88} that allowed setting specific contributions to the transition matrix element to zero. The Reid Soft-Core potential~\cite{Reid:68} was used to describe the deuteron. We used the deuteron-nucleus optical-model potential by Daehnick~\cite{Daehnick:80} and employed the Koning-Delaroche potential~\cite{Koning:03} for the proton-nucleus interaction. The manner in which we calculated the surface term, as a difference between prior-interior and post-interior contributions (Eq.~\ref{eq_intPoToSurfPlusPri}), requires good post-prior agreement. We therefore matched the approximation used by the {\sc Fresco} code, specifically the omission of the spin-orbit term in $U_{dA}$ and $U_{pF}$ in the transition operators (Eqs.~\ref{eq_transOp_post} and \ref{eq_transOp_prior}), by eliminating this term also from the optical-model potential in the entrance and exit channels. In order to still carry out comparisons to experimental results, small adjustments to the potential parameters were made to reproduce the elastic scattering cross section, where available, and to improve the fit of the full calculations with measured (d,p) cross sections. We verified that the overall conclusions of our study are not affected by these changes in potential parameters. For final bound states, the overlap function was approximated by a single-particle function in a Woods-Saxon well, with a depth adjusted to reproduce the proper binding energy. For resonance states, we adopted a bin description for the overlap function. Bin functions are momentum-averaged continuum wave functions $\Phi(r) =$ $\sqrt{\frac{2}{\pi N}}$ $\int_{k_1}^{k_2} w(k) \phi_k(r) dk$ (with $N$ = $\int_{k_1}^{k_2} |w(k)|^2 dk$) that are square integrable, orthogonal to bound states and to each other (provided the momentum ranges do not overlap)~\cite{Thompson:88}. Here $\phi_k(r)$ is a positive-energy scattering state of the potential. If the radius of integration over $r$ is taken to be sufficiently large, the bin functions are normalized and the transfer calculations converge. For the narrow resonances considered here, we used a weight function of the form $w(k) =$ exp($-i\delta_k$)sin($\delta_k$), where $\delta_k$ is the scattering phase shift for $\phi_k(r)$. We first consider the separation of the full matrix element into an interior and an exterior contribution, as given in Eq.~\ref{eq_intext}. Subsequently, we study the separation into three terms, given in Eq.~\ref{eq_intsurext} and discuss the role of the surface term relative to the other contributions. \subsection{Interior and exterior contributions: Post vs. prior formalism} \label{subsec_results_intExt} Transfer experiments are often carried out under conditions that presumably make the reaction peripheral, {\it i.e.\ } they probe the overlap function in the region of the nuclear surface. The primary contributions to the transfer matrix elements should therefore come from $r_{nA}$ values that are roughly equal to the size of the target nucleus. Our calculations, however, will illustrate that the importance of a particular nuclear region depends on the form (post or prior) chosen. The potential well used for calculating the one-neutron overlap functions of various states in $^{91}$Zr with the ground state of $^{90}$Zr had a radius of 5.53 fm and a diffuseness of 0.66 fm; the rms radius of the overlap associated with the $5/2^+$ $^{91}$Zr ground state was 4.94 fm. Figure~\ref{fig_intContribs} shows the contributions to the transfer cross section arising from the interior and exterior terms in Eq.~\ref{eq_intext}. Results for the post and prior forms are given in the top and bottom panels, respectively. The ratio $R_{X(a)}$ of the calculated peak cross section to the peak cross section obtained in the full calculation, is given as a function of the separation radius $a$. As expected, for small separation radii, the exterior terms contain all cross section contributions ($R_{M_{ext}(a)}$ $\rightarrow 1$ for $a \rightarrow 0$) and for very large radii, the interior terms carry the bulk of the cross section ($R_{M_{int}(a)}$ $\rightarrow 1$ for $a \rightarrow \infty$). In both post and prior cases, contributions to the transition matrix element are very small for radii below 2 fm as well as for radii above 15 fm, as indicated by curves that are largely flat in those regions. The interesting region, however, is where the cross-over from interior-dominated to exterior-dominated occurs. We observe that this cross-over lies at much smaller radii when the prior formulation is used than in the post formulation. In the post formulation, integration over $r_{nA}$ from 0 out to 7-8 fm yields less than 30\% of the peak cross section, while in the prior formulation such integration captures over 80\% (see post and prior {\em interior} contributions). Similarly, when considering exterior contributions in the post form, it suffices to integrate from 4-5 fm on out, while in the prior form contributions from about 2 fm out have to be included. At the same time, the region beyond $r_{nA} \approx $ 7-8 fm contributes little in the prior form. This illustrates that, although the full post and prior DWBA amplitudes are equal, their behavior is quite different in the subspace over the variable $r_{nA}$. The prior formulation is clearly more sensitive to the nuclear interior (and thus to model assumptions about the interior structure), while contributions from more peripheral parts of the n + target system dominate the post form. (The radial shape of the overlap function can be seen in the upper portion of Figure~\ref{fig_Zr_bsPostPriorSurface_3States}b.) The reason for this behavior can be found in the difference in the structure of the transition operators, Eqs.~\ref{eq_transOp_post} and \ref{eq_transOp_prior}. For sufficiently large $r_{nA}$, the three terms in $\Delta V_{dA}$ will cease to contribute to the prior transition matrix element, while $V_{pn}$ in $\Delta V_{pF}$ can still produce non-negligible contributions to the post form ($V_{pA}$ and $U_{pF}$ approximately cancel each other). It is the presence of $V_{pn}$ in the post-form matrix element that makes convergence of the radial integrals difficult when the overlap function $I_A^F$ describes a resonance~\cite{Huby:65,Vincent:70}. Calculations for (d,p) reactions on other nuclei (C, O, Ca, Pb) show similar trends for bound states. For resonance states we find reduced contributions from the nuclear interior, but additional complications arise, as will be discussed in Section~\ref{subsec_results_surf}. \begin{figure}[h] \includegraphics[width=0.7\columnwidth,angle=270,trim=80 20 40 75,clip=true]{escher_fig1a} \includegraphics[width=0.7\columnwidth,angle=270,trim=80 20 40 75,clip=true]{escher_fig1b} \caption{\label{fig_intContribs} (Color online) Examination of the role of interior and exterior contributions for $^{90}$Zr(d,p)$^{91}$Zr stripping to the ground state. Shown is $R_{X(a)}$, the ratio of the peak cross section obtained when only one term (either $M_{int}$ or $M_{ext}$) is included in the transition matrix element in Eq.~\ref{eq_intext} to the peak cross sections obtained in the full calculation. The quantity is given as a function of the separation radius $a$, for both the post (a) and prior (b) formalisms. } \end{figure} \subsection{Role of the surface term} \label{subsec_results_surf} In order to assess whether it is possible to approximate the (d,p) transfer cross section by a calculation based solely on the surface term, it is necessary to investigate the contributions of the three terms in Eq.~\ref{eq_intsurext} to the full cross section. To calculate the terms $M^{(post)}_{int}(0,a)$ and $M^{(prior)}_{ext}(a,\infty)$, respectively, we set the overlap function to zero for $r_{nA}$ $> a$ in the first case and for $r_{nA}$ $< a$ in the second case. The surface term is calculated in first-order DWBA as $M_{surf} (a)$ = $M_{int}^{(prior)}(0,a)$ - $M_{int}^{(post)}(0,a)$. We discuss our findings next. \subsubsection{$^{90}$Zr(d,p)$^{91}$Zr: Transfers to bound and resonance states} \label{sec_results_surf_Zr} We carried out a set of calculations for $^{90}$Zr(d,p)$^{91}$Zr that included stripping to the (bound) ground and first excited states, as well as to a narrow $f_{7/2}$ resonance at about 1 MeV above the neutron separation threshold. The panels in the right column of Figure~\ref{fig_Zr_bsPostPriorSurface_3States} show the ratios $R_{X(a)}$ of the peak cross sections obtained in the restricted calculations to the peak cross section from the full calculation, as a function of the separation radius $a$. Also shown is the radial behavior of the one-neutron overlap functions $I$ (solid curve with stars) for the three final states considered; their rms radii are indicated by dashed vertical lines. We find that for bound final states, the surface term is dominant at around 6-8 fm, at radii a little larger than the rms values of the overlap functions. For the resonance case, panel f), we observe that the surface term is dominant at slightly larger radii, around 7-10 fm, even though the overlap function has an rms value that is still larger, namely 11.7 fm. In addition, the surface term in the resonance case is non-zero over a wider range of radii than it is in the bound-state case. We also observe that the surface term does not fully account for the cross section. At all separation radii for which $M_{surf}(a)$ dominates, there are also remnant contributions from one or both of the other terms, $M_{int}(0,a)$ and $M_{ext}(a,\infty)$. As a result, the surface term alone does not completely reproduce the angular behavior of the cross section. This can be seen in the left column of the figure, where the cross sections calculated by using the surface terms only are compared to the full cross sections (solid curves) for selected separation radii $a$ \footnote{ For transfer to the $^{91}$Zr ground state, there is a clear discrepancy in shape between the full calculations and the cross sections calculated with the surface term, with the latter not exhibiting the upturn at small angles. In fact, in the region below 10 degrees, the measured cross section does not exhibit this upturn. The full calculation is not able to reproduce the experimental data correctly without introducing a (somewhat artifical) lower cutoff in the integration. This issue has already been discussed in the literature, see, e.g., Ref.~\cite{Hodgeson:book}, p. 456. }. The calculated cross sections show some dependence on the choice of $a$, and the absence of the other terms is clearly significant. \begin{figure*}[htb] \begin{minipage}[b]{0.48\textwidth} \begin{center} \includegraphics[width=0.7\columnwidth,angle=270,trim=80 25 30 70,clip=true]{escher_fig2a} \includegraphics[width=0.7\columnwidth,angle=270,trim=80 25 30 70,clip=true]{escher_fig2c} \includegraphics[width=0.7\columnwidth,angle=270,trim=80 25 30 70,clip=true]{escher_fig2e} \end{center} \end{minipage} \hspace{0.1cm} \begin{minipage}[b]{0.48\textwidth} \begin{center} \includegraphics[width=0.7\columnwidth,angle=270,trim=80 18 30 40,clip=true]{escher_fig2b} \includegraphics[width=0.7\columnwidth,angle=270,trim=80 18 30 40,clip=true]{escher_fig2d} \includegraphics[width=0.7\columnwidth,angle=270,trim=80 18 30 40,clip=true]{escher_fig2f} \end{center} \end{minipage} \caption{ (Color online) Examination of interior, surface, and exterior contributions to the transfer reaction $^{90}$Zr(d,p)$^{91}$Zr. Compared are several calculations for stripping to the $5/2^+$ ground state (top panels) the $1/2^+$ first excited state (middle panels), and the $f_{7/2}$ resonance (bottom panels). Left column (panels a, c, e): Angular cross sections calculated from the surface term only (broken curves) are compared to the full stripping cross section (solid black line) and experimental data from Ref.~\cite{Michelman:69}. The broken curves illustrate the dependence of the cross section on the choice of the surface radius $a$. Right column (panels b, d, f): Fractions $R_{X(a)}$ for the interior (post) term, the surface term, and the exterior (prior) term, are given as a function of the surface radius, in the lower portion of each panel. The ratios take values between zero and $\approx2.2$ (labels are on the left axis). The associated one-neutron overlap functions $I$ are shown in the upper portion of each panel (solid curves with stars). They are given in units of fm$^{-1}$, labels are on the right axis. The rms radii of the overlaps are indicated by dashed vertical lines. The potential $V_{nA}$, which binds the neutron to the $^{90}$Zr nucleus, has a radius of 5.53 fm and a diffuseness of 0.66 fm. } \label{fig_Zr_bsPostPriorSurface_3States} \end{figure*} \subsubsection{$^{48}$Ca(d,p)$^{49}$Ca: Energy dependence of the surface term} \label{sec_results_surf_Ca} It is known that with increasing beam energy a reaction becomes less peripheral and is increasingly affected by the structure of the nuclear interior. This effect is visible in Figure~\ref{fig_Ca_bsPostPriorSurface_gs}, where results are presented for $^{48}$Ca(d,p)$^{49}$Ca, for populating the ground state of $^{49}$Ca, at three different beam energies, $E_{b}$ = 13.0, 19.3, and 56 MeV. With increasing energy the region where the transition from exterior-dominated to interior-dominated occurs, and where the surface term dominates, shifts to smaller radii. The first two cases resemble the Zr example discussed, with a dominant surface term around $a$ = 6.5 fm and 7.0 fm, respectively, that approximately reproduces the shape of the full cross section but underpredicts the magnitude. For the highest beam energy considered, $E_d$ = 56 MeV, however, the surface term peaks at smaller radii, around $a$ = 5.25 fm. In this region, there are sizable contributions from the post-interior and the prior-exterior terms. The angular behavior of the cross section for this case also confirms that at this energy, the surface term does not provide a good approximation to the full cross section. There is a strong dependence of the shape of the cross section on the separation radius chosen. Calculations carried out for transfers to the first excited state in $^{49}$Ca give very similar results (not shown). In both cases, the surface term does not provide a good representation of the reaction for the higher energies, but shows clear improvements as one moves to lower energies, $E_d$ = 19.3 and 13.0 MeV: The shape of the calculated cross section becomes less dependent on the choice of of the surface radius $a$ and better approximates the exact cross section. \begin{figure*}[htb] \begin{minipage}[b]{0.48\textwidth} \begin{center} \includegraphics[width=0.7\columnwidth,angle=270,trim=80 25 30 70,clip=true]{escher_fig3a} \includegraphics[width=0.7\columnwidth,angle=270,trim=80 25 30 70,clip=true]{escher_fig3c} \includegraphics[width=0.7\columnwidth,angle=270,trim=80 25 30 70,clip=true]{escher_fig3e} \end{center} \end{minipage} \hspace{0.1cm} \begin{minipage}[b]{0.48\textwidth} \begin{center} \includegraphics[width=0.7\columnwidth,angle=270,trim=80 25 30 70,clip=true]{escher_fig3b} \includegraphics[width=0.7\columnwidth,angle=270,trim=80 25 30 70,clip=true]{escher_fig3d} \includegraphics[width=0.7\columnwidth,angle=270,trim=80 25 30 70,clip=true]{escher_fig3f} \end{center} \end{minipage} \caption{ (Color online) Examination of interior, surface, and exterior contributions for $^{48}$Ca(d,p)$^{49}$Ca. Compared are several calculations for stripping to the $3/2^-$ ground state, at $E_d$ = 13, 19.3, 56 MeV (top to bottom). Left column (panels a, c, e): Contributions from the surface term (broken curves) are compared to the full stripping cross section (solid black line), for various choices of the surface radius. Data are from Metz {\it et al.\ }~\cite{Metz:75} (13, 19.3 MeV) and Uozumi {\it et al.\ }~\cite{Uozumi:94} (56 MeV). Right column (panels b, d, f): contributions resulting from the interior (post) term, the surface term, and the exterior (prior) term, are given as a function of the surface radius. The rms radius of the associated one-neutron overlap function is 4.62 fm. The potential $V_{nA}$, which binds the neutron to the $^{48}$Ca nucleus, has a radius of 4.54 fm and a diffuseness of 0.65 fm. Results for transfers to the $1/2^-$ first excited state in $^{49}$Ca are very similar, but are not shown here. } \label{fig_Ca_bsPostPriorSurface_gs} \end{figure*} \subsubsection{$^{20}$O(d,p)$^{21}$O: Focus on resonances } \label{sec_results_surf_O} Achieving convergence for transfer calculations involving resonances has long been known to be difficult and we find this again in the calculations presented here. Numerical convergence is an issue, ambiguities in how to extract structure information (resonance energies and widths) is another. Various methods have been suggested to achieve numerical convergence~\cite{Huby:65,Fortune:69}, but their implementation in modern reaction codes is incomplete. Here we investigate to which extent the surface term is able to reproduce the full cross sections for several resonances. A surface term that captures the essentials of the reaction would reduce the dependence of the calculated cross section on slowly-converging radial integrals. Furthermore, it would provide strong motivation for the implementation of the formalism within the framework of the Continuum-Discretized Coupled-Channels (CDCC) approach, as the prior term is identically zero in that case~\cite{Mukhamedzhanov:11a}. We focus on the $^{20}$O(d,p)$^{21}$O reaction, which was recently investigated in inverse kinematics with a radioactive beam~\cite{Fernandez:11}. This is one of very few cases where angular cross sections for both bound and resonance states have been measured in the same experiment. Using a 10.5/u MeV $^{20}$O beam, it was possible to obtain angular cross sections for one-nucleon transfers populating the bound ground and first excited states, as well as resonances at 4.77 MeV and 6.17 MeV (lying 0.96 MeV and 2.36 MeV above threshold, respectively). We have carried out calculations for (d,p) reactions populating these four final states in $^{21}$O. We adopted the recommended spin-parity assignments from Ref.~\cite{Fernandez:11}, namely $5/2^+$ and $1/2^+$ for the ground and first excited states, respectively, and $3/2^+$ for the resonance at $E_{ex}$ = 4.77 MeV. Since there is some ambiguity as to whether the resonance at $E_{ex}$ = 6.17 MeV has $3/2^+$ or $7/2^-$ character, we considered both possibilities. As in the Zr and Ca cases, we carried out full calculations and reproduced the measured cross sections. We then studied the contributions from the interior post, surface, and exterior prior terms as a function of the separation radius $a$. For (d,p) transfers to the two bound states, we found results (not shown here) that are qualitatively similar to those shown in Figure~\ref{fig_Zr_bsPostPriorSurface_3States} for the Zirconium case. The surface terms peak around $a$ = 5 fm and the shape of the full cross section is reproduced by the surface term only, with the overall magnitude being too small by about 20-40\%. Calculations for the resonances were more challenging. This was expected, since these were carried out in the traditional DWBA approach that does not make use of any simplifications that the surface approach might offer. The one-neutron overlap functions associated with the resonances exhibit oscillations that decline in amplitude only very slowly with increasing radial coordinate, as seen in Figure~\ref{fig_O_resWFs}. As a result, there are contributions to the post-form matrix element (Eq.~\ref{eq:MPost}) from far outside the nucleus that have to be taken into account, while contributions from large distances to the prior-form matrix element (Eq.~\ref{eq:MPrior}) are suppressed by the transition operator. Naturally, this does not only cause problems for the full calculations (when carried out in the post formalism), but also for the calculations of the post-interior contributions, as can be seen in Figure~\ref{fig_O_surfIntExt_3Res}. Even for separation radii $a = $ 20 fm, we find that the ratio $R_{M_{int}(0,a)}$ for the interior-post calculation does not approach unity. To reach this limit, integration out to very large radii (on the order of 100 fm) is required. The prior calculation does not require integration to such large distances, as the interactions in $\Delta V_{dA}$ (Eq.~\ref{eq_transOp_post}) cease to contribute to the transition matrix element at much smaller radii. The exact cross sections shown here were calculated in the prior form. Despite the convergence challenges, a region around $r_{nA}$ $\approx 4-7$ fm can be identified for which both prior-exterior contributions and post-interior contributions are small. We calculated the surface term and the associated (d,p) cross sections for several values of $a$ in this region, to test to which extent the surface term is able to reproduce the full cross section. As in the Zr and Ca cases, we find that the cross sections calculated from the surface term only do not reproduce the full cross sections. The discrepancies are an indication that the remaining terms cannot be completely neglected. The comparisons of the surface cross sections with the full cross sections are shown in panels b, d, and f of Figure~\ref{fig_O_res_surfXsecPlus_3Res} in the next section. There we also discuss an option for improving on the surface-term-only approximation to the (d,p) stripping cross section. \begin{figure}[htb] \begin{center} \includegraphics[width=0.7\columnwidth,angle=270,trim=80 25 20 70,clip=true]{escher_fig4} \end{center} \caption{ (Color online) Radial behavior of the one-neutron overlap functions associated with three resonances in $^{21}$O (in fm$^{-1}$). The resonance energies are indicated in the figure. For the resonance at 6.17 MeV we consider two possible spin-parity assignments. } \label{fig_O_resWFs} \end{figure} \begin{figure}[htb] \begin{center} \includegraphics[width=0.7\columnwidth,angle=270,trim=80 25 30 70,clip=true]{escher_fig5a} \includegraphics[width=0.7\columnwidth,angle=270,trim=80 25 30 70,clip=true]{escher_fig5b} \includegraphics[width=0.7\columnwidth,angle=270,trim=80 25 30 70,clip=true]{escher_fig5c} \end{center} \caption{ (Color online) Examination of interior, surface, and exterior contributions for transfers to resonance states in $^{21}$O. Contributions resulting from the interior (post) term, the surface term, and the exterior (prior) term, are given as a function of the surface radius. Cross section results are shown for the $3/2^+$ resonance at 4.77 MeV (a) and the 6.17 MeV resonance, assuming a $3/2^+$ state (b), or a $7/2^-$ (c). The associated overlap functions are shown in Figure~\ref{fig_O_resWFs}. The potential $V_{nA}$, which binds the neutron to the $^{20}$O nucleus, has a radius of 3.39 fm and a diffuseness of 0.65 fm. } \label{fig_O_surfIntExt_3Res} \end{figure} \clearpage \subsection{Improvements to the surface-integral approach} \label{sec_results_improvements} In the previous section we studied the contributions from the interior-post, surface, and exterior-prior terms to the (d,p) cross sections for several target nuclei. In all cases, for both bound and resonance final states, we found that the surface term gives the dominant contributions, provided a separation radius is chosen that is in the region of the nuclear surface. When comparing to exact calculations of the cross sections, however, we also found that significant strength is missing, which indicates that the residual terms cannot be neglected. In the region where the surface cross section peaks, we find contributions from both the interior-post and the exterior-prior terms. A possible path forward for practical applications is to select a separation radius $a$ that is slightly smaller than the radius corresponding to the peak of the surface term. This will minimize contributions from the post-interior term, thus removing the need for a model for the one-nucleon overlap function in the nuclear interior. With a decrease in the surface radius comes an increase in the contribution from the prior-exterior term. Taking this term explicitly into consideration is necessary for achieving a proper description of the cross section in the DWBA approach tested here. We illustrate the effect of including this term in Figure~\ref{fig_O_res_surfXsecPlus_3Res}, where we compare the surface-only cross sections (dashed curves) and the surface-plus-post-interior calculations (dash-dotted curves) to the exact calculations (solid lines), for the $^{21}$O resonances discussed in the previous section. Available experimental data are shown as well. The surface calculations shown in the right column (panels b, d, f) were calculated with separation radii $a=$ 5.0 fm, 5.5 fm, and 5.5 fm, for a $3/2^+$ resonance at 4.77 MeV, a $3/2^+$ resonance at 6.17 MeV, and a $7/2^-$ resonance at 6.17 MeV, respectively. These choices for the radius $a$ coincide with the maxima of the surface contributions shown in Figure~\ref{fig_O_surfIntExt_3Res}. As mentioned above, the curves fall clearly short of reproducing the full cross section. Also shown are calculations that contain both surface and prior-exterior contributions (dash-dotted curves). We observe a slight improvement in the agreement with the exact calculation, but additional contributions (from the post-interior term) would be needed to achieve satisfactory agreement. Moving the separation radius to smaller values, however, improves the situation, as a comparison between the right and left columns shows. In panels a), c), e) we compare the surface-only results (dashed curve) and the surface plus interior-prior results (dash-dotted curve) to the full calculation (solid line). The radii are selected to be 0.5 fm smaller than in the right column. While this shift in $a$ reduces the surface-only cross section, it increases the cross section arising from the the exterior-prior term, with the sum giving a much better approximation to the exact cross section. When moving to smaller radii, which improves the agreement of the surface-plus-prior-exterior approximation with the exact result, care must be taken to remain at a radius $a$ for which the nuclear potential $V_{nA}$ can be approximately neglected. In the present case, the potential binding the neutron to the $^{20}$O target has fallen to 15\% of its maximum strength at $a$=4.5 fm and to 8\% of its strength at $a$=5.0 fm. The exterior term, which involves an integral over $r_{nA}$ from $a$ to very large distances, includes contributions from the same operator $\Delta V_{dA}$ (see Eq.~\ref{eq:MPrior}) that also causes deuteron breakup. In CDCC calculations, deuteron breakup is explicitly included, through the use of a wave function $\Psi^{CDCC}$ that describes the three-body dynamics between the neutron, proton, and target nucleus. We thus expect the CDCC implementation of the surface-integral formalism to contain a remnant exterior term that is reduced relative to the DWBA case. This issue remains to be investigated in detail. Instead of moving to smaller surface radii, one might consider to increase $a$ and include explicitly the contributions from the post-interior term. A test of this strategy (not shown) indicates that this as well leads to improvements in the calculated cross section. The drawback of this latter approach, however, is that it requires a model for the one-nucleon overlap function in the nuclear interior. It will still be an improvement over the traditional calculations, since i) the interior contribution, and thus the model-dependence, of the cross section is reduced, and ii) the dominant part of the cross section can be parameterized in terms of useful spectroscopic quantities. We expect these arguments to carry over to the CDCC implementation of the theory. An extension of the present work that will make this possible is underway. \begin{figure*}[htb] \begin{minipage}[b]{0.48\textwidth} \begin{center} \includegraphics[width=0.7\columnwidth,angle=270,trim=80 25 30 70,clip=true]{escher_fig6a} \includegraphics[width=0.7\columnwidth,angle=270,trim=80 25 30 70,clip=true]{escher_fig6c} \includegraphics[width=0.7\columnwidth,angle=270,trim=80 25 30 70,clip=true]{escher_fig6e} \end{center} \end{minipage} \hspace{0.1cm} \begin{minipage}[b]{0.48\textwidth} \begin{center} \includegraphics[width=0.7\columnwidth,angle=270,trim=80 25 30 70,clip=true]{escher_fig6b} \includegraphics[width=0.7\columnwidth,angle=270,trim=80 25 30 70,clip=true]{escher_fig6d} \includegraphics[width=0.7\columnwidth,angle=270,trim=80 25 30 70,clip=true]{escher_fig6f} \end{center} \end{minipage} \caption{ (Color online) Improvements to the surface-term-only approximation can be achieved by including contributions from the prior-exterior term and selecting a small surface radius. Panels b), d), f) compare the surface-only results (dashed curve) and the surface plus interior-prior results (dash-dotted curve) to the full calculation (solid line) and to experimental results, for three different resonance cases in $^{21}$O. The calculations were carried out at surface radii that coincide with the maxima of the surface contributions shown in Figure~\ref{fig_O_surfIntExt_3Res}, specifically b) $a=5.0$ fm for a $3/2^+$ resonance at 4.77 MeV, d) $a=5.5$ fm for a $3/2^+$ resonance at 6.17 MeV, and f) $a=5.5$ fm for a $7/2^-$ resonance at 6.17 MeV. The left column shows the effect of decreasing the surface radii by 0.5 fm. Results are shown for the same three resonance cases. Cross sections arising from the surface term are seen to decrease, but cross sections associated with the sum of the surface and the prior-exterior term show better agreement with the exact results. } \label{fig_O_res_surfXsecPlus_3Res} \end{figure*} \clearpage \section{Summary and Outlook} \label{sec_summary} Experimentally, resonance structures are most often studied in elastic and inelastic scattering reactions. In this context, the phenomenological R-matrix approach has been extremely useful for the interpretation of experiments and for extracting resonance energies and widths from measured cross sections~\cite{Lane:58,Descouvemont:10}. A formalism that makes use of R-matrix ideas and is applicable to (d,p) transfer reactions, was recently proposed~\cite{Mukhamedzhanov:11a} with the goal to provide a practical way for extracting structure information from transfer experiments. In this approach, the transfer amplitude, a volume integral, was reformulated in terms of a surface integral plus (presumably small) remnant terms that contain contributions from the interior and exterior of the final nucleus. The formalism has a series of significant advantages over traditional calculations for cases where the surface-integral dominates the associated cross section. We investigated the proposed approach for various isotopes in different mass regions, and for a variety of beam energies. In particular, we studied the separation of the transition matrix element into the three terms suggested in Ref.~\cite{Mukhamedzhanov:11a} and determined their contributions to the total transfer cross sections. We find that the surface term is dominant in the region where one expects it to be strong, near 5-7 fm for bound states, and at slightly larger radii for resonance states. At all radii there are also contributions from the post-interior and/or prior-exterior terms. As a result, the surface term does not completely reproduce the exact cross section. For low to moderate energies (below about $E_d \approx$ 20 MeV), the shape of the cross section is reproduced, but the magnitude differs, by as much as 30-50\%. It is clearly necessary to include additional contributions. Possible remedies include increasing the surface radius, which leads to improved cross sections, at the expense of having a model-dependent contribution from the nuclear interior (albeit one that is smaller than the model dependence in traditional calculations). Alternatively, one can decrease the chosen surface radius. In the DWBA implementation of the method, this will require the explicit inclusion of external (prior) contributions. In the CDCC extension of the approach, we expect these external contributions to be partially accounted for by the deuteron breakup components that are included in the CDCC formalism. If the latter strategy is followed, the surface-integral approach has potentially very significant advantages over conventional calculations: 1) It removes the dependence of the cross section calculations on the model used for the nuclear interior. 2) The calculations do not suffer from convergence issues. 3) The method establishes a useful link between resonance properties and transfer observables, since the cross section obtained from the surface integral can be parameterized in terms of quantities that are familiar from traditional R-matrix approaches. The strategy is constrained by the requirement that $a$ be outside the nuclear potential $V_{nA}$ and can thus only be employed for peripheral reactions. Since the Continuum-Discretized Coupled-Channels (CDCC) formalism describes both transfers and breakup, an extension of the present work is worthwhile exploring. Work along these lines is underway. \subsection*{Acknowledgments} The work is supported through the U.S. Department of Energy's Topical Collaboration TORUS (www.reactiontheory.org). Is is performed under the auspices of the DOE by Lawrence Livermore National Laboratory under contract DE-AC52-07NA27344, by Ohio University under contracts DE-FG02-93ER40756 and DE-SC0004087, by Michigan State University under contracts DE-FG52-08NA28552 and DE-SC0004084. Constructive input from Akram Mukhamdezhanov in the early stages of the project is acknowledged.
{ "redpajama_set_name": "RedPajamaArXiv" }
1,472
Q: Unwanted space between 2 containers in Flutter Unwanted space between 2 containers I want to remove this extra space between a text widget and a list View (Carousel Slider ). Both of these widgets are embedded in the Container Widget . I have not added any SizedBox or Spacer between these 2 widgets . I don't know why this extra space is coming ! Here is the sample code - class _DashBoardState extends State<DashBoard> { @override Widget build(BuildContext context) { return Scaffold( body: Column( children: [ SizedBox( height: 50, ), Container( child: Text( 'First Text Box', style: TextStyle( fontSize: 22, ), ), ), Container( height: 220, child: ListView( children: <Widget>[ CarouselSlider( height: 180.0, enlargeCenterPage: true, autoPlay: true, aspectRatio: 16 / 9, autoPlayCurve: Curves.fastOutSlowIn, enableInfiniteScroll: true, autoPlayAnimationDuration: Duration(milliseconds: 800), viewportFraction: 0.8, items: [ Container( margin: EdgeInsets.all(5.0), decoration: BoxDecoration( borderRadius: BorderRadius.circular(10.0), image: DecorationImage( image: NetworkImage( "https://images.pexels.com/photos/2116475/pexels-photo-2116475.jpeg? auto=compress&cs=tinysrgb&dpr=2&w=500"), fit: BoxFit.cover, ), ), child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: <Widget>[ Text( 'Usable Flower for Health', style: TextStyle( color: Colors.white, fontWeight: FontWeight.bold, fontSize: 18.0, ), ), Padding( padding: const EdgeInsets.all(15.0), child: Text( 'Lorem Ipsum is simply dummy text use for printing and type script', style: TextStyle( color: Colors.white, fontSize: 15.0, ), textAlign: TextAlign.center, ], ), ], ), ) ] , ), ); } } A: I think the extra space comes from the default padding of a ListView. From the documentation here: "By default, ListView will automatically pad the list's scrollable extremities to avoid partial obstructions indicated by MediaQuery's padding. To avoid this behavior, override with a zero padding property." Add: padding: EdgeInsets.all(0) In your ListView widget to set it to 0. I tried it this with your sample of code, it removes the extra space correctly.
{ "redpajama_set_name": "RedPajamaStackExchange" }
8,953
\section{Introduction}\label{sec:introduction} Face super-resolution (SR), also known as face hallucination, refers to generating high resolution (HR) face images from the corresponding low resolution (LR) inputs. Since there exist many low resolution face images (\emph{e.g}\onedot} \def\Eg{\emph{E.g}\onedot, faces in surveillance videos ) and face analysis algorithms (\emph{e.g}\onedot} \def\Eg{\emph{E.g}\onedot, face recognition) often perform poorly on such images, there is a growing interest in face SR. Different from general image SR, face SR places its emphasis on the recovery of \blank{the} key \blank{face} structures (\emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot, shapes of \blank{face} components and face outline). These structures only account for a very small portion of the image, but are often more difficult to recover as they exhibit larger pixel variations. Training a deep neural network with the commonly used mean square error (MSE) loss, which weights pixels equally, is not very effective in recovering these ``sparse'' structures. \blank{Previous} works \cite{Chen2018CVPR,bulat2017super,yu2018face} proposed incorporating additional task, such as face parsing and landmark detection, to assist the training of face SR networks. \cite{Chen2018CVPR,yu2018face} also used predicted face priors to help face SR. Although joint training with these additional tasks helps enhance the importance of \blank{the} key \blank{face} structures, there are two major drawbacks\blank{, namely} (1) extra effort is needed to label the data for the additional \blank{task,} and (2) predicting face prior from LR inputs is \blank{itself also} a difficult problem. On the other hand, if we subdivide a face image into many small regions and consider each region as an individual sample, the unbalanced distribution between regions containing key \blank{face} structures (referred to as hard regions) and those not containing key \blank{face} structures (referred to as easy regions) will \blank{resemble} the imbalance between foreground and background samples in object detection. This suggests that we may adopt some techniques similar to {\em bootstrapping} or {\em online hard example mining} (OHEM)~\cite{shrivastavaCVPR16ohem} in object detection to solve our face SR problem. \begin{figure}[t] \includegraphics[width=.99\linewidth]{Fig_intro_1.png} \caption{\blank{Super-resolution} result \blank{produced by} SPARNetHD for an old photo of Marie Curie from Solvay conference 1927. Please zoom in to see details.} \label{fig:intro_1} \end{figure} In this paper, we introduce a carefully designed \blank{Face Attention Unit (FAU)} to construct a \blank{SPatial Attention Residual Network} (SPARNet) for face SR. The key idea is to bootstrap features related to the key \blank{face} structures \blank{using} a 2D spatial attention map. Instead of hard selection, the spatial attention map assigns a score between $0$ and $1$ to each spatial location of the feature map. This allows learning \blank{the prediction of} the spatial attention map through gradient descent. Spatial attention maps in different FAUs of the network \blank{can learn} to focus on different \blank{face} structures. For example, attention maps in \blank{deeper layers} focus more on coarse structures such as eyes and mouth, while those in \blank{shallower layers} focus more on detailed textures such as hairs. Considering that most \blank{of the} existing face SR methods can only \blank{produce} $128\times128$ outputs, we further extend SPARNet, referred to as SPARNetHD, to generate \blank{high resolution outputs (\emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot, $512\times512$)}. Specifically, we enlarge the output resolution of SPARNet from \blank{$128\times128$ to $512\times512$} and adopt \blank{a} multi-scale discriminator loss similar to Pix2PixHD~\cite{wang2018pix2pixHD} to generate more realistic textures. Experiments show that SPARNetHD trained with synthetic LR data is pretty robust with natural LR inputs, while models without the proposed spatial attention mechanism produce undesirable artifacts. We show an example result of SPARNetHD on an old photo in \blank{Fig.~\ref{fig:intro_1}}. We can see that \blank{SPARNetHD} can restore key \blank{face} components very well and also generate high resolution and realistic textures. \blank{The} key contributions of this paper can be summarized as follows: \begin{enumerate} \item We propose an efficient framework \blank{named} SPARNet for face super-resolution. Without relying on any extra supervisions (\emph{e.g}\onedot} \def\Eg{\emph{E.g}\onedot, face parsing maps and landmarks), it achieves state-of-the-art performance on various kinds of metrics, including PSNR, SSIM, identity similarity, and landmark detection. \item We show that the proposed FAU\blank{, the basic building block of SPARNet,} can bootstrap the key \blank{face} structures (\emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot, \blank{face} components and face outline) and significantly improve the performance of face super-resolution. \item By repeating FAUs in SPARNet, the spatial attention maps in different FAUs can learn to focus on different \blank{face} structures and further \blank{improve} the performance of SPARNet. \item We introduce SPARNetHD to \blank{generate} high resolution \blank{face} images (\emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot, $512\times512$), and the model trained with synthetic data works \blank{equally} well on natural LR images. \end{enumerate} \begin{figure*}[t] \centering \captionsetup{justification=centering} \includegraphics[width=1.\linewidth]{Fig_arch.pdf} \caption{Architecture of the proposed SPatial Attention Residual Network (SPARNet).} \label{fig:arch} \end{figure*} \section{Related Works} In this section, we briefly review the literature on face super-resolution and recent attention neural networks. \subsection{Face Super-Resolution} Face hallucination was pioneered by Baker and Kanade \cite{baker2002limits}, who showed that it is possible to perform high magnification SR for images of a specific category (\emph{e.g}\onedot} \def\Eg{\emph{E.g}\onedot, face and text). Since then many methods were proposed to improve the performance of face hallucination. They can be roughly classified into sub-space based methods \cite{wang2005hallucinating,liu2007face,ma2010hallucinating,liu2001two,liu2005hallucinating} and component based methods \cite{tappen2012bayesian,yang2013structured,song-ijcai17-faceSR}. Sub-space based methods usually \blank{rely} on Principle Component Analysis (PCA), which requires precisely aligned faces. Component based methods require detecting facial landmarks, which is difficult for LR face images. Both kinds of methods fail to produce satisfactory results for face SR with a high upscale factor. Recently, deep convolutional neural networks (CNNs) have brought remarkable progress to face SR. Zhu \emph{et al}\onedot \cite{zhu2016deep} proposed a cascaded two-branch network to optimize face hallucination and dense correspondence field estimation in a unified framework. Yu \emph{et al}\onedot exploited generative adversarial networks (GAN) \cite{goodfellow2014generative} to directly super-resolve the LR inputs. They further improved their model to handle unaligned faces \cite{yu2017face}, noisy faces \cite{yu2017hallucinating}, and faces with different attributes \cite{yusuper}. Instead of directly inferring HR face images, Huang \emph{et al}\onedot proposed to predict wavelet coefficients from LR images to reconstruct HR images. Latest works employed extra \blank{face} prior supervisions, such as face parsing maps \cite{Chen2018CVPR}, landmark heatmaps \cite{bulat2017super,yu2018face}, and identity information \cite{zhang2018super}, to train their networks. Kim \emph{et al}\onedot \cite{pfsrnet} proposed a facial attention loss which focuses the network on the landmark region. Ma \emph{et al}\onedot \cite{dicnet} introduced an iterative method which predicts SR results and landmarks iteratively. Although extra supervisions help to improve the performance, there are two shortcomings\blank{, namely} (1) extra effort is needed to label the data, and (2) it is \blank{an} indirect way to \blank{direct} the SR network \blank{towards the key face} structures. Different from these methods, our SPARNet learns \blank{to predict} spatial attention maps to bootstrap key \blank{face} structures and \blank{other} feature-rich regions. \subsection{Attention Networks} Attention mechanism has been widely used in high level vision tasks, such as image classification \cite{mnih2014recurrent,hu2018senet,wang2017residual,woo2018cbam}, image captioning \cite{xu2015show,chen2017sca}\blank{,} and visual question answering \cite{schwartz2017high,yu2017multi}. The key idea is to \blank{reweight} features using a score map to emphasize \blank{important features and suppress less useful ones} \cite{hu2018senet}. Wang \emph{et al}\onedot \cite{wang2017residual} introduced a trunk-and-mask attention mechanism to a residual network for image classification. He \emph{et al}\onedot \cite{hu2018senet} proposed the Squeeze-and-Excitation network which \blank{employs} a channel-wise attention mechanism and \blank{demonstrates} significant performance improvements. Woo \emph{et al}\onedot proposed a convolutional block attention module (CBAM) which sequentially infers attention maps along the channel and spatial dimensions separately. Attention mechanism has also been employed in image generation tasks recently. Zhang \emph{et al}\onedot \cite{zhang2018rcan} combined channel attention with a very deep residual network for image SR. Cao \emph{et al}\onedot \cite{Cao2017Attention} proposed an attention aware face SR framework based on reinforcement learning, which sequentially attends to, crops out\blank{,} and super-resolves a patch. Although closely related, our work is different from \cite{zhang2018rcan} and \cite{Cao2017Attention} in several aspects. First, attention mechanisms in high level tasks \blank{often} employ pooling for extracting semantic information. For face SR, however, this may \blank{result the loss of} important low and middle level features such as edges and shapes. In contrast, our attention mechanism \blank{is designed to take} advantages of multi-scale features. Second, \blank{unlike \cite{zhang2018rcan} which utilizes channel attention, our work considers spatial attention which facilitates region based attention of the key face components.} Third, \blank{unlike \cite{Cao2017Attention} which takes a patch based approach, we generate spatial attention maps for the entire face.} This allows our network to have a global view of the \blank{face} structures and benefit from the contextual information. \subsection{High Resolution Image Generation with GAN.} Recently, GAN has demonstrated to be very effective in generating HR images. Wang \emph{et al}\onedot \cite{wang2018pix2pixHD} proposed Pix2PixHD and used a multi-scale generator and discriminator architecture for HR image generation. Karras \emph{et al}\onedot \cite{karras2017progressive,karras2019style} proposed a new progressive training methodology for GAN to generate HR face images from random input vectors, and improved the quality of synthesized faces in \cite{karras2019analyzing}. Park \emph{et al}\onedot \cite{park2019SPADE} proposed the spatially-adaptive normalization layer for generating photo-realistic images given an input semantic layout. We follow the idea of Pix2PixHD and use \blank{a} multi-scale discriminator to generate \blank{high resolution} results. Different from Pix2PixHD, our SPARNetHD does not require progressive training from LR to HR images\blank{,} and our results are much better than Pix2PixHD with the help of the proposed spatial attention mechanism. \section{SPARNet for Face SR} \subsection{Overview} \label{sec:overview} As shown in Fig.~\ref{fig:arch}, our SPARNet consists of three modules, namely the downscale module, the feature extraction module\blank{,} and the upscale module. Each of these modules is composed of a stack of FAUs (see \ref{sec:FAU} for details). Let $I_{LR} \in \mathbb{R}^{3\times H'\times W'}$, $I_{SR} \in \mathbb{R}^{3\times H\times W}$\blank{,} and $I_{HR} \in \mathbb{R}^{3\times H\times W}$ denote the LR face image (\emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot, input), the super-resolved image (\emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot, output)\blank{,} and the ground truth HR image respectively. $I_{LR}$ is first upsampled to the same spatial dimension as $I_{HR}$ through bicubic interpolation, denoted as $I_{LR-UP} \in \mathbb{R}^{3\times H\times W}$, which is then fed to SPARNet to produce $I_{SR}$. Given a training set with $N$ pairs of LR-HR images, $\left \{ I_{LR}^i, I_{HR}^i\right\}_{i=1}^N$, we optimize SPARNet by minimizing the pixel-level $L_2$ loss given by \begin{equation} \mathcal{L}_{pix}(\Theta) = \frac{1}{N} \blank{\sum_{i=1}^N} \|\mathcal{F}_{SPAR}(I_{LR-UP}^i, \Theta) - I_{HR}^i\blank{\|_2^2}, \label{eq:pix} \end{equation} where $\mathcal{F}_{SPAR}$ and $\Theta$ denote \blank{SPARNet and its network parameters} respectively. \subsection{Face Attention Unit}\label{sec:FAU} Based on the observation that some \blank{face} parts (\emph{e.g}\onedot} \def\Eg{\emph{E.g}\onedot, key \blank{face} components like eyes, eyebrows, nose, and mouth) are more important than the others (\emph{e.g}\onedot} \def\Eg{\emph{E.g}\onedot, shading of the cheek) in face SR, we propose a spatial attention mechanism to make our network focus more on the important and informative features. The key question is how to produce the attention map and how to integrate it with the convolutional layers. First, \blank{we believe} the spatial attention mechanism should not only have a high level view of the face but should also focus on low level structures. \blank{Note that a} high level view helps the network to learn how faces look, while a low level view makes the network \blank{learn local details better.} \blank{Hence, it would be desirable for the spatial attention mechanism to be able to} learn from multi-scale features. Second, residual blocks have \blank{demonstrated} great success in both general SR task \cite{ledig2017photo,Lim_2017_CVPR_Workshops,zhang2018rcan} and face SR task \cite{Chen2018CVPR,bulat2017super}. It should \blank{therefore} be beneficial to integrate spatial attention mechanism with residual blocks. \begin{figure}[t] \centering \includegraphics[width=.9\linewidth]{Fig_SPARB.pdf} \caption{Face Attention Unit} \label{fig:sparb} \end{figure} Based on the above \blank{discussion}, we propose a Face Attention Unit (FAU) which extends the original residual block by introducing a spatial attention branch (see Fig.~\ref{fig:sparb}). By stacking FAUs together, important features for face SR are continuously enhanced. Denote the feature input \blank{of the $j$-th indexed FAU} as $\blank{\mathbf{x}_{j-1}} \in \mathbb{R}^{C_{j-1}\times H_{j-1} \times W_{j-1}}$, the attention map $\blank{{\boldsymbol \alpha}_{j}} \in \mathbb{R}^{1\times H_j \times W_j}$ is computed as \begin{align} \blank{\mathbf{f}_j} &= \mathcal{F}_{feat}(\blank{\mathbf{x}_{j-1}}), \\ \blank{\boldsymbol{\alpha}_j} &= \sigma(\mathcal{F}_{att}(\blank{\mathbf{f}_j})), \end{align} where $\blank{\mathbf{f}_j} \in \mathbb{R}^{C_{j}\times H_{j} \times W_{j}}$ is the output of the feature branch $\mathcal{F}_{feat}$, $\mathcal{F}_{att}$ \blank{denotes} the attention branch, and $\sigma$ is the sigmoid function. Finally, the output of \blank{the $j$-th indexed} FAU is \blank{given by} \begin{equation} \blank{\mathbf{x}_j = \mathbf{x}_{j-1} + {\boldsymbol \alpha}_j \otimes \mathbf{f}_j}, \label{eq:res-out} \end{equation} where ``$\otimes$'' denotes element-wise multiplication. Details of \blank{$\mathcal{F}_{feat}$ and $\mathcal{F}_{att}$} are \blank{given in the next two paragraphs.} \para{Attention Branch} As discussed above, the attention branch should extract multi-scale features. We adopt the hourglass block followed by an extra Conv layer to generate the attention map. The hourglass block is known to be capable of capturing information at multiple scales \cite{newell2016stacked}. It has also shown great performance in face \blank{analysis} tasks, such as face alignment~\cite{bulat2017far} and face parsing~\cite{Chen2018CVPR}. The kernel size and filter number for all Conv layers in the hourglass block are $3\times3$ and $64$ respectively. \para{Feature Branch} After experimenting with several variants of residual blocks \cite{Lim_2017_CVPR_Workshops,He2016}, we finally choose the pre-activation Residual Unit with PReLU \cite{he2015delving} as our feature branch. Although previous general image SR work \cite{Lim_2017_CVPR_Workshops} argued that networks without batch normalization perform better, we find that pre-activation structure shows slightly better performance with batch normalization. We use PReLU as the activation function after batch normalization to avoid ``dead features'' caused by zero gradients in ReLU, and it shows more stable performance \cite{dong2016accelerating}. For the residual blocks in downscale and upscale module, we slightly modify the original residual branch using scale Conv (see Fig.~\ref{fig:scale_res}), and (\ref{eq:res-out}) becomes \begin{equation} \blank{\mathbf{x}_j = \mathcal{F}_{scale}(\mathbf{x}_{j-1}) + {\boldsymbol \alpha}_j \otimes \mathbf{f}_j}, \end{equation} where $\mathcal{F}_{scale}$ denotes the scale Conv layer. Downscale Conv is a normal Conv layer with stride $2$, and upscale Conv is a nearest-neighbor upsampling layer with a normal Conv layer which helps avoid checkerboard artifacts \cite{odena2016deconvolution}. \begin{figure}[htb] \includegraphics[width=1.\linewidth]{Fig_scale_res.pdf} \caption{Scale Residual Block} \label{fig:scale_res} \end{figure} \subsection{Multi-scale Discriminator Network} We extend \blank{our} SPARNet to SPARNetHD \blank{to generate high resolution} and more realistic SR images. SPARNetHD increases the channel number of SPARNet and adopt multi-scale discriminators similar to Pix2PixHD \cite{wang2018pix2pixHD}. We refer to the discriminators as $D_1, D_2$\blank{,} and $D_3$, which are used to discriminate \blank{SR images at three different scales, namely} $512\times512$, $256\times256$\blank{,} and $128\times128$\blank{, respectively}, from the \blank{ground truth downsampled to the same resolutions}. Using multiple discriminators at different scales can help to improve the quality of the \blank{SR} images. The loss \blank{functions used in training} SPARNetHD \blank{are composed of the following} four components: \noindent (1) \textit{Pixel loss}. \blank{We} use L1-norm as the pixel level loss between $I_{SR}$ and $I_{HR}$. It mainly helps to constrain the low level information in the outputs especially color, and is defined as \begin{align} \blank{\mathcal{L}_{pix}^{h}} &\blank{= \frac{1}{N} \sum_{i=1}^N \|I_{SR}^i - I_{HR}^i\|_1},\\ \blank{I_{SR}^i} &\blank{= G(I_{LR-UP}^i)}, \end{align} \blank{where $G$ denotes the SPARNetHD generator.} \noindent (2) \textit{Adversarial loss}. \blank{It is the critical loss which helps to make the outputs sharper and generate more realistic textures such as hair. The loss functions of the generator and discriminator are formulated as} \begin{gather} \mathcal{L}^h_{GAN\_G} = \frac{1}{N} \sum_{i=1}^N\sum_{k=1}^3 -D_k(I_{SR}^i),\\ \begin{aligned} \mathcal{L}^h_{GAN\_D} = \frac{1}{N} \sum_{i=1}^N\sum_{k=1}^3 [\max(0, 1 - D_k(I_{HR}^i)) \\ + \max(0, 1 + D_k(I_{SR}^i))], \end{aligned} \end{gather} where the outputs of $D_k$ are scalars which indicates whether the input images are real ($\geq 1$) or fake ($\leq -1$). \noindent (3) \textit{Feature matching loss}. This is the feature space loss of the discriminators \cite{wang2018pix2pixHD}. It helps to stabilize the training of GAN. Let \blank{$\mathbf{f}_{D_k}^l$} be \blank{the} feature map of the \blank{$l$-th} layer in \blank{$D_k$}, \blank{$L_k$} be the total number of layers in \blank{$D_k$}, and \blank{$M_k^l$} be the number of elements in \blank{$\mathbf{f}_{D_k}^l$}. \blank{The feature matching loss is then formulated as} \begin{equation} \mathcal{L}^h_{fm} = \blank{\frac{1}{N} \sum_{i=1}^N\sum_{k=1}^3 \sum_{l=1}^{L_k} \frac{1}{M_k^l} \| \mathbf{f}_{D_k}^l(I_{SR}^i) - \mathbf{f}_{D_k}^l(I_{HR}^i)\|_1},\label{eq:fm_loss} \end{equation} \noindent (4) \textit{Perceptual loss}. Different from feature matching loss, perceptual loss~\cite{ledig2017photo} is the feature space loss of the pretrained VGG19 network~\cite{simonyan2014very}. It helps to constrain the high level semantics in the outputs. We follow the notation of Eq.~\ref{eq:fm_loss} and denote the perceptual loss as \begin{equation} \mathcal{L}^h_{pcp}=\blank{\frac{1}{N} \sum_{i=1}^N\sum_{l=1}^{L_{VGG}} \frac{1}{M_{VGG}^l} \|\mathbf{f}_{VGG}^l(I_{SR}^i) - \mathbf{f}_{VGG}^l(I_{HR}^i)\|_1.} \end{equation} \noindent \blank{Finally, the loss functions are defined as} \begin{gather} \mathcal{L}^h_G = \lambda_{pix}\mathcal{L}^h_{pix} + \lambda_{adv}\mathcal{L}^h_{GAN\_G} + \lambda_{fm}\mathcal{L}^h_{fm} + \lambda_{pcp}\mathcal{L}^h_{pcp}\blank{,} \label{eq:loss-hd-final}\\ \mathcal{L}^h_D = \mathcal{L}^h_{GAN\_D}\blank{,} \end{gather} where $\mathcal{L}^h_G$ and $\mathcal{L}^h_D$ are minimized iteratively to train $G$ and $D$, and $\lambda_{pix}, \lambda_{adv}, \lambda_{fm}$, and $\lambda_{pcp}$ are the \blank{weights for each loss item respectively}. The reason why we use more complicated loss functions to train SPARNetHD is to generate results with high perceptual quality. As pointed out by \cite{blau2018perception}, distortion and perceptual quality are at odds with each other. Methods trained with only $\mathcal{L}_{pix}$ in Eq. \ref{eq:pix} always lead to better PSNR and SSIM scores, but over-smoothed results with bad perceptual quality. Therefore, we train SPARNet with $\mathcal{L}_{pix}$ to make fair comparison on distortion metrics (\emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot, PSNR and SSIM scores) with previous works. \subsection{Training Details} For SPARNet, we set the batch size as 64, and fix the learning rate at $2\times10^{-4}$. We \blank{use} Adam~\cite{kingma2014adam} to optimize the model with $\beta_1=0.9$ and $\beta_2=0.99$. For SPARNetHD, we empirically set $\lambda_{pix}=100$, \blank{$\lambda_{adv}=1$}, $\lambda_{fm}=10$, and \blank{$\lambda_{pcp}=1$}. The learning rates of $G$ and $D$ are $1\times10^{-4}$ and $4\times10^{-4}$ respectively. We \blank{use} Adam \blank{to optimize} both $G$ and $D$ with $\beta_1=0.5$ and $\beta_2=0.99$. The batch size \blank{is} set to $2$. Our models \blank{are} implemented in PyTorch and run on a Tesla K40 GPU. \section{Experiments} In this section, we conduct experiments for SPARNet and SPARNetHD respectively. First, we \blank{analyze} the effectiveness of the proposed spatial attention mechanism in SPARNet, and compare SPARNet with previous face SR methods and general SR methods with different evaluation metrics using the same training data. Second, we evaluate the performance of SPARNetHD on real LR faces trained on synthetic datasets. \subsection{Analysis of SPARNet} \subsubsection{Datasets and Evaluation Metrics} \para{Training Data} We use CelebA~\cite{liu2015faceattributes} to train SPARNet. We first detect faces using MTCNN~\cite{zhang2016mtcnn}, and crop out the face regions roughly without any pre-alignment operation. Next, we select images larger than $128\times128$, resize them to $128\times128$ through bicubic interpolation, and use them as the HR training set. \blank{The} LR training set is obtained by downsampling the HR images to $16\times16$. This results in roughly $179$K image pairs. To avoid overfitting, we \blank{carry} out data augmentation by random horizontal flipping, image rescaling (between $1.0$ and $1.3$), and image rotation ($\ang{90}$, $\ang{180}$ and $\ang{270}$). \para{Testing Data} Following previous works~\cite{zhu2016deep,huang2017wavelet,Chen2018CVPR}, we use the test set of Helen~\cite{Sagonas_2013_CVPR_Workshops} for evaluation of image quality and landmark detection. For identity similarity evaluation, we use the same test set as in \cite{zhang2018super}, which is specifically designed to preserve identity in face SR. This dataset contains randomly selected images of $1,000$ identities from UMD-Face~\cite{bansal2016umdfaces}. Following the practice of image super-resolution, the Peak Signal-to-Noise Ratio (PSNR) and Structure SIMilarity (SSIM) index calculated on the luminance channel are used as the primary quantitative evaluation metrics. Since two most important applications of face SR are alignment and identification of LR faces, we adopt two further metrics, namely landmark detection and identity similarity, to evaluate face SR performance. \para{Landmark Detection} As mentioned before, structure recovery is very important in face SR. Similar to \cite{Chen2018CVPR,bulat2017super}, we use landmark detection accuracy for evaluation. Specifically, we use a popular landmark detection model, FAN\footnote{\url{https://github.com/1adrianb/face-alignment}} \cite{bulat2017far}, which is pre-trained on HR faces, to detect landmarks on SR and HR faces. Following \cite{bulat2017far}, we use the \blank{area under the curve} (AUC) of the normalized mean error (NME) to quantify the performance. \para{Identity Similarity} Identity similarity measures how well identity information is preserved in a super-resolved face. Same as \cite{zhang2018super}, we first extract identity feature vectors for the SR and HR faces using a pre-trained SphereFace model\footnote{\url{https://github.com/clcarwin/sphereface_pytorch}} \cite{Liu_2017_CVPR}, and then compute the identity similarity as the cosine distance between the two feature vectors. \begin{figure}[t] \centering \subfigure[Image Quality]{\includegraphics[width=.49\linewidth]{Fig_ablation1_a.pdf}\label{fig:base-spar-quality}} \subfigure[Landmark Detection]{\includegraphics[width=.49\linewidth]{Fig_ablation1_b.pdf}\label{fig:base-spar-lmk}} \subfigure[Visualization of the PSNR (left) and SSIM (right) error maps. The heatmaps for Baseline and SPARNet are the average 2D PSNR/SSIM error maps (larger value indicates larger error), and the improvement heatmaps show the error reduction (larger value indicates more error reduction).]{\includegraphics[width=.99\linewidth]{Fig_ablation1_c.pdf} \label{fig:score-improve-visual}} \caption{Quantitative comparison between Baseline, SPARNet-V1 and SPARNet on the Helen test set.} \label{fig:base-spar} \end{figure} \subsubsection{Ablation Study} We compare the following three variants of our model: \begin{itemize} \item Baseline: residual SR network without any spatial attention branches. \item SPARNet-V$N$: To evaluate the effectiveness of using multiple FAU blocks, we keep the feature branch unchanged and vary the numbers of attention branch used in SPARNet \footnote{Reducing the numbers of entire FAU would make the network shallower which would definitely make the results worse, therefore we only vary the number of attention branch}. Considering that decoder parts are supposed to be more sensitive to spatial attention, we gradually increase the number of attention branches from the backend. We denote models with $N$ spatial attention branches as SPARNet-V$N$, where $N \in \{1, 2, 4, 8, 16\}$. \item SPARNet-S$M$: To demonstrate that it is crucial for the attention mechanism to learn from multi-scale features, we vary the numbers of downsample/upsample blocks to change the smallest size (scale) of feature maps in the bottleneck. We denote SPARNet with $M\times M$ size of feature maps in the bottleneck of attention branch as SPARNet-S$M$, where $M \in \{2, 4, 8, 16\}$ and smaller $M$ indicates more scales of features are used. \item SPARNet: the full model used in this work, \emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot, SPARNet-V16-S4. \end{itemize} \para{Effectiveness of Spatial Attention} To evaluate the effectiveness of the proposed spatial attention mechanism, we compare the results of SPARNet-V1 and SPARNet with that of the Baseline model. Fig~\ref{fig:base-spar-quality} shows that, with the proposed spatial attention mechanism, we can generate results with better image quality in terms of both PSNR and SSIM scores. This is expected as the spatial attention mechanism enables our network to focus on \blank{and} better recover the key \blank{face} structures. To visualize the improvement brought by the attention mechanism, we align the faces to a fixed template based on five key facial landmarks (\emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot two eye centers, nose, and two mouth corners), calculate 2D PSNR and SSIM error maps\footnote{The PSNR error is calculated by mean square error, and the SSIM error is calculated by subtracting the SSIM score from 1.} for each image, and average the error maps over the whole test set. It can be observed from Fig.~\ref{fig:score-improve-visual} that pixels corresponding to key \blank{face} structures are most difficult to recover (\emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot, with larger errors), and as expected, most of the improvement happens around them. Furthermore, we compare the landmark detection results on the super-resolved images. Better recovery of key \blank{face} structures should lead to \blank{higher} landmark detection accuracy. It can be seen in Fig.~\ref{fig:base-spar-lmk} that SPARNet achieves better landmark detection accuracy ($58.51\%$ AUC) than the Baseline ($56.23\%$ AUC). This demonstrates the benefit of the spatial attention mechanism. Fig.~\ref{fig:ablation-result-example} shows some SR results on the Helen test set. It can be observed that SPARNet can produce sharper and clearer \blank{face} structures than the Baseline, especially for the eyes. \para{Number of FAUs} By comparing the results of SPARNet-V1 with that of SPARNet in Fig.~\ref{fig:base-spar}, we can see that SPARNet, which is composed entirely of FAUs, performs better than SPARNet-V1, which has only one FAU at the end. Although the attention map of SPARNet-V1 can focus on the key \blank{face} structures, some noises also show up on the face region \blank{and cause} some distraction \blank{(see Fig.~\ref{fig:ablation-result-example} bottom left)}. This suggests that bootstrapping the key \blank{face} structures using a single FAU may be sub-optimal. On the other hand, the \blank{sequence of} FAUs in SPARNet allow the attention maps to gradually focus on different key \blank{face} structures at different stages. For instances, one can see the attention map of the second last FAU focuses cleanly on the outline of the key \blank{face} structures, and that of the last FAU focuses on the general face region \blank{(see Fig.~\ref{fig:ablation-result-example} bottom right). In Fig. \ref{fig:ablation-faus}, we show more results comparison of SPARNet-V$N$. It can be observed that the evaluation PSNR scores of SPARNet-V$N$ show a positive correlation with $N$, which demonstrates the effectiveness of stacking multiple FAUs.} \para{Multiscale features in FAU} The results of SPARNet-S$M$ are shown in Fig. \ref{fig:ablation-hourglass}. We can see that models with more scales (\emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot, smaller $M$) generally perform better, but the improvement declines when $M$ becomes smaller. The performance of SPARNet-S$4$ is similar to SPARNet-S$2$. Therefore, we set $M=4$ for SPARNet to balance the performance and computation cost. \begin{figure}[t] \centering \includegraphics[width=.99\linewidth]{Fig_ablation1_d.pdf} \caption{Results on the Helen test set. Top: HR photo and SR results; bottom: spatial attention map in FAU of SPARNet-V1 (left) and last three FAUs of SPARNet (right).} \label{fig:ablation-result-example} \end{figure} \begin{figure}[ht] \centering \centering \subfigure[Evaluation PSNR score of SPARNet-V$N$ during training.]{\includegraphics[width=.49\linewidth]{ablation_faus.pdf}\label{fig:ablation-faus}} \subfigure[Evaluation PSNR score of SPARNet-S$M$ during training.]{\includegraphics[width=.49\linewidth]{ablation_hourglass.pdf}\label{fig:ablation-hourglass}} \caption{Ablation study of SPARNet-V$N$ and SPARNet-S$M$ on Helen testset. We set $M=4$ when training SPARNet-V$N$, and $N=16$ for SPARNet-S$M$.} \label{fig:more-sparnet-ablatoin} \end{figure} \subsection{Comparisons of SPARNet against Other Methods} We compare SPARNet with state-of-the-art general image SR method RCAN~\cite{zhang2018rcan}, latest attention network for image classification CBAM~\cite{woo2018cbam}\blank{,} and other face SR methods, including URDGN~\cite{yu2016ultra}, Wavelet-SRNet~\cite{huang2017wavelet}, Attention-FH~\cite{Cao2017Attention}, FSRNet~\cite{Chen2018CVPR}\blank{,} SICNN \cite{zhang2018super}, PFSRNet \cite{pfsrnet} and DICNet \cite{dicnet}. When comparing with RCAN and CBAM, we replace our FAU with the corresponding attention module (borrowed from public released codes) and keep network depth the same for a fair comparison. \emph{All models are trained \blank{using} the same dataset except for FSRNet and SICNN.} Note that FSRNet only provides test code and SICNN relies on a much larger pre-aligned training set. \subsubsection{Overall Results} Quantitative comparison with other state-of-the-art methods on the Helen test set is shown in Table~\ref{tab:psnr-ssim}. SPARNet clearly outperforms both generic SR methods and face SR methods in terms of both PSNR and SSIM scores. With the spatial attention mechanism, SPARNet can better recover important \blank{face} structures. One can observe from Fig.~\ref{fig:qual-comp} that while most of the other methods fail to recover the eyes and nose, and the shapes are blurry, SPARNet can generate sharper results with shapes close to the ground truth HR images. \begin{table*}[ht] \caption{Quantitative comparison on the Helen (first 3 rows) and UMD (last row) test \blank{sets} with a $16\times16$ input size and an upscale factor of $8\times$. The AUCs are calculated under a threshold of $10\%$. The results of FSRNet$^*$ are generated using the test model provided by its authors.} \label{tab:psnr-ssim} \centering \begin{tabular}{|c|ccccccc|cc|} \hline Method & Bicubic & RCAN & CBAM & URDGN & Wavelet & Att-FH & FSRNet$^*$ & Baseline & SPARNet \\ \hline \hline PSNR & 23.52 & 26.40 & \textcolor{blue}{\textbf{26.46}} & 25.17 & 26.42 & 25.10 & 24.97 & 26.38 & \textcolor{red}{\textbf{26.59}} \\ \hline SSIM & 0.6408 & 0.7648 & 0.7666 & 0.7140 & \textcolor{blue}{\textbf{0.7711}} & 0.7188 & 0.7091 & 0.7639 & \textcolor{red}{\textbf{0.7716}} \\ \hline AUC($<10\%$) & 4.42\% & 56.53\% & 56.83\% & 41.78\% & \textcolor{blue}{\textbf{58.44}}\% & 46.63\% & 40.42\% & 56.23\% & \textcolor{red}{\textbf{58.51\%}} \\ \hline \hline Identity & 0.1851 & 0.5373 & \textcolor{blue}{\textbf{0.5378}} & 0.3981 & 0.5147 & 0.4731 & 0.4765 & 0.5302 & \textcolor{red}{\textbf{0.5546}} \\ \hline \end{tabular} \end{table*} \begin{figure*}[ht] \includegraphics[width=.99\linewidth]{qual_comp/3220402975_1.png} \includegraphics[width=.99\linewidth]{qual_comp/3214022978_1.png} \begin{minipage}[t]{.99\textwidth} \footnotesize \centering \begin{tabular}{*{11}{C{1.4cm}}} (a) HR & (b) Bicubic & (c) RCAN~\cite{zhang2018rcan} & (d) CBAM~\cite{woo2018cbam} & (e) URDGN~\cite{yu2016ultra} & (f) Wavelet~\cite{huang2017wavelet} & (g) Att-FH~\cite{Cao2017Attention} & (h) FSRNet~\cite{yu2018face} & (i) Baseline & (j) SPARNet \end{tabular} \end{minipage} \caption{Qualitative comparison with state-of-the-art methods. The resolution of the input is $16\times16$ and the upscale factor is $8\times$. } \label{fig:qual-comp} \end{figure*} \subsubsection{Detailed Comparisons} \para{Attention Mechanisms} Among all the methods under comparison, only RCAN, CBAM\blank{,} and Attention-FH have an attention mechanism. RCAN is designed for generic SR task. It applies a channel attention mechanism in the feature space. Although channel attention has been shown to be beneficial to general SR task, spatial structures are more important in very low resolution face super-resolution. This explains why RCAN does not show big improvement over the Baseline in terms of PSNR score ($26.40$ vs $26.38$). Attention-FH adopts a patch level attention and cannot recover details (see Fig~\ref{fig:qual-comp}(g)). CBAM also employs a spatial attention. However, it is manipulated to extract semantic information through pooling operations which cause loss of shape and edge details. We compare the SR \blank{results} and spatial attention maps generated by SPARNet and CBAM in Fig~\ref{fig:cbam-spar}. We can see that the attention maps produced by CBAM are blurry and not able to outline important details such as eyes and mouth, whereas the attention maps of SPARNet, thanks to the multi-scale feature based approach, provide more detailed structure information. Accordingly, the mouth and nose generated by SPARNet are sharper and clearer than that of CBAM. \begin{figure}[ht] \subfigure[SR results of CBAM and SPARNet.]{\includegraphics[width=.99\linewidth]{Fig_cbam_spar_a.pdf} \label{fig:cbam-spar-a}} \subfigure[Attention maps of CBAM (top) and SPARNet (bottom).]{\includegraphics[width=.99\linewidth]{Fig_cbam_spar_b.pdf} \label{fig:cbam-spar-b}} \caption{SR results and attention maps of CBAM and SPARNet.} \label{fig:cbam-spar} \end{figure} \para{Comparison with FSRNet~\cite{Chen2018CVPR}} Since FSRNet only provides test code, the results \blank{of FSRNet} reported in Table~\ref{tab:psnr-ssim} \blank{are} not obtained using the same training set as the others. To make a fair comparison, we retrain and test our model on the same dataset used by FSRNet (18K images from CelebA), and show the results in Table~\ref{tab:fsrnet-comp}. Although FSRNet uses face parsing map as an additional supervision, SPARNet still outperforms FSRNet in terms of PSNR and SSIM scores. This demonstrates the superiority of the proposed spatial attention mechanism. \begin{table}[ht] \caption{Comparison between FSRNet and SPARNet on CelebA.} \label{tab:fsrnet-comp} \centering \begin{tabular}{|c|c|c|c|c|} \hline Method & FSRNet & SPARNet \\ \hline PSNR/SSIM & 26.31/0.7522 & \textcolor{red}{\textbf{26.68/0.7741}} \\ \hline \end{tabular} \end{table} \para{Comparison with Wavelet-SRNet~\cite{huang2017wavelet}} Wavelet-SRNet shows closest performance to SPARNet in terms of SSIM score. Nonetheless, SPARNet requires much less parameters and is more computational efficient and flexible than Wavelet-SRNet. The performance and efficiency comparison between Wavelet-SRNet and SPARNet is summarized in Fig.~\ref{fig:wave-spar-comp}. Wavelet-SRNet has $4^n$ parallel subnets with an upscale factor of $2^n$. This implies the network parameters increase quadratically with the upscale factor. Besides, it requires different input size for each upscale factor. Because the output size is usually fixed, a smaller upscale factor needs a larger size of input when training the network. Since a larger input means more convolution operations and requires higher computational power, the GFLOPs of Wavelet-SRNet increase dramatically when the upscale factor is small. In contrast, SPARNet uses the same architecture for different upscale factors, and achieves better performance without increasing its computational complexity. \begin{figure}[t] \includegraphics[width=.99\linewidth]{Fig_wavelet.pdf} \caption{Performance and efficiency comparison between Wavelet-SRNet and SPARNet under different upscale factors.} \label{fig:wave-spar-comp} \end{figure} \para{Comparison with landmark based methods} We compare SPARNet with two recent landmark based methods PFSRNet\footnote{\url{https://github.com/DeokyunKim/Progressive-Face-Super-Resolution}} \cite{pfsrnet} and DICNet\footnote{\url{https://github.com/Maclory/Deep-Iterative-Collaboration}} \cite{dicnet}. To get the best results of the compared method, we directly use their public models instead of retraining them since both of them are trained on CelebA, the same as SPARNet. We evaluate the performance on the Helen test dataset provided by DICNet because our test images are cropped in a different way and DICNet performs bad on it. The quantitative results and visual examples are shown in Table \ref{tab:extra-comp} and Fig. \ref{fig:extra-comp} respectively. As we can observe from Table \ref{tab:extra-comp}, SPARNet shows the best PSNR and SSIM scores in the test dataset. The visual results in Fig. \ref{fig:extra-comp} indicate that SPARNet can recover the key face components, especially the eyes, better than DICNet even without any extra landmark information. We hypothesize that this is because it is too difficult to detect accurate landmarks for low resolution face images, and the multi-stage iterative process in DICNet amplifies the error. As for PFSRNet, we found it performs badly when test faces are not aligned. Since detecting landmarks from $16\times16$ LR face is by itself a difficult task, we find the practical value of PFSRNet is limited compared with DICNet and our SPARNet. We also show the computation complexity in Table \ref{tab:extra-comp}. Compared with state-of-the-art method DICNet, our method produces better results with much less parameters. Moreover, our SPARNet is faster than DICNet which is an iterative framework. Compared with PFSRNet, our method achieves much better performance with similar computation complexity. \begin{table}[t] \centering \caption{Quantitative comparison on the Helen test dataset provided by DICNet \cite{dicnet}.} \label{tab:extra-comp} \begin{tabular}{|c|c|c|c|} \hline Methods & PFSRNet \cite{pfsrnet} & DICNet \cite{dicnet} & SPARNet \\ \hline PSNR & 24.13 & 26.73 & \redb{26.97} \\ \hline SSIM & 0.6688 & 0.7955 & \redb{0.8026} \\ \hline \hline Params (M) & 8.97 & 22.80 & 9.86 \\ \hline Time (s) & 0.045 & 0.065 & 0.051 \\ \hline \end{tabular} \end{table} \begin{figure}[t] \centering \includegraphics[width=0.99\linewidth]{extra_compare.pdf} \caption{Visual comparison between PFSRNet, DICNet, and SPARNet on Helen test dataset provided by DICNet. All results are generated by public models trained on CelebA. PFSRNet generates bad results for unaligned test faces. SPARNet generates better key face components than DICNet especially in the eyes.} \label{fig:extra-comp} \end{figure} \para{Comparison with Different Upscale Factors} We also trained models with $4\times$, and $16\times$ upscale factors. The $4\times$ model was trained from scratch, whereas the $16\times$ model was initialized with the pre-trained $8\times$ model. We show the results of $4\times$ and $16\times$ upscale factors in Table~\ref{tab:multi-res}. It can be seen that SPARNet achieves state-of-the-art results for both $4\times$ and $16\times$ upscale factors, especially for \blank{the} $16\times$ upscale factor. \begin{table}[!thb] \caption{Image quality comparison on Helen with upscale factors $4\times$ and $16\times$} \label{tab:multi-res} \setlength{\tabcolsep}{0.25em} \centering \begin{tabular}{|c|c|cccc|c|} \hline & Scale & Bicubic & RCAN & CBAM & Wavelet & SPARNet \\ \hline \hline PSNR & \multirow{2}{*}{$4\times$} & 27.43 & 30.73 & \textbf{\textcolor{blue}{30.76}} & 30.67 & \textbf{\textcolor{red}{30.83}} \\ SSIM & & 0.8049 & 0.8857 & 0.8861 & \textbf{\textcolor{red}{0.8888}} & \textbf{\textcolor{blue}{0.8872}} \\ \hline \hline PSNR & \multirow{2}{*}{$16\times$} & 20.22 & 20.71 & \textbf{\textcolor{blue}{20.75}} & 22.44 & \textbf{\textcolor{red}{22.85}}\\ SSIM & & 0.5180 & 0.6360 & \textbf{\textcolor{blue}{0.6375}} & 0.6314 & \textcolor{red}{\textbf{0.6426}} \\ \hline \end{tabular} \end{table} \subsubsection{Landmark Detection Results} As mentioned previously, the proposed spatial attention mechanism helps recover important \blank{face} structures. Landmark detection can be exploited to evaluate such an ability. From Table~\ref{tab:psnr-ssim}, we can see that SPARNet \blank{achieves} the best performance in landmark detection. Wavelet-SRNet's performance is similar to SPARNet, but SPARNet is more efficient (refer to Fig.~\ref{fig:wave-spar-comp}) and shows much better performance (in terms of PSNR/SSIM scores) for \blank{the} $16\times$ upscale factor (refer to Table~\ref{tab:multi-res}). \subsubsection{Identity Similarity Results} We first evaluate the models in Table~\ref{tab:psnr-ssim} on the UMD-Face test set. Note that these models are trained on CelebA without pre-alignment. SPARNet achieves the best performance. We also notice that GAN based methods such as URDGN \blank{are} worse than non-GAN based methods. This is because GAN based methods \blank{target} at producing realistic textures but \blank{they do} not care whether the generated textures \blank{are} consistent with the \blank{HR images}. Therefore, \blank{they} may generate textures which look sharper but disturb the identity information. To further explore how well SPARNet can preserve identity information, we retrain our model using the same dataset as SICNN to allow a fair comparison. We denote this model as SPARNet$^*$. From Table~\ref{tab:id-sim}, we can see that SPARNet$^*$ shows better performance than SICNN even without using any explicit identity supervision. This proves that the proposed spatial attention mechanism is beneficial to preserving identity information in face SR. \begin{table}[thb] \caption{Comparison of identity similarity between SICNN and SPARNet$^*$. (SPARNet$^*$ is trained with the same dataset as SICNN.)} \label{tab:id-sim} \centering \begin{tabular}{|c|c|c|c|} \hline Method & SICNN~\cite{zhang2018super} & SPARNet$^*$ \\ \hline \hline Identity Similarity & 0.5978 & \textcolor{red}{\textbf{0.6272}} \\ \hline \end{tabular} \end{table} \subsection{Evaluation of SPARNetHD} Different from SPARNet which aims to hallucinate very low resolution faces (\emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot, $16\times16$) that are difficult to recognize, the extended SPARNetHD tries to deal with real world low resolution faces. \blank{Typical} application scenarios \blank{include} old photos \blank{and} unclear faces shot by \blank{low-end} devices. These LR faces usually \blank{do} not have fixed upscale factors and are usually noisy and blurry. \blank{Hence}, we need \blank{a} different degradation model \blank{for data synthesis. We} also need high resolution datasets in order to get high resolution outputs. \subsubsection{Degradation Model} According to previous works \cite{Li_2018_ECCV,xu2017learning} and common practice in \blank{single image SR} framework, we generate the LR image $I_l^s$ \blank{from the HR image $I_h$ using} the following degradation model: \begin{equation} I_l^s = ((I_h \blank{*} \textbf{k}_\varrho)\downarrow_s + \textbf{n}_\delta)_{JPEG_q}, \label{equ:degrade} \end{equation} where \blank{$*$} represents the convolution operation between \blank{$I_h$} and a blur kernel $\textbf{k}_\varrho$ with parameter $\varrho$. $\downarrow_s$ is the downsampling operation with a scale factor $s$. $\textbf{n}_\delta$ denotes the additive white Gaussian noise (AWGN) with a noise level $\delta$. $(\cdot)_{JPEG_q}$ indicates the JPEG compression operation with quality factor $q$. The hyper parameters $\varrho, s, \delta, q$ are randomly selected for each HR image $I_h$, and $I_l^s$ is generated online. We set the hyper parameters as \begin{itemize} \item $\textbf{k}_\varrho$ is the blur kernel. We randomly choose one of the following four kernels: Gaussian Blur \blank{($3 \leq \varrho \leq 15$)}, Average Blur \blank{($3 \leq \varrho \leq 15$)}, Median Blur \blank{($3 \leq \varrho \leq 15$)}, Motion Blur \blank{($5 \leq \varrho \leq 25$)}; \item $\downarrow_s$ is the downsample operation. The scale factor $s$ is randomly selected in $[\frac{16}{512}, \frac{128}{512}]$; \item $\textbf{n}_\delta$ is addictive white gaussian noise (AWGN) with \blank{$0 \leq \delta \leq 0.1\times255$}; \item $JPEG_q$ is the JPEG operation. The compression level is randomly chosen from $[60, 85]$, in which higher means stronger compression level. \end{itemize} After \blank{obtaining} $I_l^s$, $I_{LR-UP}=(I_l^s)\uparrow_s$ \blank{serves as the LR input of SPARNetHD}. \subsubsection{Datasets and Evaluation Metrics} \para{Training data} We adopt the FFHQ \cite{karras2019style} dataset \blank{for training}. This dataset consists of $70,000$ high-quality images at a size of $1024\times1024$ crawled from the internet. All images are automatically cropped and aligned. We resize the images to $512\times512$ with bilinear downsampling as the ground-truth HR images, and synthesize the LR inputs online with Eq. \ref{equ:degrade}. \para{Synthetic Test Data} We use the test partition of CelebAHQ dataset~\cite{karras2017progressive} as synthetic test data. CelebAHQ contains $30,000$ HR faces in total which are split into a training set ($24,183$ images), a validation set ($2,993$ images), and a test set ($2,824$ images). We generate the LR dataset with Eq.~\ref{equ:degrade}, denoted as CelebAHQ-Test. \para{Natural Test Data} We collect $1,020$ faces smaller than $48\times48$ from CelebA. We also collect some old photos from the internet for testing. All images are cropped and aligned in the same manner as FFHQ, and then resized to $512\times512$ using bicubic upsampling. We merge all these images together and create a new dataset containing $1,051$ natural LR faces, denoted as CelebA-TestN. \para{Evaluation Metrics} For CelebAHQ-Test, we use LPIPS (Learned Perceptual Image Patch Similarity) \cite{zhang2018perceptual} as our evaluation metric \blank{because it} can better represent the visual quality \blank{of} HR images than PSNR and SSIM. For CelebA-TestN, since there are no ground truth HR images, we use FID (Fréchet Inception Distance) \cite{heusel2017gans} to measure the similarity between the SR results and reference datasets containing HR face images. We use the HR version of CelebAHQ-Test as the reference dataset. \subsubsection{Ablation Study of Loss Functions} \begin{figure*}[!ht] \centering \includegraphics[width=.99\textwidth]{ablation_sparnethd.pdf} \begin{tabular}{*{6}{C{2.6cm}}} LR Input & SPARNetHD & w/o $\mathcal{L}_{pix}$ & w/o $\mathcal{L}_{GAN}$ & w/o $\mathcal{L}_{fm}$ & w/o $\mathcal{L}_{pcp}$ \end{tabular} \caption{Ablation study of losses used in SPARNetHD on the synthetic dataset CelebAHQ-Test (first row) and real dataseet CelebA-TestN (second row). Better zoom in to see the details.} \label{fig:sparhd-ablation} \end{figure*} To verify the effectiveness of different loss terms in Eq. \ref{eq:loss-hd-final}, we conduct an ablation study by removing each of them separately. Same as SPARNetHD, all models are trained for 100k iterations which take about 3 days on a single GPU. The comparison results are shown in Table \ref{tab:quant-results} and Fig. \ref{fig:sparhd-ablation}. We can observe that $\mathcal{L}_{pix}$ has the least influence on the final performance because it mainly affects the subtle low level details. Comparing the results of second column and third column, the skin color of SPARNetHD (w/o $\mathcal{L}_{pix}$) is mixed with slight background green color compared with full SPARNetHD in the first row, and teeth shape is less natural w/o $\mathcal{L}_{pix}$ in the second row (please zoom in to see the details). From the 4th column, we can see that the network fails to generate sharp edges and realistic details without adversarial loss, and these greatly degrade the quantitative performance. In the 5th column, we can observe that the generated details are less realistic and there are some noise-like artifacts near the hair in the first row. This is mainly because the GAN network trained without $\mathcal{L}_{fm}$ is less stable. In the last column, we can see obvious shape distortions in the eyes and lips since $\mathcal{L}_{pcp}$ mainly helps to constrain mid-level and high-level semantics. \subsubsection{Comparison with Other Methods} \begin{figure*}[!ht] \centering \includegraphics[width=.99\textwidth]{sparnet_celebahq_test.jpg} \begin{minipage}[t]{.99\textwidth} \centering \begin{tabular}{*{6}{C{2.6cm}}} (a) Synthetic LR & (b) ESRGAN & (c) Pix2PixHD & (d) SFTGAN & (e) Ours & (f) GT \end{tabular} \end{minipage} \caption{Visual comparison between \blank{results produced by} SPARNetHD and other methods on \blank{the} synthetic dataset CelebAHQ-Test. Better zoom in to see the details.} \label{fig:sparhd-comp-synthetic} \end{figure*} \begin{figure*}[!ht] \centering \includegraphics[width=0.99\textwidth]{sparnet_celebatestn.jpg} \begin{minipage}[t]{.99\textwidth} \centering \begin{tabular}{*{5}{C{3.1cm}}} (a) Real LR & (b) ESRGAN & (c) Pix2PixHD & (d) SFTGAN & (e) Ours \end{tabular} \end{minipage} \caption{Visual comparison between \blank{results produced by} SPARNetHD and other methods on real LR dataset CelebA-TestN. Better zoom in to see the details.} \label{fig:sparhd-comp-natural} \end{figure*} We conduct experiments to compare SPARNetHD with other methods on CelebAHQ-Test and CelebA-TestN. \blank{Since very} few previous face SR methods can produce \blank{high resolution} outputs, we mainly compare SPARNetHD with general SR methods and GAN based image-to-image translation methods which \blank{provide} public codes and can be used to generate \blank{high resolution} outputs. Specifically, we compare SPARNetHD with state-of-the-art SR method ESRGAN~\cite{wang2018esrgan}, parsing map based SR method SFTGAN~\cite{wang2018sftgan}, high resolution image translation method Pix2PixHD \cite{wang2018pix2pixHD}, and blind face restoration method based on a reference image GFRNet \cite{Li_2018_ECCV}. We retrain ESRGAN, SFTGAN and Pix2PixHD. We use existing face parsing model to generate face parsing map for SFTGAN. As for GFRNet, we only \blank{carry out a} visual comparison with the results reported in the \blank{original} paper because it needs reference images for training and testing. \begin{table}[t] \caption{Quantitative comparison on CelebAHQ-Test and CelebA-TestN. \emph{Note for w/o $\mathcal{L}_{GAN}$$^*$: because $L_{fm}$ depends on the discriminator, we also remove it when $\mathcal{L}_{GAN}$ is not used.}} \label{tab:quant-results} \centering \begin{tabular}{l|c|c} \hline Methods & CelebAHQ-Test (LPIPS$\downarrow$) & CelebA-TestN (FID$\downarrow$) \\ \hline\hline ESRGAN \cite{wang2018esrgan} & 0.49 & 60.67 \\ SFTGAN \cite{wang2018sftgan} & 0.36 & 37.76 \\ Pix2PixHD \cite{wang2018pix2pixHD} & 0.36 & 43.1 \\ \hline \hline SPARNetHD & \redb{0.29} & \redb{27.16} \\ w/o $\mathcal{L}_{pix} $ & 0.31 & 30.63 \\ w/o $\mathcal{L}_{GAN}$$^*$ & 0.38 & 39.75 \\ w/o $\mathcal{L}_{fm} $ & 0.32 & 33.52 \\ w/o $\mathcal{L}_{pcp} $ & 0.31 & 32.97 \\ \hline \end{tabular} \end{table} Table~\ref{tab:quant-results} gives \blank{a} quantitative \blank{comparison} on CelebAHQ-Test and CelebA-TestN. We can observe that SPARNetHD \blank{outperforms the other methods on both datasets}. Pix2PixHD performs better than ESRGAN because of the multi-scale discriminators. \blank{The} fact that the results of SPARNetHD are much better than \blank{that of} Pix2PixHD demonstrates the effectiveness of the proposed attention mechanism\blank{,} which is the key difference between SPARNetHD and Pix2PixHD. SFTGAN shows slightly better performance than Pix2PixHD with the help of face parsing maps. This \blank{shows the advantage of taking parsing map as additional supervision}. Nevertheless, the proposed SPARNetHD outperforms SFTGAN by a large margin. This is because parsing map can only provide coarse semantic level guidance, while the proposed spatial attention mechanism cannot only provide coarse semantic guidance but also give low level texture guidance. The \blank{qualitative} results in Fig.~\ref{fig:sparhd-comp-synthetic} and Fig~\ref{fig:sparhd-comp-natural} \blank{are consistent} with the observations in Table~\ref{tab:quant-results}. Fig.~\ref{fig:sparhd-comp-synthetic} shows the results on \blank{the} synthetic test dataset CelebAHQ-Test. We can see that ESRGAN fails to generate realistic faces. While the results of Pix2PixHD \blank{look} much better, \blank{undesirable artifacts show up} in the right eyes. SFTGAN does not have such problem\blank{, but it cannot} generate detailed textures\blank{, especially in the hair and teeth}. In contrast, SPARNetHD can restore key \blank{face} components as well as the texture details in the hair and teeth. \blank{Similar} phenomenon can also be observed \blank{in} Fig.~\ref{fig:sparhd-comp-natural}\blank{,} which \blank{shows} the results on natural LR faces. While the competitive methods generate many artifacts for real LR faces, our results are much more robust and \blank{natural. This} illustrates the good generalization ability of SPARNetHD. We also compare SPARNetHD with a recent blind face restoration method GFRNet. GFRNet takes a LR image and a HR image of the same person as \blank{input} to restore the LR image. We \blank{show some qualitative results} on natural LR faces in Fig.~\ref{fig:sparhd-comp-gfrnet}. It can be observed that SPARNetHD generates much better texture details than GFRNet even without \blank{utilizing} any additional information \blank{in} the training stage. \begin{figure}[!htb] \centering \includegraphics[width=.99\linewidth]{sparnet_gfrnet_comp.jpg} \begin{minipage}[t]{.99\linewidth} \centering \begin{tabular}{*{3}{C{2.6cm}}} (a) Real LR & (b) GFRNet & (c) Ours \end{tabular} \end{minipage} \caption{Visual comparison between \blank{results produced by} SPARNetHD and GFRNet. Better zoom in to see the details.} \label{fig:sparhd-comp-gfrnet} \end{figure} \section{Conclusion} We propose a SPatial Attention Residual Networks (SPARNet) for very low resolution face super-resolution. SPARNet is composed \blank{by stacking} Face Attention Units (FAUs), which extend vanilla residual block with a spatial attention branch. The spatial attention mechanism allows the network to \blank{pay less attention on the less feature-rich regions.} \blank{This} makes the training of SPARNet more effective and efficient. Extensive experiments with various kinds of metrics illustrate the advantages of SPARNet over current state-of-the-arts. We further extend SPARNet to SPARNetHD with more channel numbers and multi-scale discriminator networks. SPARNetHD trained on synthetic datasets is able to generate realistic and \blank{high resolution} outputs (\emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot, $512\times512$) for LR face images. Quantitative and qualitative comparisons with other methods indicate that the proposed spatial attention mechanism is beneficial to restore texture details of LR face images. We also demonstrate \blank{that} SPARNetHD can \blank{generalize} well to real world LR faces, \blank{making it highly practical and applicable}. \section*{Acknowledgments} The authors would like to thank Tencent AI Lab for supporting this research. The work of Kwan-Yee K. Wong was supported by a grant from the Research Grant Council of the Hong Kong (SAR), China, under the Project HKU 17203119. \ifCLASSOPTIONcaptionsoff \newpage \fi
{ "redpajama_set_name": "RedPajamaArXiv" }
5,914
Q: "this" in Arrow functions , function function makeCounter() { return { count:0, counter:function(){ return ++this.count; }, counter1:()=>{ return ++this.count } } } let counters= makeCounter(); console.log(counters.count)// 0 console.log(counters.counter())//1 console.log(counters.counter1())// NaN` //in counter() ,counter1(), 'this' is different ,why ??? //in counter() ,counter1(), 'this' is different ,why ???
{ "redpajama_set_name": "RedPajamaStackExchange" }
290
/* @flow */ import type BN from 'bn.js'; import { SCRIPT_CONTAINER_TYPE, TRANSACTION_TYPE, type AccountKey, type AccountUpdate, type Action, type ActionKey, type ActionsKey, type AssetKey, type AssetUpdate, type Block, type Contract, type ContractKey, type Header, type Input, type InvocationDataKey, type Output, type StorageItem, type StorageItemKey, type StorageItemsKey, type StorageItemUpdate, type Transaction, type TransactionKey, type ValidatorKey, type UInt160, type UInt256, Account, Asset, ClaimTransaction, RegisterTransaction, InvocationData, InvocationResultError, InvocationResultSuccess, IssueTransaction, EnrollmentTransaction, PublishTransaction, InvocationTransaction, Validator, common, utils, } from 'neo-blockchain-core'; import { TRIGGER_TYPE, type BlockSystemFeeKey, type OnStep, type TransactionSpentCoinsKey, type TransactionSpentCoinsUpdate, type ChangeSet, type Storage, type VM, type WriteBlockchain, BlockSystemFee, TransactionSpentCoins, } from 'neo-blockchain-node-core'; import _ from 'lodash'; import { BlockLikeStorageCache, OutputStorageCache, ReadAddDeleteStorageCache, ReadAddUpdateStorageCache, ReadAddStorageCache, ReadGetAllAddUpdateDeleteStorageCache, ReadGetAllAddStorageCache, ReadAllAddUpdateDeleteStorageCache, ReadAllAddStorageCache, } from './StorageCache'; import { GenesisBlockNotRegisteredError } from './errors'; type WriteBatchBlockchainOptions = {| settings: $PropertyType<WriteBlockchain, 'settings'>, currentBlock: ?$PropertyType<WriteBlockchain, 'currentBlock'>, currentHeader: ?$PropertyType<WriteBlockchain, 'currentHeader'>, storage: Storage, vm: VM, onStep: OnStep, |}; type Caches = {| account: ReadAllAddUpdateDeleteStorageCache< AccountKey, Account, AccountUpdate, >, action: ReadGetAllAddStorageCache<ActionKey, ActionsKey, Action>, asset: ReadAddUpdateStorageCache<AssetKey, Asset, AssetUpdate>, block: BlockLikeStorageCache<Block>, blockSystemFee: ReadAddStorageCache<BlockSystemFeeKey, BlockSystemFee>, header: BlockLikeStorageCache<Header>, transaction: ReadAddStorageCache<TransactionKey, Transaction>, transactionSpentCoins: ReadAddUpdateStorageCache< TransactionSpentCoinsKey, TransactionSpentCoins, TransactionSpentCoinsUpdate, >, output: OutputStorageCache, contract: ReadAddDeleteStorageCache<ContractKey, Contract>, storageItem: ReadGetAllAddUpdateDeleteStorageCache< StorageItemKey, StorageItemsKey, StorageItem, StorageItemUpdate, >, validator: ReadAllAddStorageCache<ValidatorKey, Validator>, invocationData: ReadAddStorageCache<InvocationDataKey, InvocationData>, |}; type InputClaim = {| type: 'claim' | 'input', hash: UInt256, input: Input, |}; export default class WriteBatchBlockchain { settings: $PropertyType<WriteBlockchain, 'settings'>; _currentBlock: ?$PropertyType<WriteBlockchain, 'currentBlock'>; _currentHeader: ?$PropertyType<WriteBlockchain, 'currentHeader'>; _storage: Storage; _vm: VM; _onStep: OnStep; _caches: Caches; account: ReadAllAddUpdateDeleteStorageCache< AccountKey, Account, AccountUpdate, >; action: ReadGetAllAddStorageCache<ActionKey, ActionsKey, Action>; asset: ReadAddUpdateStorageCache<AssetKey, Asset, AssetUpdate>; block: BlockLikeStorageCache<Block>; blockSystemFee: ReadAddStorageCache<BlockSystemFeeKey, BlockSystemFee>; header: BlockLikeStorageCache<Header>; transaction: ReadAddStorageCache<TransactionKey, Transaction>; transactionSpentCoins: ReadAddUpdateStorageCache< TransactionSpentCoinsKey, TransactionSpentCoins, TransactionSpentCoinsUpdate, >; output: OutputStorageCache; contract: ReadAddDeleteStorageCache<ContractKey, Contract>; storageItem: ReadGetAllAddUpdateDeleteStorageCache< StorageItemKey, StorageItemsKey, StorageItem, StorageItemUpdate, >; validator: ReadAllAddStorageCache<ValidatorKey, Validator>; invocationData: ReadAddStorageCache<InvocationDataKey, InvocationData>; constructor(options: WriteBatchBlockchainOptions) { this.settings = options.settings; this._currentBlock = options.currentBlock; this._currentHeader = options.currentHeader; this._storage = options.storage; this._vm = options.vm; this._onStep = options.onStep; const output = new OutputStorageCache(this._storage.output); this._caches = { account: new ReadAllAddUpdateDeleteStorageCache({ name: 'account', readAllStorage: this._storage.account, update: (value, update) => value.update(update), getKeyFromValue: value => ({ hash: value.hash }), getKeyString: key => common.uInt160ToString(key.hash), createAddChange: value => ({ type: 'account', value }), createDeleteChange: key => ({ type: 'account', key }), }), action: new ReadGetAllAddStorageCache({ name: 'action', readGetAllStorage: this._storage.action, getKeyFromValue: value => ({ blockIndex: value.blockIndex, transactionIndex: value.transactionIndex, index: value.index, }), getKeyString: key => `${key.blockIndex}:${key.transactionIndex}:${key.index}`, // eslint-disable-next-line matchesPartialKey: (value, key) => { // TODO: Implement me throw new Error('Not implemented'); }, createAddChange: value => ({ type: 'action', value }), }), asset: new ReadAddUpdateStorageCache({ name: 'asset', readStorage: this._storage.asset, update: (value, update) => value.update(update), getKeyFromValue: value => ({ hash: value.hash }), getKeyString: key => common.uInt256ToString(key.hash), createAddChange: value => ({ type: 'asset', value }), }), block: new BlockLikeStorageCache({ name: 'block', readStorage: { get: this._storage.block.get, tryGet: this._storage.block.tryGet, }, createAddChange: value => ({ type: 'block', value }), }), blockSystemFee: new ReadAddStorageCache({ name: 'blockSystemFee', readStorage: this._storage.blockSystemFee, getKeyFromValue: value => ({ hash: value.hash }), getKeyString: key => common.uInt256ToString(key.hash), createAddChange: value => ({ type: 'blockSystemFee', value }), }), header: new BlockLikeStorageCache({ name: 'header', readStorage: { get: this._storage.header.get, tryGet: this._storage.header.tryGet, }, createAddChange: value => ({ type: 'header', value }), }), transaction: new ReadAddStorageCache({ name: 'transaction', readStorage: this._storage.transaction, getKeyFromValue: value => ({ hash: value.hash }), getKeyString: key => common.uInt256ToString(key.hash), createAddChange: value => ({ type: 'transaction', value }), onAdd: async value => { await Promise.all( value.outputs.map((out, index) => output.add({ hash: value.hash, index, output: out }), ), ); }, }), transactionSpentCoins: new ReadAddUpdateStorageCache({ name: 'transactionSpentCoins', readStorage: this._storage.transactionSpentCoins, update: (value, update) => value.update(update), getKeyFromValue: value => ({ hash: value.hash }), getKeyString: key => common.uInt256ToString(key.hash), createAddChange: value => ({ type: 'transactionSpentCoins', value }), }), output, contract: new ReadAddDeleteStorageCache({ name: 'contract', readStorage: this._storage.contract, getKeyFromValue: value => ({ hash: value.hash }), getKeyString: key => common.uInt160ToString(key.hash), createAddChange: value => ({ type: 'contract', value }), createDeleteChange: key => ({ type: 'contract', key }), }), storageItem: new ReadGetAllAddUpdateDeleteStorageCache({ name: 'storageItem', readGetAllStorage: this._storage.storageItem, update: (value, update) => value.update(update), getKeyFromValue: value => ({ hash: value.hash, key: value.key, }), getKeyString: key => `${common.uInt160ToString(key.hash)}:${key.key.toString('hex')}`, matchesPartialKey: (value, key) => key.hash == null || common.uInt160Equal(value.hash, key.hash), createAddChange: value => ({ type: 'storageItem', value }), createDeleteChange: key => ({ type: 'storageItem', key }), }), validator: new ReadAllAddStorageCache({ name: 'validator', readAllStorage: this._storage.validator, getKeyFromValue: value => ({ publicKey: value.publicKey }), getKeyString: key => common.ecPointToString(key.publicKey), createAddChange: value => ({ type: 'validator', value }), }), invocationData: new ReadAddStorageCache({ name: 'invocationData', readStorage: this._storage.invocationData, getKeyFromValue: value => ({ hash: value.hash }), getKeyString: key => common.uInt256ToString(key.hash), createAddChange: value => ({ type: 'invocationData', value }), }), }; this.account = this._caches.account; this.action = this._caches.action; this.asset = this._caches.asset; this.block = this._caches.block; this.blockSystemFee = this._caches.blockSystemFee; this.header = this._caches.header; this.transaction = this._caches.transaction; this.transactionSpentCoins = this._caches.transactionSpentCoins; this.output = this._caches.output; this.contract = this._caches.contract; this.storageItem = this._caches.storageItem; this.validator = this._caches.validator; this.invocationData = this._caches.invocationData; } get currentBlock(): Block { if (this._currentBlock == null) { throw new GenesisBlockNotRegisteredError(); } return this._currentBlock; } get currentBlockIndex(): number { return this._currentBlock == null ? 0 : this._currentBlock.index; } get currentHeader(): Header { if (this._currentHeader == null) { throw new GenesisBlockNotRegisteredError(); } return this._currentHeader; } getChangeSet(): ChangeSet { return this.account .getChangeSet() .concat(this.asset.getChangeSet()) .concat(this.action.getChangeSet()) .concat(this.block.getChangeSet()) .concat(this.blockSystemFee.getChangeSet()) .concat(this.header.getChangeSet()) .concat(this.transaction.getChangeSet()) .concat(this.output.getChangeSet()) .concat(this.transactionSpentCoins.getChangeSet()) .concat(this.contract.getChangeSet()) .concat(this.storageItem.getChangeSet()) .concat(this.validator.getChangeSet()) .concat(this.invocationData.getChangeSet()); } async persistBlock(block: Block): Promise<void> { // eslint-disable-next-line const [systemFee, _] = await Promise.all([ block.index === 0 ? Promise.resolve(utils.ZERO) : this.blockSystemFee .get({ hash: block.previousHash }) .then(blockSystemFee => blockSystemFee.systemFee), this.block.add(block), this.header.add(block.header), ]); await this.blockSystemFee.add( new BlockSystemFee({ hash: block.hash, systemFee: systemFee.add( block.getSystemFee({ getOutput: this.output.get, governingToken: this.settings.governingToken, utilityToken: this.settings.utilityToken, fees: this.settings.fees, }), ), }), ); for (const [idx, transaction] of block.transactions.entries()) { // eslint-disable-next-line await this._persistTransaction(block, transaction, idx); } } async _persistTransaction( block: Block, transaction: Transaction, transactionIndex: number, ): Promise<void> { await Promise.all([ this.transaction.add(transaction), this.transactionSpentCoins.add( new TransactionSpentCoins({ hash: transaction.hash, startHeight: block.index, }), ), this._updateAccounts(transaction.inputs, transaction.outputs), this._updateCoins( transaction.inputs, transaction.type === TRANSACTION_TYPE.CLAIM && transaction instanceof ClaimTransaction ? transaction.claims : [], block, ), ]); if ( transaction.type === TRANSACTION_TYPE.REGISTER && transaction instanceof RegisterTransaction ) { await this.asset.add( new Asset({ hash: transaction.hash, type: transaction.asset.type, name: transaction.asset.name, amount: transaction.asset.amount, precision: transaction.asset.precision, owner: transaction.asset.owner, admin: transaction.asset.admin, issuer: transaction.asset.admin, expiration: this.currentBlockIndex + 2 * 2000000, isFrozen: false, }), ); } else if ( transaction.type === TRANSACTION_TYPE.ISSUE && transaction instanceof IssueTransaction ) { const results = await utils.entries( transaction.getTransactionResults({ getOutput: this.output.get, }), ); await Promise.all( results.map(async ([assetHex, value]) => { const hash = common.stringToUInt256(assetHex); const asset = await this.asset.get({ hash }); await this.asset.update(asset, { available: asset.available.add(value.neg()), }); }), ); } else if ( transaction.type === TRANSACTION_TYPE.ENROLLMENT && transaction instanceof EnrollmentTransaction ) { await this.validator.add( new Validator({ publicKey: transaction.publicKey, }), ); } else if ( transaction.type === TRANSACTION_TYPE.PUBLISH && transaction instanceof PublishTransaction ) { const contract = await this.contract.tryGet({ hash: transaction.contract.hash, }); if (contract == null) { await this.contract.add(transaction.contract); } } else if ( transaction.type === TRANSACTION_TYPE.INVOCATION && transaction instanceof InvocationTransaction ) { try { // TODO: Make this less hacky. const temporaryBlockchain = new WriteBatchBlockchain({ settings: this.settings, currentBlock: this._currentBlock, currentHeader: this._currentHeader, storage: (this: $FlowFixMe), vm: this._vm, onStep: this._onStep, }); const result = await this._vm.executeScripts({ scripts: [{ code: transaction.script }], blockchain: temporaryBlockchain, scriptContainer: { type: SCRIPT_CONTAINER_TYPE.TRANSACTION, value: transaction, }, triggerType: TRIGGER_TYPE.APPLICATION, action: { blockIndex: block.index, blockHash: block.hash, transactionIndex, transactionHash: transaction.hash, }, gas: transaction.gas, onStep: this._onStep, }); const assetChangeSet = temporaryBlockchain.asset.getChangeSet(); const assetHash = assetChangeSet .map( change => change.type === 'add' && change.change.type === 'asset' ? change.change.value.hash : null, ) .find(value => value != null); const contractsChangeSet = temporaryBlockchain.contract.getChangeSet(); const contractHashes = contractsChangeSet .map( change => change.type === 'add' && change.change.type === 'contract' ? change.change.value.hash : null, ) .filter(Boolean); await Promise.all([ Promise.all( temporaryBlockchain.getChangeSet().map(async change => { if (change.type === 'add') { await this._caches[change.change.type].add( (change.change.value: $FlowFixMe), true, ); } else if (change.type === 'delete') { await this._caches[change.change.type].delete( (change.change.key: $FlowFixMe), ); } }), ), this.invocationData.add( new InvocationData({ hash: transaction.hash, assetHash, contractHashes, blockIndex: block.index, transactionIndex, result: new InvocationResultSuccess({ stack: result.stack, stackAlt: result.stackAlt, }), }), ), ]); } catch (error) { await this.invocationData.add( new InvocationData({ hash: transaction.hash, assetHash: undefined, contractHashes: [], blockIndex: block.index, transactionIndex, result: new InvocationResultError({ message: error.message }), }), ); } } } async _updateAccounts( inputs: Array<Input>, outputs: Array<Output>, ): Promise<void> { const inputOutputs = await Promise.all( inputs.map(input => this.output.get(input)), ); const addressValues = utils.entries( _.groupBy( inputOutputs .map(output => [output.address, output.asset, output.value.neg()]) .concat( outputs.map(output => [output.address, output.asset, output.value]), ), // eslint-disable-next-line ([address, asset, value]) => common.uInt160ToHex(address), ), ); await Promise.all( addressValues.map(([address, values]) => this._updateAccount( common.hexToUInt160(address), // eslint-disable-next-line values.map(([_, asset, value]) => [asset, value]), ), ), ); } async _updateAccount( address: UInt160, values: Array<[UInt256, BN]>, ): Promise<void> { const account = await this.account.tryGet({ hash: address }); const balances = values.reduce((acc, [asset, value]) => { const key = (common.uInt256ToHex(asset): $FlowFixMe); if (acc[key] == null) { acc[key] = utils.ZERO; } acc[key] = acc[key].add(value); return acc; }, account == null ? {} : account.balances); if (account == null) { await this.account.add( new Account({ hash: address, balances, }), ); } else { const newAccount = await this.account.update(account, { balances }); if (newAccount.isDeletable()) { await this.account.delete({ hash: address }); } } } async _updateCoins( inputs: Array<Input>, claims: Array<Input>, block: Block, ): Promise<void> { const inputClaims = inputs .map(input => ({ type: 'input', input, hash: input.hash })) .concat( claims.map(input => ({ type: 'claim', input, hash: input.hash })), ); const hashInputClaims = utils.entries( _.groupBy(inputClaims, ({ hash }) => common.uInt256ToHex(hash)), ); await Promise.all( hashInputClaims.map(([hash, values]) => this._updateCoin(common.hexToUInt256(hash), values, block), ), ); } async _updateCoin( hash: UInt256, inputClaims: Array<InputClaim>, block: Block, ): Promise<void> { const spentCoins = await this.transactionSpentCoins.get({ hash }); const endHeights = { ...spentCoins.endHeights }; const claimed = { ...spentCoins.claimed }; for (const inputClaim of inputClaims) { if (inputClaim.type === 'input') { endHeights[inputClaim.input.index] = block.index; } else { claimed[inputClaim.input.index] = true; } } await this.transactionSpentCoins.update(spentCoins, { endHeights, claimed, }); } } /* Possibly broken on TestNet: if ( block.index !== 31331 && // Just seems like a bad script - unknown op block.index !== 62024 && // Invalid order for Account arguments block.index !== 131854 && // Calls contract without storage block.index !== 163432 && // Calls contract without storage block.index !== 163446 && // Calls contract without storage block.index !== 163457 && // Calls contract without storage block.index !== 163470 && // Calls contract without storage block.index !== 163484 && // Calls contract without storage block.index !== 163491 && // Calls contract without storage block.index !== 163512 && // Calls contract without storage block.index !== 460363 && // PICKITEM on non-array. block.index !== 460376 && // PICKITEM on non-array. block.index !== 460393 && // PICKITEM on non-array. block.index !== 460410 && // PICKITEM on non-array. block.index !== 561159 && // Bug in contract code - no inputs for transaction block.index !== 568381 && // Bug in contract code - no inputs for transaction block.index !== 572375 && // Bug in contract code - no inputs for transaction block.index !== 608107 && // Unknown OP 0xDB (219) block.index !== 608111 && // Unknown OP 0xDB (219) block.index !== 608135 && // Unknown OP 0x70 (112) block.index !== 609278 && // Unknown OP 0x70 (112) block.index !== 609402 && // Unknown OP 0x70 (112) block.index !== 609408 && // Unknown OP 0x70 (112) block.index !== 609504 && block.index !== 609513 && // Unknown op: 0x70 (112) block.index !== 637192 && // Seems like a bad argument to CheckWitness !error.message.includes('Unknown op: 112') && !error.message.includes('Script execution threw an Error') ) { console.log(block.index); console.error(error); throw error; } */
{ "redpajama_set_name": "RedPajamaGithub" }
9,591
I am looking for an individual who can generate leads for my business and ...an individual who can generate leads for my business and I need 200+ leads on per day basis and I am ready to pay 50 INR (extra than your campaign cost and charges) for each lead you generate for me. You can easily make 200*50 = 10000 INR per day. I need leads on daily basis. Create a lead magnet that would be suitable as a top of the funnel offering for [login to view URL] Preferably this lead magnet will be in some way related to how one can get fit and healthy without the need for a gym, however, we are open to all ideas around nutrition and fitness.
{ "redpajama_set_name": "RedPajamaC4" }
5,970
Q: Created openwhisk action but shows in guest as private java so can't call it Trying to follow directions, I created an action in the vagrant image (e.g., after vagrant ssh) using this command: wsk action create ProcessFuzzyMatch /vagrant/ildMicroServices-1.0.jar --main com.xxx.micro.services.ProcessFuzzyMatch and I could see it was created: wsk action list actions /guest/ProcessFuzzyMatch private java however guest isn't listed as a package: wsk package list /whisk.system packages /whisk.system/weather shared /whisk.system/combinators shared /whisk.system/websocket shared /whisk.system/watson-translator shared /whisk.system/samples shared /whisk.system/watson-speechToText shared /whisk.system/watson-textToSpeech shared /whisk.system/slack shared /whisk.system/github shared /whisk.system/utils shared and attempts to call the action via curl fail with authentication errors but this doesn't seem to be related to the request headers. Instead I guess it is related to the private java nature of the action I registered. I believe this because I can't use the wsk command to show the summary information for the action I'd registered: wsk package get --summary /whisk.system/guest/ProcessFuzzyMatch error: Unable to get package 'guest/ProcessFuzzyMatch': The requested resource could not be found. (code 364) Is the proper sequence to first create a package then use that package when registering my action? Thanks for any advice you can provide. A: As you have a local build, guest is your default namespace name. The package is default (aka _) as you didn't specify one. You can find the name of your namespace using: wsk namespace list It's labelled private as it's yours and not published to the world. You can invoke your action with: wsk action invoke ProcessFuzzyMatch -r If you wanted to put your action in a namespace, called say "demo", you'd use: wsk package create demo wsk action create demo/ProcessFuzzyMatch /vagrant/ildMicroServices-1.0.jar --main com.xxx.micro.services.ProcessFuzzyMatch You can now invoke your action with: wsk action invoke demo/ProcessFuzzyMatch -r Finally running wsk activation poll in a separate terminal window is helpful to see what's going on when you invoke an action. A: * *Have you tried using /guest/default/ProcessFuzzyMatch in your url instead of /guest/ProcessFuzzyMatch The fully qualified name of the action must include its package name, which is "default" if the action is not in a named package. *In case of authentication errors, you need to pass the auth as header parameters using -H curl -k -H "Authorization: Basic <encoded value>" https://<host>/api/v1/namespaces/guest/default/ProcessFuzzyMatch *You can also try to invoke action using wsk CLI and see if it is getting invoked or not. wsk -i action invoke ProcessFuzzyMatch --result=true A: You didn't create a package for your action. Actions in the default package which is what you created will not appear in the package listing. Also you're listing a whisk.system namespace while creating the action in the guest namespace. So if you want to put the action in the whisk.system package, you'll need to use that API key and create the package first. wsk package create mypkg -u <whisk.system key> wsk action create mypkg/ProcessFuzzyMatch ... -u <whisk.system key> Otherwise you the guest key to get the action wsk action get ProcessFuzzyMatch --summary Or equally wsk action get /guest/ProcessFuzzyMatch --summary Note that summaries are currently not generated if an action does not have any annotations (see https://github.com/apache/incubator-openwhisk/issues/2270). A: This answer turned out as a result of following all the other posts recommendations and trying different approaches. It took a while because I had to port all the file based functions to call Cloudant instead and because of the size of artifacts to be loaded and an issue with their attachments API in Java I had to use a workaround (because the data field returned empty). I tried using the --web=true to avoid the security issues and that got me very close. However, while I got back a reply with 200 response code, the payload was empty (Content-Length: 0). So, I used the wsk invoke action with -v I was able to see how the call was being made locally within the vagrant VM, and was then able to get it to work from outside the VM. Basically, these were the steps I followed: wsk package create ild to create my own package which becomes a child of /guest as shown with the command: wsk package list /guest/ild Then I created my action based on the jar build using gradle (so it includes all dependent classes other than gson.JsonObject since that is already in the runtime environment). wsk action create /guest/ild/ProcessFuzzyMatch /vagrant/ildMicroServices-1.0.jar --main com.xxx.ild.micro.services.ProcessFuzzyMatch --web true Because my service expected a JsonObject containing text and workspaceID I ran the following command in the vagrant VM: wsk action invoke -v -br ild/ProcessFuzzyMatch -p "text" "borken window" -p "workspaceID" "bc3d43ab-1529-41c8-8571-b7155e53e3ff" And this showed the correct response. By examining the request headers I could see how the action was being referenced so I could then create a shell script to point to the host 192.168.33.13 from outside the VM. The working shell scripts is shown below: #! /bin/bash curl -s -v -k https://192.168.33.13/api/v1/namespaces/guest/actions/ild/ProcessFuzzyMatch?blocking=true \ -H "Authorization: Basic MjNiYzQ2YjEtNzFmNi00ZWQ1LThjNTQtODE2YWE0ZjhjNTAyOjEyM3pPM3haQ0xyTU42djJCS0sxZFhZRnBYbFBrY2NPRnFtMTJDZEFzTWdSVTRWck5aOWx5R1ZDR3VNREdJd1A=" \ -X POST -H "Content-Type: application/json" \ -d '{"text":"borken window","workspaceID":"bc3d43ab-1529-41c8-8571-b7155e53e3ff"}' The -X POST is not needed as POST is assumed. The Authorization was copied from what I'd seen in the headers from the version run on the localhost (in the VM) but it is the Base64 encoding of the ~/openwhisk/ansible/files/auth.guest content (when in the VM via "vagrant ssh" command). This could also have been passed as is using the -u parameter to curl. In theory, the authentication should not have been required since the --web=true was used when registering the action, but I found it was needed when calling into the VM from outside. Without the header, it returns this error: { "error": "The resource requires authentication, which was not supplied with the request", "code": 2259 * Connection #0 to host 192.168.33.13 left intact } I believe the key to getting the external call to work was providing the proper URI before the package/action name and ensuring the blocking=true parameter was passed: https://192.168.33.13/api/v1/namespaces/guest/actions/ I will up vote all the other replies as they all helped me figure out what was required.
{ "redpajama_set_name": "RedPajamaStackExchange" }
101
USC confirms first on-campus coronavirus cases COVID-19 and Schools LOS ANGELES - USC officials confirmed om Wednesday the university first on-campus coronavirus cases, affecting three students. The students were most recently in the Cale/Irani Residence Hall and Century Apartments from Saturday through Wednesday, according to a letter sent to USC students and employees. RELATED: Stay up to date on all coronavirus-related information They are currently in self-isolation off-campus and are doing well, the letter stated. USC is in the process of contacting all individuals who were exposed to the students, according to the letter. USC also announced Wednesday it is pausing workouts in football and men's water polo until at least Monday after eight players on those teams tested positive for COVID-19 through the weekly surveillance testing program. The players contracted the virus off campus as a result of increased community spread and not via any on-campus or training activities, according to USC, citing information from contact tracing. All eight players have been isolated. Under Pac-12 Conference and public health guidelines, all USC workouts are outdoors and non-contact. "We have effective mitigation strategies in place but out of an abundance of caution we are pausing athletics activities in football and men's water polo while we await additional test results and USC completes the contact tracing process," athletic director Mike Bohn said. USC football and men's water polo players will undergo another round of COVID-19 testing this week. There had been just one positive result among 654 tests conducted from July 18 through Friday on Trojan football, men's water polo, women's soccer, women's volleyball and men's and women's basketball players participating in on-campus workouts, including no positive results the past three weeks.
{ "redpajama_set_name": "RedPajamaCommonCrawl" }
5,660
Plaats in Indonesië Butoh (Ngasem), een plaats in het regentschap Bojonegoro in de provincie Oost-Java Butoh (Sumberejo), een plaats in het regentschap Bojonegoro in de provincie Oost-Java Anders Butoh (dansstijl), een Japanse dansstijl ontwikkeld door onder meer Kazuo Ohno
{ "redpajama_set_name": "RedPajamaWikipedia" }
513
package com.ToxicBakery.app.tabsontallahassee; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.widget.TextView; import com.ToxicBakery.app.tabsontallahassee.api.retrofit.RetrofitService; import com.ToxicBakery.app.tabsontallahassee.api.retrofit.TabsAPI; import com.ToxicBakery.app.tabsontallahassee.db.BillDB; import com.ToxicBakery.app.tabsontallahassee.db.BillDetailDB; import com.ToxicBakery.app.tabsontallahassee.models.Attributes; import com.ToxicBakery.app.tabsontallahassee.models.Bill; import com.ToxicBakery.app.tabsontallahassee.models.BillDataWrapper; import com.ToxicBakery.app.tabsontallahassee.recycler.BillDetailAdapter; import com.ToxicBakery.app.tabsontallahassee.recycler.DividerItemDecoration; import rx.Subscriber; import rx.Subscription; import rx.android.schedulers.AndroidSchedulers; import rx.schedulers.Schedulers; public class ActivityBill extends AppCompatActivity { public static final String EXTRA_UUID = "EXTRA_UUID"; private static final String TAG = "ActivityBill"; private TabsAPI tabsAPI; private BillDetailDB billDetailDB; private String uuid; private BillDetailAdapter billDetailAdapter; private Subscription subscription; private TextView billTitle; private TextView billIdentifier; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_bill); tabsAPI = RetrofitService.getInstance() .getTabsApi(); billDetailDB = BillDetailDB.getInstance(getApplicationContext()); billTitle = (TextView) findViewById(R.id.bill_title); billIdentifier = (TextView) findViewById(R.id.bill_identifier); billDetailAdapter = new BillDetailAdapter(); LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this); DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(this, null); RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recycler); recyclerView.setAdapter(billDetailAdapter); recyclerView.setLayoutManager(linearLayoutManager); recyclerView.addItemDecoration(dividerItemDecoration); Intent intent = getIntent(); if (intent != null) { uuid = intent.getStringExtra(EXTRA_UUID); } if (uuid != null) { loadBill(); Bill bill = BillDB.getInstance(getApplicationContext()) .getById(uuid); if (bill != null) { Attributes attributes = bill.getAttributes(); billTitle.setText(attributes.getTitle()); attributes.getClassification(); billIdentifier.setText(attributes.getIdentifier()); } } } @Override protected void onDestroy() { if (subscription != null) { subscription.unsubscribe(); } super.onDestroy(); } void updateView(Bill bill) { billDetailAdapter.set(bill); } void notifyBillLoaded() { new Handler().post(new Runnable() { @Override public void run() { Bill bill = billDetailDB.getById(uuid); updateView(bill); } }); } void loadBill() { Bill bill = billDetailDB.getById(uuid); if (bill == null) { loadBillFromNetwork(); } else { notifyBillLoaded(); } } void loadBillFromNetwork() { subscription = tabsAPI.getBill(uuid) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Subscriber<BillDataWrapper>() { @Override public void onCompleted() { notifyBillLoaded(); } @Override public void onError(Throwable e) { Log.e(TAG, "Failed to load bill.", e); } @Override public void onNext(BillDataWrapper billDataWrapper) { Bill bill = billDataWrapper.getData(); billDetailDB.addOrReplace(bill); } }); } }
{ "redpajama_set_name": "RedPajamaGithub" }
4,505
"""TensorBoard WSGI Application Logic. Provides TensorBoardWSGIApp for building a TensorBoard WSGI app. """ import base64 import collections import hashlib import io import json import re import textwrap import time from urllib import parse as urlparse import zipfile from werkzeug import wrappers from tensorboard import errors from tensorboard import plugin_util from tensorboard import auth from tensorboard import context from tensorboard.backend import client_feature_flags from tensorboard.backend import empty_path_redirect from tensorboard.backend import experiment_id from tensorboard.backend import experimental_plugin from tensorboard.backend import http_util from tensorboard.backend import path_prefix from tensorboard.backend import security_validator from tensorboard.plugins import base_plugin from tensorboard.plugins.core import core_plugin from tensorboard.util import tb_logging DATA_PREFIX = "/data" PLUGIN_PREFIX = "/plugin" PLUGINS_LISTING_ROUTE = "/plugins_listing" PLUGIN_ENTRY_ROUTE = "/plugin_entry.html" EXPERIMENTAL_PLUGINS_QUERY_PARAM = "experimentalPlugin" # Slashes in a plugin name could throw the router for a loop. An empty # name would be confusing, too. To be safe, let's restrict the valid # names as follows. _VALID_PLUGIN_RE = re.compile(r"^[A-Za-z0-9_-]+$") logger = tb_logging.get_logger() def TensorBoardWSGIApp( flags, plugins, data_provider=None, assets_zip_provider=None, deprecated_multiplexer=None, auth_providers=None, experimental_middlewares=None, ): """Constructs a TensorBoard WSGI app from plugins and data providers. Args: flags: An argparse.Namespace containing TensorBoard CLI flags. plugins: A list of plugins, which can be provided as TBPlugin subclasses or TBLoader instances or subclasses. data_provider: Instance of `tensorboard.data.provider.DataProvider`. May be `None` if `flags.generic_data` is set to `"false"` in which case `deprecated_multiplexer` must be passed instead. assets_zip_provider: See TBContext documentation for more information. If `None` a placeholder assets zipfile will be used containing only a default `index.html` file, and the actual frontend assets must be supplied by middleware wrapping this WSGI app. deprecated_multiplexer: Optional `plugin_event_multiplexer.EventMultiplexer` to use for any plugins not yet enabled for the DataProvider API. Required if the data_provider argument is not passed. auth_providers: Optional mapping whose values are `AuthProvider` values and whose keys are used by (e.g.) data providers to specify `AuthProvider`s via the `AuthContext.get` interface. Defaults to `{}`. experimental_middlewares: Optional list of WSGI middlewares (i.e., callables that take a WSGI application and return a WSGI application) to apply directly around the core TensorBoard app itself, "inside" the request redirection machinery for `--path_prefix`, experiment IDs, etc. You can use this to add handlers for additional routes. Middlewares are applied in listed order, so the first element of this list is the innermost application. Defaults to `[]`. This parameter is experimental and may be reworked or removed. Returns: A WSGI application that implements the TensorBoard backend. :type plugins: list[base_plugin.TBLoader] """ if assets_zip_provider is None: assets_zip_provider = _placeholder_assets_zip_provider plugin_name_to_instance = {} context = base_plugin.TBContext( data_provider=data_provider, flags=flags, logdir=flags.logdir, multiplexer=deprecated_multiplexer, assets_zip_provider=assets_zip_provider, plugin_name_to_instance=plugin_name_to_instance, sampling_hints=flags.samples_per_plugin, window_title=flags.window_title, ) tbplugins = [] experimental_plugins = [] for plugin_spec in plugins: loader = make_plugin_loader(plugin_spec) try: plugin = loader.load(context) except Exception: logger.error( "Failed to load plugin %s; ignoring it.", getattr(loader.load, "__qualname__", loader.load), exc_info=True, ) plugin = None if plugin is None: continue tbplugins.append(plugin) if isinstance( loader, experimental_plugin.ExperimentalPlugin ) or isinstance(plugin, experimental_plugin.ExperimentalPlugin): experimental_plugins.append(plugin.plugin_name) plugin_name_to_instance[plugin.plugin_name] = plugin return TensorBoardWSGI( tbplugins, flags.path_prefix, data_provider, experimental_plugins, auth_providers, experimental_middlewares, ) def make_plugin_loader(plugin_spec): """Returns a plugin loader for the given plugin. Args: plugin_spec: A TBPlugin subclass, or a TBLoader instance or subclass. Returns: A TBLoader for the given plugin. :type plugin_spec: Type[base_plugin.TBPlugin] | Type[base_plugin.TBLoader] | base_plugin.TBLoader :rtype: base_plugin.TBLoader """ if isinstance(plugin_spec, base_plugin.TBLoader): return plugin_spec if isinstance(plugin_spec, type): if issubclass(plugin_spec, base_plugin.TBLoader): return plugin_spec() if issubclass(plugin_spec, base_plugin.TBPlugin): return base_plugin.BasicLoader(plugin_spec) raise TypeError("Not a TBLoader or TBPlugin subclass: %r" % (plugin_spec,)) class TensorBoardWSGI(object): """The TensorBoard WSGI app that delegates to a set of TBPlugin.""" def __init__( self, plugins, path_prefix="", data_provider=None, experimental_plugins=None, auth_providers=None, experimental_middlewares=None, ): """Constructs TensorBoardWSGI instance. Args: plugins: A list of base_plugin.TBPlugin subclass instances. path_prefix: A prefix of the path when app isn't served from root. data_provider: `tensorboard.data.provider.DataProvider` or `None`; if present, will inform the "active" state of `/plugins_listing`. experimental_plugins: A list of plugin names that are only provided experimentally. The corresponding plugins will only be activated for a user if the user has specified the plugin with the experimentalPlugin query parameter in the URL. auth_providers: Optional mapping whose values are `AuthProvider` values and whose keys are used by (e.g.) data providers to specify `AuthProvider`s via the `AuthContext.get` interface. Defaults to `{}`. experimental_middlewares: Optional list of WSGI middlewares to apply directly around the core TensorBoard app itself. Defaults to `[]`. This parameter is experimental and may be reworked or removed. Returns: A WSGI application for the set of all TBPlugin instances. Raises: ValueError: If some plugin has no plugin_name ValueError: If some plugin has an invalid plugin_name (plugin names must only contain [A-Za-z0-9_.-]) ValueError: If two plugins have the same plugin_name ValueError: If some plugin handles a route that does not start with a slash :type plugins: list[base_plugin.TBPlugin] """ self._plugins = plugins self._path_prefix = path_prefix self._data_provider = data_provider self._experimental_plugins = frozenset(experimental_plugins or ()) self._auth_providers = auth_providers or {} self._extra_middlewares = list(experimental_middlewares or []) if self._path_prefix.endswith("/"): # Should have been fixed by `fix_flags`. raise ValueError( "Trailing slash in path prefix: %r" % self._path_prefix ) self.exact_routes = { # TODO(@chihuahua): Delete this RPC once we have skylark rules that # obviate the need for the frontend to determine which plugins are # active. DATA_PREFIX + PLUGINS_LISTING_ROUTE: self._serve_plugins_listing, DATA_PREFIX + PLUGIN_ENTRY_ROUTE: self._serve_plugin_entry, } unordered_prefix_routes = {} # Serve the routes from the registered plugins using their name as the route # prefix. For example if plugin z has two routes /a and /b, they will be # served as /data/plugin/z/a and /data/plugin/z/b. plugin_names_encountered = set() for plugin in self._plugins: if plugin.plugin_name is None: raise ValueError("Plugin %s has no plugin_name" % plugin) if not _VALID_PLUGIN_RE.match(plugin.plugin_name): raise ValueError( "Plugin %s has invalid name %r" % (plugin, plugin.plugin_name) ) if plugin.plugin_name in plugin_names_encountered: raise ValueError( "Duplicate plugins for name %s" % plugin.plugin_name ) plugin_names_encountered.add(plugin.plugin_name) try: plugin_apps = plugin.get_plugin_apps() except Exception as e: # pylint: disable=broad-except if ( type(plugin) is core_plugin.CorePlugin ): # pylint: disable=unidiomatic-typecheck raise logger.warning( "Plugin %s failed. Exception: %s", plugin.plugin_name, str(e), ) continue for route, app in plugin_apps.items(): if not route.startswith("/"): raise ValueError( "Plugin named %r handles invalid route %r: " "route does not start with a slash" % (plugin.plugin_name, route) ) if ( type(plugin) is core_plugin.CorePlugin ): # pylint: disable=unidiomatic-typecheck path = route else: path = ( DATA_PREFIX + PLUGIN_PREFIX + "/" + plugin.plugin_name + route ) if path.endswith("/*"): # Note we remove the '*' but leave the slash in place. path = path[:-1] if "*" in path: # note we re-add the removed * in the format string raise ValueError( "Plugin %r handles invalid route '%s*': Only " "trailing wildcards are supported " "(i.e., `/.../*`)" % (plugin.plugin_name, path) ) unordered_prefix_routes[path] = app else: if "*" in path: raise ValueError( "Plugin %r handles invalid route %r: Only " "trailing wildcards are supported " "(i.e., `/.../*`)" % (plugin.plugin_name, path) ) self.exact_routes[path] = app # Wildcard routes will be checked in the given order, so we sort them # longest to shortest so that a more specific route will take precedence # over a more general one (e.g., a catchall route `/*` should come last). self.prefix_routes = collections.OrderedDict( sorted( unordered_prefix_routes.items(), key=lambda x: len(x[0]), reverse=True, ) ) self._app = self._create_wsgi_app() def _create_wsgi_app(self): """Apply middleware to create the final WSGI app.""" app = self._route_request for middleware in self._extra_middlewares: app = middleware(app) app = _auth_context_middleware(app, self._auth_providers) app = client_feature_flags.ClientFeatureFlagsMiddleware(app) app = empty_path_redirect.EmptyPathRedirectMiddleware(app) app = experiment_id.ExperimentIdMiddleware(app) app = path_prefix.PathPrefixMiddleware(app, self._path_prefix) app = security_validator.SecurityValidatorMiddleware(app) app = _handling_errors(app) return app @wrappers.Request.application def _serve_plugin_entry(self, request): """Serves a HTML for iframed plugin entry point. Args: request: The werkzeug.Request object. Returns: A werkzeug.Response object. """ name = request.args.get("name") plugins = [ plugin for plugin in self._plugins if plugin.plugin_name == name ] if not plugins: raise errors.NotFoundError(name) if len(plugins) > 1: # Technically is not possible as plugin names are unique and is checked # by the check on __init__. reason = ( "Plugin invariant error: multiple plugins with name " "{name} found: {list}" ).format(name=name, list=plugins) raise AssertionError(reason) plugin = plugins[0] module_path = plugin.frontend_metadata().es_module_path if not module_path: return http_util.Respond( request, "Plugin is not module loadable", "text/plain", code=400 ) # non-self origin is blocked by CSP but this is a good invariant checking. if urlparse.urlparse(module_path).netloc: raise ValueError("Expected es_module_path to be non-absolute path") module_json = json.dumps("." + module_path) script_content = "import({}).then((m) => void m.render());".format( module_json ) digest = hashlib.sha256(script_content.encode("utf-8")).digest() script_sha = base64.b64encode(digest).decode("ascii") html = textwrap.dedent( """ <!DOCTYPE html> <head><base href="plugin/{name}/" /></head> <body><script type="module">{script_content}</script></body> """ ).format(name=name, script_content=script_content) return http_util.Respond( request, html, "text/html", csp_scripts_sha256s=[script_sha], ) @wrappers.Request.application def _serve_plugins_listing(self, request): """Serves an object mapping plugin name to whether it is enabled. Args: request: The werkzeug.Request object. Returns: A werkzeug.Response object. """ response = collections.OrderedDict() ctx = plugin_util.context(request.environ) eid = plugin_util.experiment_id(request.environ) plugins_with_data = frozenset( self._data_provider.list_plugins(ctx, experiment_id=eid) or frozenset() if self._data_provider is not None else frozenset() ) plugins_to_skip = self._experimental_plugins - frozenset( request.args.getlist(EXPERIMENTAL_PLUGINS_QUERY_PARAM) ) for plugin in self._plugins: if plugin.plugin_name in plugins_to_skip: continue if ( type(plugin) is core_plugin.CorePlugin ): # pylint: disable=unidiomatic-typecheck # This plugin's existence is a backend implementation detail. continue is_active = bool( frozenset(plugin.data_plugin_names()) & plugins_with_data ) if not is_active: try: start = time.time() is_active = plugin.is_active() elapsed = time.time() - start logger.info( "Plugin listing: is_active() for %s took %0.3f seconds", plugin.plugin_name, elapsed, ) except Exception: is_active = False logger.error( "Plugin listing: is_active() for %s failed (marking inactive)", plugin.plugin_name, exc_info=True, ) plugin_metadata = plugin.frontend_metadata() output_metadata = { "disable_reload": plugin_metadata.disable_reload, "enabled": is_active, # loading_mechanism set below "remove_dom": plugin_metadata.remove_dom, # tab_name set below } if plugin_metadata.tab_name is not None: output_metadata["tab_name"] = plugin_metadata.tab_name else: output_metadata["tab_name"] = plugin.plugin_name es_module_handler = plugin_metadata.es_module_path element_name = plugin_metadata.element_name is_ng_component = plugin_metadata.is_ng_component if is_ng_component: if element_name is not None: raise ValueError( "Plugin %r declared as both Angular built-in and legacy" % plugin.plugin_name ) if es_module_handler is not None: raise ValueError( "Plugin %r declared as both Angular built-in and iframed" % plugin.plugin_name ) loading_mechanism = { "type": "NG_COMPONENT", } elif element_name is not None and es_module_handler is not None: logger.error( "Plugin %r declared as both legacy and iframed; skipping", plugin.plugin_name, ) continue elif element_name is not None and es_module_handler is None: loading_mechanism = { "type": "CUSTOM_ELEMENT", "element_name": element_name, } elif element_name is None and es_module_handler is not None: loading_mechanism = { "type": "IFRAME", "module_path": "".join( [ request.script_root, DATA_PREFIX, PLUGIN_PREFIX, "/", plugin.plugin_name, es_module_handler, ] ), } else: # As a compatibility measure (for plugins that we don't # control), we'll pull it from the frontend registry for now. loading_mechanism = { "type": "NONE", } output_metadata["loading_mechanism"] = loading_mechanism response[plugin.plugin_name] = output_metadata return http_util.Respond(request, response, "application/json") def __call__(self, environ, start_response): """Central entry point for the TensorBoard application. This __call__ method conforms to the WSGI spec, so that instances of this class are WSGI applications. Args: environ: See WSGI spec (PEP 3333). start_response: See WSGI spec (PEP 3333). """ return self._app(environ, start_response) def _route_request(self, environ, start_response): """Delegate an incoming request to sub-applications. This method supports strict string matching and wildcard routes of a single path component, such as `/foo/*`. Other routing patterns, like regular expressions, are not supported. This is the main TensorBoard entry point before middleware is applied. (See `_create_wsgi_app`.) Args: environ: See WSGI spec (PEP 3333). start_response: See WSGI spec (PEP 3333). """ request = wrappers.Request(environ) parsed_url = urlparse.urlparse(request.path) clean_path = _clean_path(parsed_url.path) # pylint: disable=too-many-function-args if clean_path in self.exact_routes: return self.exact_routes[clean_path](environ, start_response) else: for path_prefix in self.prefix_routes: if clean_path.startswith(path_prefix): return self.prefix_routes[path_prefix]( environ, start_response ) logger.warning("path %s not found, sending 404", clean_path) return http_util.Respond( request, "Not found", "text/plain", code=404 )(environ, start_response) # pylint: enable=too-many-function-args def _handling_errors(wsgi_app): def wrapper(environ, start_response): try: return wsgi_app(environ, start_response) except errors.PublicError as e: request = wrappers.Request(environ) error_app = http_util.Respond( request, str(e), "text/plain", code=e.http_code, headers=e.headers, ) return error_app(environ, start_response) # Let other exceptions be handled by the server, as an opaque # internal server error. return wrapper def _auth_context_middleware(wsgi_app, auth_providers): def wrapper(environ, start_response): environ = dict(environ) auth_ctx = auth.AuthContext(auth_providers, environ) ctx = context.from_environ(environ).replace(auth=auth_ctx) context.set_in_environ(environ, ctx) return wsgi_app(environ, start_response) return wrapper def _clean_path(path): """Removes a trailing slash from a non-root path. Arguments: path: The path of a request. Returns: The route to use to serve the request. """ if path != "/" and path.endswith("/"): return path[:-1] return path def _placeholder_assets_zip_provider(): """Defines a default assets zip provider containing a dummy index.html.""" memfile = io.BytesIO() with zipfile.ZipFile(memfile, mode="w") as zf: zf.writestr("index.html", "TensorBoard placeholder index.html") return memfile
{ "redpajama_set_name": "RedPajamaGithub" }
8,732
Will Geiger 4 Frameworks for Corporate Innovation Blending academic models with practical experience Scott Lenet and I taught Corporate Entrepreneurship & Innovation at the UCLA Anderson School of Management this spring. While Scott has been teaching venture capital and entrepreneurship for more than two decades, this was my first foray into teaching. Doing so as a recent Anderson alum was particularly fun. Our goal for the class was to provide practical, real-world exposure to corporate entrepreneurship practices at some of the largest companies in the world. With a focus on how to employ internal and external innovation, we taught R&D, business development, corporate venture capital, and M&A to our MBA students, many of whom land business development, corporate development, or corporate strategy roles after finishing school. Our curriculum used four innovation frameworks. The first three, Horizons of Growth, Four Models of Corporate Entrepreneurship, and Innovation Radar, were described in the course text Grow From Within by Wolcott & Lippitz. Horizons of Growth is a practical methodology often referenced in the real world, while the others are academic constructs providing insights about the corporate innovation journey and the impact of new initiatives on various business functions. Scott developed the fourth approach, Inside Out, which helps corporations understand a menu of approaches to innovation. All of the frameworks emphasized the importance of developing innovation programs within the context of overall corporate strategy goals. 1. Horizons of Growth This model is sometimes referenced by corporate innovation teams and sorts innovation efforts by stage, risk, and timing; this allows a portfolio approach to balance near-term execution with long-term goals. adapted from Grow From Within by Wolcott & Lippitz Horizon 1: incremental innovation on today's products, which are often sold through established channels to existing customers Horizon 2: early stage opportunities that have typically reached the market and are generating some revenue, but have yet to replace the core business Horizon 3: pre-market opportunities with potential to disrupt the core business, often via new business models and approaches to addressing customers' needs In this paradigm, corporations evaluate each potential innovation opportunity to assess whether there is a mutually beneficial near-term relationship, or long-term potential to change the overall business approach. 2. Four Models of Corporate Entrepreneurship According to Wolcott and Lippitz, there are four main types of uncertainty facing corporations: market, technical, resource, and organizational. Of these, only resource and organizational uncertainty are under direct control of management and the Board of Directors. The "Four Models" framework categorizes innovation programs into quadrants based on financial commitment and organizational structure. Dedicated resources generally indicate a higher level of commitment than ad hoc resources, and focused organizational ownership generally indicates a higher level of commitment than diffused ownership. There are certainly exceptions to the rule — like Google's diffused innovation model — but the framework is designed to highlight the types of uncertainty that are under the corporation's control. Grow From Within's research shows that many companies start as innovation "Opportunists," without a deliberate approach. Then, as some demonstrate success and become more serious about innovation strategy, more formalized efforts lead to the "Producer" quadrant in the upper right-hand corner. As an example, when Jerome Metivier made Pepsi's original strategic investment in Kevita, a manufacturer of probiotic beverages, the company did not have dedicated personnel or capital resources for investing in startups. Jerome visited our class and explained how the investment led to a successful acquisition several years later, and Pepsi then allocated a dedicated budget and team to its corporate venture capital ("CVC") effort. Although Pepsi followed a direct path from Opportunist to Producer, many companies take a more circuitous journey through the other quadrants along the way. This sequence is sometimes described as "crawl, walk, run." 3. Innovation Radar Innovation Radar is also an academic framework, providing corporate entrepreneurs a mechanism for understanding twelve different aspects of their business that are impacted by innovation efforts. Each dimension of the innovation radar can be emphasized by different activities. For example, when Kellogg's launched its CVC fund eighteen94 Capital to invest in healthy, "better for you" food brands, the effort began addressing dimensions like Offerings (by funding new products and food categories), Brand (by developing an identity tied to health, sustainability, and better ingredients), and Customers (by accessing new consumer groups through novel products). Simon Burton, the head of eighteen94 Capital, spoke to the class about the formation of Kellogg's corporate venture fund (disclaimer: Touchdown Ventures works directly with Simon to manage eighteen94 Capital). from Grow From Within by Wolcott & Lippitz Innovation Radar can also be used as a tool to assess opportunities for competitive differentiation. Before joining Touchdown, I invested in a startup craft brewery called Saint Archer that exploited a branding opportunity in the beer category through this type of analysis. While we did not possess the resources to innovate in Supply Chain, Product, and Channel to the same extent as the more established craft brands like Stone, Firestone, or Lagunitas, Saint Archer delivered a unique, differentiated experience to customers driven by social media and authentic Brand ambassador engagement. It worked well, and Miller Coors acquired the company approximately three years after launch. Although these insights can be useful for innovation design, the magnitude of the radar's dimensions are difficult to quantify, making the framework a stronger fit for an academic setting. 4. Inside Out The Inside Out framework focuses on implementation, categorizing the different types of tasks available to corporate entrepreneurs according to whether the corporation is in control or third parties are in control. As described in Scott's article Inside Out, originally published in TechCrunch, corporations can choose among research & development, incubation, acceleration, corporate venture capital, and mergers & acquisitions. Innovators can mix and match these tools. We developed the "cheat sheet" below to summarize the strengths, weaknesses, and use cases of these various approaches to innovation. While some of these frameworks are academic and others are derived from practice, each provides a lens for assessing innovation activities and aligning efforts with an organization's goals. We're looking forward to teaching this class again in the spring of 2019! Liked what you read? Click 👏 to help others find this article. Will Geiger is a Senior Associate at Touchdown Ventures, a Registered Investment Adviser that provides "Venture Capital as a Service" to help leading corporations launch and manage their investment programs. Touchdown's President Scott Lenet contributed to this article. This article includes information from third party sources believed to be reliable; however, we make no representations as to its accuracy or completeness. References to strategies are for illustrative purposes only and should not be relied upon as a recommendation to engage in any particular strategy or to invest in any particular security. Opinions expressed herein are based on current market conditions and may change without notice and we reserve the right to change any part of these materials without notice and assume no obligation to provide an update. Recipients are advised not to infer or assume that any securities, strategies, companies, sectors or markets described will be profitable or that losses will not occur. Any description or information regarding investment process or strategies is provided for illustrative purposes only, may not be fully indicative of any present or future investments and may be changed at the discretion of the manager. Past performance is no guarantee of future results. Corporate Venture More from Risky Business Thoughts on corporate VC from the team at Touchdown Ventures, the leading provider of managed venture capital for corporations. Read more from Risky Business VC investor at Touchdown Ventures. UCLA Anderson MBA and USC Trojan.
{ "redpajama_set_name": "RedPajamaCommonCrawl" }
5,493
import React from 'react' // const timeline = [{ // time: 0, // fact: '' // }] // export default function IAM() { return ( <div className="track-info-page"> <div className="track-text i-am" /> </div> ) }
{ "redpajama_set_name": "RedPajamaGithub" }
6,100
## Perumal Murugan ### ONE PART WOMAN #### Translated from the Tamil by ANIRUDDHAN VASUDEVAN ## Contents About the Author Also by Perumal Murugan Praise for the Book one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen nineteen twenty twenty-one twenty-two twenty-three twenty-four twenty-five twenty-six twenty-seven twenty-eight twenty-nine thirty thirty-one thirty-two thirty-three thirty-four a note on the type Follow Penguin Copyright PENGUIN BOOKS ##### ONE PART WOMAN PERUMAL MURUGAN is the star of contemporary Tamil literature, having garnered both critical acclaim and commercial success for his work. An award-winning writer, poet and scholar, he has written several novels, short-story collections, poetry anthologies and works of non-fiction. Some of his novels have been translated into English to immense acclaim, including _Seasons of the Palm_ , which was shortlisted for the Kiriyama Award in 2005, and _One Part Woman_ , his best-known work, which was shortlisted for the Crossword Award and won the prestigious ILF Samanvay Bhasha Samman in 2015. Murugan has also received awards from the Tamil Nadu government as well as from Katha Books. ANIRUDDHAN VASUDEVAN is a performer, writer and translator. He documents various public health projects and art projects, and is involved in LGBT advocacy work. He is currently a PhD student in anthropology at the University of Texas, Austin, and is also working on his first novel. ### Also by Perumal Murugan ## Pyre **'Murugan is the most accomplished of his generation of Tamil writers'** _ **Caravan**_ Saroja and Kumaresan are in love. After a hasty wedding, they arrive in Kumaresan's village, harbouring the dangerous secret that their marriage is an inter-caste one, likely to anger the villagers should they learn of it. Kumaresan is confident that all will be well. He naively believes that after the initial round of curious questions, the inquiries will die down and the couple will be left alone. But nothing is further from the truth. The villagers strongly suspect that Saroja must belong to a different caste. It is only a matter of time before their suspicions harden into certainty and, outraged, they set about exacting their revenge. With spare, powerful prose, Murugan masterfully conjures a terrifying vision of intolerance in this devastating tale of innocent young love pitted against chilling savagery. 'Perumal Murugan's voice is distinct . . . [His] characters, dialogues and locales are unerringly drawn and intensely evocative . . . A superb writer' _Indian Express_ '[A] great literary chronicler . . . Murugan is at the height of his creative powers' _The Hindu_ ## Praise for _One Part Woman_ 'A superb book in which tenderness, love and desire kindle each other into a conflagration of sexual rapture' BAPSI SIDHWA 'Perumal Murugan opens up the layers of desire, longing, loss and fulfilment in a relationship with extraordinary sensitivity and surgical precision' AMBAI 'A fable about sexual passion and social norms, pleasure and the conventions of family and motherhood . . . A lovely rendering of the Tamil' _BIBLIO_ 'Perumal Murugan turns an intimate and crystalline gaze on a married couple in interior Tamil Nadu. It is a gaze that lays bare the intricacies of their story, culminating in a heart-wrenching denouement that allows no room for apathy . . . _One Part Woman_ is a powerful and insightful rendering of an entire milieu which is certainly still in existence. [Murugan] handles myriad complexities with an enviable sophistication, creating an evocative, even haunting, work . . . Murugan's writing is taut and suspenseful . . . Aniruddhan Vasudevan's translation deserves mention—the language is crisp, retaining local flavour without jarring, and often lyrical' _THE HINDU BUSINESS LINE_ 'An evocative novel about a childless couple reminds us of the excellence of writing in Indian languages . . . This is a novel of many layers; of richly textured relationships; of raw and resonant dialogues and characters . . . Perumal Murugan's voice is distinct; it is the voice of writing in the Indian languages rich in characters, dialogues and locales that are unerringly drawn and intensely evocative. As the novel moves towards its inevitable climax, tragic yet redemptive, the reader shares in the anguish of the characters caught in a fate beyond their control. It is because a superb writer has drawn us adroitly into the lives of those far removed from our acquaintance' _INDIAN EXPRESS_ 'Murugan imbues the simple story of a young couple, deeply in love and anxious to have a child, with the complexities of convention, obligation and, ultimately, conviction . . . An engaging story' _TIME OUT_ ' _One Part Woman_ has the distant romanticism of a gentler, slower, prettier world, but it is infused with a sense of immediacy . . . Murugan intricately examines the effect the pressure to have a child has on [the couple's] relationship . . . _One Part Woman_ is beautifully rooted in its setting. Murugan delights in description and Aniruddhan translates it ably' _OPEN_ 'Murugan's insights about relationships spread throughout his work like flashes of lightning' _KALACHUVADU_ ## Praise for Perumal Murugan 'Versatile, sensitive to history and conscious of his responsibilities as a writer, Murugan is . . . the most accomplished of his generation of Tamil writers' _CARAVAN_ 'The Tamil Irvine Welsh' _GUARDIAN_ 'Powerful . . . lyrical' _THE HINDU_ ## one The portia tree was dense with foliage. If you looked closely, you could see the yellow trumpet-like flowers with their flared mouths, and the drooping, fading red ones with their inviting smiles. Portia flowers always grow more beautiful as they fade. Kali leapt up and plucked one. He never could resist the desire to possess what attracted him. The leaves came ripped, but the flower was intact. Settling down on the cot, he smelled the flower. It had a mild fragrance, that too when held close to the nose. He felt he should have left it on the tree. The sight of the flower on the tree was more beautiful than its scent. He ran his eyes over the tree. It was he who had planted it there, in the front yard of his father-in-law's home. Before that, whenever he had visited this house, the sight of the bare front yard had hurt his eyes relentlessly. This forced him to remain indoors until the sun went down, and because of his presence, the womenfolk could not carry on their private chatter. So he spoke to his brother-in-law about it. 'Wouldn't it be good to have a tree here?' 'They refuse to have one. They say they need the sun to dry groundnuts and corn. Why don't you try talking to my father?' Kali didn't do anything at the time. However, on his next visit, he brought along a stalk. On the way, he only smiled when Ponnayi said, 'Why are you lugging this along, maama?' She gave him an affectionate punch on his cheek and said, 'You hardly say anything. All I get is that bewitching smile!' It had been just three months into their marriage, and they refused to stay away from each other even for a little while. They couldn't even resist constantly looking at each other's faces. But that day, when he visited his father-in-law's place, he didn't enter the house. He grabbed a rake and a spade and got started on his work immediately. He found a place to plant the stalk, a spot where it could grow without hindrances and be able to spread its branches in all directions. Even when it was just a stalk, Kali's mind could see the tree it would grow into one day. He could see how it would look ten, twenty years later. He had got this stalk from the portia tree in his cattle enclosure back home. No one knew when that other tree had been planted. The gigantic spread of that tree was etched in his mind, and he hoped this one too would grow the same way. He imagined how the front yard would look when the tree spread its branches over it. Even while planting it, he focused on the pleasure of being able to lie in its cool shade some day. No one objected to the new son-in-law's fancies. Even before the cow-dung bandage at the end of the stalk dried, shoots started sprouting. There was now an obligation to protect the tree that the son-in-law had planted. Afraid that she would forget to water the tree amidst all her chores, his mother-in-law started washing dishes right under the tree. She also kept a big pot of water there for people to wash their hands and feet when they came back from somewhere. So the space under the tree was always wet. And whenever Kali visited, that was the first spot he went to, making note of the tree's growth. 'Your son-in-law comes here only to make sure we're taking good care of his dowry!' His father-in-law's teasing became a regular feature. The tree was called 'the son-in-law's dowry'. Just as he was never called by his name, neither was his tree. In just one year, it grew so tall that one could stand to full height under the new branches. After all, it had come from another tree that had withstood the vagaries of time. The next year, there were flowers. And then fruits. Twelve years went by in a flash; the tree kept growing and spreading every year. Now ten cots could lie in its shade. It didn't shed much, but when it did, his mother-in-law would complain, 'This is an endless task—this sweeping, cleaning and taking care of my son-in-law's dowry!' His father-in-law delighted at the sight of the compost pits getting filled with the tree's leaves. The tree gave as much manure as a cow did, and it was definitely enough for one enclosure. What the son-in-law had given them was certainly a gift! In the past two years or so, when Kali did not visit, the arms of the tree stretched towards the sky. Only when a tree is small can you notice its growth. When it is bigger, it continues to grow, but imperceptibly. Kali, however, could always size up a tree. For instance, he could now see that they had trimmed a branch that had outgrown the yard and started reaching into the house. It looked like a deformed body part. They must have done it to get some sun to dry something. But he stood looking at the tree's wound for a while. Since he had not visited for two years, Ponnayi had not either. But this year, her brother, Muthu, had especially come to invite them. He arrived on the very first day of the festival in Karattur, the day when the flag was hoisted and the festivities began. He was adamant that they should come this year. Kali could not refuse. So he sent Ponnayi on the day the chariot was taken out in procession. But his plan was to go on the last day—the day the deities went back to the hill—so that he could stay one more day, feast on the meat and return home with Ponnayi. After all, how long could he lie under the tree and stare at its canopy, even though he was the one to have planted it? His brother-in-law, Muthu, was his friend from childhood. In fact, they were so close that at some point he felt comfortable enough to freely say, 'I want to marry your sister.' But they had drifted apart once they became brothers-in-law. The gulf between them seemed to have become permanent over the years, but nothing much could be done about it. If he stayed here and worked the fields, people would openly ridicule him. They would say, 'See! He is his father-in-law's slave!' Also, he'd have to abandon everything back home to come here. His mother might be able to take care of the cow, the calves and the goats for a few days. But after that, she'd definitely start hurling abuses at him. 'Does he think the cows here would somehow feed themselves if he sits on his haunches in his father-in-law's house and eats away? Shouldn't a farmer be concerned about these poor creatures? It is only as long as this Marayi is alive that you can drop everything and run off like this. I could die any day. What would you do then?' He knew when her tirade of abuses was likely to begin. If he delayed even a day or two, angry words were sure to pour forth from her rotten mouth. His father's face would appear before his eyes, like a mirage in the afternoon sun. That was all he recollected of his father. It was his mother who had raised him. And she made sure no one had the chanc e to say that a child raised by a widow would amount to nothing. She was adamant that they be treated equal to everyone else. She knew everything from ploughing the land to drawing water for the fields. 'We should not depend on anyone,' she would say. One year, she could not find anyone to sow seeds. They said, 'Nothing would grow when sown by a woman in white,' clearly referring to her widow's attire. She tried calling a few people, but to no avail. Then she said, 'Let whatever grows grow. Or maybe nothing will. Then that's fine too. I don't care.' And she sowed the seeds herself. Nothing untoward happened; her yield was as good as anyone else's. The day Kali grew strong enough to carry the basket, she handed it to him. She was there to help him until he learned the skill of sowing evenly, but after that it became his responsibility. However, wherever he roamed, Kali was under his mother's control. Before his marriage, he was a free spirit. It was hard to get hold of him on days when there was no work. If someone asked Marayi, she said, 'Where can that dog go? It must have dug up a spot in the shade somewhere and must be lying in it. Or else, it must be roaming around, getting tired. Wherever it is, it will come back at night to eat.' He never betrayed her trust, and he gave his best in the field. Even now, he would tend to his field and keep to himself. Having moved away from the minions of his youth, he would not go anywhere to idle around with anyone. This fenced enclosure was his lot. That's just the way things were. ## two He lay on the cot and closed his eyes. When the body realizes there is no work to do, it throws open its doors to weariness. Ponna was happy that Kali had come as promised. Even from where Kali was lying, he could sense her prancing around the house as though she had just been married. Wherever in the house she might be, he always knew what she'd be up to. She pervaded his thoughts. She came to occupy them so much that he could tell her every movement and gesture. His nostrils could now sense that she was making snacks for him. He even knew what snack it would be. She woke him up a little while later. 'Maama, maama,' she called to him affectionately. She was holding a plate of snacks in her hands—hot pakodas and kacchayam, made with rice. He roused himself as if from a deep sleep. A smile lit up her entire face, spreading to her eyes, nose, cheeks and forehead. Kali wondered how Ponna managed to make every part of her face smile. Keeping the plate on his lap, Ponna sat down on the floor. 'Did you see the tree?' he asked. The pakoda melted with a crunch in his mouth. 'Yes, I see it every time I come here,' she said uninterestedly. 'No, dear one. Look up. See how it has grown. You can't even begin to count the flowers and the top-shaped fruits!' he said excitedly. 'Ponna, come here!' her mother yelled from inside the house. 'Shred this jaggery for me.' 'Coming!' she yelled. Turning back to Kali, she said, 'This was planted when we got married. Twelve years have gone by.' She sighed. A shadow fell on her face. She must have been thinking about how the tree had grown so lush and abundant in twelve years while not even a worm had crawled in her womb. Every wretched thing reminded her of that lack. After the wedding, she had fought with her father and had taken a cow from here. It delivered seven or eight calves, populating Kali's barn with its offspring. She'd tear up just looking at that cow. She had once cried out loud, 'I don't have the boon that even this mute creature has been blessed with.' Her tears filled him with rage against that cow and its calves. He felt like killing them all. But when he looked at their faces, he would melt: 'Poor things. What can they do about our suffering?' 'Palm jaggery adds a special taste to the kacchayam,' he said, trying to change the subject. He tore a piece and held it to her lips. 'Yes! Now is when your love pours forth,' she said in mock anger and proceeded to take the morsel into her mouth. Her mother called from inside: 'Come here, girl. The oil's heating up.' 'She can't stand it even for a little while! Nallayi is devious. It's not for no reason that they say she knows no time or place. Why is she yelling so much now?' Ponna got up and went in. His eyes were fixed on her as she walked away. Her body had stayed firm. As he gazed after her, desire welled up within him, and he wanted her right then. But they had no privacy here, at his in-laws' home. When they were just married, space was made for them by rearranging sacks of harvested kambu millets and pulses. But when he was no longer a new son-in-law, he got a cot in the porch or in front of the house. He was itching to drag her and take her home. The midday sun tormented his body. During the monsoons, he stayed home cuddling with her. It had occurred to him a few times that had she borne a child perhaps she too would have become haggard like the other women. When thoughts of women first came to him, it was Ponna's body that teased and tortured him incessantly. Unable to bear the agony, he tried to avoid looking at her. But his mind's eye would somehow seek her out. That had not changed to this day. But, whenever he embraced her, succumbing to the tease, it occurred to him that it was not the same embrace as before. Earlier, there was an urgency and passion to get to know her anew each time. That had dried up now. Now even when he took his face close to hers, his mind started worrying, 'Will it happen at least this time?' That was enough to put out the fire, and only ashes bloomed in the embers of his passion. In an attempt to douse it all with water, he started going about it mechanically. 'God, please bless us this time. Make it happen somehow,' he kept repeating. It all went up in smoke. For seven or eight years now, there had been talk of a second marriage—both openly and secretively. As a result, many people had become the objects of Ponnayi's hatred. Chellappan, who dealt in cattle, came to the barnyard once. One of Kali's cows had failed to yield a calf despite two or three attempts at mating her with a bull. He'd wanted to get rid of the cow by selling it to Chellappan. While they were talking, Ponna was cleaning the floor, ridding it of cow dung. She never stayed put when she came to the barnyard. Even if Kali had just removed the dung, she would clean the floor of the cattle shed right away. She would give the calves a bath and tether them elsewhere; then she'd feed them. Mostly, it was she who cleaned out the goat refuse. She was focused on her work while Kali was talking to Chellappan. But Chellappan kept his gaze fixed on her as he tied up his hair in a knot. 'It is fate, mapillai,' said Chellappan, using the colloquial variation of 'maapillai' or 'son-in-law', also a term of friendly address between two men. 'That is just how some cows are. No matter what you do, they never get pregnant. Just quietly change the cow. If you say yes, I can fetch you one right away.' He said it with a smile, but Ponna immediately understood the sense behind it. She felt as though a huge rock had been pressed against her heart. She wanted to drag him by the hair and thrash him with a whip. Instead, she picked up the stick that was lying in a corner of the cowshed and hit the cow on its legs and back. The poor creature. With panic in its eyes, it ran around the shed trying to dodge this unexpected attack. 'It has no sense of time and place. Shouldn't it know I was picking up the dung? It keeps stepping on my foot. It's come just to incur my wrath. Are you trying to get smart with me? I will cut off your tail, you wretched creature!' Chellappan ran away saying, 'All right, mapillai! I will see you later.' He never came back. But when Kali met him elsewhere, he said, 'That is how some cows are. If you go in front of them, they attack you with their horns. If you go behind them, they kick you. Your plight is difficult.' Sometimes he would say, 'Mapillai! Shall I find a new cow for you?' Kali would reply, 'Come to the barnyard, uncle. We will discuss the matter.' 'Oh no! You think you can fuel the fire and watch the riot? Your cow is your business. Leave me alone!' And Chellappan would drop the subject. Even though Kali was trying to be funny, these conversations made him extremely sad. He lamented the fact that he had become the butt of ridicule in the village. Ponna never tired from lashing out at anyone who came to the barnyard talking about this. She did everything short of thrashing them with the broomstick. So no one brought it up when she was around. But they never failed to do so when they caught him alone. ## three During moments of intimacy, Ponna would ask, 'Maama, are you planning to abandon me and marry another woman? Tell me.' He would cajole her. 'You are the apple of my eye—my pearl, my treasure. How can I ever leave you?' 'That's what I like to hear.' Saying this, she would melt. But he also felt like teasing her. 'I will never abandon you. Even if another woman comes, I won't abandon you.' 'Chee!' she would push him away and cry. This was no joking matter for her. When she saw people come and go, she would ask, 'Was this about a marriage alliance?' 'Hmm,' he would nod. 'Has it been fixed?' 'Almost.' 'What will be my plight then?' 'You can stay in a corner,' he would say. She would cry herself to exhaustion. 'Is it my fate that I should beg for food from another woman? I will leave right away for my father's house. They will feed me at least once a day, wouldn't they? After all, they gave birth to me. Don't I have a brother? I will fall at his feet. Won't he feed me porridge for the rest of my life? If nothing works, can't I find a small rope? Doesn't the portia tree have its branches spread all over? I will hang from one of those.' Watching her antics, Kali would secretly smile to himself. Ponna would behave as if everything was over and he had already brought another woman home. He wondered if she was rehearsing for such a moment. It always took days to placate her. This was their game. If they'd had children playing around the house, they wouldn't have needed this. Such games were just a ploy to keep themselves from getting bored looking at each other's faces. But he had no thought of marrying another girl. 'One torture is enough for this birth,' he would say. 'Oh! You think I am torturing you?' And she would get furious. But when she said, 'Maama,won't I ever get pregnant?' his heart would melt and he would rush to comfort her. 'Why not, dear? You are only twenty-eight now. You were sixteen when I married you. And you look just the same. Women are giving birth right till they are forty and forty-five. We are not that old.' Their hearts swung between faith and resignation. Neither of them had had their birth charts made. If he asked his mother about the time of his birth, she would lament, 'I struggled for two days after my water broke. Who took care of me? The midwife somehow saved both our lives. I prayed to Badrakali. That's why I named you Kaliyannan. I don't even remember if it was the month of Maasi or Panguni. Do you think we are royalty to have the time and day of birth noted down? What's the use of a birth chart for someone who rolls in the dust? Even if you rub yourself with oil before rolling, you will have to be content with whatever sticks to you.' Ponna, too, did not have the details of her birth written down. So they both showed their hands to palmists everywhere and had to be content with what they were told. Whenever she went to the market, Ponna would go to have her card read by a parrot. She had been to every astrologer in the area who picked cards using a parrot. They all predicted good tidings. Not even once was a bad card drawn. During fairs, there were even those who made predictions by drawing lines. Some used large pearls, others had pebbles piled up. It didn't cost too much—perhaps one or two rupees. All of them predicted good things. If she mentioned that she'd been married for over ten years, they would say, 'You will get it late, but you will get it for sure.' In hard times, all threads of faith would come together. ## four Kali was wiping his hands after finishing the hot pakodas and sweetened rice cakes when Ponna brought another plate of snacks and a mug of water. Whenever they came here for a feast, they claimed this space under the tree. Night or day, this was where they stayed. The house was a secluded one in the middle of the fields, so there were no intrusions. If it started drizzling, he moved to the porch. But he never went inside the house, which was comprised only of one big room. Apart from Muthu, his wife and child, this space was also shared by Kali's father-in-law and mother-in-law. His father-in-law, too, would keep to the porch and the cattle enclosure. Even Muthu would only enter the house at night to sleep. 'Have you taken the blessing money for the festival?' Kali asked Ponna. 'Like that's the only thing lacking in my life. If I had one child each in my arms, on my waist and in my womb, I would demand it rightfully from my father and brother. Now, if they give it to me, I will take it. If they don't, I will not ask.' They hadn't been to the temple chariot festival for two years. Before that, it used to be an elaborate affair with a new sari, dhoti, towel, and so on. They were even gifted up to ten or twenty rupees as money to offer to the gods. It was not that Kali had come to expect any of this as a matter of routine. But he was only trying to make conversation and wanted to know her thoughts. Holding her hand affectionately, Kali made her sit on the cot. The cloth covering her bosom slipped slightly as she sat down. Kali's eyes penetrated the fabric. Quickly pulling it back in place, she said, 'Look where your eyes stray in the middle of the day!' He replied, taking mock offence, 'If I can't see them, then what are they for?' 'Hey, Ponna!' came her mother's yell, 'Come here now and attend to the lentils. How many things can I handle at once?' 'The old hag is not able to do anything on her own,' Ponna said as she got up. Seeing the brightness on his face, she laughed, reached for the knot in his hair and undid it before running into the house. She had great fondness for the little knot of hair on his head. She often untied it and played with his locks, often by braiding them. 'Your hair is thicker than mine, maama,' she'd say. 'But there is no little petal of a hand that could hold this and climb up your shoulders.' She managed to connect anything to the subject of children. It was not a worry she could keep hidden within herself. Even if she did, people would come to know anyway. She had no other thought besides trying to pre-empt other people's questions about this. Last year, avoiding the fast, Kali took Ponna to see the chariot festival. It was the day the big chariot was taken around. People from the villages nearby were swarming the streets. When you are in a crowd, your spirits are somehow lifted. When they were surveying the shops, he heard someone call out, 'Hey, Kali, are you well?' Bommidi Mani was smiling from the other side of the crowd. It had been several years since he left the village. He had settled down on his own land in Bommidi. He shouted from where he stood, 'Do you have children?' Kali went pale. Even though the crowd carried on as before, he felt as if everyone had turned to look at him. Thankfully, Ponna was inside the bangle shop. Embarrassed, he gestured a no. Mani smacked himself on the head to express his sympathy with Kali's fate and said, 'Get married again.' Kali had to smile it away and vanish into the crowd. It annoyed Kali that though they might have a million things wrong with their own lives, people found great pleasure in poking and prodding other people's miseries. Couldn't they even remember they were in a public place? What kind of pride comes from knowing that the other person does not have what one has? Does everyone have everything? Isn't there always something lacking? Someone or the other always appeared to remind him of it. 'I may or may not have children. What is it to you? Shut up and leave!' he felt like yelling. But he never could. What stopped him from reciprocating their rudeness? Ponna was able to give cheeky retorts. He could not. His mother believed that going to Kaliyur to see the astrologer was the solution to every problem. The man would make his predictions only once a week when, after finishing his routine task of climbing palm trees, he would come to a little shrine under a tree in the forest. This would be at around ten in the morning. The ritual was simple. It was important to cut open a lemon—this signified a sacrifice. He would then divide a cluster of beads into two sets, taking the bunch on the right-hand side in both his hands and shaking them. He would then proceed to arrange them in pairs. If a single bead remained, things would be in one's favour. But if they all paired up, it was cause for worry. Every time Kali and Ponna had been to him so far, they had always drawn a single, unpaired bead. So the astrologer believed that they would definitely be blessed with a child. 'There is some curse that you have inherited. Everything will be all right if we find out what that is and make offerings for appeasement,' he said once. Kali's mother did not know what curse it was. 'Why should you suffer for what some dog might have done?' she cried. But something occurred to her after she thought about it for a few days. She remembered an incident. It was from the time of Kali's great-grandfather, Nachimuthu. One year, the yield of castor seeds was high in his fields, and he would invariably carry a sack or two to the market every week. One particular week, he took two sacks and unloaded them under a tamarind tree. The merchant, who usually bought the castor seeds, was there as usual, sitting with his men and his measuring mugs. In those days, one padi of castor seeds fetched only an anna. It was great luck if a sack fetched you five rupees. When Nachimuthu unloaded his sacks of castor seeds, a cart loaded with sacks arrived from Pazhaiyur. It was clearly from a bigger farm, but they had no one to unload the sacks. The merchant said, 'Please help with unloading these. I'll get you paid for it.' Nachimuthu did the task obligingly. But in the end the numbers did not tally. 'There were fourteen sacks,' said the driver of the cart. There were only thirteen on the ground. And, curiously, the two sacks that Nachimuthu had brought as his own had now grown to three. The merchant noticed that and remarked, 'I thought you had only two.' If Nachimuthu had said, 'I unloaded one here by mistake,' the issue might have ended there. Instead, he swore that he had brought three sacks. The driver of the cart from Pazhaiyur was not going to leave the matter there. So it went to the temple. All unresolved issues went to the Karattur Murugan temple. Halfway up the hill, on the seventieth step, Murugan stands carved on the rock. There is even a belief that long ago this was the main temple on the hill. When the hill was covered with dense forest, the dwellers made this deity. This original god still made sure truth prevailed. Once the seventy steps of truth began, people bent down in obeisance on every step. Even though steps have been carved up to the top of the hill and another, bigger temple has sprouted there, this Murugan on the seventieth step is the original god. Every step had a stone lamp. Whenever there was a matter to be settled in the temple, the plaintiff filled each lamp with oil and lit them. The defendant was made to snuff out each lamp and arrive at Murugan's feet and swear that he or she did not do what they had been accused of. Nachimuthu put out all seventy lamps. Thinking of Murugan as just an image scratched on a rock, he swore at his feet. For just a sack of castor seeds, for a meagre five rupees, he perjured in front of a god. They say that soon after this incident, Nachimuthu lost his mind and wandered all over town. Apparently, he pulled everyone by the hand saying, 'Come, let's go to the Murugan on the seventieth step.' No one knew what happened to him once he left the village and started wandering the streets of Karattur. Kali's grandfather was his only child. His father, too, had been his grandfather's only child. They both died young. Amma narrated all this and started crying. Seeking redemption from this curse, Kali and Ponna scaled the hill. For seventy days, they lit the seventy lamps and cast themselves at Murugan's feet, pleading for his blessings. The entire castor seed yield from that year became the oil in those lamps. But even that was not enough. So they bought more, took some in alms, and continued to fill those lamps. They even tried pacifying Murugan's anger by smearing oil on the deity's body. They would leave in their cart at dusk. By the time they would tether the bulls at the foot of the hill, having requested the flower vendor to keep an eye on them, and climb and reach the seventieth step, the day would have ended. The priest would be waiting for them. Kali filled the lamps with oil, and Ponna lighted them. The priest bathed Murugan every day in castor oil. The belief was that only castor oil could appease a century-long wrath. When they finished the rituals and climbed down the hill, the town would have gone to bed. But nothing could placate Murugan. Kali's grandmother, however, had another explanation. She took umbrage at her daughter-in-law's story of the family curse. 'Was it your mother who came as the merchant who bought the castor seeds?' she said. 'Who knows which dog stole the sack? She is unloading that crime on my family. No one has ever told me this story. Your mother must have stayed up many nights to come up with it. What does she know? She can't even count! She came into the family so much later. But never mind. You lit the lamps for god. Only good can come out of it.' But until the day she died, his grandmother was worried about the perpetuation of her lineage. She sent the young couple to any temple festival anywhere, saying, 'Go and beg for alms.' They did all of that, but nothing came of it. Furthermore, Kali's grandmother had a different story to tell—one that competed with his mother's theory of their current predicament. He thought they were vying with each other to narrate stories of curses and retribution. He lamented his fate that he had to do anything they asked him to do. He feared that if he refused, Ponna would unleash her tirade. She would behave as if doing that one thing would finally ensure childbirth. Such was the case with his grandmother's story too. But this one, though full of words, did not travel far either. ## five In those times, the region around Karattur was covered with forests. It was the farmers who converted it gradually into cultivable land. In the beginning, while they were engaged in this daunting task, they would also take their herds of cattle to graze in this area. Young men went daringly into the forest for this reason. Once, four such daring youths went herding their goats. In the heat of midday, they heard a female voice screaming in agony from within the forest. There were many ghost stories about the forest. At first they thought it was the snare of Mohini who was said to bewitch young men. But the voice sounded steady and human, so they walked in its direction, although fearfully. It was autumn, and the trees had all shed their leaves and were standing bare. Only the neem and palm trees were lush, with their foliage still intact. Then they saw her sitting under a palm tree, wearing only a chequered wrap around her waist. Her breasts had freshly blossomed. She was a forest dweller, fourteen or fifteen years of age. The boys knew that tribal people lived in the forest. Once in a while, they ventured into the town in tens or fifteens to barter things in exchange for what they needed. They were not an agrarian community. They ate roots, shoots and fruits. Millets were the only grains they accepted from the fields. The girl was from that community. Some adolescent anger had made her leave her haven and reach the edge of the forest. She was determined to stay there until her people came looking for her. At first, the four men looked at her with sympathy. But it dawned on them that the girl was all alone, and they were soon overcome with the urge of youth. Even though she was a girl made strong by life in the forest, she could not fight the hard-work-forged strength of the four young men. She could do nothing. Not only did they ravish her, they also strangled her to death and rolled her into a ditch in the forest. They might have thought that that would ensure their safety. But on the third day, an unidentifiable fragrance of a tree rose from the pit where she lay, and spread all around. Her people followed the scent and eventually found her dead body. The four men fled the town fearing the arrows of the tribal people. No one knew what happened to them. Many stories flourished. Some said they hanged themselves. Some even said they went away to a distant country and were happily married. Time went by; the forest was gradually uprooted and turned into cultivable land. Once, during a famine, when a few people went westward herding their cattle, they were surprised to see their family deity, Badrakali, enshrined there. When they asked around about it, they were told that the goddess had been brought there by ancestors who came from distant lands. No one knew the name of that faraway place—it seemed that the ancestors had failed to mention it. Some people presumed that the ancestors being spoken about were, in fact, the same four young men who had fled the place ages ago. The descendants of those four men would thus be long-lost relatives with whom these people now reconnected. But it was also believed that the tribal girl's curse hounded even those families that dared to associate with them: 'Devatha, our goddess who resides up in that hill, will seek justice from those who did this to me. No girl child will ever be born in their families. Even the male children shall grow up to be impotent and die young.' This curse of the tribal girl persisted till today. That was why no girl child had been born in this lineage. Even those that were born had died in a day or two. The men, too, had truncated lives. Kali's grandmother narrated all this and launched into a dirge. She lamented the fact that she could not keep the family secret from him. But she tried to keep his faith alive: 'Dear one, you have a good heart. You will have four or five children, and you will live to be a hundred.' Kali wondered if he too would die young. But a little faith grew in his heart, that a child might actually be born, even if he would grow up to be impotent. Was childbirth getting delayed to postpone his early death? A child could be born even when he was forty. And he might live to see it for eight or ten years. That was what had happened to his father and grandfather. He did not remember his father's face clearly. But there was one image that was etched in his mind, thanks to his mother's periodic narration of it. His father had always suffered from severe abdominal pain. Toddy and arrack were his staple food. 'My Kalimma' was how he used to lovingly address Kali, and he took Kali on his shoulders wherever he went. It is likely that the way he addressed Kali expressed his sadness at not having a girl child. So Kali wondered if he too would have a male child and live to be fifty years or so. Wasn't that enough? As if she read his thoughts, Ponna ruffled his hair and pulled him close to her breast. When she heard what his grandmother had to share, she lamented her fate at having to marry into a family with so many curses weighing it down. But Kali's suffering made her forget her own. She feared she might have to part with him soon. Other than the lack of a child they could call their own, there was nothing else missing in their lives. He fulfilled every wish of hers, perhaps because he had married her out of love. The day he found out that his mother and his wife did not get along, he asked his mother to cook her own food. She made a scene, crying, 'I gave birth to just one son, and I struggled so much to bring you up.' He said, 'I have not gone away anywhere. I am right here next door. And I take care of you in all other ways. What's the point in staying together when you two cannot get along? This might improve your relationship.' And it happened just like he said. In fact, sometimes the two women even got together and turned on Kali, making it doubly hard for him. Now that they had been told the story of the tribal girl and her curse, both the mother-in-law and daughter-in-law were adamant that something had to be done in recompense. But as for what exactly needed to be done, they did not know. Kali's grandmother once said, 'Devatha still resides in the hill in Karattur. It is enough if you make offerings of new clothes and pray to her. Gods cannot be angry with people for too long.' The astrologer also agreed with her. Kali had scaled the hill several times as a young boy. He had wandered around there with other boys. But he knew nothing about the temple. He only knew that Karattaiyan and Maadhorubaagan took up either side of the hill. Every morning, before she had her food, his grandmother turned in the direction of the hill and prayed, 'Karattaiyan, Devatha.' He went up the hill and spoke to the priest: 'We need to make offerings to Devatha.' The priest gave him an appraising look, and said, 'Who told you to?' Kali told him about his grandmother and the story she had narrated. 'Devatha is no one but Maadhorubaagan himself,' sermonized the priest. 'Only people who do not know that tell these stories. For hundreds of years, our family has been conducting rituals for the half-female god. Many saints have sung his praise, calling him "Mother God", "One Part Woman", and so on. The male and female together make the world. To show that to us, the Lord stands here combined with the Goddess. In other temples, you would see separate shrines for Eeswaran and Ambal. But here they stand together as one. He has given her the left half of his body. It is only when we give half of ourselves—both body and mind—to the woman that we can be good husbands. Even though we are born male, we also have feminine qualities within us. Considering all this, elders have called him One Part Woman. There is no female without the male, and no male without the female. The world goes on only when they come together. Did you see the deity? The right side is Eeswaran; the left is Ambal. This is the only place where you get this vision. No matter how many names we address him by, they all refer to this Eeswaran. But the poor illiterate people call him Devatha. Some people even say this is Kannagi. What can one say about such ignorance? We just have to keep quiet, assured that everything is Eeswaran.' At the end of the conversation, Kali gave the priest the fifty rupees he had asked for. Buying new clothes for the deity was a separate responsibility. Maadhorubaagan is male and female fused into one. What great pleasure it is to stay as one, body to body, forever! Only god gets to enjoy such great pleasure. Kali had to buy two kinds of clothes. All his in-laws came for the ceremony. It was a great crowd. The expenses were huge too. When the preparations for the ritual were on, they walked around the temple. There was a small dip in the hill between the temple and the peak of the hill. This was a small forest with thorny bushes and trees that were perhaps several centuries old. The dense foliage reverberated with the furious chirping of a variety of birds. A long mountain rock formed a border around this little forest, lying like a giant serpent on guard. Kali was wonderstruck seeing such a forest at this altitude. He and Muthu had played here as children. They would run up to the peak and touch the rock there. They'd leap around the slopes with the ease of wild goats and monkeys. But this forest had never before revealed itself as a separate entity to him. He had been one with it before. But as he grew older, he began seeing things as separate from himself. He now looked at the forest in great surprise. Muthu must have felt the same way, for he said, 'We have roamed inside this. But I have never seen it this way.' They looked around for a path to enter the forest. Birds and animals had forged a warren of paths through the forest. En route to the rock at the peak, a narrow path branched off and led into this jungle. Muthu and Kali entered it in great delight. A mongoose, alarmed by this sudden human presence, ran and hid under a bush. The path led directly to a tree. When they looked to the other side of the tree, they saw a huge reclining figure. Fear seized Kali and, holding Muthu's hand in a firm grip, he walked ahead. It was an earthen goddess. Vermilion had been scattered all over her body, and her face was aglow with wrath. But there was a faint smile at the corners of her lips. He felt the smile revealed a defiance that said, 'What can you do to me?' When he stood at her feet, she appeared to be lying there with the full confidence that the entire land was hers. Her arms and legs were as big as the trunks of trees. She had a round face, and her wide-open eyes met his in an unwavering stare. Even when Kali averted his gaze, he could still feel her eyes boring deep into him. Trying to shake off the fear the forest had induced in them, he said, 'What goddess is she?' And they heard a voice: 'She is Devatha, our Mother, our goddess.' For a moment, it felt as though the forest itself had spoken. But they turned to see that an elderly woman, carrying a pot, was walking down the narrow path towards the spot. She had two children with her. It was she who had answered Kali's question. Around the earthen goddess were small rocks planted firmly in the ground and laid out in a circle. Beside these, in a concealed spot, were three pots and bags. Kali gathered that the elderly woman had come to make an offering of rice porridge to the goddess. The woman's ears were covered with jewellery. 'Our Devatha lies right here under the cool shade of the tree and with a stream nearby,' she said. 'But they try to keep her locked in the temple and pray. She roams freely around the forest. Can you confine her within walls? Our Mother lies right here, while they are just praying to plain rock.' 'Where are you from, ma?' asked Kali. The children who had come with her started playing in the forest. They ran around, climbed the trees and jumped from them. Their laughter and chatter sounded like birdsong. The woman replied as she proceeded to get things ready for cooking the pongal: 'We are from the other bank, thambi. Ages ago, it was from here that we migrated. Even though we had to move away, seeking livelihood, our Mother refused to come. She told us very clearly that if we needed her we should come and see her here. So we come once a year like this, perform a ritual, offer pongal and eat. We have been told that our people used to live around this hill. When the forest was destroyed, they got scattered in different directions. Some people are able to visit during the chariot festival in the month of Aani. That's when they gather here. Otherwise, people like me only visit whenever we can. Now, some ten or fifteen of us have come. They have gone to the temple. But what do I have to see in the temple when my Mother lies here? So I came here to get this ready.' It occurred to Kali that he too needed to pray and offer pongal to this goddess. This was Devatha, the goddess who had claimed a space for herself in this spot between the red rocks of the mountains. Reclining on the earth, she had even made a forest around herself. She was the goddess whose wrath had been invoked ages ago by the tribal girl's curse; she was still here, untouched by the ravages of time. He knelt at her feet. But then, shuddering at the thought that even a slight movement of her feet could hit him in the face, he backed off a little. 'Who conducts the prayers to this goddess?' he asked the old woman. 'How can we let anyone else carry out the prayers for our goddess? We do it by ourselves. Some of our people live in this town, too. One of them comes and conducts the prayers once a week. Wherever we are, we save five rupees a year and send it to him,' she said. 'I want to have a prayer conducted, mother,' he said. 'Do it with pleasure. Come one afternoon—any afternoon. The priest will be here. Ask him and do whatever you need to do. Remember, you should keep a trident and cut open a rooster and offer its blood. Those are the important things. If you wish, you can also join me today to partake in these offerings.' Kali was no longer keen on the prayers the priest conducted in the temple on the hill. Nor did he care about the extra expenses. He was determined that it was Devatha to whom he wanted to make the offerings. Whatever he earned working hard in the fields got spent in such prayers and offerings. But it didn't matter. It was not as if he had children amongst whom to divide his earnings. 'All right, Amma. We will come in the afternoon,' he said and got ready to leave. She said, 'By then the pongal will be ready. Do come and eat with us.' When he nodded and left the place, he saw that the children were playing with a monkey on one of the trees. Usually he lamented the need to do whatever prayer whoever recommended, but the thought of doing one for Devatha truly filled his heart with peace. ## six The person who performed the prayers and rituals for Devatha worked in a warehouse loading and unloading sacks of produce. He did not give any elaborate list of things to be prepared for the ceremony. Nor did he take any money. In addition to the usual things needed for the offering, he asked Kali and Ponna to get red powder for about eight annas and to buy new cloth from the store in a small street at the foot of the hill. And also a rooster for sacrifice. Ponna and her sister made the pongal. The priest decorated Devatha. She did not inspire fear in Kali like she had done the day before. Using a soft piece of cloth, the priest cleaned her gently. At that moment, the goddess could have been any woman from any of the local families lying on her back. Kali and Muthu went to roam around the small forest. It was dense with neem and palai trees. There were also a few kondrai trees that had grown very tall and had their flowers hanging in bunches. The forest contained several paths, all as narrow as the lines on one's hands. You could reach the Devatha shrine from any direction. 'Machan,' said Kali, addressing Muthu fondly, 'please find a special spot in this forest too. It would be of use if we come again.' Muthu laughed. 'Do you think no one would have done that already?' he said and pointed to what looked like a thick kasarali bush but had a clearing inside. They could see that men had been sitting there since a short while. There were some cards and a few empty bottles lying around. 'Man always needs such spaces, mapillai!' explained Muthu. 'He wanders around looking for them. Some succeed; others keep looking. Then there are those who are fearful of going there even if they do manage to find such a place.' Kali moved away towards Devatha's shrine. What he found there was not an ordinary woman lying on the ground. He saw a woman dressed in red, and with red splattered all over her; he saw a woman blazing with wrath. By applying a little red to her eyes, the priest had made them glow with great ire. Kali and Muthu were speechless. The priest performed the ritual in silence. All they could hear was the sound of bells. When the offerings were made, Muthu brought out a small bottle of arrack. The priest had not mentioned it, but Muthu somehow knew. The priest slashed the rooster and let the blood flow at Devatha's feet. Once the cooking was done, they all ate. The rooster had been cooked in a gravy. Kali's father-in-law did not come. He never came to such events. So, it was only Kali, Ponna, his mother, mother-in-law, and his brother-in-law and his wife. But there was still a lot of food left over even after the priest had eaten. They had to finish all the food before they left. The priest went out of the forest and brought in a few beggars who lived in the rest houses there. They were happy to have their plates filled with food. When they finally climbed down the hill, Ponna felt very satisfied. Kali visited the shrine whenever he was on the hillside. For several months, no one changed the cloth they had offered Devatha. The priest had not taken even a penny from him. Kali felt that the curse of the tribal girl would have lifted by now. Ponna, too, was full of hope after praying to Devatha. Her expectations were heightened in the months that followed. After every twenty days, she prayed, 'God, please fill my womb at least this month.' Even if there was a day's delay in her menstrual cycle, she was filled with excitement: 'This is it!' But if her cycle began the next day, the house looked as though someone had died in it. She didn't eat properly and just lay around. Kali had to go to his mother for food. Even after cutting open a rooster and satiating Devatha's thirst for revenge, nothing changed. Whenever he went to the temple, he stood at Devatha's feet. 'Has your thirst been unquenched through the ages? It is not up to me to make you pull in your revenge-thirsty tongue. I am an ordinary man. For several births to come, I will do what I can. Please save me from being the talk of the town. I am unable to answer everyone's wretched questions. Ponna is wasting away. I am the one who is born in this useless lineage. Why are you avenging Ponna for that?' Saying this, he broke down in front of her. But nothing quenched Devatha's anger. ## seven Sleep eluded Kali even after he had finished eating the snack. He lay on the cot in the cool shade of the portia tree, his eyes closed as he savoured the gentle breeze. He could hear the sounds of cooking from inside. After tossing and turning for a while, he sat up, and the cot creaked under him. The fast for the chariot festival and the snack that had followed—neither had given him any joy. Instead, his mind was flooded with all sorts of thoughts that confused him. Kali thought he might feel better if he went out for a stroll into the forest with Muthu. Where was Muthu? Was it a workday in the fields? Muthu was good at finding or creating new secret spots—havens that were unknown to anyone else. Kali remembered that the last time he visited, Muthu took him to the well. There was very little water in it. 'How can we swim in this, machan?' Kali asked. 'You have known me for all these years, and yet how little you know me! Would I take you for a swim in this? Come, come and see. You will be amazed,' said Muthu, climbing down the stairs into the well. It was a deep well. All rock. Kali wondered at the difficulty people must have faced in bursting so much rock and digging so deep. The steps went straight down, flattened out at a point into a landing, and then continued further down. Standing on that landing, Muthu looked up. In the light that streamed in, he could neither see anyone's head nor its shadow. 'Mapillai, be careful!' he shouted. Then, reaching out and gripping a rock on the other side of the downward staircase, he suddenly vanished into a gap in the wall. Although Kali was very used to roughing it out, he hesitated to follow Muthu into the dark hole. Muthu peeped out from the hole and said, 'Hold on to that rock that is sticking out. Do you see that little groove wide enough just to place your foot there? Don't be scared. Even if you fall, it will only be into the well. And there is water enough to not get hurt.' Moving like an iguana that clutches tight even the smallest of surfaces, Kali entered the opening in the rock. Only then did he realize that it was not just a hole but a big cave with a rocky floor and a sand-plastered roof. Kovai creepers fell like a curtain, covering the entrance to the cave. Kali was amazed. Muthu had enough things stocked up there to throw a feast. Muthu started skinning the two white rats he had caught that day and brought hanging from a string on his waist. One was a male with swollen balls and the other was a female. Together, they'd make a decent amount of meat. The cave had everything—a penknife, a stove made with small stones, an earthen pot, wood. There was even a little money stowed away. Muthu pounded some chillies and roasted the meat. How did he manage to get wood that burnt without smoke? Even if someone were drawing water from the well, they wouldn't know anyone was down here in the cave. Kali stretched his legs and lay down. The tasty meat went well with the arrack. The little bit of gravy at the bottom was incredibly delicious. Kali poured it into the curve of his palm and slurped it down. They both drank, ate and slept there undisturbed for several hours and emerged only in the evening. 'Only snakes use the holes in wells, don't they?' asked Kali. 'I have calamus to ward off real snakes,' replied Muthu. 'Its fragrance repels them. And if we smoke samburani as soon as we finish eating, the smell of the meat won't linger.' Kali said, 'No man can discover such a place. You are the snake!' That place must still be a secret. If anyone found out, Muthu would immediately change his hideout. But who was going to climb down that well? Even if someone did, they would need extraordinary eyes to see past the screen of kovai creepers. How many hours would he have worked inside? Muthu's work was better than even those of professional roof-layers. He had done such a perfect job. It would be nice if he were here now. Kali sat up. Seeing this, Ponna came running. 'Maama, do you want water?' He nodded. She ran in. Whenever they were here, Ponna was more sensitive to each and every move of his and paid close attention to his every little need. Sometimes it looked like she was lost in some other work, but her mind was fully occupied with him. Her mother once remarked, 'As if you have some wonder of a husband that no one else has! Even if he moves his finger a little bit, you run and stand in front of him.' 'That's right. My husband is a wonder for me,' she replied. 'Let's see if you still run around taking care of your husband after a child is born,' said her mother. 'Even if I give birth to ten children, he will always be my first child,' she responded, brimming with pride. 'It is all right to desire. But you are greedy. Maybe that's what has put off even the gods,' her mother said with a sigh. The conversation ended there, and silence fell. Now, when Ponna brought Kali an aluminium pitcher full of water, he drained it in a single gulp. She laughed, 'Were you this thirsty?' He was about to say, 'Yes, but it is definitely less than Devatha's thirst,' but he stopped himself. Perhaps because that was the day the deity went back to the hill, all his thoughts revolved around that one event. 'When is your brother coming?' he said to her. Ponna said, 'He went somewhere in the morning and has not returned yet. But he'll be here in time to eat. Today it's your favourite: drumstick.' Kali's lips widened into a smile, but his heart was not in it; his mind was elsewhere. He felt that if he made Ponna lie next to him, embraced her tightly and cushioned his head on her breasts, all his broodings would vanish. In the middle of the day, in the shadow of the tree . . . Why was his mind stuck on impossible things? He held her hand and gently rubbed it against his cheek. But then her mother called from inside. Had her sister-in-law been at home, there wouldn't have been so much work for Ponna. But she, along with her child, had gone to her mother's house. They had been invited to keep the fast there. Kali kept looking at Ponna as she crossed the threshold and entered the house. The things she had done in the hope of getting a child! She would do whatever was asked of her. Everyone had been patient for six months after the wedding. But there had been innuendoes even before that. Then they started asking direct questions. The only way to save oneself was to conceive in the first month of marriage. Otherwise, the interrogation would begin in some form or another. His mother, who was patient for six months, started her treatments soon after that. She kept a watch on Ponna's menstrual cycle that month. As soon as it came to pass, she told Ponna to drink the juice of some shoots on the morning of the third day. She said forcefully, 'Don't eat anything else even by mistake. The juice will be bitter. You will have to close your eyes and swallow it.' After that, Ponna got used to eating different shoots and drinking different potions. Her tongue became numb to all the bitterness. The goal was to beget a child, and she was ready to do anything to attain that goal. The bitterness of the medication paled in comparison. But her mother-in-law's medication didn't go down all that easily. Before Ponna woke up and stepped out, her mother-inlaw was busy crushing a big bunch of tender neem leaves. It made Ponna retch. At her own parents' home, she would throw a fit even when her mother made her take regular medicine. Her mother would yell, 'Am I asking you to eat neem shoots?' But now she was having to eat neem shoots for real. It made her very angry at her mother-in-law. 'Should I put a child on her lap the month after the wedding? I can only drop a grinding stone into her lap. Can't she be patient for a year or two? We are young. She is unable to see us enjoy a few good years without hassles like children. She can't bear to see me happy.' Kali smiled and said, 'It is only neem juice, right? All the worms in your stomach will die.' 'You mother wants a worm to crawl in my womb. And you are saying it will die. Are you two playing with me?' And she punched him in his chest. 'Ah, it feels like you are throwing flowers at me. Please punch me more, darling,' he pleaded. But he didn't say that she needn't drink the bitter extract. His mother extracted the juice out of the crushed neem shoots by filtering them through a pure white cloth. It gave very little juice. After repeating the process some three or four times, she got a quarter cup of the extract. She had somehow procured a measuring cup that was normally used in wedding rituals; she cleaned it and got it ready overnight. She poured the neem extract into that vessel and closed the lid. She then asked Ponna to come after pouring water over herself fully clad in a sari. After that, Ponna had to stand, dripping wet, facing east in front of the house. Dawn was appearing, waving its raised hand to everyone. 'Pray,' she said to Ponna. She too prayed. 'O you who are travelling west,' she said, addressing the sun as she prayed out loud. 'She is drinking this so that my lineage will endure. Please let it grow,' said her mother-inlaw. Ponna murmured something to herself. Kali's mother had invited a white-sari-clad distant relative, a grandmother. She must have been a hundred years old, but other than her cataract-covered eyes, she looked fine. She had seven or eight children and a drove of grandchildren. Ponna's mother-in-law too was a widow. But, for some reason, she was not supposed to hand over the earthen bowl of medicine to Ponna. To receive something from a woman in white is like receiving something from the goddess herself. The old woman lifted the bowl above her head, prayed to the dawn and gave it to Ponna. 'Don't think about anything, dear one. Close your eyes and just gulp it down. The gods will open their eyes,' she said. Ponna did as told. Even though she drank it up very fast, it was bitter beyond belief. The vessel was heavy too. She retched and gagged, but didn't stop drinking. When she was done, her mother-in-law put a handful of jaggery into her mouth. But the bitterness did not leave her palate for a week. No worm crawled in her belly either. She was taken here and there, and was told that she was being given medicines to conceive. But nothing worked. She had laughed once, whispering into Kali's double-curve-studded ears, 'If you had married a goat instead of me, it would have given birth to a litter by now for all the shoots she must have eaten.' Stony-faced, he had replied, 'I should have been born a male goat for that.' Even now, thinking of that made her smile till her eyes welled up with tears. ## eight In the matter of offering prayers, Kali and Ponna left no stone unturned. They did not discriminate between small and big temples. They promised an offering to every god they encountered. For the forest gods, it was a goat sacrifice. For the temple gods, it was pongal. For some gods, the promises even doubled. If a child were indeed born, the rest of their lives would be spent in fulfilling these promises. Kali, in fact, was ready to forgo his cattle and all that he had saved with his incredible frugality, if only their prayers would bear fruit. But no god seemed to pay heed. How many prayers and promises they must have made in Karattur alone! If you went past the forest where the Devatha shrine is, and climbed further up, you would arrive at the Dandeeswarar temple on top. They called this deity the Pillayar on the hilltop. He was guarding the maladikkal, the barren rock that was nearby. An ordinary soul could not reach there; one needed both mental and physical strength. When they were younger, Kali and Muthu went there with a large crowd of young men on every new-moon day without fail. People would arrive there in bullock carts. Elderly folk and ailing people would touch the first step and pray and lie down in their carts. Muthu and Kali's crowd of young men positioned themselves in the mandapams, the rest houses that marked every significant climb, and laughed at those who needed to rest before proceeding further. They would make a competition of running up the steps. It was pretty much like running on flat ground. It was only after the dip at Pambar Pallam that it got steep. One had to be patient, particularly while climbing down. If not, then one ran the risk of tumbling down the hill, without any control, all the way till the hollow landing. The young crowd usually left their homes before the crack of dawn, walking and running to reach the hill six or seven miles away. To cross distances was a sport. Nothing gave them as much joy as this. People sold millet rice in the mandapams on the hill. The rice was mixed with thick yogurt and was full of the fragrance of millets. Two full pitchers were enough to keep hunger at bay. Besides, they were of an age when they didn't worry about hunger. In fact, going to the temple was only a feeble excuse to undertake this journey. It was over as soon as they stood in the inner sanctum, touched the camphor flame, prayed and smeared the holy ash on their foreheads. No one went into the forest where the Devatha shrine was. A fear of that place had been instilled in everyone. On days when there were bigger crowds, they even appointed someone to make sure no one strayed into the forest. Walking past it, they came to a rocky patch where small trees grew out of the crevices between the rocks. They were so narrow, no one could walk through them. So instead they jumped from rock to rock. The ruckus they made leaping about like this scattered even the monkeys away. Then a flat surface. If you walked over it, keeping to the left side, you would come to a gigantic rock that stood like a sickle. Its tip looked like it was ready to pierce the sky. They would place their feet on small fissures and climb to the top of even this rock. There was a cave under this rock. It was cold inside. They'd lie down there. If no one was talking, they could fall asleep. If they leaned out from the entrance to the cave, they could see the town below. They could even see the other temple located at the base of the hill and the thatched roofs of the stationary chariots. The houses of the priests who worked in the temple, and other houses, were all arranged along four or five streets. The temple tank appeared large and spread out. The two temple tanks would look like beggars' bowls that held sand. Running right across from the temple at the base of the hill was the devadasis' lane. Anyone was allowed into that lane. In front of the cave was a vast shaded space. They would talk non-stop. Now when he tried to remember what they talked about, Kali could not recollect a thing. Perhaps such incessant chatter was the prerogative of youth alone. Once he grew up, the brain might have decided that it was all meaningless and erased all memory of that prattle. But it could do nothing to the feelings of happiness that came with it. They were spread out like a vast, open space. When the sun went down a bit, they'd move from that spot and go towards the next peak. How many peaks there were in those hills! They had to climb down from the rock that was right in front of the cave. In the gap that looked like a crocodile's gaping jaws, there was a stream. On rainy days, they could jump, dunk their heads in and bathe in it. For the elderly folk who managed to limp, wobble and drag themselves to that spot, it was sacred water. 'Don't go into the water!' they'd shout. Above that, they had to climb on to a barren rock surface that was totally bereft of any vegetation. No tree, shrub or creeper could grow on that bald rock. That was where they could feel the force of the wind. Wind is more powerful than anything else. If it sets its mind to it, it can destroy anything in an instant. They could climb only after humbly requesting the wind to give them way. They had to place their feet carefully, their grip tenacious and strong like an iguana's, and focus on climbing one step at a time. In certain spots, the only way to move was to crawl over the rock like a creeper. And there was nothing the buoyancy of youth was not equal to. From that spot, the Dandeeswarar temple seemed like a small lookout on top of the hill. Right next to it was a stone that was as tall as a human being. That was the maladikkal, the barren rock. On the other side of the rock, it looked like someone had carved a semicircle out of the hillside. The challenge was to come round that semicircular path. Even if you leaned over a little, you would start shivering in fear; your soles would sweat and you'd fall and vanish down the steep hillside. It was sport for them to perform feats on that spot. Several people had died trying to walk around the maladikkal, in the hope of fulfilling some wish or having their prayers answered. Due to this mounting death toll, a British man had built a wall that barricaded the stone. But could anyone change a belief that had survived through the ages? In fact, the wall made it all the more convenient. One could hold the edge of the wall and move quickly to the other side. Then, relying on the coarse surface of the rock, one could cross the semicircle and get to the other side of the rock. After that, you could hold on to its edge and proceed further. If you were used to it, you could go around it in the blink of an eye. Kali and Muthu had done this many times. But men don't benefit from this prayer. Only women do. That is what Ponna was told by a short old woman who had come one day to weed their field of groundnuts. According to her, any woman would be blessed with a child if she walked around the barren rock. She added that that was how she too had conceived. Ponna listened intently to all this before leaving for the temple with all that she needed to make a pongal offering. She did not listen to anything Kali said. She did not want to tell anyone where they were going. They might discourage them from going. Everyone would have an opinion. While beginning to walk around the barren rock, even if someone warned 'Careful! Careful!' it could be distracting. Also, if Ponna felt scared on seeing the spot, she might return without walking around the rock. In that case, if someone came along, it might give them something humiliating to talk about. 'She said she would walk around the stone, but she took one look at it and came back without doing it,' they'd snicker for ages. People constantly needed something to gossip about. They went on a day when it was not crowded on the hill. Ponna had never been to the top where the maladikkal was. She had noticed it when people had pointed to the Dandeeswarar temple and the stone that looked like a raised finger and told her that was it. She was used to roaming in the fields. The only hurdle to negotiating a bald rock that had no steps was her sari. But since no one seemed to be around, she lifted her sari up to her knees, tucked it in, and climbed with ease. When they reached the cave, Kali pointed out the barren rock to her. It looked to her as though someone had stood a gigantic, flat rock upright and placed a small knot of hair on top of it. Kali tightly embraced Ponna, who sat and leisurely gazed at the stone. He pulled the sari away from her breasts and buried his head between them like a goat kid. He held her passionately, nuzzling her, when she lowered her face to his head knot and said, 'Maama, are you scared I might fall while walking round the stone? Is that why you are giving it to me now like this was the last time?' Kali let go of his embrace in shock. Tear trails ran all over her face. The altitude of the hills, the shade of the trees and the flat ground there had kindled his lust. Her sari, which had now gone up to her knees, and the cloth covering her breasts, which had come undone in the wind, all added to his longing. The sacred thread caressing her neck and the taali glittered invitingly. He was never satisfied making love in the confines of a walled space. He preferred open spaces. He had to see the sky. It was even better if a bird took a peep on its way somewhere. He would take her to their barnyard just for this. The two-acre farm had a fence but no roof. As soon as he set the cot down in the middle, he was in the mood. She would have some complaint or another: 'The goat is watching; now it is the cow.' She quite liked it, but would still make mild protests because she did not want him to think of her as a shameless woman. He would say, 'Don't we see when the cows and goats do it? Now let them watch us.' 'You have no decency at all, maama!' she would reply. Whenever he managed to find good arrack, he took her to the farm without fail. She did not like toddy. She complained that the sour burp stank for days. All she needed was half a glass of arrack that had a sharp sting on her tongue. Now, the hillside had awoken the same desires in Kali. But she put out his fire with just that one remark. She immediately tried to console him. 'We are here to pray, maama. That's why it came out like that.' 'Whatever it is, don't say such crazy things,' he said. They made peace and climbed to the spot where the barren rock was. One look at the foot-wide space around it and she was scared. 'We don't have to do it if you are scared,' he said. The old woman had said, 'Don't look outside. As long as you keep looking at the stone as you walk around it, you will have no trouble. It is just like walking on a ridge in the fields. The difference is that there you would fall into the mud if you skidded, and here, it is rock—if your head hits it, it will shatter into smithereens like a coconut. But it is nothing for those who are used to walking around in the fields and forests, Ponna.' All the stuff she had brought to make pongal with lay in front of Dandeeswarar. Only those who planned to walk around the stone made the pongal offering. Others just lit camphor and prayed. They had bought all the stuff with the intention of making the pongal once Ponna finished the walk. But now Kali was worried, wondering if she'd be able to do it. Even if she tripped a little, that was the end of it all. What if something like that happened? They would definitely accuse him of doing away with her by pushing her off the edge. This place was infamous for murders and suicides. But it did not appear that anyone who went to walk praying for fertility ever fell down. But what if it happened to Ponna? His heart suddenly weighed like a rock. If she fell, he would fall down with her too. It might even be possible to live without her. But he couldn't live with the allegations. 'Maama, I will walk around now. If something happens to me, don't let it affect you for long. Marry another woman. At least let her be blessed with a child,' Ponna said with teary eyes. 'Chee!' he exclaimed, dismissing her gloomy words. Wiping the tears from her eyes, he consoled her, 'We lack in nothing. We can be happy. It doesn't matter if we don't have a child. How long will these morons in the village keep harassing us? Maybe for another ten or twelve years. By then we would have grown old. So what if we don't have children? We can still triumph. We can write off the little land we have to some temple. Or else, we can leave it to someone who has nothing. Let him make a living out of it.' He embraced her. He felt his mind had acquired some clarity. But she was confident about completing her walk around the stone. She took this as a challenge above all the other prayers she had endured until then. Her logic was that the gods might find some compassion for her if she put herself through this most difficult of tests. Once she made up her mind to go ahead with it, Kali told her how to. He felt she might fly into a wild panic if he offered to show her how to negotiate the precipice. So he simply showed her. He went to the edge of the wall and said to her, 'Look,' and in just two swift moves went around the stone, and climbed over the other wall. When she screamed, 'Maama!' he was already in front of her, laughing. Everything felt like an illusion. She wondered why such a simple thing scared her so much. Kali was clearly used to walking around the stone. Her brother, Muthu, too had done this enough number of times. But no one at home knew this. Young men are great at keeping secrets. The second time, he asked her to watch closely, and demonstrated it again with her permission. She observed how to hold on to the railing and also made a note of how much space there was to place her feet. It reminded her of a rock lizard. The way his body clung to the rock while his arms and legs were spread out embracing it looked just like what a rock lizard would do. He told her she could either walk around once or do it three times, and went ahead and did three rounds himself. Watching him, Ponna lost all her fears. Like the old woman had said, this was nothing for someone who had roamed around forests. He helped her hoist up her sari and fasten it securely. Two vultures circled around in the endless expanse of the sky. They seemed motionless, their wings stretched wide without a discernible flutter. They blessed her. She held her palms together over her head and prayed, 'God, my father, please make sure I do not gain the reputation for being barren.' And just like he had done, she crossed the wall and navigated the precipice with the tenacity of a rock lizard. When she reached the end of her ordeal, he gave her a hand and helped her cross over the wall to his side. He held her close to his heart and exultantly kissed her on the cheek, lips and head. When they sat in front of Dandeeswarar, she burst into sobs. 'Seeking a life, we have pawned our lives. Don't cheat us, god,' she cried out loud. With her head on his chest, she felt dizzy. She lay there with her eyes closed. He laid her on the ground and splashed some water on her face. She regained consciousness. 'Maama, shall I do two more rounds?' she said. He was firm in his refusal. The effect was the same whether you did it once or a thousand times. She started making pongal in front of the Dandeeswarar temple. This temple had different priests. They came only when there were crowds, like on new-moon days. On other days, they came only if someone went and fetched them. Kali climbed down fast and was back by the time she had finished making the pongal. She was amazed at his speed. When the mind is excited, the body begins to take flight. By the time the priest came and finished the prayers and they climbed back down, darkness had begun to wrap itself around everything. They could never forget the night that followed. That was the night everything came together blissfully. That was the night they slept well, confident that the seed they'd planted would definitely grow. She also thought of it as her penance for wounding his heart with her words earlier that day. His body and mind expressed his conviction that nothing could sufficiently express his gratitude for this woman who had risked her life doing something all women feared to do. The night was filled to the brim with giving and receiving. In the middle of the farm, on the coir-rope cot, she lay like a garland on his chest. They both felt they needed nothing; nothing could make him happier than to die at such a moment. She was confident that she wouldn't bleed that month, that there would finally be an end to all the talk. ## nine And the kind of talk they had endured! Many people had concluded that Ponna and Kali would not be able to have children at all. It was, in fact, their desire that it should not happen. Even her sister-in-law said so once. 'What are you going to do by saving money? Eat well, wear good clothes and be happy.' 'Why? Are we starving now? Are we standing naked in front of your house?' Ponna retorted. Her sister-in-law's face shrank. 'I didn't mean it that way.' 'What kind of talk is this? Shit-eater talk.' Ponna could not keep it from tumbling out. And her sister-in-law held on to that last comment. She went around telling everyone, 'She called me a shit-eater.' No one bothered to ask what had provoked such an abuse. 'Ponna talks too much,' they said. But Muthu would never say anything like that. He loved his brother-in-law more than his sister. He scolded his wife. And all of this effectively ruined the relationship between the sisters-in-law. They never again spoke to each other properly. Whenever she knew Ponna was coming, her sister-in-law left for her mother's house with her child. Kali had two uncles. They lived quite well in Thalaiyur with a field and a house. But they had an eye on his property. Whenever his uncles' wives met him at any function, they fawned over him like they were ready to hand over their lives to him on a platter. The uncles visited them at least once a month. They brought fruits and vegetables or something else for their sister, Kali's mother. They gave some of it to her and the rest to Ponna. Ponna always made fun of this practice: 'Even when she is fit to be a grandmother, she gets her due from her mother's house.' Kali would smile but not say anything. One of the uncles had three daughters and a son. The other one had two sons. Once in a while, they would send their children over and it was not easy to attend to them. But all of this was not out of love for Kali and Ponna. Rather, this idea of bonding regularly was a strategic move on the part of the uncles. After all, if it ever came to a property dispute later, the closer ones might get more, right? The second uncle's last son was Kadhirvel. In his village, everyone called him 'Water Gourd'. He looked like a water gourd on which someone had hung a shirt. It was easier to assemble a herd of goats than to keep an eye on him. One moment he'd be playing right in front of the house and the next second he couldn't be seen. How long could one keep an eye on him like a snake upon its prey? Looking for him, Ponna would have to walk up and down between the house and the farm at least four times a day. But if there was work in the field, Kali expected her to be there. Water Gourd was good at wandering alone, and she let him do as he wished. It was all right as long as he did not create trouble. The children did bizarre things when they jumped and played in the well. When one of the boys wanted to leave early and started climbing up the well, they would throw mud on him. He would have to jump back into the water to wash away all that mud. It was very difficult to escape the mud-pelting. During one such game, our Water Gourd fellow threw a stone at the boy who pelted him with mud. It hit him sharply on his feet and he writhed in pain. But he retaliated by aiming one back at Water Gourd. It was sharp as a sickle and it hit our boy on the back of his head, even making a dent in it. Despite his dense hair, blood flowed down his nape. It stopped only after a herb extract was applied on it for a week. As soon as she heard the news, his mother came rushing like a she-devil. God knows who managed to convey the news to her three villages away and into a forest beyond that. There are folks who go out of their way, first thing in the morning, to make sure they have a nice fight to watch. Shouldn't the woman have first inquired about what had happened? She might have a great deal of love for her child, but how was any of this Ponna's fault? She was screaming even as she came down the street. When she reached the gate, her words were as hot as the sun: 'She would know only if she had a child of her own! She has taken such good care that my boy's head is broken. Would any mother allow that to happen?' When the boy had come home injured, Ponna had run here and there to find a medicine to apply on his wound. All that seemed to mean nothing to his mother. All that Water Gourd had done when he was bleeding profusely was to whimper in pain. But now, looking at his mother, he wailed. His mother spoke as if it was Ponna who had deliberately thrown a stone at him. Disgusted with the behaviour of the mother and son, Ponna retorted, 'Well, if you know the blessing of having a child, why don't you keep him to yourself? Why send him here?' That was it! A thousand words came pouring forth then. 'Do you think we are the kind of people who wash their asses in any river?' raged the boy's mother. 'I sent him because he wanted to go to his aunt's place. Look at her, advising me like she has raised some seven or eight children.' Ponna did not say anything. With the entire village watching, Ponna's mother-in-law rushed to her sister-in-law and said in a pleading voice, 'Please leave him here. I will take care of him.' But the woman didn't listen. She took her son away. Long after she was gone, her words seemed to echo in Ponna's ears. Kali did not say anything. Ponna cried, 'Even if we don't have children and decide to give away our money, we should give nothing to these people.' He just smiled. Since then, neither of the uncles sent their children there. This asset of theirs, the land, seemed to irk everyone. Does anyone know who ploughed this land a hundred years ago? Can anyone say whose land it would be a hundred years from now? If man had the prospect of living any longer than he already did, he would want to keep everything for himself. When we finally leave, life strips us even of the little piece of cloth we are wearing. And all this talk! Even those who look like they could die any day now talk non-stop about money and inheritance. One Tuesday, Ponna went to the fair with Pottupaatti. The woman had got her name from the large pottu, larger than her forehead, that was tattooed on her. Ponna needed company to walk the five or six miles and though Pottupaatti was terribly slow, Ponna asked her to join her. Covering her head with a basket, Ponna tackled the sun as she walked. Their onward journey was smooth. She bought enough stuff to last a week. She even got titbits like pears and puffed rice with peanuts. Her basket was full. The old woman had no money on her. Feeling bad for her, Ponna bought her some puffed rice with peanuts for one anna and dropped it in her basket. On the way back, the woman remarked casually, 'You have bought so little. Do you have a child crying at home? Your husband and you are protecting an inheritance that god knows which wretched dogs will claim later. Why don't you eat what you like? Whom are you being so miserly for? A woman without her husband and an inheritance without an heir are the same, they say.' Ponna was enraged. She had taken pity on the old woman, but now she started shooting her mouth off. 'You and your husband had no control and you were producing babies even when you were forty-five. You divided your land among them. Do any of your sons work the land now? Didn't it go as bad as not having heirs? You don't even have anyone to give you some money to go to the fair. You don't have money even to buy yourself some puffed rice. What have you accomplished by bearing children?' Ponna made sure the woman heard each word clearly and stomped off. The woman could not say anything. She was perhaps scared that if she said anything more Ponna might knock her down. But she spoke to others once she reached the village. 'Do you know what happened when I went to the fair with that witch?' she began and told the entire village her tale of woe. In her version, the old woman had caringly suggested that Ponna should buy some snacks for her husband. To which, apparently, Ponna had replied, 'It is because of your careless spending that you lost all your land. Both your property and mine are properties with no heir.' All of it came to Ponna's ears. Neither Pottupaatti nor her daughter-in-law spoke to Ponna after that. Ponna thought it best not to say anything more. It seemed that people who had children could do anything they wanted—that only _they_ had such rights. But Ponna was aware of her sharp tongue and what it could unleash at any moment. Fearing the consequences of such an outburst, she tried to be very careful in public spaces. But, somehow or the other, a quarrel would ensue. Even her neighbour Sarasa had a silly expectation that Ponna should bequeath things to her children. After all, Ponna herself had none. Sarasa's children happily helped themselves to kuzhambu, rasam and anything from Ponna's house. Sometimes, she even made them eat there. If not for the chatter of those children, she would only have to listen to her own echo bouncing off the walls. So, she was very loving towards them. The older girl played snakes and ladders and hopscotch with Ponna. Then they'd both comb their hair and decorate it with flowers. The girl didn't even mind running small errands for Ponna. It so happened that Sarasa's brother-in-law was getting married. The girl was from Kallur, which was just two villages away. Sarasa had insisted that Ponna come ahead of time. But since it involved getting a bunch of other women ready, Ponna got delayed. How could Ponna go all that distance alone? Some ten or fifteen of them went together. In front of everybody, Sarasa made a derisive remark. Perhaps it was her way of showing how close she was to Ponna. 'Despite my telling you to come early, you are arriving only now. Did you get delayed in getting your daughters ready?' She was showing off that she had children while Ponna didn't. Her mocking tone stung her. One or two of the women laughed at Sarasa's remark and looked at Ponna. 'As if those with children are always doing such a great job!' Ponna exploded. Unable to stop herself, she went on, 'This one runs around with a soiled ass after shitting, the other one runs about wiping its mouth after eating. I comb this one's hair every day. It is not enough to give birth to children—you should also know how to take care of them!' Silence prevailed for a while in the entire wedding pandal. The women who had laughed at Sarasa's remark were not laughing now. Ponna did not feel like staying there any longer. She turned around at the entrance and started walking back. To make sure she didn't give anyone a chance to come after her, she walked really fast and crossed that village. She later heard that Sarasa had sat and cried about it. She might have done it to clear her name. After this episode, Ponna did not attend any functions. Whether weddings or funerals, either Kali or his mother had to go. If any of them put pressure on Ponna, she would respond in their own style: 'I have no children. What function is going to happen in my house tomorrow? Whom am I going to invite with betel leaf and nut? Are things so bad that when I die no one would come to carry me? Will they let me just lie here and rot? I don't want to go anywhere. And no one needs to come here either. It is enough if they leave me alone.' Sarasa pulled a long face for a while. She even kept her children from going to Ponna's. And she also took better care of them—she washed their feet, fed them well and combed their hair properly. Ponna smiled inside watching all this. But it lasted just a week. Then everything went back to where it was. The older girl started coming running to Ponna with a comb in her hand. Sarasa too squeezed in a word or two here and there. But Ponna was sure that Sarasa's dream of getting a share of their property for her children must have vanished. Ponna had believed that the barren rock would put an end to all the cruel talk. But all that effort of climbing up the hill and putting her life at risk came to naught. No change occurred in her body. Everything went on just as it had. She didn't know what more could be done. ## ten An ant in his armpit woke Kali up from his slumber. The skin swelled up a little when he rubbed it involuntarily. He sat up. Sounds of cooking were coming from inside the house. Muthu hadn't returned yet. Kali felt like going for a short walk. Other than the house and the portia tree, there was mainly sun-scorched dry land all around. It had been twenty days since the month of Aani had begun, but the sky hadn't yet opened its eyes to shed tears of rain. The farmers were waiting for the rain so they could begin the first round of ploughing. But while the heat kept rising, not a single smudge of grey could be spotted in the sky. It sowed within them the fear that the rains might fail this year. There was no problem of fodder for the cattle. One granary of pulses and another of corn were still intact. Water scarcity might hit them, but whatever water was left in the well could be used sparingly—none for the coconut trees, only for the cattle. After all, it would have to rain at least by Aipasi or Karthigai. The god in Thattangadu had apparently prophesied this: 'There will be less rain this year for sure!' Kali thought he should plan accordingly. He looked up. The sun was overhead. It must be around noon. He wondered if his mother would have given water to the cows. He had put the husk in the shed. The cows only needed to be brought and tethered. His mother would do the work for one or two days, but he was contented only when he did it all himself. He wondered why he could not trust anyone. Ponna always scolded him, 'I too am a farmer's daughter. Don't you think I can handle them for a day? What is it that you do to them that I don't?' At night, even a little movement from them would wake him up. It had been several years since he had slept peacefully. Even when the body is ready for deep rest, the mind keeps irking it just like the ant from this tree. How can one sleep like that? The barnyard occupied his mind wherever he was. It was only there that he felt safe. It was enough just to be there and talk to the cattle. When he was alone in the fields, someone would come at night to keep him company. Whenever Uncle Nallayyan came, Kali was delighted. He was a distant relative of Kali's and must have been over fifty. And he always spoke with great excitement. Uncle Nallayyan never married. It was all because of what had happened in his youth. He did not get along with his father. They stayed in the same house, but they tried not to see each other. He found his father's voice as bitter as neem fruit. The moment he heard it, he would run far away. When asked what exactly the problem was, he smiled as he explained, 'When I was a child, he took me on his shoulders to see the temple chariot. Everything would have been fine had he come straight back home after seeing the chariot. Instead, he went to the devadasis' street, carrying me along. He sat me down on the porch and went inside one of the houses. I waited for a while, but it seemed like the man was not going to be out soon. So I walked back home on my own. I must have been five or six years old. Did I keep quiet about this at home? No. I told my mother that it happened like this, like that, and so on. Even my mother did not mind the fact that the little child had walked all that distance alone. She took umbrage only to the fact that he went to a devadasi. He came long after I had returned and said, "The boy got lost in the crowds. There is nowhere I haven't looked for him. That is all our bad luck." My mother rushed towards him with a broomstick and hit him on the head. She screamed, "You want a devadasi? If you come into the house again, I will chew off your neck." It appears that my mother never allowed him near her after that. That made him angry at me. Whenever he saw me, he would grimace like he'd just drunk some castor oil. As for me, I could never forget how he sat me down at the entrance to the devadasi's house and vanished inside. So, we don't get along.' When Nallayyan was fifteen or sixteen years old, the father and son got into a massive fight. Standing in the field, his father threw a ball of sand at him, and in response he threw the spade at his father. It cut into his father's calf and the old man collapsed, screaming, 'Aiyo!' Scared that he would be caught, Uncle Nallayyan ran to the house and took money from his mother's purse, which she kept hidden inside a pot. He then ran away from the village and did not come back for six months. When they finally got over their anger at his stealing the money, they looked for him here and there, but they could not find him. Six months later, early one morning, when his mother stepped outside the house, she saw her son sleeping there. She made a huge scene. He could not answer any questions about where he went and what he did. He had grown dark and gaunt. But within a week he improved a little in his mother's care. 'I cannot believe I named this wretched dog the "good" one,' his father murmured, brooding over what 'nalla' in 'Nallayyan' meant. 'I should hit my own head with a slipper. A dog that steals from his own home can even drop a rock on your head while you sleep,' he fumed. Uncle said to his mother, 'Is your husband suggesting that I go steal from other people's homes?' When others asked his father about the son, he would say, 'That barbarian was not born to me. Who knows for which bastard she dropped her clothes to beget this one?' But he made sure he didn't say any of this within his wife's hearing. He could never forgive his son for earning him the reputation that he sat his own child outside a devadasi's house and went in. After that, it became a routine for Uncle Nallayyan to run away every two months or so. The moment anyone said anything even remotely hurtful, he ran away. No one knew where he went and what he did. 'Where will that wretched dog go? He must be outside some restaurant, feeding on leftovers,' his father would say. Once Uncle gained the reputation for being unstable, no one was willing to offer their daughter in marriage to him. Even after all his younger brothers were married, they could not find a girl for him. 'I don't want to earn the sin of wrecking a girl's life,' said his father and abandoned the search for a bride for his son. But his mother never stopped ranting. Uncle himself did not care for marriage. When he shaved off his beard and moustache, his mother sang a dirge and made such a scene as though someone had died: > Your first shave, > your becoming a bridegroom, > I thought these eyes would see and tear up. > This is no first shave, > and you are no bridegroom, > you roamed aimlessly > and have tired, dark eyes. > What do I do? What do I do? But Uncle was not the kind to be moved by such dirges. He hugged his mother, wiped away her tears and said, 'What did you accomplish by getting married? You spread your pallu for a worthless husband, gave birth to so many children, and you are suffering till today. Drop the matter. I don't need to go through the same hell.' Kali, lying on the cot in his farm and listening to these old stories, said, 'Where all did you go, Uncle? Look at me. I am reluctant even to leave this spot and go to the fair once a week. I feel it is good to be contented with this barnyard and the field. Where did you go for three or six months at a stretch? 'Kalippa,' Uncle replied, 'the world is endless. It stretches on and on. On my way, if I got lost and wandered a bit, it would appear that I was returning to where I started from. In those moments, I hated our village. When the money in hand was all spent and I had nowhere else to go, I would come back home very reluctantly.' He was the not the kind to open up and give words to his feelings. But the barnyard made even Uncle Nallayyan say, 'Kalippa, when I lie here in your farm, it feels as comforting as lying in my mother's womb.' That was exactly the way Kali felt about his barnyard. He always slept in the farm. Even in summer, he laid his cot out in the open. During the monsoons and in winter, the cot would lie inside the shed. His was a home in the village complete with a porch, a wide entrance, a courtyard, a granary—all constructed with his own labour. He left the courtyard for his mother. In the early days of his marriage, he tried sleeping at home. But the darkness of the four walls and the thatched roof were not for him. He had to see the stars when he opened his eyes. The moon had to shine down on him. He needed to hear the occasional sounds from the cattle shed: a cow clearing its throat, a goat bleating sweetly. How could he lie around inside the house without any of these? So he made the barnyard his spot again. He always went back home for dinner. Whenever he felt like being with Ponna, he stayed back after dinner. Whenever he woke up, he went back to the farm. On some nights, he'd go to the barnyard just to sleep. He would come back home as soon as he woke up. All he needed to do was tap on the door gently. Ponna let him in. Initially, it was difficult for Ponna to get used to his habits—this going to and fro between the house and the farm, which was at some distance. She was also scared about the night insects on the farm. But he said, 'For me, night is the real afternoon.' This was the land in which he was born and raised. This was where he had roamed about. There was no place here that he did not know. Also, Aattur was not a large town where you could easily get lost. What was called the village was just a section of twenty houses. Four or five of those families lived in their fields and used their houses to store their harvest. Beyond that was a section of houses for others. This again had ten or fifteen houses. And a field's length separated one quarter from the other. Kali's field and barnyard were to the east of the village. If he took long strides, he could reach home before he finished chewing a betel nut. In the afternoons, as soon as he finished his work, he took a nap—in fact, a deep sleep. And he would end up not sleeping well at night. His was a chicken's sleep. If something grated against the fence, the dog would bark and he would wake up. If the chicken started clucking, that was it, he could not sleep any more. So was the case with the calf's moo. And if thoughts of Ponna came to him, he would leave immediately, closing the makeshift gate behind him. Since it was night-time, he would walk in his underwear. He knew which path was safe from stray dogs. Ponna had become used to this too. In the season of toddy, Kali would sleep until the intoxication wore off. Even after that, he would lie awake, shifting about. He had slept very little these past two years. Kali's mind turned towards an incident some years ago. It was the same Aani month, the time of the chariot festival. His mother-in-law had come to invite them home for the festival. Her home was just the next village, Adaiyur. So she never really stayed the night when she visited them. But that once, surprisingly, she did. And not just that; she dragged her cot to the courtyard next to her daughter's mother-in-law. The two old women whispered to each other all night, but neither he nor Ponna could make out what they were discussing so intently. Only a wall separated them from Ponna, but try as she did, she could not hear anything. Nor could she guess what it could be about. In the ten years that Ponna and Kali had been married, the mothers hadn't spoken so intimately even once. They had their own grievances against each other. Usually they kept their interactions to a minimum. So then what had changed? 'They keep talking back and forth. Maybe they're planning to build a fortress and rule. Or maybe they're scheming against me,' ranted Ponna. Her suspicion was that they were talking about a second marriage for Kali. Had he too turned against her? She knew that her parents did not mind if Kali were to marry again. But their condition was that he should still keep their daughter with him. The next morning, she could not keep quiet any longer. She said, 'What, Mother? Looks like you are suddenly getting all intimate with my mother-in-law.' But her mother did not reveal anything. 'We are both old women. What else could we talk about besides the past? Do you think we were scheming to build a castle?' When her own mother was so reticent about it, there was no way Ponna could have extracted anything from her mother-in-law. She went to Kali bearing her surprise and suspicion. 'I think they have found you a girl. These two hags are trying to ruin my life.' He said, 'I will marry the girl only if you like her. Don't worry.' 'Oho! You are now entertaining the thought, is it?' she pouted and turned her face away. Whenever he spoke like that, she was miffed. Then he consoled her. This was a ritual for them. After thinking long and hard about a second marriage, he had abandoned the idea. In truth, the thought had occurred to him once or twice, but his mind simply could not see any other woman in Ponna's place. ## eleven Before he got married, you could find Kali amidst any group of young men just hanging about town. He was also their leader in some ways. But once he got married, Ponna had tied him down somewhat. When the boys teased him, saying, 'Once he saw the girl, he got lost in her,' he quietly walked past them, smiling. But it was true, wasn't it? Ponna's body just dragged him into itself and presented him with whatever he needed. It even gave, volitionally, what he did not ask for, what he did not even know existed. And she had remained the same to him until today. The separation this effected from his male companions was now complete. In summer, for as long as a month before the temple festival began, crowds started teeming into the town square. Beginning late in the evening and going on till midnight, two drummers would hold forth with their instruments. A temple dance would begin. And as the musicians kept playing the thappu drums, the dance would intensify. Middle-aged men, already well trained in the dance, would go first. Then the novice youth and other boys would join in. Some of the old ones would suddenly decide to show off their expertise. So they would get up and say, 'This is how you do it,' show a few steps, and go back and sit down. They'd yell at the drummers: 'What are you playing? As if someone is dead!' And find fault with the dancers: 'Swing your arms properly!' The others would murmur, 'These old ones never shut up,' and the dancing would continue. Women and children would finish their chores at home and rush to the spot just to see the beauty of the men's hair flapping around their backs and shoulders, their topknots having come undone in all the movement. Mastering these temple dances was no small matter. The dancers had to internalize the sounds of the drums and dance accordingly. There were over fifty kinds of rhythms, and there were only a few people who were skilled enough to dance to all of them. Those people always danced in the front, and the others danced behind them. Kali was somewhat adept at this dance. He could even follow the dances he didn't really know. For him, there was nothing more joyous than being in the crowd. On one such occasion, Kali finished his work in a hurry, washed himself and ran to the town square. He did not even have patience to focus on his food, gobbling down what was on his plate before rushing out. Ponna unleashed her sarcasm. 'What wonder is waiting there for you? Are they waiting for you to inaugurate things? How would this food nourish you if you eat so fast?' But he let nothing bother him. Her mother-in-law laughed at this: 'He used to roam around like a free ass with his friends. Do you think you can tie him to your lap?' She was delighted that even Ponna could not hold him back from this. 'How can I dance if I eat so much?' he replied. 'Only my belly would go up and down in its fullness.' There was such delight in dancing in the spacious field in front of the town square! Murugesan from Karumankadu was not very good at dancing. The nuances of the thappu drum simply failed to penetrate his thick head. When everyone took a step in unison, he alone would do something that would make him fall down between their moving feet. Not everyone can dance. And when one comes to terms with this, he can go and sit down with the oldies and watch the others dance. In a way characteristic to spectators, he can also criticize the dancers and pass comments. Failed artistes suddenly become critics. But what do you do about someone who insists on dancing even though he keeps tripping over people's feet? No amount of teasing and taunting deterred Murugesan. With his clumsiness, he sometimes even made other dancers trip over him. He was well built and was the colour of a tender mango shoot. 'Looking at his skin colour, I am a little suspicious,' said Mutthan. 'Maybe we should check with his mother, just in case.' Everyone laughed. 'It should be easy for peasant folk to do this dance,' said Songaan. 'If he can't, it must be some birth defect!' This taunt was followed by more laughter. Rasu got up, entwined his legs, imitating Murugesan, and said, 'This is real dance.' And more guffaws ensued. Usually, if the teasing got out of hand, Murugesan would say, 'I will leave you to your dance,' and then move away to join another dance party. But on that day, they had teased him more than he could bear. He was fuming inside. Kali, however, did not know that. He joined in the teasing and said, 'Looks like a doll but moves like a corpse!' Everyone cheered, 'Hear! Hear!' Murugesan lost it. 'Dey!' he fumed. 'Work is not about this. Work is about _this_ ,' and he made a lewd gesture, lifting two fingers of his left hand and inserting the index finger of his right hand between them. 'Tell me, now, _who_ looks like a doll and works like a corpse?' Everyone turned to look at Kali. No one laughed but he shrank with shame. He suddenly felt that there was nothing more painful than being in a crowd. Something else had happened about a year and a half into Kali and Ponna's marriage. People had just started asking about a child. According to them, only the man who induced morning sickness in his wife in the very second month of marriage was a real man. When the girl looked unchanged in over a year and a half, it simply meant the husband's 'work' was not up to the mark. And the entire bunch of Kali's friends had insinuated this several times. Once, Subramani, who had become a father in the tenth month of his marriage, was in the crowd. When they heard that Muniyannan had made and filtered a fresh batch of arrack, they decided to go there. Muniyannan's arrack was in great demand. There were people who would be flat out for two days on just half a tumbler of his stuff. When they drank together, one of them said, 'Oh, this is great stuff! As vital as water.' And Subramani replied immediately, 'It is not enough if the water you take in is great, the water you send out should be top-class too.' Everyone glanced at Kali, even if it was for just a moment. Muniyannan's arrack lost its pungency for him that day. He gradually stopped joining this crowd of old friends. He also knew they had nicknamed him 'the impotent one'. Although he had no children, Kali was very happy with Ponna. He would also ask her now and then to make sure she was happy with him. Her replies always came as intense kisses, and he found peace in that contentment. If the only way to beat this reputation for impotence was to marry again, what would happen if that failed too? Should he ruin the lives of two women? And could Ponna bear his bringing in another woman? She was in the habit of pulling a long face for two days if she saw him even talking to another woman. If he married again, she wouldn't stay. To make things worse, what if the second wife did get pregnant? That would be the end for Ponna. She wanted to believe she was the most important person in his life. Sometimes she even suspected he was fonder of his cattle than he was of her. He tried to reason with her. 'Can this love compare to that?' he said, and buried his face in her bosom. All his heat cooled down. The moment the thoughts of a second marriage invaded him, all happiness wilted away. It also meant he would need to learn how to handle two women. When his world was already complete with his cattle, his barn and Ponna, could he handle anything more? Also, if the second woman too could not get pregnant, his reputation as an impotent man would be engraved in stone. Thinking through all these things, he abandoned the idea. Whenever someone brought it up, he closed the topic, saying, 'It won't work. Forget it.' They all attributed his hesitation to his fear of Ponna's wrath. 'Well, let them think whatever they want,' he thought. Only he knew that Ponna was scared that he might, at some point, say yes to the idea. ## twelve Uncle Nallayyan too played a role in Kali's refusal to marry again. This was his story: when it came to splitting their inheritance, Uncle Nallayyan's brothers refused to give him his full share. 'Why does a bachelor need the same share as we do?' they all said. He replied, 'How can you conclude that I will never get married? I might do it even when I am sixty. I won't let any dog touch my food. This is my grandfather's property. Though your father wandered the fields in his underwear, did he add even a handful to it? Tell me!' The property was divided a year or two after his father's passing. His brothers didn't listen to any of his arguments. They brought along some ten people as mediators, all of whom were on their side. And these men reasoned, 'Why does a single man need so much? Any home is his. Won't the brothers take care of him? His mother said, 'At least till I am alive I do not want him to have to go to anyone even for a drink of water. Just give us two acres. He and I will live there. After him, it is going to come to you. Isn't it insulting to tell a young and able man that you will feed him? At a time when the oldies are running after women and getting married, he seems to abhor even the scent of a woman.' Apparently, Uncle had to control his laughter at his mother's naiveté. He said, 'Maybe my mother smelled me for a woman's scent,' and laughed finally. When his brothers realized that their mother was not going to drop his case, they decided to allot two acres to him. But Uncle did not agree with this. He was insistent that he should get his fair share. Men from the community settled matters and asked him, 'Do you agree to this?' He got up, tightened his loincloth and said, 'All right. I agree. Just add one more thing. My brothers seem to have decided that they could just give me a torn cot and some loincloth, throw some food at me and snatch away what is rightfully mine. That's all right. Let it be as they wish. I don't even want the two acres that my mother has asked for. I will let them have all of it. Now, they are giving me this loincloth, right? If this little brother who is inside the loincloth stays quiet and calm, it will all go well. But he does wake up now and then. He'll throw a tantrum for some milk. Just find out and let me know if my sisters-in-law will take care of that.' He asked all of this with not as much as a smile. His sisters-in-law grew pale in the face and ran inside their houses. The people gathered there murmured to one another as they walked away, 'How can a man talk like this?' But Uncle called out to them, 'If you are mediators, you should speak for both parties. How can you walk away?' There were no disputes after that. His share of the inheritance came to him automatically. And his speech became popular in town. The moment someone said, 'Little brother,' the repartee was, 'What? Do you need milk?' It became a code language among young men: 'I've been thirsty for milk, da.' Whenever they saw a loincloth, they were in splits with laughter. They also took to asking Uncle Nallayyan's brothers, 'What did your brother ask for?' and they were amused at how much it angered them. Uncle did some farming as long as his mother lived. After that, he would sow the land one year, and let it go fallow the next. He also had a farm boy taking care of odd jobs around the field and tending to the cattle. One day, Uncle Nallayyan vanished for a week. When he came back, he had a woman in white with him. The next day onwards, she was working in the fields, dressed in his mother's saris. Uncle, too, worked alongside her happily. The village was overcome with surprise. They said, 'Look at how homebound Nallayyan has become!' There was no end to the stories of how the two of them would wander about as a couple and make merry. She walked about in new saris and wore lots of flowers in her hair. And he walked along dressed in sparkling white. 'He's become responsible,' everyone thought. But they had a fight one day, and he drove her away. Many people saw her running out of town one evening, wearing the white sari she had first appeared in. No one knew what went wrong, what the fight was about. His help, the little boy Vediyan, was a sharp one. He was ten or eleven years old and had a lot of freedom around the house. He even cooked for Uncle. If Uncle heard anyone say, 'He eats the food prepared by a his field hand, what kind of a man is he,' he would retort, 'You find a field worker woman fragrant, and only a field hand boy stinks for you?' Even though a lot of people tried to make Vediyan speak, they could extract nothing out of him. They even tried bribing him with good arrack. He made it look like he was about to spill something, but he never actually divulged anything. They were frustrated: 'Nallayyan has trained this boy well.' When Uncle could get him foreign liquor, why would he fall for this arrack? Muthu asked Uncle one day when they were lounging about in Kali's barnyard. And it all came out. 'When I bring a dried-up woman home, shouldn't she just shut up and sit around? She started saying she wanted a taali around her neck and a child by me! I got her earrings and this and that and kept her like a queen. But apparently all that was not good enough for her. She wanted a taali. At first I thought the desire would go away soon. But she wouldn't let me touch her without tying a taali round her neck. That's why I hit her, gave her the sari she came in and chased her away.' They couldn't stop laughing that night. Just to egg him on some more, Kali said, 'Why, Uncle, couldn't you have let her go in the coloured sari she was wearing?' 'The coloured sari was my mother's. Also, if another woman comes along, I need something to give her, don't I?' he said quietly. 'I can't deal with marriage and all that stuff. It is enough to come and go as I am. As if it's not enough to tie a ring around your nose, they want to tie you to a stalk as well.' Those words penetrated deep into Kali's mind. He already had a ring around his nose. Should he also tie himself around a stalk now? Since then, whenever someone brought up the topic of a second marriage, Uncle Nallayyan would appear before his eyes. ## thirteen Even though he was curious to find out what his mother and mother-in-law had been discussing, Kali waited for the news to unravel itself. Two nights after his mother-inlaw's visit, his mother came to see him in the barnyard. She had raised him single-handedly, working really hard—it was no mean feat farming four acres of land and tending to cattle all by herself. Working alongside her from the time he was a child, Kali took full charge of the place when he was only fourteen or fifteen years old. He was free to do whatever he wanted; he just needed to keep her informed. He let her be alone and free, just as she desired. She made her own food, and also went to work in other fields. He did not consider that a question of prestige. She wanted to make a little money of her own. What was wrong with that? Let her work as long as she could. If there was something to be done in the field, he told her. She came to help. He paid her what he paid the others, but that was their secret. Wherever she went to work, she simply had to find the time to come and see him every day. Otherwise, she couldn't sleep in peace. She had very deft hands. In his opinion, no one else could do the things she could. He loved her cooking, but he didn't tell Ponna that. His mother's kootucharu was tasty beyond words. Whenever she planned to make it, she'd tell him in advance, and Ponna wouldn't make any gravy that day. If she steamed groundnuts or other pulses, she would bring it to him in the barn. On all such visits, she would raise the issue of a second marriage. Initially, he refused to participate in the conversation. When she got insistent, his protests grew proportionally stronger. So he thought that a second marriage could not have been the topic of her conversation with his mother-in-law. It was evident to him that she was struggling to say something. She kept inquiring about the cattle, asking the same things over and over. She spoke about the seeds they were going to sow in the fields that year. Unfortunately, on that particular night, he felt very sleepy. He still had some toddy left in the dried-gourd vessel. He had planned to down it and doze off. But he was not used to drinking in his mother's presence. Though he knew she too was in the habit of drinking, she had never done it in front of him so far. In the toddy season, Muniyannan would keep aside a hanging jarful for her. She would go when it was dark and drink it without anyone coming to know. Even now she was Muniyannan's customer. Whenever he made some, a bottle would be kept aside for her. She would drink a little every day for several days. Seeing her struggle to begin the conversation, he decided to help her out. After all, the topic was no secret to either of them. 'I have some toddy. Do you want to drink, Amma?' He could not see her face in the dark. Nor could he guess the reason for her silence. Was she cringing that her son had offered her alcohol? Or was her silence to be taken as a yes? He took a small pitcher from under the cot, threw the water out and filled it with toddy and stretched it out to her. When she accepted it, he was happy. He drank what was left in the gourd bowl. He felt that it should now be easier for him to extricate whatever matter was stuck in her throat. 'What, Mother? I am told you and my mother-in-law were conferring all night. Which fortress have you planned to capture?' he prodded. He could see that her pitcher was not yet empty. She was the kind who drank slowly. He was getting to know that now. 'What fortress are we going to capture at this age? If we die today, we are fully gone tomorrow. What else would we talk about? It was about you two.' 'What? Talking about a second marriage again?' 'You have said no to it several times. Ponna's parents are fine with the idea. If we are a little forceful, even Ponna would say yes. But you refuse. I don't understand why. Anyway, drop it.' His mother spoke gently and at a measured pace that day, although it was in her nature to shout. She appeared completely new to him. Even when you have spent years with some people, their real faces are revealed only when the right time comes. God knows how many faces lie concealed forever, with no opportunity to reveal themselves. His mother spoke without a break. Perhaps she was afraid that if she paused, she might not be able to resume speaking. 'You have done all the prayers you could do,' she intoned. 'You have even walked around the barren rock that one in a thousand people take on. Nothing has happened. Whether we have children or not, we are all going to die one day; we don't live forever. When we are alive, we should be useful to the people around us. What else is left for human beings? Your father died leaving me all alone. But my plight would have been so much harder if I did not have you. I had my son entwined around my legs, and so I could bear all my difficulties happily. You were the only hold I had in life. Don't you need one such for yourself? When people ask "Do you have grandchildren?" I am unable to reply. I wonder why this earth doesn't split into two and swallow me whole. If this is how hard it is for me, it must be so much more for you and Ponna. The wretched people around us do not see what a man has. They only see what he does not have. We have to hold our heads high in front of these people, my son. Please don't get me wrong. This is not something a mother should talk about with her son. But I have dared to speak. Please listen.' He truly could not understand what she was leading up to. He could hear her gulp down the toddy left in her pitcher. He still had some left in the gourd bowl. She might need more. When she put her pitcher down, he said, 'Do you want more, Amma?' She declined and proceeded to say, 'Karattaiyan and Devatha of Karattur have so many ways of helping people. From the moment the flag is hoisted to when the gods come down and go back up the hill, how many miracles they perform for how many people! People in my father's house are entitled to carry the deities. And they have been doing so till date. I was born in that family. Will the gods fail to show me a way? We roamed around that street from the beginning to the end of the festival. The eighth day, when the gods come down, and the eighteenth day, when they go back up the hill, are very important. But since I attained puberty, I have not attended the event of the eighteenth day. They wouldn't send me. You know why. You have gone for it with and without my knowledge. This year, we need to send Ponna there. And you must agree to this.' Kali was speechless. He had never thought there could be such a motive for attending the eighteenth day of the festival. Which man would say yes to such a thing? His mind went blank, and whatever his mother said after that was dwindling into mere noise. 'Who is without lack in this world? The gods have made sure everyone lacks something or the other. But the same god has also given us ways to fill that lack. We don't know whether the problem is with you or her. But we know there is a problem, and there is a way out of it. Why don't we give it a try? If you accept it, it will all work out. A lot of women go this and that way. Who knows about these things? Even if people know, they ignore it. They say nothing is wrong as long as it is done in secret. This will be done in secret, too, but only with your permission. She is yours, after all.' He saw a world of utter silence in front of him. In the dark, he could sense the movement of her lips. 'All men who set their foot in Karattur on the eighteenth day are gods. It is god who is giving this. It is not a problem if we keep our mind on god. Who knows which god comes with what face? It is the nature of gods not to reveal their faces. If you say yes, we can go to this year's festival. Well, we don't have to go from here. Ponna's mother can take her. You don't have to go along. You can be here or in your father-in-law's place. It is your choice. Think about it and let me know. Everything is in your hands now, my little god.' He did not know when his mother left. He also did not know how long he had been sitting there. His eyes were wide open. Usually, he fed the cows once at midnight, but tonight he could not even hear their mooing. Amma, why did you struggle so hard to bring me up? Just so you could push me into this terrible fire? You could have killed me even before I came into this world. His eyes were bloodshot in the morning. And they stayed so forever after that. ## fourteen For the people of Karattur, the chariot festival was a three-month affair. The preparations began as soon as the month of Aani started. And the shops and stalls lasted till the month of Aadi. But, strictly speaking, the festival itself was only for eighteen days. For a lot of people the nineteenth day was the day of completion. So if you include that as well, it was a nineteen-day-long festival. The deities that were brought down from the hill on the eighth day returned uphill on the eighteenth day. On those two nights, crowds poured in to get a vision of the gods. And more than the day the gods came down, it was the day of their return that was charged and climactic. Crowds would gather from the morning onwards. They would erect water pandals on all sides to dispense drinking water to the travellers. The fields would lie untended. Even if there had been good rains, they would stop with the first ploughing of the topsoil. All the carts bringing people to the festival would be parked in these fields. It would look like a fair for bullock carts! People also brought large parcels of food. But they could buy food from the several stalls too. There was no dearth of cultural performances in the four main streets or in the pillared temple halls at the foothills. At the peak of the celebration, all rules were relaxed. The night bore witness to that. Any consenting man and woman could have sex. Bodies would lie casually intertwined. Darkness cast a mask on every face. It is in such revelry that the primal being in man surfaces. No one sent unmarried women to the festival. But women over thirty were to be seen everywhere. Young men roamed all over the place. Kali too went there in the days before his marriage. He started roaming the streets when the evening set in. That night there was no business in the devadasis' street. Those women dressed themselves up to dance in the temple halls. They laughed as they went about: 'Who is going to look at us today?' In that first year, when his body was ready to get to know a woman's, he was overcome with shyness and he escaped from all the women and hid under a bullock cart. Lying there, he saw all the movements in the dark around him. He didn't dare to come out. On their way back home the next day, Muthu teased him. He gestured the number two to Kali, who was frustrated that he had let the opportunity slip by. He would now have to wait another year. But Muthu made sure Kali did not have to wait a whole year. By the following year's festival, Kali had gained enough experience. Kali did not know that this was a special day for women who did not have children. He could not bring himself to agree to send Ponna there. Nor did he tell her anything about it. But he told her this much: that they were not going to her place for the festival that year. Usually, that period was a break for her, and she would go and spend a week at her mother's place. During that time, she would also go in a bullock cart to see the festival. In fact, the two of them definitely went on at least one of the three days when the large chariot was out. Seeing her shrunken and disappointed face, he took her there himself. He bought her all she wanted from the shops there. But that time, all he said to her was, 'It has been ten years since we got married. Why do we still need to go there for the festival? Let's do it here this time.' She did not protest, but she sensed that something was wrong. They did not go even when her mother came and invited them to the last day of the festival. Instead, they went to the large snake pit in the fields and offered a rooster for prayer. When he poured the kuzhambu for his mother, she did not meet his eyes. As far as he was concerned, that year's ordeal was over. The worry could wait another year. He was still confused whether to bring this up with Ponna or not. He thought she would refuse. In fact, he hoped that that's what she would do. But he was too scared to broach the subject with her. One moment, he felt the courage to start the conversation, but as soon as he looked at her, he hesitated, feeling completely tongue-tied. At other times, he felt very certain that he should not talk to her about this at all. But she might ask for a reason if next year too he said no to going to her mother's place for the festival. He knew he could not keep it from her forever, but he was also unsure whether he should ask for her opinion about this or declare his decision. Her body had entwined with his for ten years now. It had met his fragrances for ten years now. He felt that every bit of her body was his and his alone. If another fragrance were laid over it, it would be a blemish. And he told himself with certainty that once it was blemished, he wouldn't touch it. If all men were gods, then let the god take possession of Kali's body too. He trusted her. He recalled the time when the young men of the village had started teasing him for not having a child even after two years of marriage. Presuming that they knew everyone's secret in the village, they concluded that Kali was a useless fellow. All their sympathies started flowing towards Ponna. They thought they could lure her if they put some effort into it. He heard that they had placed bets on it. Karuppannan, who owned a palm grove, was the mastermind of this scheme. He had a fair complexion and was under the delusion that women would just fall all over him for the colour of his skin. He was married and had children. It was his wife who did all the work at home and in the fields. All he did was sit around in the town square, playing dice and ogling women. He also waxed eloquent about his exploits. But most of them actually turned out to be wishful thinking. He got into the bizarre habit of intercepting Ponna when she went alone to the fields, and grinning at her ingratiatingly. He even started coming to Kali's house in the middle of the day with his friends to play dice. Ponna became his waitress, bringing him water, matchbox, and so on. Kali would come back from the barnyard in the middle of the night and knock on the door. But Ponna was not sure any more that it could only be Kali. Fearing gossip, she decided to spend one night in the barnyard. Holding him in her embrace, she poured her heart out. His chest, wet with her tears, heaved in anger. 'Isn't it because I have no children that people look at me this way?' she cried. 'If I had that blessing, would I have to suffer this disgrace? Every dog thinks I am just a stone standing at the street corner that it can rub itself against.' The next day, Kali encountered Karuppannan. As usual, the latter's talk was loaded with innuendoes. 'Kali, my brother, you have two coconut trees. Can't you water them properly? Look at the new blossoms. They are dried and shrivelled up.' Kali decided there was no point in beating around the bush. He charged in head-on. 'Karuppannan, you have no idea how I go about watering things. Haven't you married off your sister Racchi to someone in Pazhavur? Ask her, she will tell you! Why do you think she keeps coming back here? Do you think she comes to see you, her brother? You poor thing! Your wife is lamenting to everyone that you are jobless and sitting around the town square. Ask her and find out what job you are good for. Don't worry about my coconut trees. Keep your game of dice to the town square.' A dark shadow fell over Karuppannan's face. Though Kali had mixed a good deal of lies with the truth, the conviction with which he spoke rattled Karuppannan and chased him away from the square. He tightened his loincloth and changed his haunt to a shaded spot in the field. After this, Ponna did not have to speak to any random man. If she had to, she hurled words that stung like an ant in the crotch. Her circle grew smaller. She stayed away from people, and kept them away. Kali was absolutely sure that Ponna would not agree to go to the eighteenth day of the festival. ## fifteen Nallayyan's arrival at the barnyard that day was like a balm to Kali's aching heart. Kali had not seen him for a week. Perhaps he had gone on one of his spontaneous trips. 'What, Chittappa? You vanished for so long,' Kali said to him. 'Oh, I was very much in town. The farm boy and I together thought we could turn our barnyard to look just like yours. Hence there was a lot of work to do.' 'What kind of work?' 'We had been just pushing aside all the cow dung to one side, and it had collected into a mound. We carried it all out. Then we wiped the floor clean. Then we killed a chicken and ate well.' 'Has it turned into a good-looking barnyard?' Kali asked. 'You manage to stay put in this place like a rock. I can't work like that. If I feel like it, I spend the whole week in the market. Then I suddenly remember I was actually born a farmer. That's how it goes.' 'But, Uncle, why would you spend the entire week in the market?' 'Well, I go to the Eeriyur market on Monday, Karattur market on Tuesday, then to the Wednesday market, and so on. You too should try going to these places. That's when you will get a sense of how the world works. Where do you think I found that white-saried woman? It was in our own Tuesday market.' 'How does it work, Uncle?' 'Just like there are men who deal in cattle, there are men for this too. I asked one of them if he could send the woman in the white sari to me for a month. He checked with her. We agreed on food and clothes for her and also twenty-five rupees in hand. I gave him five rupees. Everything went well. But that whore was not content with just a man in her life. She needed a husband.' 'But if you had married her and had children, it could've helped you with your property. You would also be able to hold your head high in the village. Don't you agree, Uncle?' 'Why? For whom do I hang my head low now? It is only you who is relentlessly talking about having children. All right, go ahead and have a child. But do you know how you should live? Like that crow that has built a nest on that palm tree. When it knows it is going to lay eggs, it builds its nest. Then it incubates the eggs and hatches them. It finds food for the little ones and takes care of them until they grow their own wings. Once that happens, what do you think is the relationship between the baby crow and its mother? They go their separate ways. "You got your wings, now get out of here, and fend for yourself." That's the way to live. Instead, we give birth, raise them, get them married, save money and struggle. Is this any way to live? If we were more like crows and cuckoos, I'd also like to have children.' He followed that up with many other things. But nothing registered in Kali's mind. What he had said had told him that he needn't care what the village said, that he didn't need a child. After all, Uncle didn't give a hoot what anyone thought, and he wanted for nothing. How happy he was! He was the first one to introduce soap to the village. When he bathed with soap, the entire well smelled wonderful. When he travelled out of town, he wore a lovely tunic. He had cut off his topknot long ago. If one was constantly worried about not having a child, could one be this happy? These people are asking me to send my wife to another man just for the sake of a child. What if I decide I don't need a child at all? If you are always worried about what others are going to say, you will always be in trouble. When Nallayyan cropped off his head-knot and came back into town, it created such a ruckus. They held a community meeting and condemned him. Everyone spoke against him. They argued that now that someone had dared to do away with his topknot, it wouldn't rain any more in the village; that no one would want to stay within bounds any more. They ruled that he should not fetch water from the common well, that workers should not go to his house, no one in the village should speak to him, and no one should accept money from him for the temple festivals. Some people even opined that they should shave his head completely, put red and black marks on him and parade him around the village in punishment. Finally, the village head called Nallayyan aside and said, 'Just own up to your mistake. Tell them you will grow the hair again. We will just fine you and let you go.' But Uncle wouldn't budge. 'If the village's honour resides in my bloody hair, I will grow it,' he said. 'I don't even mind growing a beard and a moustache. I will grow them and sit around like you all, plucking lice from it. But add another thing to it. It was only yesterday that I shaved off my pubic hair, because it was itching too much. Now if your village's honour is also dependent on my pubic hair, let me know right away. I will grow that too.' The crowd roared in laughter at Nallayyan's speech. The village head and the others did not know what to say. As they dispersed they said, 'Is he even a farmer? Why did we even think of dropping all our work and getting together to discuss this? Let's just think of him as a lunatic walking around in our village. From now on, don't bring any of his matters to the council.' Uncle said, 'In all the big towns, people have done away with these long topknots a long time ago. It is only you who are combing it for lice even now. Why should I subject myself to that?' and he roamed around with his cropped hair. Kali had often thought that he lacked his uncle's courage. He was fuming on the inside at his inability to communicate his decision on the matter of sending Ponna to the festival. He decided that he should find an opportunity to tell Ponna very firmly that he did not want children. It was much better than losing one's honour. And he also wanted to know what was on her mind. Her plan was to somehow make him accept the previous year's invite to the chariot festival from her parents. When she brought it up gently, he realized he couldn't delay it any more. 'Do you remember how your mother and mine were whispering all night to each other last year when she had come to invite us? Do you know what they were talking about?' She had been curious about it then. But when nothing unravelled for over a week, she had concluded it must have been something to do with old age and their reminiscences of the past. She even forgot about it. Now when she realized he had known about it for a year and had kept it from her, she was angry. 'I didn't tell you only because I wasn't sure how you would take it,' he started and told her about the fourteenth day of the festival when the gods returned to the hill. She didn't know about it. He was surprised that this open secret had still not spread like wildfire. 'Ah! You and my brother used to be delighted to go see the gods. I now realize what it was all about,' she snapped. 'No! We truly went to see the gods. Why are you accusing us now?' he said. In his mind, he was looking for words to console her. She seemed to fill the darkness of the barnyard. He embraced her from behind. This was the embrace that cured him of all worries. He murmured into her ear. 'Don't you know I hung around with your brother only to get to you? Would these eyes that had had a taste of you even look at another woman? Even when I was fourteen or fifteen, I decided you were mine. And it has stayed that way,' he pleaded and buried his face in her neck. But he could not tell if her anger was gone. Then, still in his arms, she turned to face him. He felt emboldened by her hand gently caressing his back. 'Will you listen to your mother and mine and go on the day when the gods retreat?' he continued. His heart was thumping, waiting for her reply. She murmured: 'If you want me to go for the sake of this wretched child, I will.' His hold around her relaxed. This was not the answer he had expected. He moved away from her. For a moment he wondered if this was her way of getting back at him for his exploits before their marriage. He lay on the cot facing the sky. She realized that she had failed to give him the reply he had wanted to hear. She rushed to him in panic and spread herself upon him. Laying her head against his cheek, she looked for words of consolation. After all, the core of this relationship consisted in using consoling words. 'Maama,' she said, melting, 'I thought you wanted me to, for the sake of a child. Will I ever do anything you do not like? You are everything to me. Despite everyone's pressuring you for a second marriage, you have said no to it. That's why I said I would do what you want me to do. Please don't be angry . . .' But the sex they had that night was the worst they had ever had. ## sixteen He did not say anything about going to her parents' place. Nor did she bring it up again. But they made peace enough to go together to watch the chariot. It looked like things were back to normal. She felt her response to him had been terribly wrong. Was it her desperation that she should have a child by any means that had led her to say what she did? Did it even sound like he wanted her to? She had failed to see that he was merely testing the waters. Usually, it was not difficult for her to say exactly what he wanted to hear. After all, she had been doing it all these years. But she blundered on that one day. Anger had clouded her eyes. But then again, what was so terrible about what she had said? All she had implied was that if _he_ was fine with the idea, she didn't mind. She genuinely thought it was a way out of being insulted and ridiculed by everyone. Didn't he remember the humiliation they suffered at the puberty ceremony of Chellama's daughter's? Chellama was like an older sister to him. So, as an uncle to her daughter, there was no way he could not have gone for the ceremony. She invited them lovingly. By then, Ponna had stopped going anywhere, but Kali insisted that she accompany him. Her mother-in-law kept ranting, 'How can a man go alone and stand in a girl's puberty ceremony? Don't you have any brains? The girl is the granddaughter of our close relatives. And how can an uncle's wife not go to the function? When I am dead and gone, don't you want some people to still keep some contact, visit now and then? Or do you think you would send me away and be done with it?' Unable to bear all this, Ponna went along. There were nine plates of gifts at the ceremony. Ponna carried one of these plates in the procession. It was only later that she came to know that they had grudgingly given her a plate to carry, because it was the convention for the uncles' wives to do so. There was also a custom meant to ward off the evil eye, wherein all the aunts were called to spin red balls of rice in a large circle around the girl's body and then toss them away. Ponna was standing to a side with Kali. He nudged her to go forward to be part of that ritual. Another woman had also said, 'If you are her uncle's wife, you too should do it.' But when she tucked in her pallu and went forward, Chellama's brother's wife dragged her aside and said, 'You stay away.' If a childless woman did the ritual, would it make the girl barren? Was she that inauspicious? She pulled Kali by the arm and brought him outside. While he kept imploring, 'Let it go, let it go,' she kept walking in the dark. And he ran after her. Didn't he take that insult personally? Even for death ceremonies in the village, no one asked him to fetch water in the cremation ground. If a child is so important to establish oneself as a human being in this world, why shouldn't she dare to do what it takes to accomplish that? After all, she was not the kind who went in secret and slept with other men in the fields, was she? All she said was that if he approved, she was fine with the idea. What could she do if that upset him? As the last day of the festival approached, her mother-in-law started giving her meaningful glances. It looked like if Ponna nodded just a little, her mother-in-law would herself take her to the festival. If it was a lazy, adamant bull, you could make it budge by biting its tail. You could shock it into action by staging a little fire. But what could she do with this obstinate man? The humiliations she had had to suffer because of this one problem were endless. She could not even go to their own fields during the sowing season for fear that others would broach the topic. So she would lock herself inside the house. Couldn't he understand these things? He responded to the moment by cajoling and consoling her, and then forgot all about it the very next minute. In the months of Aani or Aadi, depending on when the rains arrived, they would sow groundnuts. There was only one plough to each field. And it took two or three days to plough a field with one. It could get tiresome. But if four or five of them got together to work on each field, not only was it fun, they could also finish ploughing each field in a day. Sometimes, they would even take five ploughs at once to a field and be done in half a day. They first ploughed those fields which had loose topsoil that didn't hold water for long. Next, it was the elevated fields with red soil. Low-lying ones were ploughed last. The order of preference was based on the soil and its moisture content. Women went to sprinkle manure water in the ploughed furrow and to lift and give seed baskets to the men. Then one year, something happened. That year too, they ploughed in a specific order, working together in everyone's fields. On the last day, they focused on Vellivel's field. He was from Thidamankaadu. There had been no rain for five days, not even a drop. So the land was not very wet. They reasoned that it was all right if it was not wet on top. As long as the soil was wet underneath, there was no big problem. So, they went ahead and sowed the seeds. On that day, Ponna helped by lifting the baskets of seeds. Originally, her task had been to sprinkle seed-water, but Vellivel's wife, Karuvachi, who was supposed to do it, came down with severe leg pain and couldn't be part of the work. Sprinkling only involved walking behind whoever ploughed. But lifting the seed baskets also involved running back and forth. The seeds were all kept amassed in one corner of the field. They would have to keep replenishing the baskets with the seeds and be ready. The moment the sprinklers signalled, the lifters would have to run carrying the baskets. If any one of them delayed, even for a bit, it would halt the work of all five ploughs. Also, they had to walk along with the sprinklers and drop the seeds evenly. Ponna had to do all these tasks that day. Her legs were exhausted from all the running. She could sleep only after she massaged them with some hot water. But what came of all that suffering? The following year, they did not include Kali in their sowing team. He worked alone in his field and Ponna did the sprinkling. They didn't know the reason. Then they heard that Vellivel did not get a good yield the year before, and whatever he got was of poor quality. Someone had said, 'That barren woman ran up and down carrying seeds. How do you expect them to grow once she has touched them?' They never found out who said it. Everyone kept pointing to someone else. They could not even find out if it was a man who said it or a woman. But this much was clear: everyone seemed to agree with it. Ponna's father and brother had always asked her to fill and carry the seed baskets whenever they had sowed. Their yield had never suffered because of this. After marrying Kali, it was she who did those tasks in the field. Only when they needed extra help did Kali hire someone. And nothing went wrong. Ponna confronted Vellivel's wife on the way and gave her a piece of her mind: 'You said you were in severe leg pain and begged me to go. That's why I carried the seeds. Do you think I am obliged to go and work in your field? I might be barren, but nothing I have touched has ever withered. The plant I planted is flowering now, the tree I planted is bearing fruit, the calf I brought has grown and birthed many of its own, and the egg that I helped incubate has hatched a beautiful chick . . . There is nothing I have touched that has not flourished. Anything sowed in a dry land will go waste, no matter who helps in carrying the seeds. If you—wife and husband—had taken better care of the land, maybe it would have all grown.' The next year, Ponna refused to work even in their own field. But Kali placated her and took her along. Since then, they worked with one plough. And if he didn't learn his lesson even after everyone had cast him away, what could she do? ## seventeen Though Kali had resumed normal conversation with Ponna, he was constantly haunted by her words. He was now convinced that women were terrible creatures. Mother tells the son, 'Send your wife to another man.' The other mother is ready to take her own daughter to it. And Ponna says, 'I will, if you are fine with it.' No one seemed to have even an iota of hesitation anywhere. He, on the other hand, was still hesitant to talk about those long-gone days when he had been to the festival. While a man felt so shy about these matters, look at these women! What they dared to do! If someone told them that the only way to have a child was to drop a rock on his head while he slept, would Ponna be ready to do that too? These thoughts drained his trust in her. A falseness entered in his sweet words to her. His embrace was no longer whole-hearted. There was no softness when he made love to her, not the usual generosity that let him include her in its sway. He came to be possessed by a fury for revenge, a desire to pound her violently and tear her apart. It was hot in the barnyard those days, even at night. He'd wake up suddenly and go home. Ponna kept the earthen wick lamp burning softly through the night. He would peep through the gaps in the wooden planks on the door to see if she was asleep. Sometimes he even went back to the barnyard without waking her up. Whenever he saw that the light inside was put out, that there was nothing but darkness, he panicked. On such days, he listened carefully for any sound that came from inside the house. Sometimes, his tapping on the door woke his mother. When she asked, 'Who is it?' he replied shyly, 'It's just me. Go back to sleep.' A sense of urgency and carelessness started pervading all his actions. However much she tried to hold him tight and take him inside her, all he wanted was to hold back adamantly and ejaculate as soon as he could. Whenever he decided to drink loads of arrack, which he knew would knock him out till morning, he asked her to come and stay in the barn. He would force her to drink. Earlier, on the nights he drank, his body lost its harshness and spread on her like a fluid. He would chatter happily for a long time. On such nights, he wore only the loincloth. She'd playfully pull it open. But he would feel no shame. She would say in mock anger, 'You have no shame. Look at you! Sitting with nothing on.' And he'd reply, 'Why should I feel any shame in front of you? Why don't you be naked too?' But there was none of that intimacy now. Now he downed the arrack like water in quick gulps and passed out right away. At whatever time he came to at night, he jumped on her and took control of her. It took him several mornings to regain a sense of balance. 'The drinking is getting out of control, maama. Please drink less,' she said lovingly. He responded with a slight smile. His face never blossomed again in a full smile. Whenever he crushed her underneath him, she begged, 'Maama, please don't show your anger on me this way. It is unbearable. Just hit me. Get a club and beat me to pulp if you want. But please don't torture me like this.' His heart went out to her. His embrace and kisses then said to her, 'It was my mistake, dear.' When she menstruated every month, she came to sit and cry in the barn. It was consoling to bury her face in his lap. He'd ruffle her hair and say, 'Let it go. We should be used to it by now.' But she kept hoping things would change. Sometimes, her crying made him cry too. So they cried together, lamenting their fate. Ironically, it made him happy on the inside whenever she got her periods on time and came crying to him. The way his mind worked, she was trustworthy as long as she was menstruating regularly. Subsequently, he reasoned: 'Poor thing. How can I be so suspicious because of just that one thing she said? She only said it in the urge to do something to have a child of her own. Does that mean I can conclude she would go with any man? Didn't she come to me complaining about Karuppannan's advances? She said what she said because of me—she said it for me. She said, "I will go if you ask me to." And I didn't ask her to. Then why would she go?' This made him treat her with affection, and it looked as though the Kali she knew was back. But it lasted only a week. He then got back to being irritable, and she was at a loss for words to placate him. But since she was annoyed too, it was easy for her to raise her voice. It put him in place a little if she shouted at him. He never raised his voice. Even when he had to call out to her from the field, he didn't yell. He'd move closer and call her in a voice that sounded like he had a raven hidden deep inside his throat. She felt bad that she needed to shout and fight with him. This went on for a year. She had no other way but to observe him closely and choose her responses accordingly. ## eighteen Then came the year when Muthu came in person to invite them for the chariot festival. He was determined to somehow convince his sister and Kali to go. He came on the eve of the procession of the big chariot and spoke to his sister first. Her face was clouded in sadness. She wanted to visit her home, but how could she go without Kali's permission? 'I will speak to Kali,' he said to her. 'You should be ready to leave with me in the morning. Let Kali come a few days from now.' Muthu and Kali had known each other since childhood. Sometimes Muthu came here and stayed for a few days. Even Kali's mother thought he would listen to whatever Muthu said. 'Ponna, please go to the eighteenth day of the festival this year,' said her mother-in-law to her happily. 'Your brother will take care of everything. How long can we keep looking at each other's faces in this house? Don't we want a child to bounce around in this place? We have a lovely home. Don't we need a child to crawl around all this space? Everything will go well. Be ready to leave tomorrow.' Ponna, however, felt certain that Kali wouldn't say yes. Even if he relented and agreed to send her to her village, he would definitely not say yes to her going to the eighteenth day of the festival. He was still smarting at what she had said a year ago. Why would he change his mind now? Muthu left for the barn, asking Ponna to bring dinner there. Fencing it around with dried, thorny twigs, Kali had kept his barnyard very well. The fence, which sagged nowhere, was strewn with creepers here and there. The thatched roof was stitched close and tight. A bullock cart could easily go in and come out. And then, of course, there was the portia tree. It had spread, arresting time in its branches. In its shade were tethered two bulls and a cow. There was a calf bull with a bite-guard in its mouth; its legs were tied. All of them somehow fit under the shade of the tree. When it started drizzling, Kali would take the calf alone inside the shed. Under the dense foliage of the tree, the rain sprinkled in gentle droplets. There was a large rectangular waste pit in one corner. On the other side of the portia tree was the enclosure for goats. There weren't too many of them, however. Just two nanny-goats; one of them had four kids. And looking at them, you could say how full of milk the goat was. The other goat was pregnant, its tummy bulging. There were also two sheep wandering about untethered. The little hut inside the enclosure was meant to keep the goats from the rain. Next to the enclosure were stacks of harvested groundnuts and corn. The latter in particular looked abundant and robust. It would last for a year even if the rains failed. There was not a speck of dirt on the cemented thrash floor. It was kept very clean. Beyond that was the shed with its thatched roof looking like the half-spread wings of a bird. Of the two cots that were inside this shed, one was stood upright. On the other side of the shed was an empty space of about a square metre. Bordering the fence were a neem tree, a vadanarayana tree and two palm trees. It had been two years since the palm fronds were pruned. By the dried bird shit that was all over them, you could tell that the chickens were in the habit of climbing on to the palm tree. Muthu was delighted to roam around the barn. Kali was always thoughtful in whatever he did. During one of his earlier visits here, Muthu saw two hens wandering around with a large group of chickens. There must have been over twenty chickens for each of them. If they grew up, one could start a poultry farm. But it was a nuisance to keep too many hens. They would get into the cow dung kept to a side and spread it all over the flat floor. That was why Kali was in the habit of gathering the cow dung from the floor well before the chickens got down from the tree. And only after throwing some kambu millet in front of the shed would he even let the little chicks out of the large hay basket. Once the chicks got bigger, there was a chicken feast every week. Whenever someone came to visit, he would catch hold of a chicken. If he decided to go to the Tuesday market, he could probably sell them very easily, but he was reluctant to do that. Sengannan, the chicken seller, came now and then to buy them for a decent price. After all, he needed to make a profit of at least four or eight annas per chicken. Muthu was amazed at how well the fowls looked. If you let the hen out of the coop after it hatched ten or fifteen little chicks, then in a month all you were left with were four or five of them. That's because crows bothered them incessantly. Eagles too. Even when the chicks grew bigger, they could not escape the claws of the large kite. It would lie concealed in the dense foliage of a tree and attack suddenly. Whenever it swooped down, it always left with a chicken held tight in its beak. It was almost impossible to save the chicken from them. But then how did Kali manage to keep so many of them alive? With a smile, Kali pointed to the two palm trees at the back of the shed. 'What do these unpruned palm fronds have to do with the chicken?' Muthu asked. 'Look carefully, machan. Keep looking at the tree. You will get it in a little while.' He never explained anything. He only drew your attention to things. Muthu kept staring at the trees. Two blackbirds took turns visiting the tree. Was Kali keeping the palm fronds intact for these birds? 'It is not enough if you find little caves and crevices to hide in. You also need some brains. But how can I expect that from you!' Kali teased. Then he explained. The blackbird built its nest only on palm trees with dense fronds. From the time it begins to build the nest to the time it lays its eggs, incubates them, and nourishes the little ones, no other bird can come near the tree. The male and female blackbirds would take turns guarding the nest. If another bird approached the tree, they would peck at it and chase it away. These birds might be small and fit into the palm of one's hand, but they were courageous. They could even daringly chase away an eagle. And if you let the chicks out during this time when the blackbirds were nesting on the tree, the chicks would be safe. In this way, the blackbirds guarded the little chicks too. This was how it worked. The moment Kali noticed the blackbirds surveying the palm trees, he prepared the hen coop. There were always one or two hens laying eggs. But if those eggs were not enough, he bought at least twenty eggs from someone and placed them in the coop. For this reason alone, he never cut the palm fronds. He only cleared away, once every two years, the dried ones that hung from the tree. Ponna always cried, 'You take such good care of these little chickens. And I am unable to lay a little one in your hands.' Muthu was truly amazed at how well kept Kali's barn was. He went around expressing his wonder to everyone. A lot of people tried to keep a barn like Kali's, but they couldn't sustain the work. Nor did they have the patience. What did they think? That if they did not prune the palm fronds, the blackbird will somehow land up on its own? The place also needed to be a safe one for the birds, like Kali's barn was. In this respect, the blackbirds were far more intelligent than human beings. It was Kali who had built the barnyard. His mother was concerned that land spread over more than half an acre was getting wasted. It was a disorganized space, with the harvest piled up on one side and the flat thrash floor on the other. He brought them closer, planned the space, and insisted that a barnyard was essential for farmers. He thought of it in such a way that the portia, which had already been planted, became the front side of the barn. Muthu, who was assisting Kali then, said, 'It would be nice to have the shed as soon as you enter.' But Kali felt that it was important to see the cows' faces while entering. He also felt that this way, by walking past the cows every day, it would be easier to assess if the thrash floor needed cleaning. So he put the shed at the back. Muthu now recollected the days he had spent in this space with Kali. What happy times they were! If they finished their work in the fields and attended to the cattle on time, no one bothered them for anything. They were like the temple bull that roamed around freely. After his marriage, Kali was worried about a child. Muthu's parents too spoke about it all the time. They even told him with conviction, 'It is too late for a child now. That's it. Your machan and you have been great friends for a long time now. Then what? It is to your children that he is going to leave all he has.' Muthu did not care for the property. He felt that Kali's life would gain some normalcy if he had a child. The Kali he knew before he married Ponna was a different man. Laughter and revelry were his natural states of being. The moment he heard that there was a theatre performance happening ten villages away, he'd gather a crowd and go there. If someone told him that there was a good movie running at Kannan Talkies in Karattur, he would go. The first time Muthu watched a film, he was very confused. Were those people dancing for real in front of him or were they dolls? There were forests, houses, palaces and songs. Where did they all come from? Kali pointed to the projector room at the back. Muthu was wonderstruck at how all of that was coming through a little hole in the wall. The film operator there was an acquaintance of Kali's. They smoked together sometimes. There were a number of things Kali used to do. Now he confined himself to the barnyard. The cattle and the portia were all that he needed. Muthu felt he could not leave Kali to this lifestyle. He needed to be dragged out of this. And having a child could do it. So, even if this was the last resort, Muthu was determined he should somehow send Ponna to the eighteenth day of the festival that year. He did not know how to broach this topic with Kali. But he had to. Also, whether he spoke to Kali or not, and whether Kali gave his permission or not, he had to make sure Ponna went to see the gods. Muthu was certain of that. ## nineteen When Muthu entered the barnyard, Kali was feeding the cows. 'I am staying here tonight, mapillai!' Muthu shouted out to him. It felt like the entire barnyard was trying to contain a great excitement within it. There was joy on Kali's face too. At the thought of a night in the barnyard with his old friend, a celebratory mood pervaded his mind. 'Machan, does toddy suffice, or do you want arrack?' he asked Muthu. 'After drinking toddy every day now, it has lost its zing for me, mapillai. See if you can get some sharp arrack.' 'All right. I'll be back,' said Kali, and took the ochre dhoti that was hanging on the hook, tied it over his loincloth, and left. 'Shall I also kill a chicken?' he asked. Muthu replied, 'Have you forgotten the rules of the fast? We can do all that on the last day of the festival. Not today. I have asked Ponna to bring dinner here. She will bring something soon. Don't worry.' Kali closed the thatched gate behind him and blended with the darkness outside. Muthu knew he would bring some good arrack. The moment the temple flag was hoisted in Karattur and the festival was on, you couldn't as much as smell a fish. That was how strictly the rules of the fast had to be followed. The strictures were relaxed once the gods returned to the hill. There would be no dearth of cows, goats and pigs. Also, rows of bullock carts carrying baskets of fish would start streaming into town. When they were little boys, they went together to herd cattle. There was a rugged stretch of land between the two villages. It was as high as two coconut trees and was as wide as the living quarters of the village. People called it Narikkaradu, the Fox Land. In the main cultivation season, that was the grazing ground for cattle. In what looked like something arranged out of large rocks, there were plenty of short trees and bushes. What started as time spent together tending to the flock developed into a friendship. They roamed around together, and they had nothing to hide from each other. Once the festival started, they wandered about the streets of the town every other day for months. They could walk and sprint the eight-mile distance in half an hour. Not that they needed to get there in any hurry. In the months of Chithirai and Vaigasi, they would sit in the front yards of different houses and flirt with the girls. Once they were done taking care of the cattle, what was left for these young men to do? It was also quite common for them to stay in each other's houses. Strictly speaking, their relationship was that of an uncle and a nephew. But they addressed each other in the friendliest of terms, as 'vaada' and 'poda'. Whenever Kali went to Muthu's house, he had an eye on Ponna. It was a wonder for him to have seen her as a child and then to see her suddenly blossoming into a girl. As soon as he turned eighteen, his mother started looking for a bride for him. Since Kali knew that Muthu was privy to everything about him, he was not sure how to walk up to him and say, 'Give me your sister in marriage.' But finally, on a night when they were lying around in Kali's barnyard, sated with toddy, he asked Muthu. 'Do you think I am a good man?' 'Why do you doubt that? You are a better man than me.' 'Are you just humouring me? Or are you being truthful?' 'Truly! I am ready to go to any temple and swear that you are a good, good, good man.' 'Then, will you marry your sister to me?' Muthu did not hesitate even for a minute. He said, 'Dey, mapillai! Oh no, I cannot address my mapillai as "dey"! I should say "Mr Mapillai"!' He went on and on, teasing Kali. Kali assumed that it was the toddy that did the talking and that Muthu would forget everything in the morning. But the very next day, he spoke to his parents and sister, and came back to Kali the same evening with their consent. From then on, they started addressing each other as mapillai and machan. That night had been quite like this one. A waxing moon, three-quarters its size, was throwing its light across the sky. Muthu could hear Kali opening the makeshift gate to the barnyard. He sat up. Kali came with a full bottle. 'This is Muniyannan's arrack. It is our luck this was available today,' he said and started pouring it. They drank the arrack out of small earthen pitchers and cracked open peanut shells and popped the peanuts into their mouths. Muthu always drank it almost neat and also downed it all really fast. It sank down his throat with a sting. It was definitely good arrack. It would be good if Ponna came with the food before he went for the next round. He had a habit of holding his nose and swallowing it all in one go. Kali was different; he took his time with each glass and drank up to four or five. He preferred to feel the intoxication slowly growing inside him. 'Mapillai, the last two fasts have just not been the same without you. You must come this time. I will make sure no one bothers you. Tell me, will you come?' Kali's eyes teared up and they shone in the moonlight. He was moved by Muthu's words. 'I will come, machan. I will,' he said. 'We can drink and make merry like we used to. Come. Tell me when you can come. I will get things ready . . .' 'When does your sister want to go?' 'It is you who has to decide that. She is scared of you. She has not come there for two years now. If you say yes, I will take her with me tomorrow.' 'All right. Take her with you. I will come on the day the gods go back uphill, stay for the last day and then return.' Ponna brought dinner. Usually, when she came there, she did not like anyone else hanging about. But today, it was her brother, Muthu, and he had come to speak for her. So she had cooked the dinner with care. Often, jobless fellows from the village would be sitting and chatting away with Kali. She would come there hoping to catch a private moment with Kali, and all her desire would vanish the moment she saw someone else. Those people weren't good at taking a hint and leaving the couple alone. She would wait impatiently, and finally leave without talking to him. She would often explode, 'If someone comes, meet them at the gate, talk to them and send them away! These wretched people never leave once they come and sit inside the barnyard. They look at how good our cattle seem to be, and they go and talk about it to the entire village!' She didn't mind Nallayyan. Even though the entire village talked ill of him, in her opinion he was good-hearted. He always had a kind word or two for Ponna. Once, when Uncle had come over, Ponna was on her way to the barnyard, carrying food, when she stopped to watch some children playing. What did children have to worry about? They could play all the time even in the streets. She too felt like playing along with them. But someone might remark, 'Now that she does not have a child of her own, she has decided to become one and prance about herself.' They might stop their children from talking to her. So Ponna contented herself with watching them from a distance. When she entered the barnyard, feeling content, she heard Nallayyan say, 'This is the kind of space you need for a calf to play around in.' A week-old calf was leaping about all over the barnyard. 'We have the space, Uncle, and we can rejoice at the calf's bounding about. After all, do we have children to run around this place?' she said in a tone of resignation. Whenever this topic came up, Uncle had words that were like balm to her aching heart. In fact, she would often make some such remark just to elicit his response. And Uncle responded that day. He said, 'Don't worry, daughter-in-law. Enjoy the calf's happiness. That is a child, too. If you go out into the street, don't you see a number of children playing? Watch them as long as you want. That's enough. What else is there in a child? Everything lasts only a little while. Take this calf, for example. After some time, it will leap on to this cot. It will go and bother the goats. We will get annoyed and tie it up in one place. My brother's children used to come to my house. It would all be nice for a while. After that, it would all be a nuisance with them breaking this and smashing that. I would chase them away like dogs. They'd cry as they ran. So what? In their own homes, they behaved themselves. That's because if they broke anything, their mothers would take hot iron rods to them. So, it is better to look at it all from a distance. It is a nuisance to have to take care of children. Be relieved that you don't have to go through all that. Let stupid dogs who know nothing about happiness keep having children and keep suffering. Let us laugh at that too!' 'Are you always this playful, Uncle?' she asked. 'That is the key to happiness, dear girl. Take everything lightly, you will not be assailed by worries. Do not think about who says what. It balances out if we too talk ill of them!' he said. Now, again, Ponna felt as happy in the barnyard as she was whenever Uncle Nallayyan visited. She hadn't been to the chariot festival for two years in a row. Her brother was not going to let that happen this time. She had cooked what her brother loved most: kootucharu and spicy vadai. As soon she set her basket down, Muthu said, 'Ponna, we will serve ourselves. You go back home. I have discussed everything with mapillai. He has said yes to your going with me in the morning.' Though Muthu had told her this, she would only be convinced if she heard it straight from Kali. Would he really have agreed to send her on the day the gods went back to the hill? She felt like asking gleefully, 'Really?' But she wondered if that would be hurtful to Kali. He might say, 'Do you want it so badly?' Even if he did not say anything in her brother's presence, he would make sure he told her later. To break her silence, Muthu said, 'Mapillai, you tell her yourself. She will believe it only if you say it. My words don't carry weight any more.' Kali laughed, 'Well, there are places where your words work wonders. Ponna, leave with your brother in the morning. I will come on the eighteenth day . . . We'll see.' Not wanting to be in the way of their conversation, Ponna left right away. But a million thoughts assailed her. What did he mean when he said 'We'll see'? Was it in response to what her brother meant when he said 'I have discussed everything'? Just a little while ago, when they were preparing dinner, her mother-in-law had told her, 'What is there to think about? This is god's work. You are going to be with whoever appears as god for you. God will show you the way. Do you know the old Vellapillai woman in our village? Do you know how her mother conceived her? She was given by god. Asking for a boy, her mother went there a second time too. And she got the male child she wanted. Ponna, this is a tradition that has been going on for ages. Don't worry about anything. Just think of god.' As she walked back home, Ponna chanted to herself, 'Oh, Karattaiya, mother Devatha, it is in you that I trust. Please show me a good way.' ## twenty Once Ponna left, Kali refilled the pitchers and also took some food on his plate. He always liked to drink as he ate. But Muthu preferred to be done with all the drinking before getting to the food. Sometimes the food would stay untouched because he would have passed out after all the drinking. In some ways, he was much like the goat who was let out after being kept shut inside for a better part of the day. It would rush to the fodder and start munching it loudly. Muthu was exactly like that. Kali always laughed at his speed and urgency. As soon as he drank straight from the pitcher, Muthu opened his mouth wide to take a deep breath. The sting from the arrack reached his nose. He took a handful of pakodas and put them in his mouth. Kali laughed. 'Eat slowly, machan. Do you think I won't leave anything for you?' 'You know me, don't you? This is nothing new to me,' said Muthu. Then he asked Kali, 'Mapillai, we gave our girl in marriage to you as soon as you asked, didn't we? Is it fair that you have not sent her home these past two years?' 'Is it fair that you didn't ask me this these past two years? Why are you so concerned suddenly?' Kali too spoke out. 'True. It was wrong on my part. I accept. I thought I should not interfere when there were elders to do that . . .' said Muthu. Kali's voice rose in anger: 'What good are these elders for? They plan to pimp their own daughter and also come and tell me that shamelessly.' Sensing a change in the air, the dog came running towards him, barked once, and moved away to lie down elsewhere. Having waited for just this kind of moment, Muthu spoke: 'Please don't say that, mapillai. It is because we couldn't bear to see you two suffer that we came up with that idea. This is nothing new, mapillai. It has been going on for ages now. We have gone there a few times too, haven't we?' 'You tell me. If your wife was childless, would you have sent her with a stranger?' 'Mapillai. Don't call him a stranger. Who remembers faces? All men are gods that night. Think of him as god, you might even feel happy about it. Isn't it a great blessing if our child comes from god? Haven't you heard people remark, "This child is a boon from god"? Those children were born exactly this way, mapillai.' 'When you and I went, were we gods? All we wanted was to find some decent-looking women to fuck, didn't we? Did you ever think of yourself as a god?' 'It does not matter what we thought of ourselves. If the women get children because of us, we become gods for them.' 'Really?! All men there are radiant with divinity, roaming around holding their cocks in their hands. It happened because people were ignorant in those days. Who will send their women now? Will you send your wife?' 'How much have you suffered these past twelve years because of this one issue?' reasoned Muthu. 'You lie confined to this barnyard and the field. This should end. We should be able to hold our heads high in front of others. If I were in such a situation, and if this were the only solution, then yes, I would send my wife.' 'You might,' countered Kali, 'I won't. Actually, if you were really faced with such a situation, I know you wouldn't either. You are now arguing for the sake of it. In those days, when a boy was a mere child, they got him married to a girl. In reality, it was the boy's father who did with the girl all that the husband was supposed to do. The boy was a husband just in name. Will such a thing be approved of today? This is just like that.' 'It is not like that. There are women who go to other men for various reasons. This is not like that. Here, as part of a festival, god gives a woman a blessing. I want you to become the Kali you used to be. And I want to see my sister happy again. That's why—' 'You are so old-fashioned, Muthu,' snapped Kali. 'Earlier, a woman could be with however many men as long as they were all from the same caste. Even related castes were fine. But if she went with an "untouchable", they excommunicated her. Is that how it works today? We insist that a woman should be with just one man from the same caste. Then how would this work? More than half the young men roaming about town are from the "untouchable" castes. If any one of them gets to be with Ponna, I simply cannot touch her after that. I cannot even lift and hold the child. Why do I need all that? I am happy lying around here. I don't want a child so desperately. Moreover, all of you will call me impotent and laugh at me. So, let it go.' 'When a woman goes secretly, who knows which caste the man belongs to? Also, it is a mistake only if others come to know of it. Anyway, if you don't want to do this, we won't. But please don't use this as a reason not to come home for the festival.' 'I will come. But let me be clear: I am not sending my wife anywhere.' It was clear to Muthu that he could not shake Kali's conviction on this matter. But that didn't mean he would abandon the matter altogether. He knew he had to find another way to convince Kali. Before they went to bed after midnight, they spoke about other things. In the morning, Muthu woke up to the sound of the blackbird. He roused Kali and said to him, 'Don't brood over anything. Come on the day the gods return to the hill. I will make excellent arrangements. Let's have fun!' Kali saw him off at the gate. On his way out, Muthu was assailed by doubts as to whether he was right or wrong in what he was about to do. His justification to himself was that since he was doing it for a good reason, it must be the right thing. 'Mapillai said yes to everything, Ponna. I explained to him that this was a religious matter, and I made him agree. He loves you so much.' Saying this to Ponna, he took her with him at the crack of dawn. Muthu knew that Kali and Ponna had not had a chance to speak to each other in private either the night before or in the morning. Now he had to make sure it did not happen until the task was done. Also, it was important that Ponna always thought of it as god's work. Kali could be handled. In fact, once a child was born, it might not even matter if he found out. None of these things might matter to him when a child called him 'Appa' and crawled on to his lap. ## twenty-one Kali was half-asleep on the cot under the portia tree when Muthu's voice woke him up. 'Welcome, mapillai. Have I made you wait for too long? These fellows never leave me alone. I had planned to stay put at home on this festival day, but who lets you be? You know Selvarasu, don't you? He wanted me to go with him to select a bullock. It took us so long to finish that transaction. The bullock looked like it was quite used to pulling carts. But it had only two teeth. The fellow wouldn't come down below forty rupees. We somehow agreed on thirty-five. All right, come. Let's eat. You could have eaten. Why should you be waiting for me?' It was only when the two were alone that Muthu addressed Kali in the friendly terms reminiscent of their childhood days. But when Kali was here, he was the son-in-law, and Muthu's address shifted accordingly. Kali rose from the cot, saying, 'Oh, I didn't mind waiting. And I dozed off.' Portia leaves had been stitched together into a wide leaf plate for them to eat from. At festival time, mendicants delivered stitched leaf plates to every home. But since they had a huge portia tree right in the front, the mendicants sat there in its shade and stitched their own leaves for them to use. So, they never ran out of these leaf plates. Kali declined the snacks since he'd already eaten a lot of them. Muthu murmured in his ear, 'Don't eat too much. I have made other plans.' In times like these, Muthu's plans always excelled. He also didn't hesitate to spend. 'It is enough to leave a little for the children,' he always said. 'Don't we have to live well? The children can fend for themselves.' After lunch, they sat under the portia tree and chewed betel leaves. Since they'd been bought just the day before at the Tuesday market, the leaves were fresh. Kali's mother-inlaw was in the habit of chewing betel leaves every day. So, they always had enough at home. She wrapped the leaves in a white cloth and kept them on top of the water pot. She also wet the cloth two or three times a day so that the leaves wouldn't wilt until the next week's market. 'Mapillai, now we can go out for a while, can't we? I hope you have nothing planned,' said Muthu. 'Hang on a minute. We will leave soon,' he added and rushed inside. Kali heard him tell his mother, 'What, Mother? No, nothing at all.' And then Kali heard his mother-in-law chastising Muthu, 'Why couldn't you come back sooner? These two are all over each other as if they just got married, and I got tired having to call Ponna to help me here. Nothing got done here. Anyway. I will take care. You fellows go.' Muthu also said goodbye to Ponna who was arranging the pots and pans. He rushed back to Kali and said, 'Come!' Bored and lonely from sitting under the portia tree for so long, Kali was now ready to go out. In his barnyard, there was always some work to do. He felt that the most difficult thing to do was to do nothing at all. He knew Muthu had a knack for finding secret hideouts in the forest, and that he would also have furnished them with all that was needed whenever he spent time there. There was a rocky patch in the elevated section of the fields. It was quite rugged and in the gaps between the huge rocks, giant trees stuck out forming bridges across the two rock faces. Only very rarely did someone go in there to defecate. And they were always afraid. But Muthu had a hideout even there, deep inside. There was a palm tree atop a pile of rocks, and he had worked using the rocks right below that palm tree. He had nudged them away with a crowbar and cleared a circular spot where five people could easily sit and two could lie down. But his genius lay in the way he had laid palm fronds on the trees that lay over the gap right above them, forming a bridge between the two rocks. Not only did this give them the much-needed shade but also served as a perfect decoy: for anyone who looked from above, it simply seemed as though the palm fronds had just fallen in the wind. And all that Muthu needed was hidden in the crevices in the rocks: chilli, salt, a lead wok with a broken crimp, a mud pot—everything needed to run a small family. A rat, a bandicoot, a quail or a partridge would get fried in there now and then. Secret places were Muthu's happy places. When Muthu took him in there once, Kali said, 'Dey, machan, why do you have this space? Which woman do you bring here?' 'Nothing like that, mapillai. People can spot if anyone comes and goes. Only I come here. You know my father, don't you? This is where I come to escape him,' Muthu replied. Once, when they were preparing the land for sowing peanuts, Muthu bought a large pitcher of toddy and hid it in one spot. Two ploughs were working on the land. Once in a little while, Muthu ran to the rocky patch and while returning to the field, he made a show of tightening his loincloth and said, 'My stomach's upset.' But how many times could they halt the ploughing? Annoyed, his father ran after Muthu the next time he took off, and discovered his secret spot. 'Are you a rat?' he laughed. 'You have made a hideout in this little nook.' After that, everyone started visiting the spot, if only to marvel at Muthu's genius. So he had to abandon that spot, but it was not as if there was a dearth of possible secret locations there. There was certainly one spot that he'd had since childhood, which no one had been able to discover. Only Kali was privy to it. The elevated fields ended at the stream, the edge of which was bordered by ten large, fully grown neem trees. On one of those trees, Muthu had fastened two of the branches together to form a loft and had completed it using long stalks, ropes and plaited palm fronds. To an outsider, it would just look as though the neem branches had entwined. He could spend days and nights over there. He had also furnished the place with all the things he needed. Though he could not really cook there, he could pretty much do everything else he wanted to. If there was an argument or a fight at home, he would run away and spend at least a night and a day there. On one such occasion, they had looked for him everywhere, without any luck. After a whole night and a day, he returned home as if nothing had happened. But they still hadn't been able to locate this spot. When Kali said, 'You should have been born a crow or a cuckoo,' he replied, 'I would have been much happier that way, you know.' Muthu too had a barn, but it was his father who was the master there. He always remarked when he visited Kali's barn, 'Only children without their fathers around are the lucky ones.' Remembering all this, Kali thought that they were now going to one such haven. But Muthu seemed to walk past all the fields. The sun had started going down, but in its slant it could be felt more sharply. 'How much further?' 'If you want to see a new place and taste new stuff, you should not mind such discomfort. Wait and see. You will hug me and give me a kiss!' said Muthu. Kali's curiosity was piqued. He kept walking with Muthu past the barren lands. ## twenty-two Ponna's parents got busy as soon as Kali and Muthu left. 'We are late,' they said to Ponna and rushed her to get ready. Before he left, Muthu came into the house and said to Ponna, 'We two will be fine. You go, Ponna. Think of god in your mind.' She had stepped out eagerly to say bye to Kali. He raised his eyebrows and smiled at her seductively. He wouldn't talk to her when they were in a crowd or even when there was anyone else around. But he would communicate everything to her with his facial expressions. His eyebrows would arch and talk to her; the curve of his lips would contain his message for her; and just a nod of his head would let her know what he wanted. It was only she who was afraid that someone would catch them at this game. She was surprised that her brother had managed to speak to Kali and get his permission for this. After walking a little distance, Kali turned to look at her. She stood right there, since she knew he would do that. She sent him off with a shy smile. A little while after their departure, a bullock cart pulled up in front of the house. There was hay spread on the cart for her and her mother to sit on. In the sack tied under the cart, there was some fodder for the bull and two coarse mats. Her mother had packed some food, and it was now next to her on the hay. Ponna hadn't known her mother had packed food for the way, though she had been with her all day long. She must have soaked tamarind and made the rice when Ponna was busy with Kali. 'When did you manage to pack the food, Amma?' said Ponna. 'You two are all over each other like you just got married. You talk through signs. In the middle of all this, where do you have the time to pay attention to what I am up to?' her mother replied. 'If there is a child, it will teach you some modesty,' she added. 'Well, at least now your husband had the good sense to say yes. Pray that this time it should all go well.' Ponna heaved a sigh of relief. When she had menstruated in the first month after the wedding, her mother-in-law sniggered in displeasure and turned her face away. Since then, the snigger had continued every month until that day. Nothing had happened to change that. But now, Ponna was going with her blessings. It was Kali's change of mind that was surprising to her. Perhaps it was because her brother and Kali were friends since childhood. That's why his words had had some effect. In a very short while, the bullock cart reached the main road that was lined on both sides with huge tamarind trees. From the point where their mud path met this main road, they saw that it was already lined with bullock carts. Traffic was quite bad even on days when people went to see the chariot, but nothing compared to this day. Their cart too inserted itself into the line. They saw there were a lot of carts without roofs and which had only hay spread on them. There were only one or two bullock carts that had a covered box to sit in. In all of these, men, women and children were packed tight. Both mother and daughter felt strange that it was only their cart that was not crowded. Every cart carried stacks of grass and fodder for the bulls. They could even hear the crowing of hens and roosters from under some of the carts. People would go see the gods that night and the next day they would offer pongal and sacrifice a rooster for the snake god in the forest. After they'd cooked and eaten, they'd wash and clean their utensils right there before leaving. Hundreds of roosters would be sacrificed the next day. Needless to say, it would be another crowded day in town. Not only did the dust from the roads settle on their bodies, it also flew on to their faces and made it hard to breathe. People walking by the side of the carts did not mind this even one bit. They carried on as if the dust was nothing but holy ash smearing itself on them. Taking a cue from her mother, Ponna covered her face with her sari. It looked like her mother was wearing a faded sari. Maybe this was the best one she had. However tirelessly she worked in the fields, she was unable to wear good clothes. Nor was she keen on doing that. Ponna remembered a story from last year. Apparently, when people went with their carts to load up on hay, a man came there to conduct an auction just for them. They did not want to get into an auction, so they all bought a sari each. Ponna was now wearing the sari that Kali had bought her from that sale. He always preferred light-coloured saris. She loved this one—a light sandalwood colour—and she was now concerned about it getting caked with dust. Thankfully, after a little distance, women were sprinkling water from either side of the road, helping the dust settle. This was a service that people from the villages along the road took on during the festival season. There were also water pandals every few miles or so. They were made by plaiting palm fronds together and then fastening them with coconut fronds. Two or three carts pulled up in front of each of the pandals. Everyone could get as many pitchers of cold water as they needed. Some people removed themselves to the other side of the pandals and drank water out of palm-fruit shells. Some of the pandals even had watery buttermilk in pots. This was like nectar to someone in thirst. Nothing could compete with that. Watching everyone around her, Ponna was filled with the excitement of a child. The young men who drove the carts were keen on overtaking the carts ahead of them. Every time they managed to do that, all the young men and the children in that cart would shout and jeer at the one they overtook. All of this took a toll on the poor bullock that heaved, panted and struggled. Excitement pulsed through the entire stretch of the road. Ponna's father drove slowly and carefully. It was enough if they reached when there was still some daylight left. After all, there was nothing new about the festival that he needed to see after all these years. The last time he went was when he took little Ponna to see the festival. The years had rolled by. Now, looking at this crowd, Ponna had little doubt that all sorts of rules would be broken that night. Perhaps different rules applied to crowds? Just like this road, the other roads that led to Karattur from all the other villages around it would also bring in similar crowds. Would the four quadrangle streets be enough to accommodate the thousands of people pouring into town? Just for this day, the town would expand into the distant lands surrounding it. The noise of the crowds continued to ring in her ears. Her father stopped the cart at a water pandal. They could get watery buttermilk there! They only said it was watery, but it turned out to be excellent buttermilk. If you drank a small pitcher full of this, it would relieve not only your thirst but your hunger too. Nearby, there was also a large tank filled with water for the cattle. While the passengers were busy drinking the buttermilk, some of the drivers unharnessed their bullocks and took them for a drink of water. All of these were acts of service that people from the villages along the road took upon themselves. These pandals lasted the entire duration of the festival. On some days, you could get not only water and buttermilk, but also panagam, sweetened with jaggery. All the palm-tree climbers of that village made sure that enough Karuppatti jaggery was available to make panagam in large vessels. When they were heading back to the cart, a man approached them. He was wearing a dhoti around his waist and had a folded towel under his arm. When he said, 'Samee . . .' Ponna's father turned around. 'What?' He could tell who the man was. He said, 'Samee, the little ones are unable to walk. If you can give us a little space in your cart, you will be blessed.' 'Where will you sit?' Ponna's father asked. 'Samee, you go to the back and sit restfully on the hay. I will drive the cart and have these three sit next to me.' 'Are you a good driver?' 'Samee, I work for Periyasami's farm in Veliyur. My name is Maran. You can ask him. Everyone speaks highly of my work, samee. I will be gentle on the bulls. You will have nothing to fear.' 'All right. Come. Get in carefully,' said Ponna's father, handing over the reins to Maran. Moving the bull on the right slightly aside, Maran climbed on to the driver's spot. Then he lifted his two little children and made them sit. His wife was a little on the heavier side. She hoisted herself up by placing one foot on the pivot of the wheel and sat herself behind her husband, making sure she did not touch anyone sitting on the hay spread. Since now an entire family was to the front of the cart, the weight imbalance bothered the bullocks. So, Ponna's father moved further to the back to make it easier for them. Now they also had people to talk to. ## twenty-three It made Ponna anxious when her father started asking Maran about his family. Her fear was that once that ended, Maran might reciprocate. Gradually, it would come to his asking, 'How many children does your daughter have?' And when they would hear she had no children yet, they would take pity on her and suggest some medicine or some ritual. 'I have nothing but humiliation to expect, even from a farmhand,' she thought. She did her part to make sure the conversation did not head that way. Thankfully, her father started talking about cultivation instead. The two children were very beautiful. The one sitting on the father's lap must have been eight years old. A small kandangi cloth torn from a sari was all she was wearing around her waist. The other one, sitting naked on her mother's lap, must have only been three. Ponna felt like keeping the baby on her lap. But caste laws forbade her from touching the child. She refrained from even playing with caste children, since she feared some rebuke or comment. In the month of Purattasi, it was a tradition to offer pongal at the Perumal temple at the foot of a hill. At the crack of dawn, if one took the shortcut, one could reach the temple by the time the sun was overhead. Of course, if someone was going like this by bullock cart, you could all go together. Earlier, Kali used to take the initiative to arrange for and even drive the cart. Those were very happy journeys. He would take as many people as the cart could hold. If they left very early, they would be at the foot of the hill by the time it was bright and sunny. The hill was basically a bare rock that resembled a giant basket that had been turned upside down. The region surrounding the hill was all forest. On the Saturdays of the Purattasi month, crowds from nearby flocked to the temple. You could see stoves busy preparing pongal for the offering. The sambar made with green gram dal, pumpkin and ladies' fingers—all specially made for this offering for Vishnu—were delicious. Everyone followed the same recipe. On the mud roads leading to that hill, one could never spot any sign of a human dwelling. It was all green and lush vegetation. Elevated fields cultivating groundnuts dotted the edges of the roads and filled everyone with joy. And the plants that yielded thurvarai dal stood with their leaves spread out like the unfurled tails of proud peacocks. It was soothing to the heart just to drive on this road. Ponna had promised three head shaves and three pongal offerings to this deity. When would she get to complete that? Once during their trip there, Kali's cart was so crowded that they were practically elbowing each other for space. Accompanying them from Vandukkaadu were Kannaaya and her two children. Her son, who was three or four years old, was dark and snot constantly dribbled from his nose. The girl was an infant; she hadn't even started to crawl. Kannaaya was struggling to take care of the children while also holding on to all the things she was carrying for the temple offering. Her husband was walking behind the vehicle, since there was absolutely no space for him in it. Ponna took the infant from Kannaaya and kept it on her lap, making sure the sun didn't bother the baby. The child was in utter delight at the vehicle's bouncing up and down on the road, and it laughed whenever Ponna made a 'kooooo' sound twirling her tongue around. Kannaaya's wedding had happened only a year after Ponna's, but she already had two children one after the other. Whenever Ponna saw someone like that, she shrank from within. Despite her best efforts to cheer up, she would be sad the whole day. There were no words to describe the pride and joy glowing on the faces of women who managed to have a child within a year of their marriage. They also overdid it in front of Ponna. The baby, who was laughing until then, suddenly grunted. Ponna saw that the baby had defecated, wetting the little white cloth tied around her waist. The stench was overpowering. What had Kannaaya eaten before feeding the child? Ponna's sari too was wet with the child's faeces. 'Why does it stink so badly? Did you eat anything that you were not supposed to during the festival weeks?' Ponna asked as she handed over the baby to Kannaaya. She could not bear the stench and the dampness on her sari. Everyone in the cart felt assailed by it and were trying to manage it by covering and twitching their noses. Kali stopped the cart at a well by the side of the road. Ponna ran to the well, took some water from the large water holder next to it and cleaned herself. Kannaaya cleaned the child's legs and feet and also rinsed the cloth it was wearing. Why carry the baby when she was travelling so far? Was the god going to be mad if she decided to come the next year instead? All right, if she still chose to go, shouldn't she know what to feed the child before travel? Ponna was really annoyed. It felt like the stench from her sari had not fully gone. 'This is making me retch. Kannaaya, don't you think you should feed the infant something she can digest?' she said. And Kannaaya retorted, 'Shit will stink. Is it only my baby's shit that stinks? Does yours smell wonderful? You'd know if you'd had and raised a child of your own. You keep saying it stinks, as if I don't know it!' The worst thing was not Kannaaya's remark that Ponna didn't know what it took to raise a child. It was what Kannaaya muttered under her breath after that, which everyone heard anyway: 'This childless woman smells a child's ass and squirms at the sight of a child's shit. How does she expect to be blessed with a child?' Ponna broke into sobs. Kali did not know what to do. He just made a general remark: 'Can't you keep quiet? These women! They can never keep their tongues under control.' But the argument had rippled out among the other passengers by then, and they took sides. 'Once you have a child, you will have things like shit to deal with. You can't be squeamish about that.' 'Well, you promptly lifted the child and gave it to its mother. Whom can she hand it over to in turn? Nobody. She has to do it herself, doesn't she?' It turned out that Ponna was more upset with the words of those who claimed to speak in support of her than those who took Kannaaya's side. 'Who knows what curse it is that has kept her childless and suffering? How can you speak to her like that?' 'Had she handled a child before, she would have done better. She didn't know. That doesn't mean you call her barren.' 'Don't cry, Ponna. This time next year Perumalsami would have given you a child.' Until they reached the temple, this was their only topic of conversation. Ponna was mad at Kali. Not only had he given Kannaaya a ride in the cart, he had also included Ponna in his admonition. 'Do I have a problem controlling my tongue? What about what the other woman said?' Ponna said. She had long since lost interest in the deity, in climbing the hill and in making pongal. But she did it anyway just for the sake of it. Thankfully, when they got ready to leave, Kannaaya did not join them. Her husband informed them that they were going to stay on longer. They might have chosen a different cart to return by. On the way back, everyone in Ponna's cart scolded the absent Kannaaya: she talked back, she was arrogant, she was haughty—all sorts of words rolled around. But Ponna knew that they felt obliged to speak against Kannaaya because they were in Ponna's vehicle. When they would meet Kannaaya, they would talk ill of Ponna. She did not speak to Kali for a month after this event. 'If I had simply taken your side in front of everyone,' he said, 'wouldn't they have said I was merely taking my wife's side? That's why I made a general remark. She is an uncouth woman. Why are you taking her words so seriously?' But still she did not speak to him. She felt isolated from everyone and confined herself to the house. She also took to sleeping at odd hours. Sometimes she cooked, at other times she forgot to. She didn't go anywhere near the field or the barnyard. Her face looked swollen most of the time, her hair dishevelled. Normally, she wouldn't even allow him to leave his hair untied. She would also wash his hair for him. But now she did nothing. When he came home, she laid food on his plate. When she forgot to make any food at all, Kali's mother brought his food. Now he mostly ate his mother's food. It also became very difficult to make her eat. Kali and his mother were quite alarmed seeing her lie around with no sense of day or night. They feared she might be possessed by some evil spirit. They even thought of sending for her parents. When Kali came home at midnight and knocked on the door, it took her a long time to unlock it. She looked demented. Her arms, which once used to embrace him with desire, now lay limp and dead. Kali was frustrated. But just when he was at a loss to figure out what to do, something happened that revived her. A goat in the barn was in the throes of a difficult birthing. Kali ran to Ponna, imploring her, 'You used to take such loving care of it, calling it your goat, remember? You used to say, "It doesn't matter that I don't have children. My goats and cows will always yield abundantly." Now will you consider going to the barn and taking care of the goat in its suffering and give it some strength? Or are you going to let it die? It is a struggle of two lives now. Kattu Karuppanarayya! Show us a good way. Badrakali! Be on my side, Mother!' The moment she heard that, she rose as if she had just regained consciousness and ran to the barn. Even after the kid had been force-delivered, the goat's legs were shaking. For the next ten days, until it was able to get up on its own feet and look at its young one, Ponna stayed in the barnyard. She washed the goat with warm water twice a day. She ground the pulp of aloe vera and applied it on the goat's wounds from the delivery. She fed it steamed kambu millets. It was her love for this mother-goat that revived her. The next year, when he brought up the subject of going to the Perumal temple, she retorted, 'Why? So that you can bring some woman along to humiliate me?' and, instead, walked all the way to the temple. She also stopped lifting and holding anyone's children. Their barnyard always had little calves and kids for her to play with. ## twenty-four Ponna loved the eyes of the little child who, sitting on her mother's lap, kept looking at Ponna. The child smiled through her eyes. In her mind, Ponna lifted the child and kissed her. Maran drove the cart faster than her father did. He was also able to overtake some of the other vehicles with great ease. For all this, he didn't land the whip on the bullocks even once. All he did was touch them on their flanks with the handle of the whip. He seemed to be adept at the language of the animals, and since he was busy with the driving, his conversation with her father did not continue. It was a relief to her. As they neared the town, she could see the hill at a distance through the gaps in the tamarind trees en route. Atop the hill, like a hand folded in prayer, was the barren rock. The hill's peak was resplendent in the receding light of the day. Ponna prayed: 'If you do not show me a way this time, the only option I have is to fall from that hilltop . . . I am coming today to see the god. I might fail to recognize you. You have to help me. You have to give me a child. I do not know in what form you will come today, where you will stand, what you will say, and how you will approach me. Kali's hands are like large, rugged sieves. When they touch my cheek, my love pours forth despite the roughness of their touch. How will your touch be? How will you enter my body? I know nothing, but I am coming now, trusting you . . . My husband's permission to this is not whole-hearted. He has said yes because my brother asked for it. Just like you, he wants to keep me in his body. He would never want to tear me apart from his body and give me to someone else. Despite all that, I am coming to you now. Let him hold his head high among people. Let him not stay confined to the barnyard, let the spring be back in his gait. May his embrace regain the love it used to have. You have to help us be like others, be accepted by everyone, my Father . . . my Mother . . .' Her mind was immersed in prayers. She felt as though a new power was entering her. She felt dizzy, so she lay on her mother's lap. Though she could not shrink herself and lie like a baby, it was comforting to lie with her head in her mother's lap. She even forgot that this was the same mother who had been annoying her the whole morning. After a long time, she felt her mother's gentle hands on her back. Her mother's hand had sacred threads wrapped around the wrist, and she relished this maternal touch. Her mother's eyes had teared up thinking about something. It seemed that a mother needed the joy of having a child, and the child that of having a mother. Nallayyan used to say, 'Why do you think we have and raise children? For them to grow up well? No. We do it because we seem to need it for ourselves. That is why we have children and raise them. And then in old age we complain that those children are not taking care of us. This is all plain madness . . .' Let him be right. We don't expect our children to take care of us when we are old. It is enough if we can have a social life because of them. Now we are forced to act like untouchables, fearing if our sight or touch is inauspicious. All we want is to show these people who ostracize us that we too are people just like them. Her mind was filled with various confusing dreams. There was one in which she walked a long distance with a child across her shoulder. It occurred to her that she could never see the child's face. Was it even her child? From the way she walked, it looked like she had stolen the baby from somewhere. Was that true? Why was Kali never part of this particular vision? Where had he gone? Did he abandon her thinking that she didn't need him when she had a child? With images and memories mingling with one another, she lay on her mother's lap, tossed between sleep and wakefulness. There was a lot of noise. Above the din of carts pulling over, the voices of people could be heard. They sounded unintelligible, like the cawing of crows at dawn. Maran drove the cart into the market, which seemed to be in full swing already. Ponna's mother woke her up only after Maran pulled over at a spot wide enough for their cart. It took her a while to get her bearings. She couldn't remember how long she had slept in her mother's lap. She was fully awake only after a little while. The sun was down, and the shadow of twilight spread over everything. She covered her bosom properly, wiped her face with the end of her sari and, holding her mother's hand, got off the cart. She saw that the market was filled with people and cattle. She was amazed. Had the heavens landed here? She hadn't seen this much of a crowd even on the days when people came to see the chariot. If there were already so many people here, how many more must be coming through the roads leading up to here from all four directions! Ponna looked at everything with a great sense of wonder. 'Samee,' Maran said with great reverence, 'may you be blessed. But for your help, we couldn't have made it all the way with these children. It is Devatha herself who showed you to us at the right time. She has somehow brought us here. Please let me know if you need any work done. When there is no work at my landlord's farm, I will work for you. It is people like you that I should serve.' His wife bent low in obeisance and said, 'We will take leave.' Ponna's mother undid a knot at the end of her sari, took out an anna and gave it to Maran's wife, who received it in her pallu. They walked backwards for a few steps before walking away. While Maran and his wife were taking their leave, their little child had been smiling at Ponna. It was a good omen. Ponna had wanted to affectionately pinch the child's cheek. Until the family vanished into the crowds, she kept looking at the child. Please bless me with such a charming child, my lord, she prayed. Her father untied the bullocks from their harness. Bringing them around, tied to the front of the harness, he threw some fodder for them to gorge on. As darkness settled in, fire torches started glowing here and there in the market. Human faces became wandering figures of smoke. Her mother opened the food package. To Ponna, everything appeared foggy. She perceived everything as images from a dream that was not even hers. ## twenty-five Muthu and Kali walked along the meandering paths and elevated boundaries between the fields. They were enveloped in a variety of sounds—birds settling on the palm trees, the rustle of dry leaves in the mild wind, the sound of palm fronds grating against each other. Intertwined with all of these, their voices too had lost their human quality. Though Kali had been to these places several times when they were children, he was now unable to guess where Muthu was taking him. So much had changed in all the years he had stayed shut inside his barn. They walked past fields belonging to both villages and reached the stream. It was flanked by thick bushes on both sides. The avaram shrubs had grown as tall as trees. Muthu walked past them, suddenly turned a corner and climbed higher. There was a coconut grove in front of Kali's eyes. There must have been a hundred trees. They had been planted following the dictum that there must be enough space between two coconut trees for a chariot to pass through. Almost all the trees were of the same height. He could even see the tender coconut and the toddy pots on many of them. He had never seen such a grove in these parts. When all the elevated fields lay dried up, how did such a coconut grove thrive here? For most other crops, you could manage even if you had very little water in the well. It could even be as little as what a small cuckoo would need for a drink. With that you could grow some chilli, a square-measure of raagi or some cotton. But coconut trees needed plenty of water. Otherwise, the coir covering would dry and hang, and that in turn would make the top of the tree shrivel up. Such trees looked like broken-winged birds frozen in mid-air. Kali had four coconut trees. In the rainy season, he would widen the circle around the tree for it to hold more water. But in summer, the circle would shrink close to the roots, and he would release two loads of water through the little canal. How much of it would get to the coconut trees? Not much. Kali called this 'Life Water'. This water was meant to give just enough strength to the coconut trees to survive. He'd do that because they needed coconut for their food. Ponna would also sell what she didn't need. After all, it was only the two of them. But Kali could not get over his sense of wonder that here, in this dry land, was a coconut grove with a hundred trees. As they entered, a chill palm breeze took them in its embrace. Dried-up barks and fallen fronds had been stacked up on a side. Some fronds had also been spread under each tree. He was full of questions: 'Machan, who owns this place? I never realized there was such a grove so close to us. There would be a hundred trees, right? Looks like they have all ripened. What do they do for water?' Muthu told him the story of that place. A Muslim merchant who owned a cotton storehouse in Karattur also owned this place. Before this grove of trees came up, this too was a dry piece of land like the surrounding stretches. But the cotton merchant had a lot of money. He brought a farming family from yonder and gave them a place to live here. This family had been languishing in a farm there, working as farmhands. He had met them during his visits there to buy cotton. When he called them here to take care of the place, they moved. Since he had no major concerns regarding money, he gave them what they needed. There were three wells for this land, and one well was used for irrigation every day. What more did the trees need? There was also a tile-roofed house right in the middle of the property for the owner to stay in when he visited occasionally. The family stayed in the thatched-roof hut. The moment the flower sheath started showing and the trees started yielding, a family of traditional tree climbers also found its way into the grove. Not only did they take over the trees but they also started making and selling toddy. Kali's mouth watered at the thought of the toddy. Until some years ago, you could get coconut toddy in shops. You could drink a bellyful at whatever time you wanted to; it was not as sharp as palm toddy. It was, in fact, sweet. But it was a real shock when all toddy and arrack businesses in Sailam district were ordered to be shut down. One could not see toddy bowls on trees. The family was at a loss about what to do; it had been their traditional livelihood. Life, in general, lost its flavour. So, people started brewing arrack in secret. But there was a persistent fear of the police. People wondered why some local educated groups were making these decisions. In the middle of the white man's rule, who suddenly gave these people the power? How else would things turn out if this lawyer from Sailam—a man who knew nothing about alcohol, who had never tasted meat in his life—was made the minister? Also, this order was only for Salem district. No other place had such a rule. It was supposed to be a favour this lawyer had done for his district. Could everybody afford to go to the district of Konamputtur next door just to drink? But some people did. Thankfully, the lawyer went away soon and the white man's rule was back again. Although the shops didn't open again, the rules were relaxed. Nonetheless, Kali hadn't drunk toddy in a long while. Delighted that Muthu had brought him to the right place, he put his arm around Muthu's shoulders and they walked towards the end of the grove, next to the stream, where the family of tree climbers lived. This was a small, thatched-roof hut. Little mud toddy pots had been kept upside down in front of it. There were also four or five mats for people to sit on. By the time they reached there, the day was casting a yellow light everywhere. Inside the grove, the light came filtered in thin rays. Two children were happily playing around. When Kali and Muthu sat down on the mats in front of the hut, they could hear sounds from inside, of dishes banging against each other. 'Who's there?' Muthu asked. 'Please sit, brother. I'll be there in a minute,' a voice replied from inside. She stepped out saying, 'What happened, brother? You have come so late.' And Kali recognized her immediately. 'Katthayi! What are you doing here?' he said in amazement. 'Do you know her already?' Muthu said to him. Kali just said, 'Hmm,' and turned to look at her. 'Where is Mandayan?' he asked. 'He went saying he wanted to have a word with the farm owner. Let me call him,' she said and walked a little distance into the grove. Then she called out to her husband, 'Pilla! Pilla!' That was how she called her husband. If he was nearby, she would use one of her children's names to address him. Since it sounded like he had responded, she returned to the hut. 'How long have you been here?' Kali asked her. Katthayi poured out her woes: 'It is in this dark place that we have been languishing for two years now. We used to live with other people; now we are all alone by ourselves. After that wretched whore made sure we got out of your land, we roamed around all over the place before landing here.' ## twenty-six Four or five years ago, Mandayan and Katthayi had come to Kali's land to climb palm trees, and they had stayed there for some days. They were newlyweds then. Katthayi's beauty was undisturbed. Mandayan had left his village because of a feud with his brothers. Deciding that they would make their living elsewhere, they had come to Kali's village. After all, a toddy tapper could find work to do wherever there were palm trees. All he needed was a strong rope and a sharp knife. Just like the gypsies, they could set up a hut with a few dried fronds on any rock they found. It was not very difficult. Mandayan was very good with palm. He had acquired a deep understanding of the palm tree from a very young age. There had been trees that people had given up on, which Mandayan revived and made them spring toddy again. He was also excellent with working with the coir sheaths. Palm toddy was just as sweet as coconut toddy. If you tasted the top layer of alkali, it tasted as sweet as cane juice. The jaggery that came out of this just melted in your mouth. Since he was a master of all this, there was no village where he could not make a living. They made a hut on a piece of rock on Kali's land. Half the produce was toddy, and the rest was the clear alkaline water. Katthayi's job was to boil and reduce the latter into jaggery. Most of the toddy was for consumption within Kali's property. But whatever was left of it, Mandayan sold to daily-wage labourers. A man by the name Pazhani was doing similar work in the adjacent plot of land. His wife was a troublemaker. She decided that her business was not going to flourish as long as Mandayan and Katthayi were around. After all, it was not as if a lot of men came to drink every day. And how hard it was sometimes to get the money from them! One had to practically untie their loincloths and take the money out. And who needed a competitor in the middle of all this? The day fresh toddy was brought down was when they could sell and make some money. Though some people drank on credit, there was quite a crowd on Tuesdays, the day of the market. The list of creditors was quite long, but if the owners persisted in asking the customer each time, it was possible they cleared their tabs. There was a caste dimension to this too. While it was easy to handle most customers, it was quite a challenge extracting money out of the farmers. But they expected you to pour toddy whenever they came. As far as palm jaggery was concerned, it had to be preserved well and sold when the prices were good. Sometimes it would take even a year to see any profit. Either way, it was toddy that sold easily. So there was always some competition. Pazhani's wife started making insinuations and hurling indirect abuses. She spread rumours linking Katthayi with each of her customers. 'Do you think she just sells toddy like I do? No! She bewitches the men. That's why these fellows go to her grinning from ear to ear.' 'She takes her customers into the hut. Who knows what she shows them there?' 'If she goes aside and removes her sari, milk oozes from her breasts. Mine are dry and shrivelled. Who will come for these?' How long could Katthayi bear these insults? Since she was a new, young bride, she was not armed with words to retaliate with. But Pazhani's wife had no problem unleashing vulgarisms. Katthayi felt that it was better to die than to have to survive putting up with all this. Her eyes reddened because of crying every day. Mandayan was not the confrontational type. Also, if someone came to fight with you, you could argue it out. But if they implied, insinuated and said things here and there, how could one respond to that? However, it didn't mean they could ignore her, thinking of her as the dog that barked at the sun. Mosalan frequented Mandayan's shop and stayed till late at night drinking. Pazhani's wife, the demoness, went to Mosalan's wife and said, 'Katthayi is being kept by your husband. Otherwise, why is he there in the grove till midnight?' Mosalan's wife came with a broomstick to assault Katthayi. Mandayan and Katthayi abandoned the trees just when they were ripe with new toddy, and left the village. Kali couldn't do anything. How could he respond to someone who did not engage in direct combat but attacked by slandering and bad-mouthing? Also, if Kali did intervene, the woman might say, 'Look at this! The impotent one has come to fight!' In fact, Kali heard what she said about him: 'This impotent man has brought her from somewhere. When his own wife is a dry land, what is he going to do with this new one?' He felt such rage that he wanted to drag that coarse and uncouth woman by her hair and give her a thrashing. But Ponna was firm. She said, 'Let's not get into this fight between the tree climbers. They think one thing when they climb up, and another when they climb down. Be careful.' After all that time, Mandayan was very excited to see Kali. He had two tiny little children. Kali could not take his eyes off them. He sighed. What was the use of being so well built and strong enough to knock four men down in one blow? Mandayan was fat and short. So what? He had fathered two children. Perhaps his body was as dexterous as his hands. The children looked as beautiful as sculptures. 'Is he related to you?' Mandayan asked Muthu, referring to Kali. 'Related? Hey, Mandaya! Ponna is my own sister!' Muthu laughed. 'Somehow, we never got to know that. Otherwise, we could have brought him here long ago and given him a taste of the coconut toddy.' As per Muthu's arrangement, they had steamed mochai peas and rice. Mandayan had coconut toddy as well as arrack soaked in coconut toddy to offer. Kali said, 'I will have the toddy first.' He was already regretting the fact that he had missed tasting the fish that would be available near the temple hill, now that the festival was coming to a close. The moon had started to ascend the skies. ## twenty-seven The marketplace was full of flame torches. In the brightness of those flames, the light from the little lamps that hung under the carts appeared muted. Her mother decided to open the packed food, knowing that it would take a long time to walk around the streets and then return. Ponna was not hungry; all she felt was a tightening of her stomach, but she ate whatever her mother put on her plate. Whenever her mother packed food for just one or two days, she added onions. It had a distinctly wonderful taste. But right now Ponna could not taste anything. Her father decided not to go into the market. 'I have seen it for so many years,' he said. 'Who wants to walk all the distance now? It tires my legs. You two go. I will guard the vehicle.' He kept repeating to them that they should be very careful when they went into the crowd. He asked them to be mindful of the chain and the taali pendant round their necks. He then told his wife not to keep money tied to the end of her sari, but to keep it in a pouch and tuck it into her garment close to her waist. 'All sorts of thieves will be roaming around today.' Then he added in a muffled voice, 'Cover your chest properly. These dogs have wandering hands.' He wouldn't sleep so easily. If he stood around with the others minding their cart and bullocks, he wouldn't know how time went by. Finally, he asked them to return to this spot if they lost each other in the crowd. Her mother lost her patience. 'Come, let's go. He'll keep telling us something or the other as though we are little children.' She dragged Ponna along and stepped into the market. It was an ocean of human faces. Little patches of darkness lay here and there, challenging the light from the flame torches. Human bodies were rubbing, banging and pushing against one another. To Ponna, they all looked like worms crawling on top of each other. 'Don't think this is the only crowded place!' her mother said to her. 'Today, the entire town is like this everywhere, on all four sides. Even children and old people from the nearby villages have come. Take a look.' But all that she said was mere meaningless noise to Ponna's ears. They walked past the market and arrived at a corner that was lit by five lanterns hung on large iron rods. These were permanent lanterns. But to manage the extra crowd, more light was needed. So, there were flame torches or more lanterns kept at regular intervals. There were also men in charge of these lamps, and they were running around making sure every place was lit. Right below the bunch of five lanterns were three flower shops. Ponna's mother bought some jasmine and kanakambaram flowers strung together and decorated Ponna's head with it. It was only rarely that Ponna wore flowers. When she went to some function, she wore just a pinch of a flower. In her opinion, her lacklustre hair—ravaged by the sun and the heat and all the wandering around in the fields—didn't deserve to be decorated with flowers. In the early days of their marriage, Kali really liked it when she wore flowers. He'd pluck wild jasmine from creepers growing over the bushes in the fields and bring them home. They were small but incredibly fragrant. If she wore even ten of those flowers on her head, people four houses away were drawn by the scent. The local belief was that that particular flower's scent attracted snakes. So she asked Kali not to go looking for the creepers. Some days, he brought cactus flowers. Those too were found on the edges of the fields. The plant was prickly, and the flower was mild ochre in colour. It did not have much of a fragrance, but if she brought it close to her nose, it smelled of sour toddy. It was really beautiful to look at, and a handful of the flowers made a lovely string. To avoid having to go looking for flowers, Kali brought some kanakambaram plants and a jasmine creeper and planted them along the little canal. In just a few days, they burst forth with blossom. Then it became a major task for Ponna to pluck them, string them together and to comb her hair just to wear the flowers. She was enthused at first, but the novelty soon wore off. Those who wanted flowers came to pluck them from the plants. They blossomed abundantly. She'd stand under the shrub and lament, 'The plant that we plant grows; the seed that we sow blooms; is it only me who is the wasted land here?' Shouldn't she have given Kali a child at least in thanks for his love for her? A lot of people were bathing in the pond. Even in summer, the pond was more than half full with water. All it needed was one rain, and water from all over town would flow into the pond. The place was well lit on all four sides. The workers were chasing away those who were jumping into the pond, and asking the spectators to keep moving. There were many men and far fewer women bathing in the pond. Whenever she looked at the pond, Ponna was reminded of the incidents involving Kali's grandfather, which his grandmother had told them about. ## twenty-eight On one such day several years ago, Sadayappan, Kali's grandfather, went to see the festivities. Though quite short in stature, he was a very shrewd man. It was the day the big chariot was brought out. The British officer who had come to ensure law and order arrived near the holy pond with his retinue of lower officers. He was an enthusiastic man and loved contests. Seeing the number of people gathered for the festival, he began to think of some kind of a contest or another. That year, the pond was so full that waves rolled on it. There had been two or three excellent bouts of summer rain. There was quite a crowd at the pond in the daytime. On one side, five or six boys were throwing stones into the water. The aim was to see who could throw the farthest. That gave the British officer an idea and he sent out an announcement with the parai drum the very next day. The news reached several villages. The news was that on that day, when the gods would return to the hills, a stone-throwing contest would be held on the banks of the temple pond. All contestants had to stand on one side of the pond and aim their stones towards the opposite bank. The stones should reach the other side of the tank without falling into the water. All those who managed to do that would receive one rupee as prize. And all those who lost would receive a whiplash right away right there next to the temple pond. Everyone would get three chances. It seemed that the idea was to design a contest which nobody could win. The contest was all everybody could talk about that year. One rupee was a big amount. Some people who were determined to win the prize landed up at the temple pond the day before the actual contest and started practising their throws. The British officer had to issue an order prohibiting it. The next day, a great crowd gathered around the pond. They had all come to watch the contest. The contestants themselves were hesitant. For, if they lost, they'd have to endure a whiplash, though the officer had ordered that the whiplash should not be so severe that it peeled away the skin on their backs but should merely create a sound effect. Gradually, the contestants started stepping out of the crowd. They had to stand on the east bank and aim their stones on the west bank. The stones were big and round like ostrich eggs, the kind of stones one used for the game of fifth stone. Many started receiving whiplashes. Only one or two stones managed to cross even half the length. This provided the entire day's entertainment for the people. The moment someone received a slightly severe whiplash, his friends and relatives were outraged: 'Wretched white dog! Isn't there a limit to the game? He wants to throw stones from this side to the other. May stones fall upon his house! May people throw stones at him!' But they continued to stand and watch the rest of the contest. The British officer did not budge from his spot. Even when he dismounted the horse, he stood right there. Since he could not bear the heat, he constantly drank something or the other. When the heat got too much for him, men came running, stood by his sides and fanned him. It was an imported fan made of palm fronds and had beautiful pictures drawn on it. The contest had started in the morning, and even by the afternoon, no one had won. The officer could not stop grinning. When he realized no one was going to win, he increased the prize money to ten rupees. He wanted to make more people participate and watch them receive whiplashes. The moment they heard of the new prize money, a new line of contestants got ready. These men, with their dhotis tied tight around their loins and their turban cloth tied around their waist in deference, and running to throw stones, must have looked like bizarre creatures from another world. Every time someone lost and was given a whiplash, the officer smiled. If someone's stone managed to cross more than half the distance across the pond, he raised his eyebrows in wonder. Kali's grandfather, Sadayappan, arrived there only in the late afternoon. Seeing the crowd around the pond, he inquired what was going on and watched the contest for a little while. After walking around the pond twice, he decided to participate. He was used to taking aim and throwing stones. He had practised it while herding goats in the forest. He could aim a stone sharply at a goat's hind leg. Most of the time, his stones could cross a square measure, which was over half an acre. Whenever he aimed a stone into the lake, at least one dead fish rose to the surface. All those who had come with him from the village now whistled and cheered him on. He removed his dhoti and towel and stood in his loincloth, which was strung on a thread made of aloe fibre. It was wide in the front, and at the back, it hung like a long tail. His appearance was a source of mirth for the officer. Sadayappan felt like telling him, 'I feel like laughing looking at you, officer, wearing so many clothes in this heat.' But if he even smiled, the officer would detect the sarcasm in it, and that would blow up into a big problem. So, he controlled himself. He stood on the farther edge of the east bank of the pond and came running at great speed towards the water. He looked like a bandicoot rolling down. Everyone looked silently at the pond. His stone flew more than halfway across and fell into the water with a plop. No one else had managed to reach his stone that far in his very first throw. The crowd clapped and cheered. The officer couldn't laugh now. With his mouth open in wonder, he kept staring at Sadayappan, who now came running again from the outer edge of the bank to cast his stone. Everyone was keen to find out how far this one would go. It crossed three-fourths of the distance before falling into the water with a splash. The crowd went berserk. The officer was wonderstruck. The third time too Sadayappan came running at great speed. The crowd was absolutely convinced that this time the stone would reach the other side of the pond. And—it did. No one could see where the stone fell. One of the men who had been appointed to keep a watch on the game lifted a stone from the ground and shouted out to the crowd. Sadayappan was then lifted by the crowd in celebration. Many of the spectators were keen on finding out who he was and from which village. Suddenly, Aattur Sadayappan's name was on everyone's lips. Until then, no one had known him. He had stayed confined to his field. But within a few minutes, he had become famous. The British officer was nonplussed at the development, but without showing it on the outside, he joined in the celebration. He got off the horse and shook Sadayappan's hands and patted him on the back, while Sadayappan stood hunched in deference. In front of the entire crowd, he was awarded the prize money of ten rupees. Kali's grandmother pointed out to the land where the barnyard now stood and told them that it was with those ten rupees that the land was bought. There was no British officer next to the temple pond this time. That happened forty or fifty years ago, and many other officers came after him. Whenever anyone asked Sadayappan how he managed to do what no one else could, he said, 'I just prayed to god and flung the stone. It must have been them who made sure the stone fell where no one could see it.' When Ponna wondered how he managed to do that, Kali's grandmother lowered her voice and said, 'I haven't told this to anyone. He is dead and gone, too. That British officer too is not around now, but it is the British who are still ruling. If they hear of it, they will lock us up in jail.' There was fear in her voice. 'I won't tell anyone, Grandma. Share it with me,' said Ponna. Grandmother narrowed her eyes and said, 'If they come to know, they might rampage through our land, dear. Don't tell anyone.' She made Ponna promise before she shared the secret. When Sadayappan walked around the pond, he made note of the fact that they did not allow anyone to hang out on the other side of the pond. There was just one man allowed there, who was supposed to observe where the stones fell. Sadayappan was certain that his throw would reach the stone at least three-quarters of the way. He decided that he would try a trick to get the stone to the other side. Well, if they found out, he would just get some extra whiplashes. Won't his robust body bear that much of an onslaught? he reasoned. He could have thrown the very first stone three-fourths of the distance, but he controlled himself and let it travel only half the way. This way, he could build up the next throw to three-quarters and gain people's confidence that he would eventually win. In fact, his third throw rested entirely on the strength of this confidence. When he receded to the outer end of the east bank to start running for lead, he pretended to have dropped the stone. While bending down to look for it, he picked it up with his left hand, while his clenched fist just gave the impression of holding the stone. He then gently dropped the stone that was in his left hand and ran with his clenched right hand that appeared to be holding a stone. No one suspected anything. Everyone's attention was focused on seeing where the stone would fall in the pond. And since it did not fall anywhere inside the pond, they all concluded that it must have fallen on the other bank. The man on guard on the other side was scared that he would be chastised for slackening in his job, so he picked up a random stone and proclaimed, 'Here! This is where it fell.' This was the secret of Sadayappan's victory. Ponna was shocked on hearing this. Was it right to make one's living through something that was earned by cheating? She even suspected that was the reason for their being childless. He might have been a British officer. He might have been a cruel man who dealt people whiplashes. Wouldn't the gods make sure he was punished adequately for that? Was it all right to cheat him and take ten rupees from him? Was it good for the family? Weren't there thousands of people around the pond that day? Didn't this mean the money was received by cheating everybody? It might have been a big achievement for him, but . . . It wouldn't have mattered if he'd spent the money on some temple expenses. It would even have been all right if he'd wasted it away in food and drinks. Instead, he bought land and made sure the consequences of his action went down generations. That's why god had ensured there was no further heir. Ponna brooded over this for a few days. Since she didn't want to upset Grandmother at her age, she didn't say anything. But when she shared her concern with Kali, he laughed. 'Do you think no one would have known if he had no stone in his hand and just made a gesture of throwing it? Do you think that British officer was an idiot? The stone that my grandfather threw would definitely have reached the other side. Do you think he was an ordinary man? He might have been short, but he was very strong. Don't worry about this,' he said. She insisted that they should sell the land and spend the money on rituals. She said whatever land would be left after that would suffice. He was not at all in agreement with her about selling the land. Which farmer would so easily agree to let go of his land? 'If you think this is definitely the reason, we could go ahead and do it just for the sake of a child. But I don't believe it is so. I say this for you,' he said. Soon after, Ponna took her mother-in-law along, took a bath in the temple pond and went to the base of the hill and made an offering. When Kali's grandmother was on her deathbed, she asked her: 'Are we suffering the consequences of that, Paatti?' With tears in her eyes, Kali's grandmother said, 'We prayed to god, consulted him with flowers and bought this land with his blessing, dear one. So, nothing will happen because of that.' Only after that did Ponna feel a bit consoled. She was determined to complete her offering as soon as a child was born. Now, they moved beyond the pond and towards the bungalows. There were small stalls lining the road. People could buy rice puffs and mochai seeds and eat as they walked along. The smell of jaggery attracted them. 'Shall we buy something?' said her mother, but Ponna was not interested in anything. They walked past the crowds from one street to the next. There was a big market under way there. It had plenty of bangle shops. Her mother compelled Ponna and made her wear some new bangles. She also bought some hairpins. Ponna stood there as if she was somehow disconnected from all of it. When they turned to the east, they saw brilliant lights. In the light of the moon above, the big chariot appeared magnificent. It looked like its sharp roof could pierce the skies. Though the chariot had reached its spot after making its rounds, its giant ropes still lay on the street. People were touching the rope in prayer. That entire street was full of steel merchandise: cast-iron work, spades, dosai pans, sickles and other such stuff. There were crowds in front of every shop. She could hear voices bargaining. When she got up after bending down to touch the large iron chain that lay in the middle of the road like a large serpent, she couldn't find her mother. ## twenty-nine As soon as he gulped down a small pitcher of coconut toddy, his tummy cooled down. It had a sweet–sour taste. Kali then stuffed his mouth with a handful of mochai seeds. Muthu and Mandayan sat opposite him. Katthayi lay inside the hut. Both the children were asleep, but Katthayi was still awake and listening to the voices outside in case they might call her suddenly. Though she had kept everything ready for them, they might suddenly ask her to help with something. The string-bean dish she had made with sesame and chilli powder was still inside. She had roasted some eggplant and made a gravy dish. Everything was untouched. She was worried about how much of it would be left over. It always happened this way. They would initially plan to eat a lot after drinking. But they fell down flat after eating just a little bit. From a very young age, she had seen this happening to many men. Her mother was much smarter than her. She always made only half of what the men asked her to cook. Katthayi still hadn't found the courage to do that. What if it was not enough? What would she do? Mandayan would give her a thrashing with the coconut stem. He might look like a little fat insect, but his hands were like whips. Well, there will be enough food for tomorrow. Let the children eat rice for a change. They only got to eat kambu millets and porridge otherwise. If she kept the rice pot on top of the water pot and closed it properly, it wouldn't get spoilt. Even if she killed a chicken and made some gravy the next day, this rice would be enough. She'd almost asked Kali if he had children, when she stopped herself. What if it made him sad? After coming to this grove, she hadn't cooked this kind of food for anyone else. Muthu was like a brother to her; he was a good man. He came once in a while and always spoke to her kindly. She had agreed to make all this food because it was for him. It was just as well, because she didn't know Kali too would come. She could hear their conversation very clearly. She hoped to hear something about a child. The moment she heard Mandayan's voice, she stepped out with the string-bean dish she had made. There were enough mochai seeds in the bowl. Kali ate a mouthful of the string beans and said, 'Tastes like intestine curry.' It made Katthayi very happy. 'Is Ponna akka well?' she asked hesitantly. 'Hmm. Why wouldn't she be? She's well,' he said. She didn't know what else to say. But feeling that she had to say something, she said, 'Shall I bring the rice and gravy?' Ponna used to talk sweetly to Katthayi. Since she was a new wife when she went to their village, Katthayi was quite clueless and couldn't have lasted there even for a year but for Ponna's support. She prayed quietly that only good things should have befallen Ponna akka. It looked like Muthu too was drinking slowly that day. The moon cast its light well on the spot where they were sitting. Mandayan refilled the pitchers with toddy from the barrel. It had been years since Kali had drunk coconut toddy. Once, Muthu had fetched a dried-gourd container filled with the toddy. Kali and Ponna were visiting then. Muthu took Kali into the fields. It was the season before the harvest, so the kambu crops were as tall as human beings. Since it had rained very well, it was wet and cold among the plants. Muthu walked into the fields softly without leaving footprints. It was very difficult for Kali to do the same. In the middle of the millet field, there was a rock large enough to build a cattle enclosure on. Muthu had built a tiny hut on top of it. It looked like a hen coop. It was not very high; one had to crawl to get into it and sit down. No one looking at the field from outside would even know there was a hut in the middle of it. He had used tender palm leaves to weave the hut without any holes on its surface. So, he could lie there on rainy days too. Now he made a fire outside the hut using some dry twigs that didn't give out much smoke. Then he fried some eggs. That was the last time Kali had had any coconut toddy. 'Muthanna, I didn't know our landlord was your brother-in-law,' said Mandayan. 'Had I known, I'd have invited him long ago. It is always a delight to see him drink toddy. It makes me want to keep pouring him more. Most men would drink it all in a gulp and keep spitting here and there.' Muthu laughed, 'Mandaya! You are referring to me, aren't you?' 'Oh, not you, brother! You don't keep spitting,' said Mandayan and kept a bottle of arrack before him. 'It was brewed yesterday. Do try it.' 'Mandaya, do you brew this often?' 'No, samee, if I set aside what is left of the toddy, I can brew some arrack every fifteen days or so. The owner of this grove prefers only arrack. Also, when the Muslim merchant—the one who owns this place—comes, he always carries a bottle with him. We are lacking in nothing here, brother. After having come here, we are finally making some money. We have been able to stay put in one place without wandering around with all our stuff.' 'It looks like your wife doesn't like the place that much.' 'Oh, don't bother about her. What better place can a tree climber expect to be in? Her worry is that if we fall sick, we don't have any relatives to ask after us. Well, even if they are nearby, do relatives always care for us? It is the problem of children that worries me most. We roam around here and there. But we can't just drink toddy and hang around as we wish. We have two children who look like little sheep. Now she has conceived again. The first two are still so small, and now another is on the way. We don't know how we're going to manage.' 'Why don't you get it aborted?' 'She is scared of it. In our village, a girl died after they inserted a plant stem to abort her foetus. Since then, we're scared to think of that option. If she dies, how will I raise these two? And even if we have four more, won't they somehow grow up if I just feed them some toddy?' Kali's head reeled as soon as he drank the arrack from the pitcher. Arrack made from coconut toddy had a distinct taste. 'All right, don't worry. Just give me the child that is going to be born. I will raise it,' Kali said to Mandayan. Muthu was relieved to see Kali gulp down more of the toddy. He knew they would have to spend the night there. Even if they left at dawn, the people who'd gone to the festival would have returned before they reached. 'Samee, don't you have a child yet?' 'Don't get me started on that. There is nowhere we have not prayed, no god we have not made offerings to. Nothing has happened, Mandaya. That's why I'm asking you for your child.' 'That's it, then. I will give you the child that is going to be born. You raise it.' Katthayi rushed out of the hut in anger and said to her husband, 'Will you eat shit when you are drunk? You have promised him now. What will you do if he comes for real later and asks for the child? How can we just give away a child we have given birth to? Even if we do, how can our child grow up in his household? Think before you speak! If they heard us, his relatives will come here to beat us to pulp. Let him find a child from among his relatives.' 'So, you won't give it to me?' said Kali. 'Give it! I will take care of the child. I will also see which fucker objects . . .' And Kali slid down on the mat. Remembering that he hadn't eaten anything, Muthu asked Katthayi to bring some food. Then he mashed it well and fed Kali. But Kali just said, 'I want a child . . . a child . . .' and fell back again on the mat. While Muthu and Mandayan were eating, Kali's drunken rant continued. Let him empty out his mind, thought Muthu. Just a question about a child had upset him so much. Muthu felt very sorry for him. ## thirty Ponna found herself standing alone in the middle of a large crowd. She couldn't find her mother anywhere. Though there were faces milling around everywhere, none of them were familiar to her. Where did her mother go? Her supportive hand had been on Ponna's shoulders all this while. She must have mingled with the crowd when Ponna's eyes were glued to the top of the large chariot. She might have wandered off when Ponna was busy looking at the shops with ironware suited for any kind of work. In that one unknown moment, when her eyes were lost in the spectacle of things, everything known to her must have taken leave of her. For a little while, she stood frozen in fear, but the crowd eventually pushed her in one direction or another. She drifted along like a piece of wood in a flood. The large lanterns hanging in the streets were heaving like snakes. The men who were rekindling fading lanterns stood out in the crowd. Policemen too were wandering the streets armed with lathis. She observed the dark shadows and dots of light casting themselves on the crowd, making everyone look like objects of smoke. She recognized none of the faces. It amazed her that there were so many people in this town. How many must there be in this entire world! The earth seemed to hold innumerable people, but none of them were known to her. She looked around for anyone she knew from the village. No one. Any relatives? Anyone she had worked with in the fields? From within her mind, she brought out several faces that she had known since childhood and checked to see if any of the faces in the crowd now matched any of those from her mind's inventory. None. Even if any face matched, it might not mean anything. Once people enter such a large crowd, everyone becomes a new, unknown face. Mine has become a new face too. Has my mother made me new by making me wear flowers and glass bangles? Do they change everything? It was the job of mothers everywhere to make things new, and to do this, they made themselves anew too. Here, my face, my body, my appearance—everything has become new. Isn't this what I need to become a mother? I need to fear only if I am among known faces and in known places. I'd have to be scared about what might happen, what people might say. Have I ever been able to do anything just the way I have desired to? There has always been the fear that someone familiar might chance upon me. Everyone is here. And also no one. She was overcome with a huge sense of relief. Once her fear abated, she saw everything with fresh eyes. Everything was new to her. When she realized how attracted she was by the glamour of newness, she saw that she was standing next to the wheel of the chariot. She felt that, just like the wheel of the chariot, she had abandoned what she was accustomed to and was standing firmly in what was new. She had a sudden desire to run and jump amidst the crowd. She wanted to explode into laughter. There was nothing to stop her here. She could do anything she wanted to. She yearned to see the entire town in one long run. But she should control herself. She thought she could absorb nothing if she lost her balance. There were four paths ahead of her. To the west of the chariot was the eighty-pillared hall. Once she went past the eighty-pillared hall, she could see the temple at the foothills, looking as if it was standing with its arms outstretched. Around this were the temple streets. These then branched into different streets and led to the various roads. Good lord! How many paths she could take! On the streets branching off the ones bordering the temple, there were several halls where dance and music performances were taking place. From where she stood, she could hear them faintly. The east street had two exits, one each on its north and south ends. And midway between these, there was a performance going on. To the east of the chariot was another street that ran straight to the base of the hill and then around it. She could not decide which path to take. But she was delighted at the sheer number of options she had! Without jumping to a decision immediately, she savoured that happiness of simply having options. Then, involuntarily, she walked southward. Did her feet choose this direction because it was the most crowded there? Was it the crowd that was guiding her? When she walked past the smaller chariots that had been stationed in a row, she saw that a dance event was in progress at the junction of four streets. In a space surrounded by flame torches, more than ten young men were dancing with sticks in their hands. From the centre of the wide space cleared in the middle of the crowd, which was now standing in a circle, she heard the sound of sticks clashing against one another—a perfectly coordinated, disciplined sound. Some of the people in the first row of the circle were seated. All the young men dancing had tied their topknots in the same style. When they leapt up in the air, their dhotis, which they had fastened by bringing the cloth from between their legs and tucking it in at the back, appeared to loosen. Ponna wondered what sort of knot was holding the dhotis in place. There weren't many women in the crowd. She could see only some old women and little girls sitting about. Among those standing around the dancers, all she found were a few women dotting the crowd like stones in a plate of rice. They were standing right behind those who were seated, the best place to see the dance from. Ponna felt that she could watch forever the way the topknots of the dancing men bounced up and fell back on their napes; each of the men had tightly combed back his hair, fastening it into a knot at the nape. She liked the way they worked their sticks, sometimes separated as two teams, and at other times as one, but always leaving enough space for the sticks to clash, always doing it without the least discordance. It felt like the clank of the sticks was hitting open the knots in her mind. This dance was not just about sticks clashing. It was not just mere combat. It was the play of magic wands which cracked open facades to bring out hidden secrets. She shut her eyes. When she opened them, she saw bodies glistening with sweat and lit by the flame torches. All the bodies looked alike—like black rocks that had been set upright and carved into bodies. The tightening and relaxing of the muscles on these bodies made her mind swing back and forth. The earrings that the men wore glowed in the light. The sound of their ankle bells matched perfectly the sound of the sticks. They all looked like gods. They paused in between movements. She wondered if she should just remain there. But there would be much more to see in all the other streets. While she was thinking about this, she felt a touch on her right arm. She was not able to turn around immediately. She felt a lack of desire in that touch. Kali's embrace was like this sometimes; his mind would be far from her, hovering somewhere else. It was merely the body working. It panicked her that thoughts of Kali should choose this moment to arrive. What brought up these old things? But then, was it easy to shake off the things that lay layered on top of each other in her mind? It was no problem casting aside superficial concerns. But there were those that had seeped deep into the mind, and lay there rotting. Was it an easy task to hack at them and throw them out? To avoid thinking about Kali, she turned to look at the face of whoever had grabbed her arm. He was ready with a smile, a smile that he had prepared to meet her with, whenever she turned around. He was young, but the smile was not the kind that showed an interest for the experience. Instead, it betrayed an arrogance that was simply interested in increasing the number of his exploits. He was no god. Her mother had said every man was a god that night. Perhaps. But Ponna was clear he was not the god meant for her. She jerked his hand off and moved away. She did not turn to look at him again. Though she was overcome with an urge to leave the place right away, she decided to stay put for a while. Now the sounds of the sticks refused to register in her mind. The sounds of the ankle bells and those of the sticks came separately to her. And the figures seemed to move in a way completely disconnected with the sounds. She pulled each figure away from the crowd. She embraced and kissed each one of them. When she felt that that was all she had to offer to those gods, she left the place and mingled with the crowd in the south street. She didn't know what it led to. Anyway, it was better if she found out once she reached there. She had done enough of walking towards the known and the familiar. At least on this one night, she wanted to make full use of the opportunity to walk towards the new and the unknown. On the lane that branched off from the south street and went towards the temple at the base of the hill, the crowd was standing in a circle. She rose to her toes to take a look at what was going on. It was a Karagattam performance, the dance where people balanced decorated metal pots on their heads. There were four dancers—two men and two women. But were they really women or were they men dressed as women? She couldn't tell, despite looking at them closely. They were at the end of a movement where they danced bouncing up and down in keeping with the sound of the naayanam. She was tired of seeing it every year at the Mariamman temple festival. So her feet took her away from the spot. Looking at the moving crowd, she wondered if, like her, everyone else too was wandering alone. There were all kinds of people there: those walking alone, two people walking together, and people walking in fives and sixes making a lot of noise. They were all mostly men. There were so few women in the crowds that Ponna could count them on the fingers of her hand. Perhaps they were all huddled close to the shops. The women were interested in buying something or the other. The shops would remain there right until the month of Aadi. She could come sometime later with Kali. But then how much stuff did two people need? The stuff she had brought as dowry still lay in the loft, covered in cloth. If they had a toddler, they could buy little wooden toys, dolls carved of wood, this and that. But now all they needed was some farm instrument made of iron. A group walking behind her was full of laughter and revelry. She turned around just a little. They were teenagers. She felt that they might pounce on her even if she paused at the spot for a little while. How would she recognize her god in this group? As they neared her, she could smell the arrack on their breath. 'Oh, this will endure everything, da. A young tree. Shall we climb it?' 'Sure. You take the top, I will take the bottom.' The language of groups was distasteful too. To protect herself from the disgust that their words induced in her, she walked away fast. The Poovayi temple was at the junction of the south and west streets. A play was being performed in the wide grounds behind the temple. She could hear a song floating in from there, sounding like a voice from deep within a well. > Oh Ganapathi, the one born before Kandan, lead my way I hold your feet, protect me She suspected that the group was still following her. She ran towards the grounds. Every year now, she had come to the Poovayi temple to offer pongal. It was also traditional at this temple to walk on a bed of fire in gratitude for prayers answered. She had vowed to do that if her prayers were answered and she conceived a child. The temple was just a thatched hut, and people were entering the grounds by walking in from either side. It was only after she followed the crowd and entered the grounds that she felt a little better. What if the men had managed to trap her? She reasoned that something like that could not happen in festival times with so many people around. She took her mind away from those thoughts and focused on the play. ## thirty-one The play had just begun, and there wasn't much of a crowd yet. They would start coming in now. But considering there was so much going on in all the streets, this was an impressive crowd, the kind of crowd that sits down and watches something. The clown was singing the welcome song: > Welcome! Welcome! Welcome! > Come, sit down, sit down, sit down! He came around on all sides and exhorted everyone to 'Sit down, sit down.' But it looked like many people had planned to watch for a while and then move on. So, very few people obliged the clown. Then he dragged on, 'Appanmaare! Annanmaare! Fathers! Brothers!' But the harmonium player stopped playing, looked at the clown and said, 'You babbling idiot! Can't you speak sensibly? Since when do appan and annan have breasts?' He was clearly punning on the word 'maar' that the clown had used simply as a plural suffix, but which also referred to breasts. Everyone laughed. But the clown was up to the repartee. He said, 'Ah, the times have come to this! You are good at playing the box, but you can't speak a word properly. And you call me a babbler? You are a babbler, you father's a babbler, your mother and wife are babblers. Also, don't you frequent a woman in the devadasi quarters? She's a babbler, too!' The crowd laughed at his layered attack. The harmonium player beat a retreat, saying, 'Good lord! You are the god of words. You definitely speak meaningfully.' 'All right, I will sing sensibly as you asked me. Listen,' said the clown. > Older sisters, younger sisters, > Mothers and grandmothers, > Redden your tongue > With betel leaves and nuts > And come, sit down, sit down! But he continued to use 'maar' as the plural form, enunciating it extra clearly, and emphasized the double entendre by heaving his chest up and down as he finished the song. Ponna walked past the people sitting on the mats that were normally used as partitions. She wanted to sit right in the front. As she waded through the crowd, light from the flame torches suddenly illuminated her. She tightened her sari around her torso and continued walking, when the clown pointed at her and said: 'Aha! Look who has come! Kumari Rukmini amma herself, who played the role of Valli, Lord Murugan's consort from the movie _Sri Valli_ has come from Chennapattanam to watch our play! What style! What beauty! How glamorously has she tied her sari! What gait! What a dancer! O peacock, won't you be my messenger . . . Everyone! Please put your hands together and give her a place to sit.' Everyone looked at Ponna, clapped and laughed. Then the clown started singing a famous song from the movie _Sri Valli_ : 'In the forest that never dries up . . .' Everyone's attention was fully on Ponna. When she realized it was her that the clown had referred to as the actress Kumari Rukmini, she was overcome with shyness. She dropped her chin and quickly sat down where she could find a spot. Kali had taken her to watch some movies. The movie _Sri Valli_ had run at Kannan Talkies for several days. All the village folk arranged bullock carts and went in large groups to watch it. 'Oh, it is the story of our Pazhani Murugan,' was what everyone kept saying. Her mother-in-law, however, was not pleased with the idea. She went on and on: 'I have never seen a farmer who went to strange parts of town in the middle of the night to watch a play. And what I cannot believe is that this girl too wants to go along! As if that wasn't enough, now they are showing a film, it seems, and these two are going for that!' Kali said, 'Amma, shut up. This is a movie about our god Pazhani Murugan. Everyone's going. You come too, if you want.' 'Of course!' she snapped sarcastically. 'Am I at an age to go and see people dropping their clothes and prancing around? You two get lost.' Kali and Ponna went to watch the movie. They walked along with a crowd that looked as big as the one that went every year on Panguni Utthiram carrying kavadis to Pazhani. Ponna did not understand the film much, so Kali kept explaining it to her now and then. He was used to coming with his friends to watch films at night. But Ponna had only seen three or four films, so she had difficulty understanding certain things. She could not make sense of the lyrics. She felt sleepy after a while. But, despite all these constraints, they managed to watch _Sri Valli_. She thought that the actress Rukmini who played Valli was extremely beautiful. Her unblemished face had stayed in Ponna's mind. She even touched her cheek, wondering if she would ever be as beautiful as Rukmini. Perhaps if she wore a blouse and jewellery like she did. As she wondered how she'd look with a blouse on, she pulled her sari to cover her chest properly. She felt bad that the clown had made her the butt of ridicule. But then she took comfort in the fact that no one was looking at her any more. It was only after she sat down that she realized she had walked and run a long distance. Her legs begged for some rest. In the part of the village where the farmhands lived, there was always a play when there was a temple festival. In the month of Thai, there was another ceremony, and they had performed plays then too. But it happened in the cremation ground, so the others did not go for that. For the one that happened during the temple festival, the farm labourers kept a separate spot for the farm owners to watch the play from. Ponna had seen many such performances. The clown could make even the most morose of people laugh. Hoping that she would find some solace if she let her mind enter the play, she started paying attention. A man, who was not in costume, came to announce what the play was about in a pompous speech: 'The fact of the matter is, the eighteenth day of the festival is going on with aplomb in Karattur, which is such a heaven on earth and is so fertile with gold, dairy and paddy that the crores of celestial beings and even the three gods—Brahma, Vishnu and Shiva—along with their consorts are considering staying on here! The god and goddess of the hill—who are variously called Mangaipangan, the half-female god, Maadhorubaagan, the one who is one part woman, and Ammaiyappan, the mother–father god—came down from the hill, went around the four main streets in procession, blessed various villages with their presence, and today they are about to go back to the hill . . .' The clown had to rupture all this bombast! He said, 'This man says the god and goddess roamed around the villages. But are they jobless like you? Wherever they roam about, they have to come back here eventually. That's why we have this eighteenth day of the festival. All right, what was it you said about Ammaithazhumbu, the chickenpox scar?' The announcer was ready to handle this pun on words. 'Not Ammaithazhumbu, pa. I said Ammaiyappan, the mother–father form.' The clown, who was on a roll by now, replied, 'Oh, you mean your mother and your father? Okay. Didn't you say something else? Something about Madhiyaanasoru, the afternoon meal? You were mentioning that you and I didn't eat lunch, weren't you? The announcer was exasperated: 'Ayyo! Not that, pa.' The clown now pretended to take offence to his being addressed as 'pa', which was both a respectful, endearing way to address someone as well as a short form for 'appa'. 'Stop! Why do you keep addressing me as "pa"? How did I become you father? I don't even know who your mother is. Are you trying to grab a share of my wealth?' Announcer: 'Well, what wealth do you have, pa?' Clown: 'See! You are calling me "pa" again!' The announcer had had it. He switched to the much less respectful 'da', and said, 'All right, you useless motherfucker. Tell me how much wealth you got.' 'Good, now that's a more respectable way to address me. I have five acres next to the river and seven acres next to the lake. But I'm not going to give them to anyone. Even when I die, they will remain in my name. Now you come back to the matter at hand. What were you saying about Madhiyaanasoru, our lunch?' said the clown. 'No one wants your land. Keep it, da. I was not talking about Madhiyaanasoru but about Maadhorubaagan, the one who is one part female. The god who stands on the Karattur hill and has the goddess for his left half. That is why he is called Maadhorubaagan. Do you understand, da?' The clown switched to mock anger now, and said, 'Hey! What is this? You are using the "da" too often now!' Then he lamented his bad fate: 'Why should I have to struggle with this disrespectful man! All right. So, Madhiyaanasoru means to be half male and half female? So they stay right next to each other? But what's the use if they can't touch each other?' The announcer was now disgusted at these sacrilegious remarks. 'Chee!' he said. 'Don't say such dirty things on this auspicious day. You will land up in hell for the next seven births.' 'Oh! So you think you will go to the glorious heaven?' retorted the clown. 'When you die, no one will even volunteer to decorate your hearse. People come only when you have amassed some wealth. You have nothing.' Then he turned to the audience, and continued, 'In the morning, you will see him buying some puttu on credit from the poor woman.' Back to addressing the announcer, the clown said, 'What uncouth thing did I say? I said the male and female sides cannot touch each other despite being so close. What's wrong with that? You and I came about because they touched, isn't it? You call this dirty?' Either out of sheer exasperation or because the play had to begin at some point, the announcer broke into an invocation song seeking the blessings of Ganapathi before beginning the play based on the well-known story of Siruthondan, a devotee of Lord Shiva. 'The play that we are going to present today is the story of the King of Kanchi—the most fertile and prosperous of kingdoms. He did great service to the devotees of our Lord by offering them food every day. One day, the Lord tested him by asking the King to give him his own son, the prince. And the King did. The Lord then brought the King's dear son back to life. If those without children are watching this play, they will be blessed with a child . . .' Here the clown cut in and took over, 'Those without husbands will be blessed with husbands and those who do not have wives will be blessed with wives. Isn't that so?' The crowd doubled up in laughter. No one had left the audience. In fact, some more people had joined in. Ponna felt that the clown was the strength of this troupe. He was definitely going to hold the audience's attention till the end. But she did not like the fact that they were playing Siruthondar's story. She had seen it once in the other festival, in the farmhand quarters. Since someone had prayed for a child and got one, they had arranged for the play to be performed. And several people from that part of town came one after the other to invite Ponna. When the moment came in the play wherein the prince Seeralan is killed for food, there was not a dry eye in the audience. Ponna remembered how heart-rending it was when the musicians sang about how the king sharpened his knife before killing his own son for the offering. She remembered the song describing how he sharpened his knife on sandalwood and then on a vermilion slab. When they sang, 'As the mother held the son's hands and feet, the father slit his throat,' she heard many women sobbing away in the audience. When the ordeal was over and Seeralan was brought back to life, the custom was to wave two lemons around him in a circle. No matter how many people came with lemons, their lemons were circled around the person who played Seeralan and given back. Women who received a lemon in their laps were blessed with children. Ponna too received a lemon in her lap. She did that every time the Punnadayan story was sung in the village. But nothing happened. Well, it is only from those whom he has blessed with a child that the Lord can demand such an offering. What would you ask, oh Lord, from those who don't have children? She wanted to leave from there. ## thirty-two At that moment, someone came and sat rubbing against her. In her head, she tried to classify the nature of that graze. But she couldn't. Was this her god? She glanced slowly at the man who was rubbing and pressing down on her right shoulder. She saw an eager face with a thin moustache. His eyes looked directly into hers. She felt she had seen those eyes somewhere, but she could not remember where and when. She closed her eyes and searched her mind. By then he had sat down comfortably, huddling against her, and was trying to rest his face on her shoulder. She could not decide whether to allow it or not, but she knew she had to make up her mind before it proceeded any further. She shifted her body gently and suggested her disapproval. But she did it in a way that did not mean rejection either. It made her wonder when she had become so clever. Perhaps she had always been so. Perhaps it was finding expression only now. Kali was adept at reading the nuances of her movements. Even if he sensed a slight rejection, he would move away immediately. At those times, it would become very hard for her to get him interested again. She jerked her head to get Kali off her mind, and his image receded and vanished. She turned and looked. The eyes and the face she saw nudged a memory—it was as though a bolt of lightning flashed across her face, and for a moment she thought she recognized him. But it was not him; only a likeness. Ponna came of age when she was fourteen. And the face that had been in her mind then was Sakthi's. He had been a goatherd in their farm for many years, and she had grown up playing with him. Later, when she was a young woman, his had been the face of her dreams and her imagination. When it was decided that Kali would marry her, she had struggled a lot to replace Sakthi in her mind with Kali. Whatever she started imagining with Kali in her mind would end up with Sakthi's face being part of the fantasy. For some time, she even vacillated between the two faces. But after the wedding, Sakthi's face slowly faded away and over time she even forgot him completely. But here it was again, and so close to her. Suddenly, she decided she did not want him. She moved away a little and avoided the intimacy. But his heavy sigh wafted in the air and bothered her. When she turned around, his eyes were pleading with her, and his arms were stretched out towards her. She felt like laughing, but she showed him an angry face, shook her head in refusal, and turned her back to him. How easily he asked for what he wanted even in the middle of such a crowd! It amazed her that she could conduct an entire conversation with him without anyone noticing. It was only then that she grew conscious of her surroundings. She looked around and dropped her head shyly. On stage, Siruthondar had entered in a dance movement and was introducing himself. It looked like the dance performance might actually be good. She looked towards the man through the corner of her eye. He wasn't there. She thought she would leave too. But that might give him the idea that she had come out looking for him. It might be good to leave after a while. The things this god did! He dug out a forgotten face from the depths of her heart and placed it in front of her. Was it her punishment to remember that face forever? 'Please appear with a new face, one I am not familiar with,' she prayed. Had she earned his wrath after having rejected two of the gods? Is this a crowd of gods too? Is he watching me? It looked like there was a way leading out in every direction; there were gods wandering everywhere. 'Come to me with a form I like,' she kept praying. She went past the Poovayi temple and reached the west street. There was a wide space at the intersection with the north street. Hearing some loud whistling from there, she walked in that direction. She was thirsty. Was it her mind's thirst that was peeping out through her tongue? On the west street, there were four or five unmanned water pandals. Anyone could help themselves to the water. She drank some and splashed some cold water on her face. She felt refreshed. She glanced at the temple. In the moonlight, its tower looked taller. When she reached the crowded street corner, all the while praying in her mind, she saw a team of Oyilattam dancers performing there. There were over twenty of them; they all wore yellow headbands and held long red streams of cloth in their hands and danced in rhythm to the drums. She looked in amazement at how, when they took four steps in unison and turned around suddenly, the several pieces of coloured cloth that waved in the air flared and settled like snakes flying in the air with their tongues out. She was familiar with the dance. This was the same dance that was performed on all nine days of the Mariamman temple festival. Youngsters trained in summer with a teacher. Also, because it was done in the temple, it was called Koyilattam. It started with a slow movement of the hands and feet, but it gradually gained speed and reached a crescendo. And as the dance grew faster, the whistles grew louder. Sometimes, the performance opened with a song and every dance was alternated with a song. But this dance looked different, perhaps because of the colours that had been added to it. Whenever she heard the whistles, she was beside herself, clapping and jumping in joyful laughter. It looked like she might even join the dancers. The beauty of it, when they moved to the front and turned around, was so intense that it wrapped itself around everything in the vicinity. Looking at the dancers, she wondered if men were really such beautiful creatures. She felt a wild urge to run and embrace them. She jumped and almost fell on the girl standing next to her. But the girl didn't take it amiss; she just laughed. 'I don't see women performing anywhere,' she said in a gossipy tone. It looked like she too would have liked to join them. Ponna gave her a friendly smile. When she felt something touching her earlobes, she reached back and wiped herself. It felt as though someone was blowing gently on her nape. She turned around and saw a pair of eyes to her side. She knew it was the touch of these eyes that had bothered her. Those eyes pierced the glow of the burning torches, and touched and teased her. The folded dhoti and the towel that was around his neck and fell over his chest made him look like no one she knew. His hair had been combed carelessly, and it looked like he had not even started shaving. It occurred to her that this was her god. His eyes smiled. His lips too were parted in a permanent grin. In a delightful, repetitive game, his eyes moved towards the dance only to turn back to her suddenly. She looked fondly at that desire-filled face. Then she closed her eyes and tried holding it in her mind. But it slipped away. She could recollect the eyes, the lips and the head separately, but she could not put them together. Why wouldn't it stay in her mind? It was unlike any other face that had stayed on in her mind. It was never easy for a new face to make its place in a shelf of faces. 'This is how I expected you to be, god,' she thought. Then his eyelashes lowered and eyebrows slanted. She understood that he wanted her to walk out with him. She was overcome with shyness. When she remembered that Kali too often spoke this way—in signs—her mind closed up. She was never able to keep Kali aside. In twelve years, he had gradually etched himself on every fold of her heart. No one could do anything to him. She would find him in any man. She could recognize him in anyone. She felt like screaming at this image, pleading with him not to remind her of Kali. If she spoke to him in signs, he would respond like Kali too. She knew she had to leave from there and get to a place where they could talk in words. When she emerged, parting her way through the crowd gathered around the Oyilattam troupe, he too came and joined hands with her. She was surprised that he read her mind so quickly. She felt that just a small shift of the body was enough for a man to understand a woman. The grip of his hand was comforting. He walked with her along the north street. She decided to let him lead. Along the way were shops selling puttu laid out on baskets layered with white cloth. There were small crowds here and there. His lips grazed her ears when they said, 'Shall we eat puttu?' A male voice dripping desire and intoxication. She didn't even think. She nodded. He peeped into every store, but didn't stop at any. Finally, he stopped at a shop that was halfway down the street and got hot puttu on a leaf plate covered with dry leaves stitched together. There were four portions of puttu with gravy on the side. Though she thought she might not be able to eat so much, she did not refuse. He brought his plate and ate standing next to her. She liked the way he carefully chose the puttu after considering several shops. It made her happy to think that he would have chosen her the same way. She took some puttu and put it on his plate, but she was too shy to look up at this face. 'Why? Enough already?' he said. 'Please speak some more,' she pleaded in her mind. With a man, that was how she always felt—like he did not speak enough. You want your dear one to talk to you non-stop. She was eating, her head bent low, when he said, 'Selvi, look here.' When she looked up in shock, wondering who Selvi was, he brought a handful of puttu close to her lips. She let him feed her. 'He has given me a new name so that no one around here gets suspicious.' She found this cleverness very attractive. He continued to feed her without any hesitation. But her diffidence came in the way of her desire to reciprocate. As if he sensed that, he said, 'Hmmm,' and, bending close to her, held her hand and brought it to his lips. She fed him without looking up. When they started walking again, she literally stuck to him. She did not know the way, and she had no sense of the people around her. 'He is my god. My job is to go where he takes me,' was all she could think. Like a rain-soaked chicken, she huddled in his warmth. It appeared that he was taking her far away from the crowds and the noise. ## thirty-three Kali woke up at exactly the same time he was used to for feeding the cows every night, but he could not rise because of an overpowering dizziness. He lay down for a little longer, tossing his head from side to side. The thatched mat he was lying on made crunching sounds under his head. When he sat up with some difficulty, he could see everything very clearly in the moonlight. The realization about where he was and in what circumstances dawned on him with a sharp pain. Suddenly, a roaring wind entered the coconut grove and pushed the fronds around. They made a great noise and it seemed that they were beating their chests. For a moment, Kali experienced great fear. He was used to the sound of palm fronds rustling in the wind. They'd look like they were clutching their hands to their chests. But this was the first time he was witnessing how the coconut fronds spread their arms out and wailed in panic. Slowly, the wind died down. Outside the hut, Muthu and Mandayan were lying on mats that were facing different directions. All that great wind did nothing to disturb their sleep. When Kali got drunk and passed out, Muthu had been quite stable, which was unusual. Normally, it was Muthu who gulped down his alcohol like water and went flat very soon. How did it all change that night? Perhaps Kali could not control the excitement at seeing coconut toddy and arrack. But he had been happy. He had not planned to spend the night here, but it all ended up working out that way. Maybe Muthu was used to coming here, getting drunk and lying around. That was why he did not say anything. Kali looked at the sky. He could not find the moon, but its light fell continuously through the gaps in the grove. He got up and washed his face with the water in the pot. His breath stank and his saliva tasted foul. So he spat it out and rinsed his mouth. He removed his dhoti, which was coming undone anyway, and wiped his face with it. Then he tightened his loincloth and wore the dhoti over it. His towel was caught under Muthu's sleeping body. He tried to pull it free, but he had to move Muthu a little to get it out. Then he sat on the mat. He didn't know what to do. He couldn't fall asleep again. He never could sleep once he woke up at the time when the cattle needed to be fed. He always just stayed awake gazing around. If there was moonlight, he would carry a pot and go to the well. The barnyard needed twenty pots of water every day. What did it matter when he got that work done? Though he knew he could not fall asleep again, he lay down and stretched his legs. Again, a mighty wind swept into the grove. Kali thought that it was only here that he was actually able to see the wind. If the wind was so strong in Aani, one could imagine how forceful it would have been in Aadi. No one would stay in the grove with such a wind blowing around and the trees screaming constantly. Perhaps, if one was used to it, one could stay. After all, Mandayan could not vacate the hut and run elsewhere just for the month of Aadi. Mandayan was still full of affection for Kali. He kept saying 'Our landlord.' He even said yes when Kali asked for the child. He wondered what gift Mandayan had that whenever he slept with his wife, he had a child. The gods seemed to keep giving to someone who kept saying 'Enough!' while the one who desperately wanted it was simply told to fuck off. Even if Mandayan agreed to give the child, Katthayi wouldn't agree. However dire the circumstances might be, no mother would gladly give away her child. Like she said, would it work out to raise his child in Kali's home? He remembered that even Ponna had once said that if it came to adopting a child, she would prefer one from the same caste. 'But not from our relatives. They will talk as if they have given us a portion of their wealth, and we cannot raise the child with them watching. Even if the child had a minor cold and fever, they'd say we did not take good care of it. If you can find a child from some unknown place, I will consider raising it.' Kali too was not that keen on adopting a child. Would that stop people from talking? They'd only say, 'He calls himself the father to someone else's child.' Would this make them invite Kali to weddings and funerals and give him pride of place at special gatherings? He would still be the impotent one. Ponna would still be the barren woman. On a moonlit night like this one, when they were in the barnyard and Ponna lay with him on the cot, she had said, 'We don't need to raise someone else's child, maama. We won't be able to be as loving to it as we could be to our own child. If the child does something stupid, we would think, "Had he been our own child would he have done this?" And he might also think, "They wouldn't talk to me like this if I were their own child." We don't need all that. If we manage to conceive one of our own, well and good. If not, we will just be the way we are.' Another time, however, she spoke differently. Since it had rained well, they had planted cotton. The plants had grown nice and robust. The old woman who was supposed to be grazing an entire herd of goats in a nearby field dozed off, letting her goats wander into Kali's cotton field. When Ponna ran from the barnyard, they were busy munching away at the lush cotton plants. And by the time she chased them all out, a sizeable portion of the plants had been reduced to leafless stalks. 'Who knows which man she went with, abandoning her goats? Let her come. I will scoop the life out of her!' Ponna kept yelling. Finally, the old woman arrived, looking somewhat sheepish. Seeing her, Ponna shouted in rage. 'I just dozed off in the heat,' the woman said nonchalantly. 'Why are you making a big deal out of it?' Ponna's anger peaked. 'I am making a big deal out of it? Come and take a look. They have damaged one square measure of the crop. How dare you say I am making a big deal out it!' To shut her up, the woman had just one thing in her arsenal, and she used it: 'Why do you worry so much about an heirless property?' Ponna was shocked. But she collected herself and responded, 'So what? Have you come as the child to eat off my property?' She was quite hurt by what the old woman had said. Outraged, she walked back to the barnyard and said to Kali, 'I don't know what you will do and how. I want a child right away.' This was not a doll he could get immediately from the shop, was it? He tried to soothe her, but to no avail. 'Go somewhere and get me a child!' Ponna raged. 'I don't care even if it is from an untouchable woman. I don't care if you have to buy one for money. I don't want anyone to be able to say that this property of ours has no inheritor. Go now!' And Ponna physically pushed Kali out of the barnyard. She was very angry. But where would he go? How would he get a child? He stood there for a little while and then peeped inside. She was lying on the thrash floor. It took him great effort to console her that day. The topic of adopting a child usually flared up like this now and then and got put out on its own. To reclaim her from the effect of these conversations, he had to go home at night from the barnyard for a few nights. His intense embraces accomplished what his gentle words could not. If she slowly loosened her body and showed some involvement, it meant she had emerged from her despair. ## thirty-four To this day, Kali found something very inviting in Ponna's speech and demeanour. He felt that it would've been nice if he had stayed with her and not come along with Muthu. Only Ponna's mother would be with her, and if he knocked on the door and asked for some water, she'd understand his intention. It was not too late even now; he could still go back. It would be a long time before dawn. Even if he walked really slowly, he could get there before the blackbirds started chirping. Thoughts of Ponna excited him. Even the great wind blowing in the grove failed to quench his body's thirst. He sat up. Muthu was fast asleep. Let him come in the morning after drinking some more toddy, he thought. At home, they'd serve chicken in the morning. Kali could always come back here, bringing some for Muthu. He decided to tell Mandayan and leave. Bottles of arrack stood by Mandayan's sleeping head. One was half full and the other was untouched. Kali took the latter; it might come of use. The half-full bottle also attracted him. He drank a little from it and it hit his empty stomach with a sharp sting. He looked around and saw coconuts lying next to the hut. He broke them open with the sickle that was lying at the hut's entrance. They were good, fleshy coconuts. He ate the pulp of one, took another with him, and emerged out of the grove. The moon had slid slightly down the sky to the west. He did not even think about the long distance he had to walk. Lying on the cot under the portia tree, Ponna was beckoning him with outstretched arms. The only part of the walk that was difficult was when he had to get down to the stream and climb up on to the other side, where it was dark since the moonlight came filtered through the dense bushes. When the wind started again, he could hear the wailing of coconut fronds from behind. Once he climbed up, he saw elevated fields stretching to a great distance. There was also the comforting presence of palm trees here and there. Memories of days when he had walked along the fields after watching street plays scrolled across his mind. A big crowd of them would walk and run through the fields, scaring even the birds sleeping on the trees. The next day, people living in the shacks along the fields would inquire about the previous night's noises. All of these ended when he got married. Nallayyan used to say, 'If one can freely get the pleasure of a woman without getting married, who would want to get married?' He was right in a way. Was it only pleasure that came with marriage? It gave one an heir to complete one's final rites and to inherit one's wealth. Can one abandon a corpse because one didn't know where the fellow was from? If there was no one to do the final rites, one had to run around and find someone who could do it. You would have to fall at his feet and beg him. There are even stories where somebody had to write off his wealth to someone else just so he would have someone to complete his death rites. There was nothing more ignominious than having to take care of the property of an heirless man. Imagine the physical fights that would break out over Nallayyan's property when he died. A while back, when he had come to Kali's barnyard, Nallayyan had said, 'I will write my property in your name. There is no one more important to me.' Kali said, 'Ah! You are such a tease! Here I am, wondering what to do with my wealth, and you are offering me yours!' 'You will give birth to one,' said Uncle. 'And even if you don't, it's not a problem. Enjoy it all as long as you can, and when you think your days are over, write it off to someone or the other. Are we going to pack all this land into a sack and carry it with us when we go?' Once, Nallayyan came with a large dish that was half-filled with chicken meat. The meat had been cooked in its juices and fried well. He also had a bottle of arrack with him. That was a time when Kali had a lot of work in the fields. He had worked for four days and had put out all the raagi to dry. The work of clearing the field of raagi stems was going on. While he allowed other people to pick the grains, he wouldn't let anyone else cut the stem. If he started very early in the morning when the mist still lingered, he could finish working on over half an acre before the sun hit his forehead. Once the grains were picked, what did it matter if the field stood for a week with just the stems? But Kali wouldn't have it. He would even cut them at night, if there was moonlight. Ponna didn't approve of this. There were always rodents in a raagi field, and snakes came to catch the rodents. Why risk anything at night? Kali had been very happy to see that Nallayyan had come bringing that feast. He had come at the right time, because Kali was very tired after all the work. He drank the arrack and took bites of the meat. It was a good chicken dish that had been made by adding just the right amount of green chilli. 'Uncle, looks like you have learned to make excellent chicken gravy and fry it!' said Kali. 'Oh, I can't do such things,' said Uncle. 'I can't sit still in one place even for a little while. Then where am I going to have the patience to cook and fry? My brothers' wives bring me these things.' And he laughed, adding, 'You keep saying we need an heir to what wealth we save, don't you? But what's the use of having a child? Even those parents who have four or five children have been left to take care of themselves. They all die alone. But I won't die that way. See, when you have children, it is the unspoken understanding that they are going to inherit whatever you leave behind. But in my case, no one knows what I will do with my stuff, where it will go. So everyone trips over each other wanting to take care of me. The other day, I said, just for the sake of it, that since I didn't know who was going to take care of me, I was planning to write my property off to the temples and then go to die in some monastery somewhere. Since then, I am sent a big portion of whatever is cooked in my brothers' homes! Today, they made meat in both houses, and the farm boy and I could not finish eating it all. So I brought it here thinking you might like it.' Apparently, Nallayyan's sisters-in-law were vying with one another to take care of him. They were pampering him: 'Is the meat enough, maama?' or 'Shall I bring you more gravy?' 'Everything comes to where I am sitting,' Uncle continued. 'I don't have to move anywhere. Do people who have children get treated this way? Don't worry. In the future, you will get all this attention too.' Saying this, he cheered Kali up. Whenever he was talking to Nallayyan, Kali forgot the pain of being childless and found an excitement about life. He even felt convinced it was good not to have children. But very soon some other small matter would come to the fore, tease him, rekindle his yearning for a child and laugh at his plight. Kali felt that however much Nallayyan rationalized it, his plight was not great either. Uncle might have met several women in the market. He might have enjoyed the pleasures of coitus several times. All this was fine if it was just once in a while. But wasn't it sad if the dog had to dip its tongue in the cattle's water pot every time it felt hungry? For instance, could Uncle Nallayyan have ever experienced the kind of late-night urge that Kali was experiencing now, the one propelled by thoughts of Ponna's body? How many kinds of urges had he felt since morning! Could Uncle ever feel the certainty that he could go home and quench his yearning? It was Ponna who made Kali aware of the secret nuances of the body. Just a slight movement of her eyes made his body toss and struggle. Even without a touch, she could make his body hers. If she touched him, his body became the two-sided drum, the kind that was played during theatrical performances. When she touched him with just a finger, his body-drum reverberated with a certain sound. If she held him with a hand, it made another distinct sound. And when she held him with both her hands, his body completely lost its control. When her touches progressed, his body moved with the increasing intensity of a body responding to a drum's rise to a crescendo. His mother might have given birth to him and raised him, but her control over him was limited. Nothing compared to the power his wife wielded over him. It was for Ponna that he left behind his circle of friends and relatives and confined himself to the barnyard. She said, 'I will go if you want me to.' That didn't mean, 'I will go.' It meant, 'I will do anything for you.' Giving up everything was the only price he had to pay to have her rest in the palm of his hand, to nestle in the hold of his fist. Thinking of her, his body acquired speed. Not minding the mild dizziness, he walked on. Pathways that meandered through fields with no farmsteads led the way for him. Even from a distance, he could see his portia tree shaped like an umbrella of shadows. The wind had died. The tree looked like darkness itself. Would she open the door if he just gently tapped on it like he did at home? Or would she have gone to sleep after expecting him all night? On nights when he failed her expectation to go to her, she stayed awake. In the morning, she would burn him with her anger. The frenzy of her agitated body was too much for him to bear. The cot under the portia tree lay bare. He walked towards the door. A large iron lock hung on the latch. For a minute, he thought she had just hung the lock outside and latched the door from the inside. So he tried pushing the latch. It was chain-locked on the outside. All his intoxication wore off. He tried pushing the lock around. Was she teasing him? But why play with him at this time of the night and that too at his father-in-law's place? He leaned against the door and looked across the front yard. The bullocks were not there. Nor was the cart. His lips murmured, 'She has cheated you, she has cheated you.' He banged his head against the door. His topknot came undone and rolled down to his nape. 'You whore!' he shouted. 'Have you really gone? Have you gone despite my saying no?' Only the dog echoed his shout in a single bark. The hens that had climbed the portia tree rustled their feathers and marked their presence. 'All of you have gotten together and cheated me,' he cried. His sobbing stopped gradually. Suddenly, he got up like a man possessed. He opened the full bottle of arrack in his hand and drank it down in one gulp. He didn't stop for air even once. Holding the bottle in his hand, he started walking. His hair, now loosened completely, lashed like a whip across his back. He wobbled along slowly all the way back to his home. When he reached his barnyard at dawn, his dog came running to him and showed him its affection by curling its body and getting between his feet. But he kicked it off. It screamed in pain and ran away. Under the portia tree, the cattle were munching on fodder. He sat on the rock under the tree. He drank some more of the arrack. When he yelled, 'You whore! You have cheated me!' he was breathless. 'You will not be happy. You have cheated me, you whore . . .' He slid down to the ground. The rope running from the corn stacks pressed against his back. He looked above. The branches of the portia tree had spread themselves across the sky. ## A Note on the Type Bembo is one of the most comfortable and competent typefaces for extended texts. It exhibits a classic beauty: elegant without being fussy, and neither too condensed nor too expanded. Named after Pietro Bembo— a sixteenth-century Italian scholar, poet and cardinal—this serif typeface was first cut in 1495 by Francesco Griffo, a Venetian goldsmith who had become a punchcutter. Other well-known serif typefaces like Garamond and Times Roman exhibit characteristics that can be traced back to Bembo.This typeface was revived in 1929 by the superlative typographical talents of Stanley Morison, who successfully adapted the font to the machine requirements of the day. Morison's efforts have ensured that the Bembo font family lives on, the calligraphic style of its distinctive serifs imparting a warm human feel. ## THE BEGINNING Let the conversation begin... Follow the Penguin Twitter.com@PenguinIndia Keep up-to-date with all our stories Youtube.com/PenguinIndia Like 'Penguin Books' on Facebook.com/PenguinIndia Find out more about the author and discover more stories like this at Penguinbooksindia.com ##### PENGUIN BOOKS Published by the Penguin Group Penguin Books India Pvt. Ltd, 7th Floor, Infinity Tower C, DLF Cyber City, Gurgaon - 122 002, Haryana, India Penguin Group (USA) Inc., 375 Hudson Street, New York, New York 10014, USA Penguin Group (Canada), 90 Eglinton Avenue East, Suite 700, Toronto, Ontario M4P 2Y3, Canada Penguin Books Ltd, 80 Strand, London WC2R 0RL, England Penguin Ireland, 25 St Stephen's Green, Dublin 2, Ireland (a division of Penguin Books Ltd) Penguin Group (Australia), 707 Collins Street, Melbourne, Victoria 3008, Australia Penguin Group (NZ), 67 Apollo Drive, Rosedale, Auckland 0632, New Zealand Penguin Books (South Africa) (Pty) Ltd, Block D, Rosebank Office Park, 181 Jan Smuts Avenue, Parktown North, Johannesburg 2193, South Africa Penguin Books Ltd, Registered Offices: 80 Strand, London WC2R 0RL, England First published in Tamil as _Maadhorubaagan_ by Kalachuvadu Publications, Tamil Nadu 2010 First published in English in Hamish Hamilton by Penguin Books India 2013 Published in Penguin Books 2014 www.penguinbooksindia.com Copyright © Perumal Murugan 2010 Translation copyright © Aniruddhan Vasudevan 2013 Cover illustration & design by Pallavi Agarwala All rights reserved ISBN: 978-0-143-42354-6 This digital edition published in 2016. e-ISBN: 978-9-351-18585-7 This book is sold subject to the condition that it shall not, by way of trade or otherwise, be lent, resold, hired out, or otherwise circulated without the publisher's prior written consent in any form of binding or cover other than that in which it is published and without a similar condition including this condition being imposed on the subsequent purchaser and without limiting the rights under copyright reserved above, no part of this publication may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording or otherwise), without the prior written permission of both the copyright owner and the above-mentioned publisher of this book. # Contents 1. Cover 2. Title Page 3. Contents 4. About the Author 5. Also by Perumal Murugan 6. Praise for the Book 7. one 8. two 9. three 10. four 11. five 12. six 13. seven 14. eight 15. nine 16. ten 17. eleven 18. twelve 19. thirteen 20. fourteen 21. fifteen 22. sixteen 23. seventeen 24. eighteen 25. nineteen 26. twenty 27. twenty-one 28. twenty-two 29. twenty-three 30. twenty-four 31. twenty-five 32. twenty-six 33. twenty-seven 34. twenty-eight 35. twenty-nine 36. thirty 37. thirty-one 38. thirty-two 39. thirty-three 40. thirty-four 41. Follow Penguin 42. Copyright 1. Cover 2. Brand Page 3. Table of Contents 4. Begin Reading 5. Copyright
{ "redpajama_set_name": "RedPajamaBook" }
2,133
Sachi is soft pink and white hand-tied bouquet, beautifully wrapped and tied with a pretty ribbon. Locally grown Sprayroses and Alstroemaria with imported Ecuadorean Roses. Sachi is a soft pink and white hand-tied bouquet, beautifully wrapped and tied with a pretty ribbon. The soft pink Hermosa Ecuadorean roses with locally grown baby roses and local Àlstroemaria. Also available in a smaller bouquet and a larger bouquet. Our selection may differ with our availabiltiy.
{ "redpajama_set_name": "RedPajamaC4" }
8,113
Q: Implementing computation on a TCP based game application We are planning a real-time network game application for mobiles. After some researches and studying, we decided to use a TCP connection between the server and the clients (mobile devices) by implementing Socket. As we are writing the protocols, we came across the following question: where should we implement the computation? In the user's device or in the server? For example, imagine a short game between 5 players which does not require communication until the game ends (hitting the screen as fast as you can or something like that). At the end of the round, the clients send their score to the server, and the application should display the loser or the winner. Where should the computation take place? Should the server collect all of the scores, compute the maximum and the minimum and send back the loser and winner? Or should the server send back all the scores to the players, in which their devices will compute the results? What are the pros and cons of each strategy? A: A couple of things here: 1) Do not use a persistent socket for mobile applications. Connectivity is too spotty. 2) Use a higher level protocol, like HTTP. You have no need to use such a low-level protocol. By doing so you are going to end up doing far more work than you need to. Think about if you want to build this into a web-based game, or implement on a device that doesn't allow you to use raw sockets. HTTP is nice because it is firewall friendly, most firewalls already let HTTP on standard ports through. This is why it is so popular these days. 3) You should think very skeptically about the devices. In general you should trust clients as little as possible. You can do processing on the client, but it should be related to rendering. Generally assuming that your client is malicious is a good approach to n-tier architecture applications. Especially with games.
{ "redpajama_set_name": "RedPajamaStackExchange" }
4,516
\section{Introduction} A classical nova is a cataclysmic nuclear explosion on the surface of a white dwarf star resulting from the accretion of hydrogen-rich gas from a companion star. A~sequence of nuclear reactions produces a sudden luminosity increase by up to a factor of a million and ejects matter from the white dwarf. The time scales of explosive hydrogen burning processes are influenced by the duration of reaction cycles closed by ($p$,$\alpha$) reactions, with break out via ($p$,$\gamma$) reactions competing with $\beta$-decays. The SiP cycle is one such cycle, which is of particular interest for understanding novae like Nova Her 1991 that are observed to exhibit high sulfur abundances compared to solar values \cite{Wil94,Mat94}. In the SiP cycle the $^{31}$S($p$,$\gamma$)$^{32}$Cl reaction is believed to be the dominant break-out reaction~\cite{Vou94}. The rate of the $^{31}$S($p$,$\gamma$)$^{32}$Cl reaction at nova temperatures is dominated by resonances corresponding to states in the compound nucleus $^{32}$Cl. The~$^{31}$S($p$,$\gamma$)$^{32}$Cl reaction rate was previously calculated based on some measured resonance properties and estimates of others based upon the mirror nucleus $^{32}$P~\cite{Ili99}. Uncertainties in the rate were provided in a subsequent reanalysis~\cite{Ili10}. The $^{32}$Cl excitation energies near the proton threshold of $Q_p$ = 1581.3(6)~keV~\cite{Bha08} used by Ref.~\cite{Ili99,Ili10} were based on earlier measurements that disagreed at the 2 sigma level (by 10-20 keV) \cite{Vou94,Jea89}, and the resonance strengths were only constrained based upon properties of states in the mirror. A recent study of 5 states below 2.3~MeV via the $^{32}$S($^{3}$He,$t$)$^{32}$Cl reaction \cite{Wr210} is in agreement with the excitation energies reported by Ref. \cite{Vou94}. However, significant uncertainties remain regarding resonance strengths and size of systematic uncertainties in the resonance energies. We have studied proton-unbound states in $^{32}$Cl using the~$^{32}$S($^{3}$He,$t$)$^{32}$Cl charge-exchange reaction. Excitation energies and proton-branching ratios for states of astrophysical interest for the $^{31}$S($p$,$\gamma$)$^{32}$Cl reaction rate were determined. In the following sections we describe the experiment and new results for states in $^{32}$Cl, including the observation of a~predicted, but previously unobserved, level. We then present calculations of a new recommended $^{31}$S($p$,$\gamma$)$^{32}$Cl reaction rate based on these new results including statistical and systematic uncertainties. \section{Experiment} \begin{figure*} \begin{center} \includegraphics[width=0.9\linewidth]{all} \caption{Spectra showing position of tritons at the focal plane measured by the ionization chamber with the Enge spectrograph set at 3$^{\circ}$. Three spectra show results from measurements with three targets, 240 $\mu$g/cm$^2$ ZnS, 350 $\mu$g/cm$^2$ ZnS and a~300~$\mu$g/cm$^2$ Si target. Peaks are identified with the final level in the nucleus produced. } \label{f:spectra} \end{center} \end{figure*} We used the charge-exchange reaction $^{32}$S($^{3}$He,$t$)$^{32}$Cl to populate states in $^{32}$Cl. A~30-MeV $^{3}$He$^{2+}$ beam from the Extended Stretched TransUranium (ESTU) tandem Van de Graaff accelerator at the Wright Nuclear Structure Laboratory (WNSL) at Yale University bombarded ZnS targets. Targets with thicknesses of 240 $\mu$g/cm$^2$ and 350 $\mu$g/cm$^2$ both on 5 $\mu$g/cm$^2$ carbon substrates were produced via evaporation at Oak Ridge National Laboratory and used in the experiment at the WNSL. Their thicknesses were determined with about 10\% uncertainty via energy loss measurements of $\alpha$ particles from a $^{241}$Am source. A~150 $\mu$g/cm$^2$ CdS target on a 20 $\mu$g/cm$^2$ substrate was used at one angle (5$^{\circ}$) but had worse energy resolution and lower counting rates and was therefore not used at other angles. Additional data were taken with a 300 $\mu$g/cm$^2$ natural Si target for calibration and a~900 $\mu$g/cm$^2$ Zn target for background analysis. Reaction products were separated and analyzed with the Enge split-pole spectrograph at the WNSL. The~spectrograph separates particles according to their magnetic rigidities, $B \rho$, so that discrete positions at the focal plane correspond to discrete momenta. The positions of detected particles at an Enge focal plane were determined by a~position-sensitive ionization drift chamber filled with 150 Torr of isobutane gas~\cite{Par06}. As the ions pass through the gas, the amount of charge collected by the cathode determines the energy lost in the detector. The residual energy was measured by a thick plastic scintillator located behind the ionization chamber. Measurements were conducted at spectrograph (laboratory) angles of 3$^{\circ}$, 5$^{\circ}$, 10$^{\circ}$ and 20$^{\circ}$. At the 3$^{\circ}$ setting the protons emitted from excited states in $^{32}$Cl were detected in coincidence with outgoing tritons by the Yale Lamp Shade Array (YLSA)~\cite{Vis03} consisting of four 16-strip silicon detectors arranged in a lamp-shade configuration. The YLSA detectors covered an angular range of $\theta_{lab}$ = 131$^{\circ}$ to $\theta_{lab}$ = 166$^{\circ}$ and were calibrated with $\alpha$ particles from a $^{241}$Am source. \section{Level Energies} Tritons were identified at the focal plane of the spectrograph using the~$E_{res}$ vs. $\Delta E$ relationship from the ionization chamber and the~scintillator. Focal-plane position spectra gated on tritons are shown in Fig.~\ref{f:spectra}, and states in $^{32}$Cl populated via the $^{32}$S($^{3}$He,$t$)$^{32}$Cl charge-exchange reaction are labeled. Tritons corresponding to states in $^{16}$F resulting from the $^{16}$O($^{3}$He,$t$)$^{16}$F reaction due to oxygen contamination in the targets are also seen in Fig.~\ref{f:spectra}. Positions at the focal plane were calibrated using known states in $^{28}$P populated from the $^{28}$Si($^{3}$He,$t$)$^{28}$P reaction on a silicon target. The 424 keV $^{16}$F state populated from oxygen contaminants in the targets, and the ground and 90 keV first excited states in $^{32}$Cl were also used to calibrate the position spectra, providing 14 calibration points spanning the region of interest. Centroids were obtained by fitting a Gaussian function to each peak with a linear background, and the centroids of the calibration peaks were fit by their magnetic rigidities. Both 2$^{nd}$ and 3$^{rd}$ order polynomial functions were fit. Excitation energies for all states of astrophysical interest agreed within 1 keV from both fits, but the 3$^{rd}$ order fit function was adopted as it provided a better fit to the lowest and highest energy calibration peaks. The magnetic rigidities of the recoiling tritons were calculated from the reaction kinematics with the newest atomic mass values implemented~\cite{AW03,nucmas}, including new values for $^{28}$P and $^{32}$Cl obtained recently, with mass excess of $-7147.5(12)$~keV, $-13333.8(12)$ keV, respectively~\cite{Wre10}. Small corrections ($<$30~keV) were made for the energy loss of the incident $^{3}$He ions and recoiling tritons in the target using the energy loss code STOPIT ~\cite{stopit}, assuming the reaction happened in the center of the target. The fit function was then used to obtain magnetic rigidities from the centroids for the peaks of interest. The energies of the levels were calculated from reaction kinematics taking energy losses into account. The statistical uncertainty in the energy of each state, $\Delta E_{i}$, was calculated as a combination of the uncertainties originating from the centroid determination and the fitting function uncertainties estimated from covariance analysis. The energy resolution for each triton peak was typically about 40~keV (FWHM), and no peaks wider than the instrumental resolution were observed. Excitation energies were obtained for each level at several angles and with the different targets. The final weighted average for each state was calculated from these energies. The uncertainty in the excitation energy was assigned as the larger of the average uncertainty \begin{equation} \Delta E_{av} = \sqrt{ \frac{\displaystyle 1} {\displaystyle \sum_{i=1}^n \frac{\displaystyle 1}{\displaystyle (\Delta E_i)^2}} } \end{equation} and the scatter uncertainty \begin{equation} \Delta E_{scat} = \sqrt{ \frac{1}{n-1} \frac{\displaystyle \sum_{i=1}^n \frac{(E - E_i)^2}{\displaystyle (\Delta E_i)^2} } {\displaystyle \sum_{i=1}^n \frac{\displaystyle 1}{\displaystyle (\Delta E_i)^2}} } . \end{equation} Systematic uncertainties were estimated using a Monte Carlo simulation, where the target thicknesses and mass values were randomly varied with Gaussian distribution probabilities. Mass and thickness uncertainties were used as standard deviations, $\sigma$. The systematic error was determined as the standard deviation of the Gaussian fit for the level energy distributions obtained in the Monte Carlo simulation. The systematic uncertainty was found to be 4~keV for all states, except for the 462 keV and 1167 keV states, where the systematic uncertainty was determined to be 2~keV and 3~keV, respectively. The excitation energies determined from this measurement with statistical uncertainties are given in Table~\ref{t:results}. They are compared with other measurements \cite{Jea89, Vou94,Wr210} and the evaluation by \cite{End98}. The evaluation favored \cite{Vou94} over \cite{Jea89}, where results from both measurements were available and generally adds 11~keV to \cite{Jea89} if only this one is available. The level energies determined in $^{32}$Ar($\beta ^+$p) experiments include 461.1(1)~keV, 1168.5(2)~keV, and 4076(10)~keV from~\cite{Bjo85} and 4072(9)~keV from~\cite{Sch93}, all agreeing well with our results. A recent measurement also using the $^{32}$S($^{3}$He,$t$)$^{32}$Cl reaction provides energies for five levels between 1.3 and 2.3 MeV that are systematically higher than the current work by about 4 keV ~\cite{Wr210}. \begin{table}[b \caption{\label{t:results} Excitation energies in $^{32}$Cl measured in this work compared to other measurements and evaluations. All listed uncertainties are statistical. Systematic uncertainties have been estimated in this work as 4~keV for all states, except for the 462 keV state with the systematic uncertainty of 2~keV and the 1167 keV state with the systematic uncertainty of 3~keV.} \setlength{\extrarowheight}{1.3pt} \begin{tabular}{ccccc} \hline this & Jeanperrin & Vouzoukas & Endt & Wrede\\ work & \cite{Jea89} & \cite{Vou94} & \cite{End98} & \cite{Wr210} \\ \ [keV] & [keV] & [keV] & [keV] & [keV] \\ \hline 462.0(10) & 447(7) & & 461.1(1) & \\ 1167.0(21) & 1157(5) & & 1168.5(2) & \\ 1327.4(29) & 1326(5) & 1329(3) & 1331(3) & 1331.2(5) \\ 1734.2(14) & 1719(4) & 1735(3) & 1733(2) & 1736.7(6) \\ 2127.5(19) & 2122(5) & 2129(3) & 2130(3) & 2131.1(4) \\ 2203.1(28) & 2193(7) & 2213(3) & 2212(3) & 2209.5(5) \\ 2278.6(25) & 2270(5) & 2281(3) & 2281(3) & 2283.5(5) \\ 2610.9(30) & & & & \\ 2677.0(16) & 2665(10) & & 2676(10) & \\ 2859.2(14) & 2858(5) & & 2869(5) & \\ 2931.5(17) & 2941(5) & & 2952(5) & \\ 3054.7(14) & 3056(5) & & 3067(5) & \\ 3163.9(11) & 3166(5) & & 3177(5) & \\ 3280.8(23) & 3290(10) & & 3301(10) & \\ 3695.0(9) & 3692(7) & & 3703(7) & \\ 3874.8(17) & 3883(5) & & 3894(5) & \\ 3999.5(12) & 4002(6) & & 4013(6) & \\ 4073.6(11) & 4080(7) & & 4074(7) & \\ 4349.9(23) & 4356(7) & & 4367(7) & \\ 4577.1(30) & 4590(8) & & 4601(8) & \\ \hline \end{tabular} \end{table} We have also discovered an excited state in $^{32}$Cl at 2611(5)~keV, shown in Fig.~\ref{f:newsbranch}. The measured excitation energy for the new state is in good agreement with a $1^{+}$ state predicted at 2574(50)~keV based on the mirror nucleus $^{32}$P and estimated using the IMME equation~\cite{Ili99}. \begin{figure}[tb] \begin{center} \includegraphics[width=0.9\linewidth]{newstate2} \caption{(Color online) Focal-plane position spectrum with the Enge spectrograph set at 10$^{\circ}$ showing the newly discovered 2611 keV state in $^{32}$Cl produced in the 350 $\mu$g/cm$^2$ ZnS target.} \label{f:newsbranch} \end{center} \end{figure} \section{Proton Unbound States} The YLSA silicon-detector array was installed covering backward angles at the target position to measure decays of proton-unbound states in $^{32}$Cl in coincidence with tritons detected with the spectrograph at $\theta_{lab}$ = 3$^{\circ}$. Figure \ref{f:tritonproton} shows the energy of the protons detected by YLSA versus the position (corresponding to momentum) of the tritons at the focal plane. \begin{figure}[b] \begin{center} \includegraphics[width=1\linewidth]{tp} \caption{(Color online) Triton energy - proton energy coincidence spectrum. The gated band corresponds to the~$^{32}$S($^{3}$He,$t$)$^{32}$Cl$^*$($p$)$^{31}$S reaction.} \label{f:tritonproton} \end{center} \end{figure} A gate is shown around events corresponding to the proton decay of $^{32}$Cl$^{*}$ to the ground state of $^{31}$S ($J^{\pi} = 1/2^+$). Proton decay to excited states of $^{31}$S was not possible for $^{32}$Cl excited states below 2.8~MeV due to the $^{32}$Cl proton-separation energy of $Q_p$ = 1581.3(6)~keV~\cite{Bha08} and the first excited state in $^{31}$S being at 1248.9(2)~keV~\cite{End90}. The events below the gated region in Fig.~\ref{f:tritonproton} corresponds to the proton decay of $^{16}$F$^{*}$, while events above are caused by leakage of deuterons into the triton window in the particle identification cut. \begin{figure*}[tb] \begin{center} \includegraphics[width=0.75\linewidth]{distribution} \caption{(Color online) Triton-proton angular correlation probabilities from the $^{32}$S($^{3}$He,$t$)$^{32}$Cl$^∗$($p$)$^{31}$S reaction at 30 MeV for the various states in $^{32}$Cl as listed in Table~\ref{t:results}. Red squares are the experimentally determined values with uncertainties, the black lines are the fits with even Legendre-polynomial terms. The polynomial orders are listed in Table~\ref{t:protons}. Although the 2$^{nd}$ order Legendre polynomial (dashed line) for the 2859 keV and 3659 keV states describes the data well, we assume the 4$^{th}$ order Legendre polynomial to be correct (solid line).} \label{f:protonangular} \end{center} \end{figure*} The angular probability distributions of the emitted protons for the $^{32}$Cl states between 2.1 and 3.9 MeV are shown in Fig.~\ref{f:protonangular}. Two neighboring YLSA strips are coupled together to reduce scatter due to the low statistics. The values come from the ratios of the number of events in the $t$-$p$ coincidence peaks to the total number of tritons populating a given state in $^{32}$Cl, both with background subtracted. These numbers were then divided by the YLSA efficiency estimated via the use of a Monte Carlo model~\cite{Vis03}. Angular correlations of isolated nuclear levels can be described by a linear combination of even terms of the Legendre polynomials, $P_{2k}\left[\cos ( \theta_{c.m.})\right]$, of center-mass angle $\theta_{c.m.}$ up to two times the proton orbital angular momentum $\ell$, i.e. \begin{equation} W(\theta) = \sum_{k=0}^{\ell} A_k P_{2k} \left[\cos (\theta_{c.m.})\right], \label{eq:angular} \end{equation} which is symmetric around $\theta_{c.m.} = 90^{\circ}$. The minimum order of the Legendre polynomial needed to fit the data is defined by statistical significance testing with a p-value~\cite{Wal02} required to be $>$ 0.05, corresponding to $\chi^2 < $ 14.07, 12.59, and 11.07 for 7, 6, and 5 free parameters, respectively. This function was constrained to be positive at each point, and the integral over the full solid angle must be $\le 1$. The function was then integrated over the full solid angle to obtain a total proton-branching ratio, $b_p$, as \begin{equation} b_p = \int_{\theta=0}^{\pi} 2 \pi sin(\theta) W(\theta) d\theta. \end{equation} The results are shown in Table~\ref{t:protons} with $P_{fit}$ being the order of the Legendre polynomial used in the fit. The quoted proton branching-ratio uncertainties come from the uncertainties in~the~fit parameters. The proton-branching ratio for the first excited state above the proton separation energy, $E_{x}$ = 1734.2~keV, is expected to be small. However, even if it was a significant branch, the proton energy resulting from the $E_{r}$ = 153 keV resonance is below the YLSA detector threshold, and would not be observed. The angular distributions of states with excitation energies of 2128~keV, 2203~keV, 2279~keV, 2611~keV, 2677~keV, and 2932~keV are well fit with just a constant function, requiring only the first term in Eq.~\ref{eq:angular}. The new state at 2611~keV presents an interesting case. Fits are shown in Fig. \ref{f:protonangular} using only an isotropic term (solid line) and the 4$^{th}$ order Legendre polynomial (dashed line). The angular distribution for this state is better fit with the 4$^{th}$ order Legendre polynomial, but the isotropic fit fulfills the p-value test~\cite{Wal02} at the 95\% confidence level and cannot be ruled out. As the excitation energy agrees well with that expected for a state corresponding to a 1$^{+}$ state in the mirror \cite{Ili99}, we adopt the 1$^{+}$ assignment and use the isotropic angular distribution required from a $\ell$=0 proton orbital angular momentum. \begin{table}[b \caption{\label{t:protons} Proton-branching ratios for states in $^{32}$Cl. Spin-parities assigned based on~\cite{Ili99}, except for 3695 keV and 3875 keV states that we assigned based on the mirror symmetry.} \setlength{\extrarowheight}{1.3pt} \begin{tabular}{cccc} \hline $E_x$ [keV] & $J^{\pi}$ & $P_{fit}$ & $b_p$ [\%] \\ \hline 2128 & 3$^+$ & 0 & 7 $\pm$ 4 \\ 2203 & 1$^+$ & 0 & 54 $\pm$ 7 \\ 2279 & 2$^+$ & 0 & 66 $\pm$ 13 \\ 2611 & 1$^+$ & 0 & $>$62\footnote{Fit result is (95$\pm$32)\%.} \\ 2677 & 2$^+$ & 0 & $>$78\footnote{Fit result is (94$\pm$16)\%.} \\ 2859 & 3$^+$ & 4 & $>$95 \\ 2932 & 2$^-$ & 0 & $>$88 \\ 3055 & 4$^-$ & 4 & $>$97 \\ 3164 & 3$^-$ & 4 & $>$96 \\ 3281 & 2$^+$ & 4 & $>$88 \\ 3695 & 2$^+$ & 4 & $>$96 \\ 3875 & 3$^+$ & 4 & $>$94 \\ \hline \end{tabular} \end{table} \begin{table \caption{\label{t:strength} Properties of proton-unbound states in $^{32}$Cl and corresponding resonances relevant for the $^{31}$S($p$,$\gamma$)$^{32}$Cl reaction. Energies (including systematic and statistical uncertainties) are the result from this work, except for 3767(10)~keV from~\cite{Bjo85} and 3397(50)~keV predicted by~\cite{Ili99}. The spin-parity assignments from~\cite{Ili99} were used for the states up to 3.5~MeV, from~\cite{Bjo85} for the 3767 keV state, for the 3695 and 3875 keV states were tentatively assigned based on the mirror symmetry. } \setlength{\extrarowheight}{1.4pt} \begin{tabular}{cccccccc} \hline $E_x$ & $E_r$ & $J^\pi$ & $\Gamma_\gamma$ & $\Gamma_{p}$ & $\omega \gamma$ & $\sigma(\omega \gamma)$ & \\% & $\sigma_{log}(\omega \gamma)$ \\ \ [keV] & [keV] & &[meV] & [meV] & [meV] & [meV] \\ \hline 1734 & 153(5) & 3$^+$ & 1.0 & 2.8$\times$10$^{-8}$ & 4.9$\times$10$^{-8}$ & 1.0$\times$10$^{-8}$ \footnote{The uncertainty distribution of the 153 keV resonance strength includes an~additional log-normal component with $\sigma_{log}(\omega \gamma) = 0.58$.} \\% & 0.58 \\ 2128 & 546(5) & 3$^+$ & 7.9 & 0.59 & 0.96 & 0.61 \\% & -- \\ 2203 & 622(5) & 1$^+$ & 15.5 & 18.2 & 6.3 & 3.6 \\% & -- \\ 2279 & 697(5) & 2$^+$ & 3.1 & 6.0 & 2.54 & 0.76 \\% & --\\ 2611 & 1030(5) & 1$^+$ & 20.2 & & 14.4 & 7.5 \\% & -- \\ 2677 & 1096(5) & 2$^+$ & 57.9 & & 68 & 30 \\% -- \\ 2859 & 1278(4) & 3$^+$ & 5.4 & & 9.5 & 3.7 \\% & -- \\ 2932 & 1350(5) & 2$^-$ & 2.3 & & 2.84 & 0.76 \\% & -- \\ 3055 & 1473(5) & 4$^-$ & 0.8 & & 1.81 & 0.42 \\% & -- \\ 3164 & 1583(4) & 3$^-$ & 2 & & 3.51 & 0.96 \\% & -- \\ 3281 & 1700(5) & 2$^+$ & 15 & & 18.3 & 8.5 \\% & -- \\ 3397 & 1816(50) & 4$^+$ & 1.8 & & 4.1 & 1.4 \\% & -- \\ 3695 & 2114(4) & 2$^+$ & 28 & & 35 & 20 \\% & -- \\ 3767 & 2186(10) & 1$^+$ & 110 & & 83 & 34 \\% & -- \\ 3875 & 2294(4) & 3$^+$ & 59 & & 104 & 65 \\% & -- \\ \hline \end{tabular} \end{table} For the 2859 keV state, the 2$^{nd}$ order Legendre polynomial fulfills the p-value test giving a total proton-branching ratio of 75$\pm$5 \%. However, a fit with the 4$^{th}$ order Legendre polynomial (dashed line in Fig.~\ref{f:protonangular}) differs from the previous one only outside the area covered with our data points, giving a total proton-branching ratio $>$95\%. The neutron spectroscopic factor for the mirror state in $^{32}$P has been measured to be 0.03 \cite{Gas73} and 0.008 \cite{Eck89}. While there is a discrepancy between the measurements, even the lower value implies an expected proton width for the 2859 keV level that would be about 3 orders of magnitude larger than the expected gamma width. Therefore, we adopt the result from the 4$^{th}$ order Legendre polynomial fit. The situation is similar for the 3695 keV state. We find a total proton-branching ratio of 59$\pm$4 \% coming from the fit with the 2$^{nd}$ order Legendre polynomial and a branching ratio of $>$96\% using a 4$^{th}$ order Legendre polynomial. While the mirror assignment is not as clear for the 3695 keV state, the most likely candidate, the 3880 keV ($2^+$), has a measured spectroscopic factor of 0.028~\cite{Gas73}, in agreement with $\approx$0.03 predicted for the $^{32}$Cl state by shell model calculations~\cite{Bro11}. This is a factor of 15 more than the spectroscopic factor required for the branching ratio of 59\% and we therefore adopt $>$96\% from the 4$^{th}$ order Legendre polynomial fit. For the 3055, 3164, 3281 and 3875 keV states, a 4$^{th}$ order Legendre polynomial fit is required, and the resulting branching ratio is consistent with $b_p =$ 100\%. The lower limit for these states is then statistically estimated based on the number of events. The obtained values for minimum proton orbital angular momenta are in a good agreement with assumed spins and parities. The spin-parity assignments for states with $E_x < 3.5$~MeV are taken from~\cite{Ili99}. The spins of the 3695 and 3875 keV states were tentatively assigned based on the mirror symmetry corresponding to the 3880.3 keV 2$^+$ and 3989.8 keV $(3^+)$ states in $^{32}$P~\cite{End98}, as the 3796.1 keV $(1^+)$ in $^{32}$P is assumed to be the mirror state to the 3767 keV state in $^{32}$Cl that is known to be $J^\pi=1^+$~\cite{Bjo85}. \section{$^{31}$S(\lowercase{p},$\gamma$)$^{32}$C\lowercase{l} Reaction Rate} At nova temperatures, $T\approx$0.1--0.3~GK, the states just above the proton-separation energy ($Q_{p}$ = 1581.3~keV) dominate the $^{31}$S($p$,$\gamma$)$^{32}$Cl reaction rate. As the resonances are generally narrow and well separated, the resonant component of the reaction rate (in cm$^{3}$mol$^{-1}$s$^{-1}$) can be approximated by \begin{eqnarray} N_A \langle \sigma v \rangle & = & 1.54 \times 10^{11} (\mu T_9)^{-3/2} \nonumber \\ & & \times \sum_r (\omega \gamma)_r \exp(-11.605 E_r/T_9), \label{eq:rate} \end{eqnarray} where $T_9$ is the temperature in GK, $E_r$ is the energy of the $^{32}$Cl resonance in MeV, $\mu$ is the reduced mass in atomic mass units, and $(\omega \gamma)_r$ is the resonance strength in MeV, given by the spin of the resonance, $J_r$ and its partial ($\Gamma_p$,$\Gamma_{\gamma}$) and total ($\Gamma$) widths as \begin{equation} (\omega \gamma)_r = \frac{(2 J_r +1)}{4} \frac{\Gamma_{p} \Gamma_{\gamma}}{\Gamma} . \label{eq:strength} \end{equation} The resonance reaction rate depends exponentially on the resonance energies, $E_r$, and linearly on the partial widths through the resonance strengths, though the proton partial width, $\Gamma_p$, also has an exponential dependence on energy through the penetrability. Therefore, our improved measurement of the resonance energies and the proton-branching ratios, corresponding to $\Gamma_{p} / \Gamma = \Gamma_{p} / (\Gamma_{p} + \Gamma_\gamma$), has a direct impact on the uncertainty in the $^{31}$S($p$,$\gamma$)$^{32}$Cl reaction rate. \begin{table}[t \caption{\label{t:totalrate} Recommended stellar reaction rates as a function of the temperature $T$ for the reaction $^{31}$S($p$,$\gamma$)$^{32}$Cl. Lower and upper limits cover the 68.2\% confidence level. } \setlength{\extrarowheight}{-3pt} \begin{tabular}{cccc} \hline \rule{0cm}{0.25cm} Tempe- & Recommended & Low & High \\ rature & rate & rate & rate \\ $T$ & $N_A \langle \sigma v \rangle$ & $N_A \langle \sigma v \rangle$ & $N_A \langle \sigma v \rangle$ \\ \ [GK] & [cm$^{3}$mol$^{-1}$s$^{-1}$] & [cm$^{3}$mol$^{-1}$s$^{-1}$] & [cm$^{3}$mol$^{-1}$s$^{-1}$] \\ \hline \rule{0cm}{0.3cm} 0.01 \rule{0cm}{0.3cm} & 3.68$\times 10^{-44}$ & 2.33$\times 10^{-44}$ & 5.12$\times 10^{-44}$ \\ 0.015 & 1.84$\times 10^{-37}$ & 1.17$\times 10^{-37}$ & 2.56$\times 10^{-37}$ \\ 0.02 & 3.08$\times 10^{-33}$ & 1.95$\times 10^{-33}$ & 4.28$\times 10^{-33}$ \\ 0.03 & 6.33$\times 10^{-28}$ & 4.36$\times 10^{-28}$ & 1.02$\times 10^{-27}$ \\ 0.04 & 5.39$\times 10^{-23}$ & 1.39$\times 10^{-23}$ & 2.12$\times 10^{-22}$ \\ 0.05 & 2.69$\times 10^{-19}$ & 8.50$\times 10^{-20}$ & 8.10$\times 10^{-19}$ \\ 0.06 & 7.56$\times 10^{-17}$ & 2.86$\times 10^{-17}$ & 1.91$\times 10^{-16}$ \\ 0.07 & 4.10$\times 10^{-15}$ & 1.76$\times 10^{-15}$ & 9.13$\times 10^{-15}$ \\ 0.08 & 7.98$\times 10^{-14}$ & 3.77$\times 10^{-14}$ & 1.62$\times 10^{-13}$ \\ 0.09 & 7.86$\times 10^{-13}$ & 4.00$\times 10^{-13}$ & 1.48$\times 10^{-12}$ \\ 0.1 & 4.82$\times 10^{-12}$ & 2.59$\times 10^{-12}$ & 8.61$\times 10^{-12}$ \\ 0.15 & 9.73$\times 10^{-10}$ & 6.17$\times 10^{-10}$ & 1.48$\times 10^{-9}$ \\ 0.2 & 1.22$\times 10^{-8}$ & 8.42$\times 10^{-9}$ & 1.71$\times 10^{-8}$ \\ 0.3 & 9.86$\times 10^{-7}$ & 5.70$\times 10^{-7}$ & 1.45$\times 10^{-6}$ \\ 0.4 & 1.41$\times 10^{-4}$ & 7.90$\times 10^{-5}$ & 2.05$\times 10^{-4}$ \\ 0.5 & 2.99$\times 10^{-3}$ & 1.73$\times 10^{-3}$ & 4.26$\times 10^{-3}$ \\ 0.6 & 2.27$\times 10^{-2}$ & 1.33$\times 10^{-2}$ & 3.20$\times 10^{-2}$ \\ 0.7 & 9.47$\times 10^{-2}$ & 5.61$\times 10^{-2}$ & 1.33$\times 10^{-1}$ \\ 0.8 & 2.73$\times 10^{-1}$ & 1.63$\times 10^{-1}$ & 3.81$\times 10^{-1}$ \\ 0.9 & 6.17$\times 10^{-1}$ & 3.70$\times 10^{-1}$ & 8.59$\times 10^{-1}$ \\ 1 & 1.18$\times 10^{0}$ & 7.16$\times 10^{-1}$ & 1.63$\times 10^{0}$ \\ 1.5 & 8.39$\times 10^{0}$ & 5.59$\times 10^{0}$ & 1.11$\times 10^{1}$ \\ 2 & 2.37$\times 10^{1}$ & 1.69$\times 10^{1}$ & 3.01$\times 10^{1}$ \\ 3 & 6.99$\times 10^{1}$ & 5.25$\times 10^{1}$ & 8.71$\times 10^{1}$ \\ 4 & 1.20$\times 10^{2}$ & 9.08$\times 10^{1}$ & 1.48$\times 10^{2}$ \\ 5 & 1.63$\times 10^{2}$ & 1.25$\times 10^{2}$ & 2.00$\times 10^{2}$ \\ 6 & 1.97$\times 10^{2}$ & 1.53$\times 10^{2}$ & 2.41$\times 10^{2}$ \\ 7 & 2.23$\times 10^{2}$ & 1.75$\times 10^{2}$ & 2.70$\times 10^{2}$ \\ 8 & 2.41$\times 10^{2}$ & 1.91$\times 10^{2}$ & 2.91$\times 10^{2}$ \\ 9 & 2.53$\times 10^{2}$ & 2.02$\times 10^{2}$ & 3.06$\times 10^{2}$ \\ 10 & 2.61$\times 10^{2}$ & 2.08$\times 10^{2}$ & 3.14$\times 10^{2}$ \\ \hline \end{tabular} \end{table} We have calculated the gamma widths for the states in $^{32}$Cl using the known half-lives of mirror $^{32}$P states, $T_{1/2}$, as well as $\gamma$-branching ratios, $b_{\gamma}$, and energies, $E_{\gamma_i}$, of the corresponding transitions from the states \cite{Kan97}. Assuming that the reduced transition probabilities, $B(E_i)$ and $B(M_i)$, are the same for both mirror nuclei, one can calculate the $\gamma$ width of a state in the mirror nucleus as a sum through all possible final state transitions: \begin{equation} \Gamma_\gamma \left(^{32}{\text {Cl}}\right) = \sum_i \frac{E_{\gamma_i}^{(\lambda_i+2)}(^{32}{\text {Cl}})}{E_{\gamma_i}^{(\lambda_i+2)}(^{32}{\text P})} \frac{b_{\gamma} \hbar \ln(2)}{T_{1/2}(^{32}{\text P})}, \end{equation} where $\lambda$ is electric or magnetic multipolarity. This follows a similar prescription as was used in \cite{Ili99,Ili10}. The lowest possible multipolarities were assumed. In the case of $M1/E2$ transitions, studies of the mirror nucleus~\cite{Kan97} showed that $M1$ transitions mostly dominate, and thus $M1$ transitions were adopted in the present reaction rate calculations. For the excited states between 2.1~MeV and 2.3~MeV, where the proton-branching ratio was determined to be finite but less than 100\%, we calculated the proton widths, $\Gamma_{p}$, directly from the gamma widths with our measured proton-branching ratios. For the higher energies, the resonance strength becomes insensitive to the proton width as $\Gamma_{p} \gg \Gamma_\gamma$ and $\Gamma_{p} \Gamma_{\gamma} / \Gamma \sim \Gamma_{\gamma}$. The 1734 keV state, corresponding to the 153 keV resonance, is the one state where the proton decay width is important, but where no information was extracted from our measurement. In this case we calculated the proton width using the prescription also followed in \cite{Ili99}, \begin{equation} \Gamma_{p} = 2 \frac{\hbar^2}{\mu a_c^2}P_c C^2 S_p \theta_{sp}^2 , \end{equation} where $\mu$ is the reduced mass and $a_c = 5.6$~fm is the channel radius. The single-particle reduced width, $\theta_{sp}^2 = 0.32$, was derived from the parameterization for nuclei with the mass number $A$ = 12--50 and bombarding energies $E \le$ 1000~keV based on optical-model computations and $R$-matrix expressions~\cite{Ili97}. The penetrability was calculated to be $P_c = 2.9 \times 10^{-15}$. The spectroscopic factor, $C^2 S_p$, was obtained from the reaction studies with the mirror nucleus $^{32}$P produced via a neutron transfer, $^{31}$P($d$,$p$)$^{32}$P, at deuteron energies of 10~MeV \cite{Gas73} and 20~MeV~\cite{Eck89}. The spectroscopic factors reported in these measurements are discrepant, 0.011 \cite{Gas73} and 0.0054 \cite{Eck89}, and the average value was adopted in \cite{Ili99,Ili10}. However, we conducted a reanalysis of the experimental cross section data from \cite{Gas73} and \cite{Eck89} using the FRESCO code~\cite{Tho88}. We find differential cross-sections from both experiments to be best fit with a spectroscopic factor of 0.011, in agreement with \cite{Gas73}. Thus, we adopt the higher value for the spectroscopic factor and from this calculate the proton width of the 153(5) keV resonance to be 2.8$\times$10$^{-8}$ meV. The calculated proton and gamma widths, as well as resonance strengths calculated using Eq.~\ref{eq:strength}, are listed in Table~\ref{t:strength}. The resonance energies determined in this work have been used for the calculations, except for the 3767 keV state measured in the $^{32}$Ar $\beta$-decay studies \cite{Bjo85} and the 3397 keV state predicted by~\cite{Ili99} based on the mirror symmetry. To cover temperatures below the regions dominated by the resonances, we have adopted the direct capture parameterization from~\cite{Ili99}. The recommended total $^{31}$S($p$,$\gamma$)$^{32}$Cl reaction rate for the stellar temperature range $T$ = 0.01--10 GK is given in Table~\ref{t:totalrate}. The individual contributions of direct and resonant capture are illustrated in Fig.~\ref{f:ratecontr}. \begin{figure*}[t] \begin{center} \includegraphics[width=0.9\linewidth]{ratecontr} \caption{(Color online) $^{31}$S($p$,$\gamma$)$^{32}$Cl reaction rate as a function of the stellar temperature $T$. Resonances with a contribution of at least 10\% contribution are shown. } \label{f:ratecontr} \end{center} \end{figure*} The rate has been parameterized in the Reaclib format~\cite{Thi87} as the sum of three exponentials, each with a set of 7 parameters in the form \begin{eqnarray} N_A \langle \sigma v \rangle = \exp & \left[ a_0 + a_1/T_9 + a_2/T_9^{1/3} + a_3 T_9^{1/3} \right. \nonumber \\ & \left. + a_4 T_9 + a_5 T_9^{5/3} + a_6\times \ln(T_9) \right] \end{eqnarray} where $T_9$ is the temperature in GK, using the tools in~\cite{nucastro}. The fit agrees with the data within 1.5\%. The new Reaclib parameters are listed in Table~\ref{t:reaclib}. Uncertainties in the reaction rate have been estimated using a Monte Carlo technique, as a~combination of normal and log-normal distributions of uncertainties complicate the analysis. Uncertainties in the resonance energies contribute to the log-normal distribution, as the energy is in the exponential of Eq.~\ref{eq:rate}. The gamma width contributes to the normal distribution, as its uncertainty originated from the half-life uncertainty, mirror-symmetry assumption (that we have estimated to be 20\% based on the mirror states in the neighboring nuclei) and the uncertainty of the proton-branching ratio. The uncertainty in the proton width will have a pure normal distribution, if extracted from the proton-branching ratio. For the 153 keV resonance, the exponential dependence of the penetrability on the energy contributes to the log-normal distribution, but a normally distributed contribution also originates in the spectroscopic factor uncertainty that we have estimated to be 30\%, the spectroscopic factor being different for both mirror nuclei due to the effect of Coulomb and other isospin-nonconserving interactions ($\sim$10\%), a small uncertainty of the wavelength in the penetrability ($\sim$2\%), and the reduced width uncertainty that we have estimated to be 20\%. For the 3695 keV and 3875 keV states, the uncertainty in the spins is considered. Estimated uncertainties for the resonance strengths are shown in Table~\ref{t:strength}. Direct capture uncertainties were taken directly from~\cite{Ili10}. \begin{table}[t] \caption{\label{t:reaclib} Recommended Reaclib parameters for the $^{31}$S($p$,$\gamma$)$^{32}$Cl reaction rate within $T$ = 0.01--10 GK.} \begin{tabular}{cccccccc} \hline set & a$_0$ & a$_1$ & a$_2$ & a$_3$ & a$_4$ & a$_5$ & a$_6$ \\ \hline 1 & 297.13 & -2.6702 & 114.07 & -485.67 & 63.95 & -5.699 & 140.32 \\ 2 & -35.362 & 4.1263 & -324.5 & 373.08 & -18.087 & 0.9159 & -205.99 \\ 3 & 1315.5 & -1.8787 & 330.21 & -1911.9 & 261.17 & -25.381 & 511.02 \\ \hline \end{tabular} \end{table} \begin{figure}[t] \begin{center} \includegraphics[height=17cm]{ratedist} \caption{(Color online) Total reaction rate probability density functions as a~result of the Monte Carlo simulation of the input-uncertainty propagation for various temperatures. The left figures show the distributions in the logarithmic scale normalized to the recommended value, the right figures show the same distributions in logarithmic scale without normalization. } \label{f:ratedistr} \end{center} \end{figure} In the simulation, the values of the energies and resonance strengths were varied randomly as a Gaussian distribution. Correlations, when dependent on the same parameters, were taken into account. The resulting reaction rate distributions (see Fig.~\ref{f:ratedistr}) have various shapes for different temperatures, including a nearly pure log-normal distribution at $T$ = 0.05~GK and normal distribution at $T$ = 5~GK. To give final uncertainties that would correspond to the standard deviation $\sigma$ in both distributions, we found a lower limit as a value with a percentile of 15.9 and an upper limit with a percentile of 84.1, covering the 68.2\% confidence level. The results from the Monte Carlo simulation are listed as the low and high rates in Table~\ref{t:totalrate}. \section{Discussion} The total $^{31}$S($p$,$\gamma$)$^{32}$Cl reaction rate and individual contributions based upon this work are illustrated in Fig.~\ref{f:ratecontr}. Direct capture dominates the reaction rate up to $T \sim $ 0.03~GK. The 153 keV, 546 keV, 622 keV, and 1096 keV resonances, corresponding to 1734 keV, 2128 keV, 2203 keV, and 2677 keV levels in $^{32}$Cl, dominate the rate over nearly all temperatures. The 697 keV resonance contributes more than 10\% at nova temperatures, and the 1030 keV resonance must be considered at X-ray burst temperatures, $T\approx 2$~GK. The 2186 keV, and 2294 keV resonances do not contribute except at very high temperatures, $T > 5$~GK, and the 2859 keV and 3695 keV levels (which had some ambiguity as to the shape of the proton angular distribution) make a negligible contribution to the reaction rate. The $^{31}$S($p$,$\gamma$)$^{32}$Cl reaction rate with uncertainties was recently calculated by \cite{Ili10} using the previous work of~\cite{Ili99} with the evaluated level energies from~\cite{End98}. The ratio of the rate from Ref.~\cite{Ili10} to our rate is shown in Fig.~\ref{f:ratecomp}. The uncertainties in both rates are illustrated by the hashed regions. The agreement for $T < 0.03$~GK is expected, as the direct capture rate was calculated based on the same parameters~\cite{Ili99}, and the lower and upper limits we take from~\cite{Ili10}. \begin{figure}[t] \begin{center} \includegraphics[width=1\linewidth]{ratecomp} \caption{(Color online) The $^{31}$S($p$,$\gamma$)$^{32}$Cl reaction rate with uncertainties calculated by~\cite{Ili10} (red), with only statistical uncertainties considered, is compared to the results from this work (blue), with both statistical and systematic uncertainties considered. Values are shown normalized to the recommended rate from this work. } \label{f:ratecomp} \end{center} \end{figure} Over much of the range of nova temperatures our recommended rate is significantly greater than even the ``high rate'' recommended in Ref. \cite{Ili10}. This arises from the contribution of individual resonances. In Fig.~\ref{f:individualres} the individual resonance reaction rates from Ref.~\cite{Ili10} are compared to our results. Our higher reaction rate at most nova temperatures arises from the fact that the resonance energies adopted in Ref. \cite{Ili99} (and derived from \cite{End98}) are greater than our energies by 6-15 keV (9 keV on average). The excitation energies adopted by \cite{End98} and \cite{Ili99} primarily reflect a weighted average of \cite{Vou94} and \cite{Jea89} after the results of \cite{Jea89} were shifted to match the 1168 keV excitation energy. The 3-5 keV uncertainties in the adopted excitation energies do not properly reflect systematic uncertainties, such as uncertainties in the calibration used or the discrepancies between measurements. \begin{figure}[] \begin{center} \includegraphics[width=1\linewidth]{individualrescomp} \caption{(Color online) The ratio of the individual resonance reaction rates from Ref.~\cite{Ili10} to rates from this work as a function of stellar temperature for the most important resonances contributing to the $^{31}$S($p$,$\gamma$)$^{32}$Cl rate.} \label{f:individualres} \end{center} \end{figure} Our rate also differs from that of \cite{Ili10} due to improved values for resonance strengths. It should be noted that while we adopt a resonance strength for the 153 keV resonance that is nearly the same as \cite{Ili99,Ili10}, this arises from two significant changes that largely cancel each other. Our lower resonance energy results in a significantly smaller penetrability, but we recommend a significantly greater spectroscopic factor based on our reanalysis of the transfer data of ~\cite{Gas73,Eck89}. Our reaction rate near peak nova temperatures, $T \approx 0.3$~GK, becomes smaller than that of \cite{Ili10} due to our improved values for the proton branching ratios of the 546 and 622 keV resonances. We find $\Gamma_p$ for the 546 keV resonance to be about 30\% smaller than estimated by \cite{Ili99} and $\Gamma_p$ for the 622 keV resonance to be about 2 orders of magnitude smaller. The smaller proton widths result in smaller resonance strengths and reaction rates, though the magnitude of the effect is mitigated by the lower value of the resonance energies for these states that makes for a smaller decrease in the reaction rate than would otherwise be. At higher temperatures (above about 2 GK) our rate increases in comparison to~\cite{Ili99} due to our inclusion of resonances above 2~MeV that were not previously considered. In summary, we have significantly improved the resonance energies and resonance strengths for some of the most important resonances in the $^{31}$S($p$,$\gamma$)$^{32}$Cl reaction. An important aspect of the current work is that we have given careful consideration to uncertainties, including systematic uncertainties in the level energies, states used for calibration, and target thickness effects. The largest uncertainties in the reaction rate at nova temperatures arise from the systematic uncertainty in the resonance energies and the resonance strength of the 153 keV resonance. Our excitation energy for the 1734.2(14) keV state (corresponding to the 153 keV resonance) differs from the value of 1736.7(6) reported by \cite{Wr210} (which used a slightly different set of calibration reactions) by 2.5 keV or slightly more than $1\sigma$. However, we estimate the systematic uncertainty in the resonance energies to be 4 keV, which is in agreement with the fact that the excitation energies for all levels reported by \cite{Wr210} are higher on average than this work by about 4 keV. Additional experimental information leading to an improvement in the resonance energies would therefore be valuable. As the states most important for novae have substantial branches for gamma decay, an accurate measurement of gamma-ray energies using a complementary approach, for example as in \cite{Sew07}, would be particularly helpful in reducing the systematic uncertainties that arise largely from Q-value uncertainties in reaction studies like this one. A direct measurement of the resonance strength of the 153 keV resonance (or corresponding proton width) is also desired, but would be experimentally challenging. \section*{Acknowledgments} The authors would like to thank the staff of the WNSL for their help and support during the measurement. The authors also thank B.~Alex Brown for his help with the state configurations in $^{32}$P needed for the DWBA calculation, the estimate of the effect of the~Coulomb and other isospin-nonconserving  interactions on the spectroscopic factor, as well as the shell-model spectroscopic factor calculation for the 3695~keV state, and Christian Iliadis for helpful discussions and for providing unpublished information regarding details of the analysis in \cite{Ili99}. This work is supported by the U.S. Department of Energy Office of Nuclear Physics under Contract No. DE-AC02-06CH11357 and DE-FG02-91ER40609, and grant No. DE-FG02-96ER40978.
{ "redpajama_set_name": "RedPajamaArXiv" }
6,485
![computenext](http://cloudenablers.files.wordpress.com/2014/02/computenext.png) ![plus](http://cloudenablers.files.wordpress.com/2014/02/iconplussmall.png) ![chef] (http://cloudenablers.files.wordpress.com/2014/02/chef-logo.jpg) ## About ComputeNext ComputeNext makes cloud service brokerage simple, sewing together choice in cloud services with the metrics and data to feed smart decision making processes. Computenext platform has more than 20 providers in their market place which can be accessed and managed using Computenext API. ## What is Chef? Chef is a systems and cloud infrastructure automation framework that makes it easy to deploy servers and applications to any physical, virtual, or cloud location, no matter the size of the infrastructure. Chef relies on abstract definitions (known as cookbooks and recipes) that are written in Ruby and are managed like source code. Each definition describes how a specific part of your infrastructure should be built and managed. Chef then applies those definitions to servers and applications, as specified, resulting in a fully automated infrastructure. ## What is Knife? Knife is a command-line tool that provides an interface between a local Chef repository and the Chef Server. Knife helps users of Chef to manage: * Nodes * Cookbooks and recipes * Roles * Stores of JSON data (data bags), including encrypted data * Environments * Cloud resources, including provisioning * The installation of Chef on management workstations * Searching of indexed data on the Chef Server ## About Knife Cloud Plugins * A Knife plugin is a set of one (or more) subcommands that can be added to Knife to support additional functionality that is not built-in to the base set of Knife subcommands. * A Knife plugin can be run just like any other Knife subcommand. * A Knife plugin can make authenticated API requests to the server. ## Why Knife Plugin for ComputeNext? ComputeNext Knife Plugin is used to manage API-driven cloud servers from various providers that are available in the ComputeNext Market place using command line. ComputeNext subcommand should be installed as a Knife plugin, using RubyGems. ## INSTALLATION ### Pre-Requisites * Ruby – 1.9.3 * Rubygems * Chef (Package or Gem) – 11.4.4 Note: If you install chef as a package then ruby will come as embedded into it. No need to install ruby if you install chef as a package ### Install Fog library Note: If you have already installed default fog gem, please uninstall it and then install using these steps * Clone the fog-repo * git clone https://github.com/ComputeNext/fog-1.15.0.git * Build fog gem * cd fog-1.15.0 * gem build fog.gemspec * Install fog gem * gem install fog-1.15.0.gem ### Install knife-computenext plugin To install the knife computenext plugin using RubyGems, follow the steps below * Clone the knife-computenext-json repo * git clone https://github.com/ComputeNext/knife-computenext.git * Build knife-computenext gem * cd knife-computenext * gem build knife-computenext.gemspec * Install knife-computenext gem * gem install knife-computenext-0.2.gem ### Provide Auth Credentials • Create a knife.rb (in the path where going to use knife calls) • Give the access and secret keys along with the auth_url in knife.rb in the format mentioned below knife[:computenext_access_key] = 'xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' knife[:computenext_secret_key] = 'yyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy' knife[:computenext_auth_url] = 'http://cws.computenext.com/' ## AVAILABLE COMMANDS ![knife-plugin] (http://cloudenablers.files.wordpress.com/2014/02/knife-computenext-commands-list.jpg) ## SAMPLE REQUESTS Note: Use "knife computenext --help" to see the command list #### To retrieve all Image details $ knife computenext queryresources image You can supply a query to display a particular image detail also. Eg. $ knife computenext queryresources virtualmachine platform=VC #### To retrieve all Virtual Machine details $ knife computenext queryresources virtualmachine You can supply a query to display a particular VM detail also. Eg. $ knife computenext queryresources virtualmachine provider=Hegerys #### Creating a Virtual Machine $ knife computenext virtualmachine create [NAME] [DESCRIPTION] [VM URI] [IMAGE URI] #### To retrieve IP details $ knife computenext virtualmachine retrieve [VIRTUALMACHINE_INSTANCE_ID] #### Deleting a Virtual Machine $ knife computenext virtualmachine delete [VIRTUALMACHINE_INSTANCE_ID]
{ "redpajama_set_name": "RedPajamaGithub" }
381
30848 has 16 divisors (see below), whose sum is σ = 61710. Its totient is φ = 15360. The previous prime is 30841. The next prime is 30851. The reversal of 30848 is 84803. It can be divided in two parts, 30 and 848, that added together give a palindrome (878). It can be written as a sum of positive squares in only one way, i.e., 23104 + 7744 = 152^2 + 88^2 . It is an inconsummate number, since it does not exist a number n which divided by its sum of digits gives 30848. It is not an unprimeable number, because it can be changed into a prime (30841) by changing a digit. 30848 is an untouchable number, because it is not equal to the sum of proper divisors of any number. It is a polite number, since it can be written as a sum of consecutive naturals, namely, 8 + ... + 248. 230848 is an apocalyptic number. It is a practical number, because each smaller number is the sum of distinct divisors of 30848, and also a Zumkeller number, because its divisors can be partitioned in two sets with the same sum (30855). 30848 is a primitive abundant number, since it is smaller than the sum of its proper divisors, none of which is abundant. 30848 is an equidigital number, since it uses as much as digits as its factorization. 30848 is an odious number, because the sum of its binary digits is odd. The sum of its prime factors is 255 (or 243 counting only the distinct ones). The product of its (nonzero) digits is 768, while the sum is 23. The square root of 30848 is about 175.6359872008. The cubic root of 30848 is about 31.3623793835. The spelling of 30848 in words is "thirty thousand, eight hundred forty-eight".
{ "redpajama_set_name": "RedPajamaC4" }
4,694
from django.contrib import admin # Register your models here. from .models import Product, Variation, ProductImage, Category, ProductFeatured class ProductImageInline(admin.TabularInline): model = ProductImage extra = 0 max_num = 10 class VariationInline(admin.TabularInline): model = Variation extra = 0 max_num = 10 class ProductAdmin(admin.ModelAdmin): list_display = ['__unicode__', 'price'] inlines = [ ProductImageInline, VariationInline, ] class Meta: model = Product admin.site.register(Product, ProductAdmin) # admin.site.register(Variation) admin.site.register(ProductImage) admin.site.register(Category) admin.site.register(ProductFeatured)
{ "redpajama_set_name": "RedPajamaGithub" }
9,752
Q: How to Parse a specific string in C# I have this structure: { "longUrl" :"http://www.sample.com", "bok" :1, "url" :"http://pleasegetme.com ", "title" :"" } //equivalent "{ \n \"longUrl\" :\"http://www.sample.com/\", \n \"bok\" :1, \n \"url\" :\"http://pleasegetme.com \", \n \"title\" :\"\"\n }" I have this function public string Domain1Helper(string longText) { Regex rgxUrl = new Regex("\"url\":\"(.*?)\""); Match mUrl = rgxUrl.Match(longText); string url = Regex.Replace(mUrl.Groups[1].Value, @"\\", ""); return url; } What I want to get is http://pleasegetme.com. What is the wrong in my Domain1Helper method? A: What you have there is a JSON string. You can parse this using a library called Json.Net. You can find this as a nuget package. You can then use the following code to pick out the strings you want. JObject jo = JObject.Parse(longtext); Console.WriteLine(jo["longUrl"].Value.ToString()); // Outputs 'http://www.sample.com' A: AJB, You have an error in your RegEx. That being said you should use a JSON deserializer, like JSON.NET. In the function Domain1Helper it should be: Regex rgxUrl = new Regex("\"url\"\\s+:\"(.*?)\""); Notice the \s+ ? A: It is a freaking JSON formatted string. Use a JSON deserializer such as JSON.NET. I'll leave it to you on which one you'd want to use. Here is the root object generated using json2csharp.com public class RootObject { public string longUrl { get; set; } public int bok { get; set; } public string url { get; set; } public string title { get; set; } } Example using JSON.NET: using Newtonsoft.Json; // Namespace is something like this string json = "{ \n \"longUrl\" :\"http://www.sample.com/\", \n \"bok\" :1, \n \"url\" :\"http://pleasegetme.com \", \n \"title\" :\"\"\n }"; RootObject rootObject = JsonConvert.DeserializeObject<RootObject>(json); string url = rootObject.url; // Do something with the url A: You have included the escape strings \. If you remove those, it should parse just fine, as in here: https://regex101.com/r/hK7xR7/1 Note, that you method should look like this: public string Domain1Helper(string longText) { Regex rgxUrl = new Regex(@"\"url\" :\"(.*?)\""); Match mUrl = rgxUrl.Match(longText); string url = Regex.Replace(mUrl.Groups[1].Value, @"\\", ""); return url; } And alternative solution would be using one json library, which is outlined here: https://msdn.microsoft.com/en-us/library/cc197957(v=vs.95).aspx
{ "redpajama_set_name": "RedPajamaStackExchange" }
5,190
Louis Tomlinson Said He Didn't "Approve" That One Direction Sex Scene in Euphoria Bianca Betancourt How to Know If Your Hymen Is Broken: Facts About Your Virginity This Heartbreaking Euphoria Fan Theory Completely Changed How I Saw the Show De Elizabeth How My Traumatic Experience With Upskirting Taught Me How to Be an Activist Louis Tomlinson's Biological Father Has Been Diagnosed With Cancer Less than two years after Louis's mom died. Emma Sarran Webster MANCHESTER, ENGLAND - NOVEMBER 09: Louis Tomlinson performs on stage during Key 103 Live held at the Manchester Arena on November 9, 2017 in Manchester, England. (Photo by Anthony Devlin/Getty Images)Anthony Devlin/Getty Images In 2016, Louis Tomlinson lost his mother, Johannah Deakin, to leukemia. Now, 18 months later, the One Direction star's biological father is also facing a cancer diagnosis. According to The Sun, Troy Austin recently underwent surgery to remove a cancerous tumor on his liver. Louis's estranged father told the paper that he believes his the liver cancer was due to his own excessive drinking and smoking, as well as a poor diet. "Some days I wouldn't eat at all but would just drink and smoke," he said. "I would drink to celebrate the good times and drink to cope with the bad. Whatever life threw at me I would drink." Following his surgery, Troy praised the doctors and nurses with England's National Health Service (NHS) — the same week his son attended the NHS Heroes Awards in London and presented Manchester bombing survivor Freya Lewis with an award. Louis's mom, Johannah, split from Troy in 1997 (when Louis was five) before having four more children with Mark Tomlinson, whose last name Louis uses, according to The Daily Mail. Per The Sun, Louis and Troy have not spoken in about five years, but Troy — who said his "life is changing now" — is holding out hope for a reunion. "If he ever wanted to make contact then I would be happy for that to happen," he said. Louis has not commented publicly on Troy's diagnosis. The singer was very close with his mom, who he previously said was a huge source of support for him. "Sometimes my reservation, or my confidence, might have prevented me from doing something," he told The Guardian after she died. "And I've needed a mum in the past to kick me up the arse and go: 'You're doing it.'" Let us slide into your DMs. Sign up for the Teen Vogue daily email. Want more from Teen Vogue? Check this out: Louis Tomlinson Fulfilled His Mom's Dying Wish and Made Up With Zayn Malik Keywordslouis tomlinsoncancerOne direction Cara Delevingne Confirmed She's Been Dating Ashley Benson for a Year Allie Gemmill Ariana Grande Said Relationship With Mac Miller Wasn't Perfect, But He "Didn't Deserve" His Demons Lauren Rearick Dua Lipa and Anwar Hadid Were Photographed Cuddling at a Music Festival I Was Diagnosed With Breast Cancer For the First Time at Age 16 Nikia Hammonds-Blakely, as told to Brittney McNamara
{ "redpajama_set_name": "RedPajamaCommonCrawl" }
6,125
var casper = require("casper").create(); casper.start('test/fixtures/basicSite.html'); casper.then(function() { this.test.assert(casper.cli.args.indexOf('baz') == 0, 'expected baz to be an argument'); this.test.assert(typeof casper.cli.options['foo'] !== 'undefined', 'expected foo to be an option'); this.test.assert(casper.cli.options.foo == 'bar', 'expected foo option to be bar'); }); casper.run(function() { this.test.done(3); this.test.renderResults(true, 0, this.cli.get('save') || false); });
{ "redpajama_set_name": "RedPajamaGithub" }
9,198
Q: Como fazer busca e ordenação de TemplateFields em um GridView? Basicamente, tenho uma tabela (GridView) em uma página aspx cujos dados estão definidos por TemplateFields. Por exemplo: <asp:GridView runat="server" ID="grdProdutos"> <Columns> <asp:TemplateField HeaderText="Produto"> <ItemTemplate> <asp:Label runat="server" ID="lblProduto" Text='<%# Eval("NomeProduto")%>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Tipo"> <ItemTemplate> <asp:Label runat="server" ID="lblTipo" Text='<%# Eval("TipoProduto")%>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Preço"> <ItemTemplate> <asp:Label runat="server" ID="lblPreco" Text='<%# Eval("PrecoProduto")%>'></asp:Label> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> Os métodos usados no code behind são os seguintes: RepositorioProdutos banco = new RepositorioProdutos(); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { CarregarGridView(); } } public void CarregarGridView() { var produtos = banco.ObterProdutos(); if (produtos != null) { grdProdutos.DataSource = produtos; grdProdutos.DataBind(); } else { throw new Exception("Nenhum produto encontrado."); } } Gostaria de saber como poderia implementar uma busca por produtos (procurando um termo em qualquer campo) e como poderia implementar uma ordenação clicando no nome da coluna que eu gostaria de ordenar (como no Explorer do Windows), sem precisar fazer uma nova consulta ao banco (ou seja, sem precisar acessar o método banco.ObterProdutos() novamente). Obs.: para a busca, estou considerando o uso de um textBox que será usado para inserir a palavra-chave da busca, e um botão que acionará a busca. A: São duas perguntas distintas, na minha opinião não é uma tarefa tão simples quando parece, portanto essa resposta não pretende ser definitiva, mas apenas tentar mostrar um ponto de partida. Sobre o sorting: O GridView possui um evento OnSorting que fornece um parâmetro com uma propriedade SortExpression que contém uma string normalmente com o nome do campo a ser ordenado. Ocorre que com Linq não conseguimos ordernar os campos a partir de uma string, para isso precisamos de uma library System.Linq.Dynamic que permite utilizarmos strings em vez das lambda expressions. Portanto, instale a library System.Linq.Dynamic pelo nuget, depois certifique-se de fazer referência no seu código: using System.Linq.Dynamic; Agora altere seu gridView para aceitar sorting: <asp:GridView ID="grdProdutos" AllowSorting="true" OnSorting="gridView_Sorting" runat="server"> Nas colunas do gridView precisamos definir a SortExpression que informa por qual campos queremos ordenar: <asp:TemplateField HeaderText="Produto" SortExpression="Produto"> E no seu codebehind: protected void grdProdutos_Sorting(object sender, GridViewSortEventArgs e) { var gridView = (GridView)sender; for (int i = 0; i < gridView.Columns.Count; i++) if (gridView.Columns[i].SortExpression == e.SortExpression) if (e.SortExpression.EndsWith(" desc")) gridView.Columns[i].SortExpression = e.SortExpression.Replace(" desc", ""); else gridView.Columns[i].SortExpression = e.SortExpression + " desc"; gridView.DataSource = banco.ObterProdutos().OrderBy(e.SortExpression); gridView.DataBind(); } Lembrando que o Dynamic Linq funciona com tipos IQueryable<T>, portanto se seu método ObterProdutos retorna um IEnumerable<T> modifique o mesmo, provavelmente evitando fazer uma chamada para ToList(). Para pesquisar você pode fazer com o input e um botão parar disparar e usar o valor do input para pesquisar em seguida define novamente o DataSource, por exemplo: gridView.DataSource = banco.ObterProdutos().Where(m => m.Produto.StartsWith(valordoinput); gridView.DataBind(); A parte chata vai ser manter a busca e o sort juntos. Você precisaria criar um método que vai buscar o SortExpression de cada uma das colunas do gridView assim como a expressão de pesquisa que retorne uma lista de produtos com Where e OrderBy. A: Se o Grid já estiver populado você pode usar o próprio ds da grid para retomar as informações sem a necessidade de buscar novamente na base.. Acredito que isso daria certo.. IList<seuObj> variavel = this.GridView1.DataSource as IList<seuObj>; if (variavel != null){ GridView1.DataSource = variavel.OrderBy(x => x.campo).ToList(); GridView1.DataBind(); }
{ "redpajama_set_name": "RedPajamaStackExchange" }
9,733
Our most recent visit to Yas Viceroy brought us to the acclaimed Indian restaurant Angar. The venue's name derives from the Hindi word for 'ember' and the connotations with fire as a cooking method are immediately evident. A colour scheme of vibrant reds guides diners' attention towards an openshow kitchen with the focal feature being the tandoori oven (but more on that later). Service is friendly, efficient and knowledgeable and comes from a predominantly male team, dressed in traditional tunics that keep with the colour scheme of fiery reds, burnt orange and earthy browns. While the menu is an expansive two-page affair, the team is more than happy to lead the way towards suitable dishes with no sign of upselling. Broken into distinct sections for breads, soups, starters, tandoor, vegetarian and non-vegetarian (there's even a vegan menu) the selection gears towards the more traditional choices such as butter chicken while sensibly including a handful of more obscure options. Our Duck Galouti represents one of Angar's surprises and brings a sense of fine dining modernity to a cuisine usually associated with comfort food. A duo of minced duck patties are particularly well seasoned, sat upon a fragrant saffron bread and topped with generous pieces of foie gras making for an audacious blend of texture and flavour. As expected flavours take prominence throughout the meal and the starter of Saffron Coconut Scallops comes served in a sweet and velvety sauce that works to complement the delicate flesh of the poached scallops. These intricate sauces are likely to be the element we'll remember most about our visit to Angar and the signature main course of Lemon Chili Lobster Curry represents another strong dish. Two pieces of poached lobster take prominence within a gravy of coconut and kaffir lime that's seductively aromatic without taking away from the crustacean as the focus of the dish. The curry had us reaching for the light and fluffy naan breads, which straight from the tandoor are easy contenders for the best in the city. We actually order extra to mop up the gravy (it's that good)! Yet the tandoor remains the focus of any meal at Angar and the Kebab Platter shouldn't be missed. Presented on a sleek black slate the chargrilled taste is achieved via the intense heat of the clay oven, sealing in the meats natural fats. Made up of tandoori prawns, tandoori chicken tikka, salmon tikka and a lamp chop, the cookery method may be the same but the unique spice blends ensure each item achieves a unique and prominent composition of flavour. With many of the dishes presented on red crockery, the name of the restaurant is carried into the culinary journey, with the presentation of each menu item well thought out and executed with precision to emphasise the notion of tandoor cookery. The desserts retain a modern flair on a handful of Indian classics of which we'd recommend the rich and decadent Chocolate Cardamom Cake and the warm Gulab Jaman served with an interesting fig and ginger ice cream.
{ "redpajama_set_name": "RedPajamaC4" }
5,081
The Neighbor (; also known as My Neighbor) is a 2012 South Korean suspense thriller starring Kim Yunjin in the lead role. In the film, residents of an apartment building suspect that one of their neighbors may be a serial killer responsible for the murder of a residing family's daughter. As the victim's stepmother investigates, the killer begins to target another young girl. Based on Kang Full's eponymous webtoon, the film sold over 2.43 million tickets, becoming the highest grossing film among the movie adaptations of Kang Full's works. Plot What would you do if you found out someone living in your building is a serial killer? A man, whose identity is known, kills his own neighbors ― including a middle-school girl ― living in his building, and continues to stay there even after committing the grisly murders. All the neighbors in the film are reluctant to act due to self-interest. One character does not want the property price to fall after a scandal. Another wants to avoid attention from the police, as he has just five months left before his statute of limitations runs out. Some simply do not want to meddle without evidence, clinging to their daily routines. Meanwhile, the criminal continues to kill. Cast Kim Yunjin - Song Kyung-hee, stepmother of dead girl Kim Sae-ron - Won Yeo-seon (first victim) / Yoo Soo-yeon Chun Ho-jin - Pyo Jong-rok Jang Young-nam - Ha Tae-seon Im Ha-ryong - Kim Sang-young Ma Dong-seok - Ahn Hyuk-mo, ex-con and loan shark Kim Sung-kyun - Ryu Seung-hyuk, crew man of fishing vessel Do Ji-han - Ahn Sang-yoon Kim Jung-tae - Kim Jong-guk, ghost Jung In-gi - Kim Hong-jung, Ahn Hyuk-mo's uncle Kim Ki-cheon - Hwang Jae-yeon, security guard 1 Cha Hyeon-woo - Detective Lee Kwak Min-seok - Ahn Dong-joo, pizza store owner Cha Kwang-soo - Won Jung-man, Won Yeo-seon's father Awards and nominations 2012 Grand Bell Awards Best New Actor - Kim Sung-kyun 2012 Korean Association of Film Critics Awards Best New Actor - Kim Sung-kyun 2012 Blue Dragon Film Awards Nomination - Best New Director - Kim Hwi Nomination - Best Supporting Actor - Ma Dong-seok Nomination - Best Supporting Actress - Jang Young-nam 2012 Busan Film Critics Awards Best New Actor - Kim Sung-kyun 2013 Baeksang Arts Awards Best Supporting Actor - Ma Dong-seok Nomination - Best New Director - Kim Hwi 2013 Buil Film Awards Nomination - Best Supporting Actor - Ma Dong-seok See also Law Crime Murder Abuse Child abuse References External links The Neighbor original webtoon at Daum 2012 films 2012 crime thriller films 2010s serial killer films South Korean crime thriller films South Korean serial killer films Films set in apartment buildings Films shot in Busan Films based on South Korean webtoons Films based on works by Kang Full Lotte Entertainment films 2010s Korean-language films Live-action films based on comics 2010s South Korean films
{ "redpajama_set_name": "RedPajamaWikipedia" }
6,620
\section{Introduction} The Casimir effect \cite{Casimir48} is a jewel with many facets. First, it is a macroscopic effect of the irreducible field fluctuations which fill quantum vacuum. As a crucial prediction of quantum theory, it has thus been the focus of a number of works (see reviews in~\cite{Milonni94,LamoreauxAJP99 BordagPR01,MiltonJPA05,BarreraNJP06,CasimirPhysics,LambrechtCasimir11}). Then, it has fascinating interfaces with some of the most important open questions in fundamental physics. It is connected with the puzzles of gravitational physics through the problem of vacuum energy \cite{GenetDark02,JaekelMass08} as well as with the principle of relativity of motion through the dynamical Casimir-like effects \cite{JaekelRPP97}. Effects beyond the Proximity Force Approximation also make apparent the rich interplay of vacuum energy with geometry \cite{BalianPoincare03,BalianSigrav04,ReynaudJPA08} (more discussions below). Casimir physics also plays an important role in the tests of gravity at sub-millimeter ranges \cite{Fischbach98,AdelbergerARNPS03}. Strong constraints have been obtained in short range Cavendish-like experiments \cite{KapnerPRL07}. Should an hypothetical new force have a Yukawa-like form, its strength could not be larger than that of gravity if the range is larger than 56$\mu$m. For scales of the order of the micrometer, gravity tests are performed by comparing the results of Casimir force measurements with theor ~\cite{LambrechtPoincare03,OnofrioNJP06,DeccaEPJC07}. Other constraints can be obtained with atomic or nuclear force measurements (for a recent overview of short-range tests, see~\cite{AntoniadisCRAS11}). Finally, the Casimir force and closely related Van der Waals force are dominant at micron or sub-micron distances. This entails that they have strong connections with various active domains and interfaces of physics, such as atomic and molecular physics, condensed matter and surface physics, chemical and biological physics, micro- and nano-technology~\cite{Parsegian06}. In the following, we will stress that Casimir physics reveals optomechanical couplings of macroscopic mirrors with quantum vacuum fields. \section{The puzzle of vacuum energy} The classical idealization of space as being absolutely empty was already affected by the advent of statistical mechanics, when it was realized that space is in fact filled with black body radiation. The first quantum law was designed by Planck precisely to explain the properties of this black body radiation~\cite{Planck00}. In modern terms, it gave the mean energy per electromagnetic mode as the product $\overline{n}\hbar\omega$ of the photon energy $\hbar \omega$ by the mean number of photons per mode $\overline{n}=\left(\exp\frac{\hbar\omega}{k_\mathrm{B}T}-1\right)^{-1}$. Like Einstein, Planck was aware of the unsatisfactory character of his derivation. Among other physicists, they attempted for years to give more satisfactory treatments by studying in more detail the interaction between matter and radiation. These attempts led to the discovery by Einstein of the quantum absorption-emission laws and of the Bose statistics (see \cite{Wolf79,MilonniAJP91,Sciama91}). In 1911, Planck \cite{Planck12} wrote a new expression for the mean energy per mode $\left(\overline{n}+\frac12\right)\hbar\omega$ which contained a zero-point energy $\frac12\hbar\omega$ besides the black body energy. In contrast to the latter, the zero-point fluctuations were still present at zero temperature. The arguments thus used by Planck cannot be considered as consistent today. The first known argument still acceptable today was proposed by Einstein and Stern~\cite{Einstein13} in 1913~: the second Planck law (but not the first one) reproduces the classical limit $\left(\overline{n}+\frac12\right)\hbar\omega= k_{{\rm B}}T+O\left( \frac{1}{T}\right)$ at high temperatures $T\to\infty$. Amazingly, this argument fixes the magnitude of zero-point fluctuations, essentially visible at low temperatures, by requiring their disappearance at high temperatures to be as perfect as possible~! Some physicists took zero-point fluctuations seriously, long before the advent of the fully developed quantum theory. Debye insisted on observable consequences of zero-point atomic motions, in particular through their effects on the intensities of diffraction peaks \cite{Debye14}. Mulliken produced experimental evidence of the effects of zero-point motions by studying isotopic shifts in vibrational spectra of molecules \cite{Mulliken24}. Nernst was the first physicist to notice, in 1916, that zero-point fluctuations of the electromagnetic field constituted a challenge for gravitation theory~\cite{Nernst16,Browne95}. When the energy density is calculated by summing up the energies over all field modes, a finite value is obtained for the first Planck law (this is the solution of the `ultraviolet catastrophe') but an infinite value is produced from the second law. When a high frequency cutoff $\omega _{{\rm max}}$ is introduced, the calculated energy density $\frac{\left( \hbar \omega _{{\rm max}}\right) ^{4} {8\pi^{2}\left( \hbar c\right) ^{3}}$ is finite but still much larger than the mean energy observed in the world around us through gravitational phenomena~\cite{WeinbergRMP89}. The ratio of calculated to observed energy density has a huge value, up to $10^{120}$ in the most extreme estimations~\cite{AdlerAJP95}. This major problem, known since 1916 and still unsolved today, has led famous physicists to deny the reality of vacuum fluctuations. In particular, Pauli stated in his textbook on Wave Mechanics~\cite{Pauli33} : \emph{At this point it should be noted that it is more consistent here, in contrast to the material oscillator, not to introduce a zero-point energy of $\frac12\hbar\omega$ per degree of freedom. For, on the one hand, the latter would give rise to an infinitely large energy per unit volume due to the infinite number of degrees of freedom, on the other hand, it would be principally unobservable since nor can it be emitted, absorbed or scattered and hence, cannot be contained within walls and, as is evident from experience, neither does it produce any gravitational field.} A part of these statements is simply unescapable~: it is just a matter of evidence that the mean value of vacuum energy does not contribute to gravitation as an ordinary energy. But it is certainly no longer possible to uphold today that vacuum fluctuations have no observable effects. Certainly, vacuum fluctuations are \emph{scattered} by matter, as shown by their numerous effects in atomic~\cite{CohenTannoudji92} and subatomic~\cite{Itzykson85} physics. And the Casimir effect is nothing but the evidence of vacuum fluctuations making their existence manifest when being \emph{contained within walls}. \section{The Casimir force} Casimir calculated the force between a pair of perfectly smooth, flat and parallel plates in the limit of zero temperature and perfect reflection. In this idealized case, the expressions for the force $F_\Cas$ and energy $E_\Cas$ reveal a universal effect resulting from the confinement of vacuum fluctuations \begin{eqnarray} F_\Cas=-\frac{\dd E_\Cas}{\dd L} \quad,\quad E_\Cas= - \frac{\hbar c \pi^2 A}{720 L^3} \end{eqnarray} with $L$ the distance, $A$ the area, $c$ the speed of light and $\hbar$ the Planck constant. This universality is explained by the saturation of the optical response of mirrors reflecting 100\% of incoming fields. In particular the expressions $F_\Cas$ and $E_\Cas$ do not depend on the atomic structure constants. This idealization is no longer tenable for the real mirrors used in the experiments. It is thus necessary to take into account the optical properties of these mirrors~\cite{LambrechtEPJ00,SvetovoyPRB08}. The most precise experiments have been performed with metallic mirrors which are good reflectors only at frequencies smaller than their plasma frequency $\omega_\P$. Their optical response is described by a reduced dielectric function written at imaginary frequencies $\omega=i\xi$ as \begin{eqnarray} \varepsilon \left[i\xi\right] = \hat{\varepsilon}\left[i\xi\right] + \frac{\sigma \left[i\xi\right] }{\xi} \quad,\quad \sigma \left[i\xi\right] = \frac{\omega_\P^2}{\xi+\gamma} \end{eqnarray} The function $\hat{\varepsilon} \left[i\xi\right] $ represents the contribution of interband transitions and is regular at the limit $\xi\to0$. Meanwhile $\sigma \left[i\xi\right]$ is the reduced conductivity ($\sigma$ is measured as a frequency and the SI conductivity is $\epsilon_0\sigma$) which describes the contribution of the conduction electrons. A simplified description corresponds to the lossless limit $\gamma \to 0$ often called the plasma model. As $\gamma$ is much smaller than $\omega_\P$ for a metal such as Gold, this simple model captures the main effect of imperfect reflection. However it cannot be considered as an accurate description since a much better fit of tabulated optical data is obtained with a non null value of $\gamma$. When taking into account the imperfect reflection of the metallic mirrors, one finds that the Casimir force is reduced with respect to the ideal Casimir expression at all distances for a null temperature. This reduction is conveniently represented as a factor $\eta_F = F/F_\Cas$ where $F$ is the real force and $F_\Cas$ the ideal expression. For the plasma model, there is only one length scale, the plasma wavelength $\lambda_P = 2\pi c/\omega_P $ (136nm for Gold). The ideal Casimir formula is recovered ($\eta_F\to1$) at large distances $L\gg\lambda_P$, as expected from the fact that metallic mirrors tend to be perfect reflectors at low frequencies $\omega \ll\omega_P$. At short distances in contrast, a significant reduction of the force is obtained ($\eta_F\propto L/\lambda_P$), as a consequence of the fact that metallic mirrors are poor reflectors at high frequencies $\omega \gg\omega_P$. In other words, there is a change in the power law for the variation of the force with distance. This change can be understood as the result of the Coulomb interaction of surface plasmons living at the two matter-vacuum interfaces~\cite{GenetAFLB04,IntravaiaPRL05}. Experiments are performed at room temperature so that the effect of thermal fluctuations has to be added to that of vacuum fields~\cite{SchwingerAP78,GenetPRA00}. Significant thermal corrections appear at distances $L$ larger than a critical distance determined by the thermal wavelength $\lambda_T$ (a few micrometers at room temperature). Bostr\"{o}m and Sernelius were the first to remark that the small non zero value of $\gamma$ had a significant effect on the force at non null temperatures~\cite{BostromPRL00}. In particular, there is a large difference at large distances between the expectations calculated for $\gamma=0$ and $\gamma\neq0$, their ratio reaching a factor 2 when $L\gg\lambda_T$. It is also worth emphasizing that the contribution of thermal fluctuations to the force is opposite to that of vacuum fluctuations for intermediate ranges $L\sim\lambda_T$. This situation has led to a blossoming of contradictory papers (see references in~\cite{ReynaudQfext04,BrevikNJP06,IngoldPRE09}). As we will see below, the contradiction is also deeply connected to the comparison between theory and experiments. Another important feature of the recent precise experiments is that they are performed in the geometry of a plane and a sphere. The estimation of the force in this geometry uses the so-called \textit{Proximity Force Approximation} (PFA)~\cite{DerjaguinQR68} which amounts to integrating over the distribution of local inter-plate distances the pressure calculated in the geometry with two parallel planes. But Casimir forces are certainly not additive~! The PFA can only be valid when the radius $R$ of the sphere is much larger than the separation $L$ between the plane and the sphere. Even in this case its accuracy remains a question of importance for the comparison between theory and experiments. We now discuss the status of comparisons between Casimir experiments and theory. After years of improvement on both sides, we have to face discrepancies in these comparisons : there are differences between experimental results and theoretical predictions drawn from the expected models, as well as disagreements between some recent experiments. On one hand, there have been experiments in Purdue and Riverside for approximately ten years, the results of which point to an unexpected conclusion (see~\cite{DeccaAP05,DeccaPRD07,KlimchitskayaRMP09}). The Purdue experiment uses dynamic measurements of the resonance frequency of a microresonator. The shift of the resonance gives the gradient of the Casimir force in the plane-sphere geometry, which is also (within PFA) the Casimir pressure between two planes. The typical radius of the sphere is $R=150\mu$m and the range of distances $L=0.16-0.75\mu$m. The results appear to fit predictions obtained from the lossless plasma model $\gamma=0$ rather than those corresponding to the expected dissipative Drude model $\gamma\neq0$ (see Fig.1 in~\cite{DeccaPRD07}), in contradiction with the fact that Gold has a finite static conductivity $\sigma_0 = \omega_\P^2/\gamma$. Note that these experiments are performed at distances where the thermal contribution as well as the effect of $\gamma$ are not so large, so that the estimation of accuracy is a critical issue in these experiments. On the other hand, there is now a new experiment in Yale~\cite{SushkovNatPh11}, where a much larger sphere $R=156$mm is used, allowing for measurements at larger distances $L=0.7-7\mu$m. The thermal contribution is large there and the difference between the predictions at $\gamma=0$ and $\gamma\neq0$ is significant. Another problem appears which is the large contribution of the electrostatic patch effec ~\cite{SpeakePRL03,ChumakPRB04,KimPRA10,deManJVST10,LamoreauxCasimir11}. After subtraction of this contribution of the patch effect, the results of the Yale experiment fit the expected Drude model. Of course, these new results have to be confirmed by further studies~\cite{MiltonNatPh11}. The conclusion of this discussion is that the Casimir effect, now measured in several experiments, is however not tested at the 1\% level, as has been sometimes claimed. In particular, the patch effect remains a source of concern for Casimir experiments, as for other precision measurements (see examples in~\cite{CampJAP91,TurchettePRA07,DeslauriersPRL06 RobertsonCQG06,EpsteinPRA07,PollackPRL08,AdelbergerPPNP09 EverittPRL11,ReasenbergCQG11}). The patch distribution has not been measured in any of the experiments discussed above and progress could of course come with better characterization and control of surfaces. The related problem of surface roughness has also to be studied in more detail~\cite{vanZwolPRB09,BroerEPL11,vanZwolCasimir11}. We note also that the aspect ratio $L/R$ lies in the range $[10^{-3},5\times10^{-3}]$ for the Purdue experiment, $[5\times10^{-5},5\times10^{-6}]$ for the Yale experiment, so that the corrections to PFA could have quite different effects in the two cases. \section{The Casimir effect in the scattering approach} The best tool available for addressing these questions is the scattering approach. This approach has been used for years for evaluating the Casimir force between non perfectly reflecting mirrors. It is today the best solution for calculating the force in arbitrary geometries~\cite{LambrechtNJP06}. The basic idea is that mirrors are described by their scattering amplitudes. It can be simply illustrated with the model of scalar fields propagating along the two directions on a line (1-dimensional space; see references in \cite{JaekelRPP97}). Each mirror is described by a scattering matrix containing reflection and transmission amplitudes. Two mirrors form a Fabry-Perot cavity described by a scattering matrix $S$ which can be deduced from the two elementary matrices. The Casimir force then results from the difference of radiation pressures exerted onto the inner and outer sides of the mirrors by the vacuum field fluctuations~\cite{JaekelJP91}. Equivalently, the Casimir free energy can be derived from the frequency shifts of all vacuum field modes due to the presence of the cavity. The same discussion can be extended to the geometry of two plane and parallel mirrors aligned along the axis $x$ and $y$, described by specular reflection and transmission amplitudes which depend on frequency $\omega$, the transverse vector $\bk \equiv \left( k_x,k_y\right)$ and the polarization $p=\TE,\TM$. A few points have to be treated with care when extending the derivation from 1-dimensional space to 3-dimensional space~: evanescent waves contribute besides ordinary modes freely propagating outside and inside the cavity; dissipation has to be accounted for~\cite{GenetPRA03}. The properties of the evanescent waves are described through an analytical continuation of those of ordinary ones, using the well defined analytic behavior of the scattering amplitudes. At the end of this derivation, this analytic properties are also used to perform a Wick rotation from real to imaginary frequencies. The sum of all phaseshifts leads to the expression of the Casimir free energy $\calF$ \begin{eqnarray} \label{CasimirFreeEnergy} &&\calF = \sum_\bk \sum_p k_\B T \sum_m{}^\prime \ln d(i\xi_m,\bk,p) \\ &&d = 1 - r e^{ -2\K L } \,,\quad \xi_m \equiv \frac{2\pi m k_\B T}\hbar \,,\quad \K\equiv \sqrt{\bk^2+\frac{\xi^2}{c^2}} \nonumber \end{eqnarray} $\sum_\bk \equiv A \int\frac{\dd^2\bk}{4\pi^2}$ is the sum over transverse wavevectors with $A$ the area of the plates, $\sum_p$ the sum over polarizations and $\sum_m^\prime$ the Matsubara sum (sum over positive integers $m$ with $m=0$ counted with a weight $\frac12$); $d$ is the denominator describing cavity resonances; $r\equiv r_1 r_2$ is the product of the reflection amplitudes of the mirrors as seen by the intracavity field; $\xi$ and $\K$ are the counterparts of frequency $\omega$ and longitudinal wavevector $k_z$ after the Wick rotation. This expression reproduces the Casimir ideal formula in the limits of perfect reflection $r \rightarrow 1$ and null temperature $T \rightarrow 0$. But it is valid and regular at thermal equilibrium at any temperature and for any optical model of mirrors obeying causality and high frequency transparency properties. It can thus be used for calculating the Casimir force between arbitrary mirrors, as soon as the reflection amplitudes are specified. These amplitudes are commonly deduced from models of mirrors, the simplest of which is the well known Lifshitz model \cite{LifshitzJETP56,DzyaloshinskiiUspekhi61} which corresponds to semi-infinite bulk mirrors characterized by a local dielectric response function $\varepsilon (\omega)$ and reflection amplitudes deduced from the Fresnel law. In principle, the expression (\ref{CasimirFreeEnergy}) can still be written in terms of reflection amplitudes even when the optical response of the mirrors can no longer be described by a local dielectric response function. \section{The non specular scattering approach} The scattering formalism can be generalized one step further to calculate the Casimir force between stationary objects with arbitrary geometries. Now the scattering matrix $\calS$ is a larger matrix accounting for non-specular reflection and mixing different wavevectors and polarizations while preserving frequency. Of course, the non-specular scattering formula is the generic one while the specular limit can only be an idealization. The Casimir free energy can be written as a generalization of equation (\ref{CasimirFreeEnergy}) \begin{eqnarray} \label{CasimirFreeEnergyNS} &&\calF = k_\B T \sum_m{}^\prime \,\Tr \ln \calD (i\xi_m) \\ &&\calD = 1 - \calR_1 \exp^{ -\calK L } \calR_2 \exp^{ -\calK L } \nonumber \end{eqnarray} The symbol $\Tr$ refers to a trace over the modes at a given frequency. The matrix $\calD$ is the denominator containing all the resonance properties of the cavity formed by the two objects 1 and 2 here written for imaginary frequencies. It is expressed in terms of the matrices $\calR_1$ and $\calR_2$ which represent reflection on the two objects 1 and 2 and of propagation factors $\exp^{-\calK L}$. Note that the matrices $\calD$, $\calR_1$ and $\calR_2$, which were diagonal on the basis of plane waves when they described specular scattering, are no longer diagonal in the general case of non specular scattering. The propagation factors remain diagonal in this basis with their diagonal values written as in (\ref{CasimirFreeEnergy}). Clearly the expression (\ref{CasimirFreeEnergyNS}) does not depend on the choice of a specific basis. But it may be written in specific basis fitting the geometry under study. The multiple scattering formalism has been used in the past years by different groups using different notations (see as examples \cite{EmigJSM08,KennethPRB08,MiltonJPA08}). Numerous applications have been considered and some of them are discussed in the next section. \section{Applications to different geometries} Various geometries can be studied beyond the PFA by using the general expression (\ref{CasimirFreeEnergyNS}). For example, one can study plane or spherical plates, flat, rough or nanostructured surfaces, atoms, molecules or nanoparticles, as well as different combinations of these possibilities. The first applications were devoted to the effect of surface roughness on the normal Casimir force~\cite{GenetEPL03,MaiaNetoEPL05,MaiaNetoPRA05}. The case of corrugated plates is also interesting, in particular because it gives rise to lateral forces when the corrugations are shifted with respect to each other~\cite{RodriguesPRL06,RodriguesPRA07,ChiuPRB09} and to torques when they are misaligned~\cite{RodriguesEPL06}. In the geometry of a sphere above a grating, the normal Casimir force is affected in a manner which can be understood quantitatively by using the non specular scattering approac ~\cite{ChanPRL08,LambrechtPRL08,LambrechtNat08,BaoPRL10}. Applications have also been developed for the study of atoms in the vicinity of corrugated plates~\cite{MessinaPRA09,ContrerasPRA10}. Examples of such applications involve the use of Bose-Einstein condensates (BEC) as probes of vacuum affected by the proximity of a grooved surface~\cite{DalvitPRL08}, localization of matter waves in the disordered vacuum above a rough plate~\cite{MorenoPRL10}, and the driving of quantized vortices in a BEC by a contactless tranfer of angular momentum through the mediation of vacuum fluctuations~\cite{ImpensEPL10}. All these applications involve Casimir forces or torques beyond the regime of validity of the PFA. Efforts have also been devoted to the use of multiple scattering method to obtain explicit evaluations of the Casimir force in the plane-sphere geometry. Such calculations have first been performed for perfectly reflecting mirrors~\cite{MaiaPRA08}. They have then been done for the more realistic case of metallic mirrors described by a plasma model dielectric function~\cite{CanaguierPRL09}. More recently, it has become possible to make calculations which treat simultaneously plane-sphere geometry and non zero temperature, with dissipation taken into account~\cite{CanaguierPRL10}. In these calculations, the reflection matrices are written in terms of Fresnel amplitudes for plane waves on the plane mirror and of Mie amplitudes for spherical waves on the spherical mirror. The scattering formula is then obtained by writing transformation formulas from the plane waves basis to the spherical waves basis and conversely. The energy takes the form of an exact multipolar formula labeled by a multipolar index $\ell$. When doing the numerics, the expansion is truncated at some maximum value $\ell_\max$, which degrades the accuracy of the resulting estimation for very large spheres $x\equiv L/R<x_\min$ with $x_\min$ proportional to $\ell_\max^{-1}$. The results of these calculations may be compared to the only experiment devoted to the study of PFA in the plane-sphere geometry~\cite{KrausePRL07}. In this experiment, the force gradient $G$ was measured for various radii of the sphere and the results were used to constrain the value of the slope at origin $\beta_G$ of the function \begin{eqnarray} \rho_G(x)=\frac{G}{G^\PFA}=1+\beta_G x+O(x^2) \quad,\quad x\equiv \frac LR \end{eqnarray} where $x$ is the already discussed aspect ratio which characterizes the plane-sphere geometry. The constraint obtained in this experiment is read $\vert\beta_G\vert<0.4$. Its comparison with the theoretical value obtained for the slope $\beta_G$ by interpolating at low values of $x$ the numerically evaluated $\rho_G$ reveals a striking difference between the cases of perfect and plasma mirrors. The slope $\beta_G^\perf\sim-0.48$ obtained for perfect mirrors is indeed not compatible with the experimental bound. In contrast, the slope $\beta_G^\Gold\sim-0.21$ obtained for more precisely described gold mirrors is significantly smaller and, as a result, compatible with the experimental bound. The effect of temperature is also correlated with that of plane-sphere geometry. The first calculations accounting simultaneously for plane-sphere geometry, temperature and dissipation~\cite{CanaguierPRL10} show several striking features. The factor 2 between two planes at long distances calculated with Drude and plasma models is reduced to a factor below 3/2 in the plane-sphere geometry. Then, PFA underestimates the Casimir force within the Drude model at short distances, but overestimates it at all distances for the perfect reflector and plasma model. If the latter feature were conserved for the aspect ratios met in the experiments, the actual values of the Casimir force calculated within plasma and Drude model could be closer than what PFA suggests. This would affect the comparison of Casimir measurements with theory, which is still based on calculations using PFA. We finally refer to the study of the Casimir interaction between a dielectric nanosphere and a metallic plane~\cite{CanaguierPRA11}. The known Casimir-Polder formula is recovered at the limit of small nanospheres, which may be thought of as large atoms. Meanwhile an expression that takes into account the finite size of the sphere is found, which behaves better at small distances than the Casimir-Polder formula. This opens the way to new studies devoted to the optomechanics of nanoobjects in the vacuum modified by the proximity of a surface. \section*{Acknowledgments} The authors thank A. Canaguier-Durand, A. G\'erardin, R. Gu\'erout, J. Lussange, R.O. Behunin, I. Cavero-Pelaez, D.A.R. Dalvit, C. Genet, G.L. Ingold, F. Intravaia, M.-T. Jaekel, P.A. Maia Neto, V.V. Nesvizhevsky, A.Yu. Voronin, for contributions to the work reviewed in this paper, and the ESF Research Networking Programme CASIMIR (www.casimirnetwork. com) for providing excellent opportunities for discussions on the Casimir effect and related topics.
{ "redpajama_set_name": "RedPajamaArXiv" }
1,758
Praise for The Grain-Free, Sugar-Free, Dairy-Free Family Cookbook "As a busy mom and nutrition therapist, trying to strategize meals that everyone in my family will eat on a grain-, sugar-, and dairy-free diet can be exhausting. Leah Webb's book takes the work out of the daily 'what are we going to eat?' conundrum. The recipes are doable even on busy weekdays and have high kid-appeal. Her raw, relatable experiences with feeding and loving her children round this book into a parenting guide, nutrition primer, and cookbook. The best family focused cookbook I've ever come across." —Jess Higgins Kelley, coauthor of The Metabolic Approach to Cancer and Bioregulatory Medicine "Mothers are my heroes! And here another mother has had a steep learning curve in understanding how to heal her children. Having helped her own family, Leah Webb is now generously sharing what she learned on her journey. Parents will find this book very helpful! It is full of practical tips and good ideas on how to feed children from day to day and make the whole process happy and doable." —Natasha Campbell-McBride, MD, author of Gut and Psychology Syndrome "Leah Webb's The Grain-Free, Sugar-Free, Dairy-Free Family Cookbook should be in the hands of any family looking to manage multiple food allergies or simply eat healthfully in the face of chronic illness. If you are looking to learn the hows and whys of dietary change in an approachable way, as well as try some kid- and family-friendly recipes and meal plans, this book is for you!" —Mickey Trescott, NTP, author of The Autoimmune Paleo Cookbook and The Nutrient-Dense Kitchen "The Grain-Free, Sugar-free, Dairy-free Family Cookbook should not be seen as just part of an unusual dietary niche as more and more families are now faced with illnesses and will find important solutions in this comprehensive book. Leah Webb tells the compelling story of her own journey in a compassionate and informed manner. Inspired by her family's serious health conditions, she explored a grain-free, dairy-free, sugar-free diet due to its purported benefits on gut health and found it changed the way she cared for her two children. While filled with many time- and kid-friendly recipes, this book is more than just a cookbook. Practical strategies are offered to assist families transitioning to a healthful way of eating and in regaining health while on a budget. Sections on creating a kitchen, stocking the pantry, and meal planning offer practical advice for all readers and eaters, and the resources and thorough bibliography will help those desiring further inquiry. Make room for this book on your kitchen counter!" —Michelle Perro, MD, author of What's Making Our Children Sick? "Us mamas who walk the walk and have found the beautiful power of food as medicine want to shout from the rooftops to prevent others from enduring the pain of chronic illness. As we begin to understand the intricacies and differences of our microbiomes, we are realizing more and more that personalized medicine and intuitive eating are vital. Returning to a baseline with real food is where the magic unfolds. Yet for so many, with the swirling of life's busyness, this seems impossible. Leah not only inspires us with her own honest reflections, she sets us up for delicious success by teaching us the rudimentary and lost life skill of cooking. It does not have to be complicated, but you do have to be dedicated—a small price to pay for health. This is a must-read for anyone involved in the health and well-being of children! It's valuable information we all need to hear." —Hilary Boynton, author of The Heal Your Gut Cookbook THE GRAIN-FREE SUGAR-FREE DAIRY-FREE FAMILY COOKBOOK Simple and Delicious Recipes for Cooking with Whole Foods on a Restrictive Diet Leah Webb, MPH, CHC Chelsea Green Publishing White River Junction, Vermont London, UK Copyright © 2018 by Leah M. Webb. All rights reserved. No part of this book may be transmitted or reproduced in any form by any means without permission in writing from the publisher. The Faune typeface used in this document was created by Alice Savoie in the context of a commission by the Centre National des Arts Plastiques in partnership with the Groupe Imprimerie Nationale. Unless otherwise noted, all photographs by Thomas C. Webb. Photographs on pages 87, , , , , , , , , and from iStock.com. Project Manager: Patricia Stone Editor: Makenna Goodman Copy Editor: Diane Durrett Proofreader: Laura Jorstad Indexer: Linda Hallinger Designer: Melissa Jacobson Printed in the United States of America. First printing March, 2019. 10 9 8 7 6 5 4 3 2 1 19 20 21 22 23 Our Commitment to Green Publishing Chelsea Green sees publishing as a tool for cultural change and ecological stewardship. We strive to align our book manufacturing practices with our editorial mission and to reduce the impact of our business enterprise in the environment. We print our books and catalogs on chlorine-free recycled paper, using vegetable-based inks whenever possible. This book may cost slightly more because it was printed on paper that contains recycled fiber, and we hope you'll agree that it's worth it. Chelsea Green is a member of the Green Press Initiative (greenpressinitiative.org), a nonprofit coalition of publishers, manufacturers, and authors working to protect the world's endangered forests and conserve natural resources. The Grain-Free, Sugar-Free, Dairy-Free Family Cookbook was printed on paper supplied by LSC Communications that contains at least 10% postconsumer recycled fiber. Library of Congress Cataloging-in-Publication Data Names: Webb, Leah M., 1983– author. Title: The grain-free, sugar-free, dairy-free family cookbook : simple and delicious recipes for cooking with whole foods on a restrictive diet / Leah M. Webb, MPH, CHC. Description: White River Junction, Vermont : Chelsea Green Publishing, [2019] | Includes bibliographical references and index. Identifiers: LCCN 2018047428 | ISBN 9781603587594 (pbk.) | ISBN 9781603587600 (ebook) Subjects: LCSH: Low-carbohydrate diet—Recipes. | Gluten-free diet—Recipes. | Sugar-free diet—Recipes. Classification: LCC RM237.73 .W43 2019 | DDC 641.5/6383—dc23 LC record available at https://lccn.loc.gov/2018047428 Chelsea Green Publishing 85 North Main Street, Suite 120 White River Junction, VT 05001 (802) 295-6300 www.chelseagreen.com This book is dedicated to June and Owen, the teachers I never knew I needed. May they be a reminder to us all that light comes from the darkness... as long as you open the door to let it in. contents Introduction 1 The Restrictive Diet for Optimal Health 2 Feeding the Kids—Get Your Game Face On! 3 Get Prepared, You Can Do This! 4 The Importance of Meal Planning breakfasts and "breads" main courses vegetable sides and salads soups and stews snacks and smaller meals sauces, dips, and dressings smoothies and other drinks ferments sweet treats Acknowledgments Appendix A: Menus Appendix B: Packed Lunches for Kids Appendix C: Holiday Meals and Healthy Celebrations Appendix D: Recipes That Freeze Well Resources Notes Bibliography Recipe Index introduction When Crisis Compels Transformation I'm proud to say that I'm a fourth-generation gardener with a knack for cooking. As a child I was often required to help maintain our large vegetable garden, and it's a chore that has served me well in my adult life. I was also taught that home-cooked meals can be joyfully prepared on a daily basis and that healthy food takes priority. These traditions that were ingrained in me from a young age are now being passed along to my two kids, Owen and June. I became a mother shortly after completing my master's degree in public health. While I was trained to work in environmental health sciences (think OSHA or the EPA), I knew that my education would propel me into a career of helping families follow healthier diets. After four years completing a bachelor's degree and three years of graduate work, the take-home message was that nutritional status affects most aspects of disease etiology (causes). While many exposures are out of our control—air pollution, water quality, indoor air pollution in public spaces—we all choose what to eat. So when it came to food, I knew that I wanted to make appropriate choices, especially once I became responsible for cultivating the early development of my own children. I followed all of the rules while pregnant with my first child. I ate vegetables, walked daily, choked down my horse pill of a prenatal vitamin, read all the books, and did my best to nurture the growing human inside my womb. Owen, like the other babies born from small women in my family, was characteristically large—a healthy nine-pound, two-ounce baby who neared the 99th percentile for height and weight. But his weight suddenly plummeted, and at his four-month visit I learned that he had dropped to the 45th percentile over the course of just a few months. Something was wrong. Owen's inability to gain weight was due to an underlying dairy allergy, the first of many food-related surprises from Owen. To say that he was sensitive is a gross understatement. We slowly learned that he had an anaphylactic (severe, potentially life-threatening) allergy to wheat, eggs, cashews, pistachios, almonds, and oddly enough, seaweed. Less easily discovered were his other food intolerances—coconut, beets, sesame, soy, melon, and cacao. Luckily, he has outgrown some of the allergies and many of the intolerances, but managing Owen's sensitive gut required creativity in the kitchen, persistence, and a whole lot of diaper cream. I had to adjust my boundaries surrounding food, which wasn't easy. In fact, it felt like one of the most challenging things I had ever done. My friends and family were sure I'd turned into a neurotic mother, fretting over the simplest foods as if they were kryptonite. What these good-intentioned folks didn't understand was that trying to keep a constant watchful eye on an allergic toddler was exhausting. Dinner dates? Not fun. Potlucks? Even worse. Large parties? Stress city. What if Owen innocently grabbed a piece of bread or God forbid a cookie from the food table when someone wasn't watching? If you've ever seen someone in anaphylaxis (life-threatening allergic reaction) then you understand the severity of our situation. My husband and I would take shifts—one parent enjoyed the company of friends while the other watched over Owen like a hawk. We'd switch roles every 20 minutes or so, but sometimes the watchful effort wasn't worth the struggle and we'd skip social engagements altogether. Owen's issues have become less problematic, because he can now voice that he simply can't eat some of the foods that most people enjoy, but those first few years were difficult. At some point during all of the stress of sorting through Owen's food allergies, he developed asthma. It started as a persistent dry cough at night, a symptom that someone inexperienced with asthma wouldn't recognize as being a threat, that soon developed into emergency room–worthy bouts of impaired breathing. We lived a mile from the closest hospital at the time, and proximity to 24-hour emergency care became an important criterion when looking for our next home. I remember one of the scariest nights when Owen coughed so hard and for so long that he simply couldn't catch his breath. He started vomiting from his inability to breathe and I silently hoped that he'd pass out, a last-chance mechanism that would prevent his situation from elevating past the point of no return. We rushed him to the ER where he quickly recovered after receiving inhaled and oral steroids, a routine that was all too familiar to his young little body. Over time, as we got to know Owen's symptoms, managing his condition became less frightening, but I spent a lot of time feeling like we were teetering on the edge of irreversible disaster. My expectations of having two children shifted due to Owen's sensitive condition. What if we had another child with asthma and allergies? What if the allergies weren't the same and we had a whole additional set of restrictions? Some people tried to persuade me that the scenario would be much easier the second time, but I wasn't convinced. It's hard for someone to comprehend the anxiety that accompanies the protection of an allergic child in those early years. I didn't want to relive the stress of deciphering the unknowns. Despite my hesitations, my husband and I learned that I was pregnant again right around Owen's second birthday. A girl this time. She was smaller, only eight pounds, four ounces, and she came bursting into this world as if she had a God-given purpose to fulfill. While Owen was the sensitive child, June appeared to be sturdier. I don't know how to explain it, but our acupuncturist confirmed my belief when she told me that June has particularly strong qi (in Chinese medicine this refers to one's life force). But June was just two weeks old when her pediatrician handed me a piece of paper and pointed to a series of letters and numbers that had been circled in the middle of the page, the results from June's routine newborn screening for common metabolic diseases. The results read "DF508," which meant that June had the most common genetic mutation for cystic fibrosis (CF). Alone, this mutation meant nothing, but the results warranted a visit to the CF clinic in Burlington, Vermont, to confirm the absence of a second CF-causing mutation. If June carried just the one gene, DF508, she would be deemed a carrier, but if a second gene was found, she would have the disease. I was reassured that we had nothing to worry about. June didn't fit the description of a typical child with CF, but our doctor also believed that further testing was in her best interest. We made the hour-long journey to Burlington, strapped an archaic electrode machine on June's arm that stimulated the sweat glands, and waited as her sweat was meticulously collected. It would be analyzed later that day. People with CF have abnormally high concentrations of salt in their sweat, so the test was nothing more than an elegant method to measure salinity. Pretty simple. We returned home and I didn't think much of it. After all, I had been convinced that June was likely a carrier and I had nothing to worry about. But then we got the call. I hadn't prepared myself for the worst. I assumed I was just going through the motions of pleasing the medical community while fully knowing that we'd get a positive outcome. I was wrong. I could say that I should've prepared myself, but how is a postpartum mother supposed to prepare herself for the worst news of her life? "Your daughter has cystic fibrosis. There is no cure." While I wish that I could tell you that this day was difficult, but it eventually turned out to be a day full of motivational life lessons, I cannot. I will instead tell you that this was the worst day of my life. I lost a small piece of my inherent joy on that day. Never before had I felt so broken. The one-page CF Fact Sheet that I had been given earlier in the day shook every part of my soul. I couldn't stop reflecting on the bullet point stating that the life expectancy for someone with CF was around 27 years of age. I've since learned that this number is actually closer to 40 and that it's even higher in countries such as Canada that have better access to health care, but this number made me feel physically ill. My sweet baby, just two weeks old, was staring up at me and all I could think was that I would only get to enjoy her for the next 27 years. I didn't know anything else about CF except that it was going to break my heart in a way that nothing ever had. The next few months were a crash course into a world that I denied being part of. Even when we got the results from June's genetic test that identified her second CF-causing mutation, 3272-26A>G, my husband and I often discussed a repeated sweat test. How could this possibly happen to us? Were we destined to care for a sick child? Would our child lead a life of suffering? Acceptance didn't come easily. I don't know how else to describe the next eight months other than to say I was grieving. Part of this process involved numerous late nights spent frantically searching for an obscure cure. I don't always trust the advice of the medical community with their heavy reliance on pharmaceuticals and often complete neglect of preventive care, so I somehow hoped that independent research would reveal a solution to prevent the devastation of disease in a way unbeknownst to the professionals. I never found the cure. I also found a complete lack of compelling evidence to show that pharmaceuticals wouldn't be necessary in June's life. Managing her disease was going to require that we approach preventive care from multiple angles—diet, lifestyle, antibiotics, herbs, drugs, and physical therapy. And then there was accepting the fact that much of her disease would be out of my control, an aspect of genetic disease management that has turned out to be the most heartbreaking and challenging part of the journey. There is no correcting her faulty genes; I cannot change that. Now for the silver lining. CF, like many illnesses, is an inflammatory disease. Luckily, diet goes a long way toward controlling inflammation. I researched anti-inflammatory diets and came to the conclusion that a GAPS diet would be beneficial in establishing a healthy immune response early on. Dr. Natasha Campbell-McBride developed the GAPS—Gut and Psychology Syndrome—diet as a primary treatment for autism spectrum disorders and other conditions that she theorized to originate in the gut. Her belief is that repairing the gut using a specific combination of healing foods can result in a reversal of the child's condition. Establishing a healthy immune response for my daughter would mean developing a healthy gut, and the GAPS diet stood out as the most beneficial diet to achieve those results (see the GAPS Diet and Early Foods for Baby section on page 32 for more information regarding GAPS). My daughter was solely breastfed until six months of age, at which point I introduced homemade bone broths and healthy fats such as lard, organic coconut oil, organic olive oil, and avocado oil. I then introduced non-starchy vegetables including leeks, zucchinis, greens, and others that were boiled and blended in bone broth and fat to make simple soups. Around the same time I started to prepare simple egg preparations. Next came the well-cooked meats including beef, pork, chicken, and fish. Fruits and starchy vegetables weren't introduced until around ten months of age. Fermented vegetables, juice from ferments, and probiotics were added to foods throughout this entire process as a way to establish a healthy microbiota. Beans were introduced, but not until my daughter was around 18 months of age. I never introduced dairy, grains, sugar, or any type of processed oil, and with the rare exception, my daughter doesn't eat these foods to this day. The diet I chose is slightly different from a complete GAPS diet since fermented raw dairy lies at the cornerstone of a true GAPS baby. I explain the depth of my reasons for avoiding dairy in chapter 1 (see The Dairy Debacle on page 20), but one of my primary reasons is because dairy is a mucus-producing food. The CF lungs suffer from abnormally thick and sticky mucus, so avoiding dairy is a choice that I continue to make for my daughter. Here's what's amazing—while we started this diet for my daughter, our whole family has benefited from its implementation. My five-year-old son now requires limited medications to fully manage his asthma. (For those who are curious, his current dose of Qvar [beclomethasone dipropionate HFA] is at 40mcg/day. He takes just one puff every evening, but we're hoping to experiment with natural alternatives under the care of an integrative physician in order to completely ditch the medication. Regardless, this is an extremely low dose, especially for someone who has multiple environmental allergies. We've even had periods of time where he's been able to stop taking his daily dose of Qvar entirely, but this is challenging to maintain since some of his environmental allergies seem to be fairly persistent triggers for him.) Overall, I'd say his condition has improved since starting this diet and I believe that it will only continue to improve over the coming years. Owen had his most severe anaphylactic reaction to date in November 2018 while I was halfway through writing this book. I questioned whether we were actually making headway with him, but the reaction prompted us to review some of his other allergies that had been diagnosed when he was a small child. Avoiding multiple foods can be challenging and stressful, so because Owen hadn't been tested since he was quite small our allergist felt it necessary to retest him so we could fully understand the extent and severity of his food allergies. The results from these tests revealed that Owen is now able to eat nuts, eggs, seaweed, and dairy without suffering from any type of noticeable reaction (he still doesn't eat dairy because I believe it's not in his best interest, but the potential for major reactions is gone). Owen is actually outgrowing some of his allergies! His wheat and barley allergies remain, but our list of avoided foods has gotten a whole heck of a lot smaller over the past four years. Did this result stem from our diet and my dedication to avoiding chemicals as much as possible? I'll never know for sure, but I know that he's not getting worse, which is always a possibility in kids with multiple food allergies. My husband is also severely asthmatic, and exhibits many of the sensitive traits of my son (although to a lesser degree). Yet after a year of following this refined way of eating, he has completely stopped relying on daily meds. He has depended on varying medications since a very young age, so this transformation is quite impressive. Interestingly, the change for my son started only six months after we had been following the diet, which is perhaps a testament to the dynamic nature of a child's body. A grain-free, sugar-free, dairy-free diet has been hugely beneficial for my family. We've experienced major improvements in medical conditions for my son and husband, I've drastically improved my mood by eliminating sugar, and my daughter has experienced limited digestive issues related to CF. My daughter's success is partially attributed to her genetic makeup (she has a class V mutation, meaning that she maintains residual function of CFTR proteins and is pancreas sufficient—does not require digestive enzymes with every meal—unlike the majority of people with CF; see the Cystic Fibrosis and Our Journey with June section, page 6, for more info regarding cystic fibrosis) and the luck of the draw, but I'm comforted by the fact that we've included diet as one part of a multifaceted preventive approach to health. How much of her success is due to diet? I'll likely never know, but why would I stop doing something if it seems to be working? We're certainly not your typical family when it comes to health and medical needs, but it's not uncommon for families to seek a similar type of diet to help improve their own unique situation, whatever that may be. Our story is our own, but I know we're not alone. I want others to be inspired in knowing that a diagnosis doesn't mean the end. It means that you just have to work that much harder and with that much more passion to achieve the results you want. In fact, a diagnosis can sometimes mean the beginning of something you never thought possible. I'm not sure who said it originally, but I'll say it, too: Not all storms come to disrupt your life; some come to clear your path. I also want people to remember that an ounce of prevention is worth a pound of cure. If you stumbled upon this book as a perfectly healthy individual, but you are interested in improving your diet, I say go for it! I'll be one of the first to tell you that managing disease is a path that's best avoided. And most of the foods available to us in grocery stores and restaurants will eventually make us sick. Changing your diet now can save you time, heartache, and money in the future. Don't settle for mediocrity when it comes to diet when the alternative is so much better. I never imagined I'd be sharing my story and food wisdom in a book, especially a cookbook. Like most of us, I assumed my life would be different. Writing about food obstacles and solutions in the treatment of my children's unique medical issues never occurred to me as an imaginable future. As a young woman reflecting on my hopes of becoming a mother, I didn't even consider the possibility that life with children would mean having medical equipment piled in a corner of the living room, medications scattered throughout the house, frequent doctor visits with multiple specialists, an hour of daily treatments and therapies (more when sick), epinephrine and Benadryl, lists of restrictions and rules (each kid has their own), and living with stress of this magnitude. However, I can say with 100 percent certainty that I wouldn't appreciate life and health in the same way had I not been gifted these two special children who are a daily reminder that without health you have nothing. And for that reason, achieving optimal health is worth putting in a damn good effort. The opportunity to write this book fell into my lap, which I've been told almost never happens. When I was in the early stages of grieving my daughter's disease, a friend wrote to me saying that she hoped I would someday find the gifts that come from the darkness. I believe this book is one such gift, and my hope is to offer parents like me a tool and platform to help improve their families' quality of life. I chose a grain-free, sugar-free, dairy-free diet because of its benefits for gut health and its associated reduction in inflammation, an extremely desirable response in the treatment of any disease or condition. But as we began our journey, I quickly discovered that many of the recipes I found were attempts at mimicking traditional foods like mac 'n' cheese, a food that I'm sorry to say is impossible to re-create without grains and dairy. Store-bought Paleo Diet products proved equally disappointing for their inclusion of varying starches—potato, tapioca, arrowroot, and the like. Many grain-free recipes featured similar issues. The presence of sugar in recipes and packaged foods was in my opinion the worst of the issues. It was the number one food that I wanted to avoid. Marketers would have you believe that because their processed foods are gluten-free, all natural, heart healthy, low fat, or sugar-free, you're buying a healthy product. But this couldn't be further from the truth. When we learned that my son had a wheat allergy I remember being so disappointed to find that not only did store-bought gluten-free breads have the worst texture of any bread I had ever tasted, but this terrible texture was achieved using chemicals, fillers, starches, and other food-like substances that aren't worth eating. (Note that this microscopic loaf of a health hazard cost around $8.) Believe me when I say that many gluten-free products are some of the least healthy and least affordable options in the grocery store. And while I certainly have a handful of gluten-free products in my pantry that our family enjoys, the majority of them should be avoided. Attempts to re-create traditional grain-based foods without grains equates to a product full of chemicals and inscrutable ingredients. The bottom line is that we couldn't improve our diet simply by changing from grains to highly processed grain-free foods. We had to instead make some major upgrades and learn to cook more meals from real, whole ingredients—a skill that is mostly lost in today's busy world. I realized what we needed was more than just a new diet; we needed an entirely new way of looking at food and cooking. As the fervently dedicated mother that I am, I started cooking more than I ever had. I was determined to supply my family with real, whole foods to support their health in the best way possible. Quality breakfasts, lunches, dinners, and snacks soon began flying out of the kitchen. But there was a downside: I was never leaving the kitchen. Our diet had turned me into the household cook and my other interests and responsibilities were being pushed to the wayside. I'm a firm believer that joy and happiness are two of the most important contributors to health. Although our diet was drastically helping us to reduce inflammation, it was also taking away precious time from other health-promoting activities such as spending quality time with family, exercise, and even sleep. If we were to continue life on this diet I knew I had to find a more sustainable, balanced approach to meal preparation. So I started buying and cooking in bulk, meal planning, eating more leftovers, freezing leftovers, multitasking in the kitchen, asking for more help, and implementing numerous other tactics that slowly made this diet feel more sustainable. And now it's just a part of life! And although we stick with the diet for the most part, we occasionally cheat and eat convenience foods that aren't necessarily part of the diet. I occasionally buy a gluten- and dairy-free frozen pizza for my kids to share, and my husband and I share a grain-free version that's loaded with cheese. We always stay within the important boundaries necessary to maintain each individual's health, but a convenience food night allows us to enjoy a relaxing evening that requires little prep or cleanup. I've even cut the pizza boxes into "plates" so that I have zero dishes to clean. Everyone eats a salad while the pizzas bake and we enjoy our packaged Friday night dinner in front of the television. This book is not about turning you into a superhero, but about making it work for you. And making life enjoyable. One of the takeaways I hope you get from reading through the following chapters is that life is about progress, not perfection. Sometimes that means letting go in one area so that you can gain some peace in another. Hopefully this book will help you achieve your own version of balance, one with less sugar, grains, and dairy, and more home-cooked meals. I'll also say that this diet doesn't necessarily feel restrictive most of the time. I genuinely enjoy eating a grain-free, sugar-free, dairy-free diet and all of the nourishing foods that come along with it. I can't imagine going back to eating any other way now that we've grown accustomed to such a high standard of quality. Likewise, I'm quick to observe the negative way in which my body responds to unhealthy foods when we do break our own food "rules." There's a great deal of reward that comes with following a healthy diet, and my body clearly appreciates my efforts. My hope is that you don't just treat this book like any other cookbook. This book is more about the process of food and how we can achieve healing when we commit to a better way of eating and living, and less about the perfect combination of herbs and spices. Tasty food doesn't have to be complicated. In fact, sometimes kids enjoy simple foods more than a complex mix of unfamiliar ingredients and flavors. Besides, this book is written to simplify the process of everyday food prep for a family. Why would I include a plethora of complicated recipes? I want someone to read this book, implement my strategies, use the menus, and prepare the recipes as everyday solutions to health and longevity. I want my readers (you!) to have success. I hope you enjoy reading about my family, our tragedies, our solutions, and our celebrations. And most of all, I hope you enjoy the simple yet delicious and healthy recipes that I've shared with you and your family. A grain-free, sugar-free, dairy-free diet has been a true gift to my own family in more ways than I can explain, and I am certain that other families will experience similar benefits. This book is one of my gifts from the darkness that I have the joy and pleasure of sharing with you all. How to Use This Book In my health coaching practice I've noticed time and again that almost anyone can prepare a recipe, but cooking from scratch for nearly every single meal becomes a labor-intensive task that most aren't willing to take on. In this book I'll show you how to get organized, get cooking, and stay sane while keeping you and your family healthy. The only caveat is that you have to agree to be patient, commit to completing the recommendations in each chapter, and not give up when it's challenging, because it will be challenging at times. Please don't immediately flip to the recipe section and ignore the rest of the contents like we so often do with other cookbooks. I suggest you instead start by reading chapter 1, The Restrictive Diet for Optimal Health. You're clearly interested in a grain-free, sugar-free, dairy-free family diet, but this chapter will help affirm your interest in this nutrient-dense, health-promoting way of eating. It's easy to lose interest or motivation with a change in diet if you don't understand the full reason behind its implementation. So do yourself a favor and start by soaking up some intellectual motivation! You'll next want to gain a better understanding of how to get the whole family involved by reading chapter 2, Feeding the Kids—Get Your Game Face On! You simply will not have time to prepare multiple meals to cater to the desires of your kids if you're cooking from scratch every day, three to five times a day. Plus, your kids will need to start eating the same foods enjoyed by the entire family, which means you might need to brace yourself for some pushback. This chapter is designed to encourage and affirm your desire to abandon the picky eating trap and create healthier habits for the entire family. I've included tips on how to get your kids more involved, so that they're more likely to accept these new dietary changes. Incorporating kids in healthy eating habits is one of the central themes for this book, so please don't skip this chapter! If you're a grandparent, know that you're not off the hook. Grandparents are especially notorious for providing grandkids with foods that parents might not approve of. While this tradition may have been acceptable in the past, we're now in the midst of a major public health crisis due to drastic decline in food quality and extreme overconsumption of chemical-laden foods. Our children are being exposed to foods that weren't even thought possible 50 years ago, and these foods are resulting in severe negative health consequences. We all (grandparents, parents, teachers, educators, and anyone involved in the lives of children) need to start being part of the solution if we're ever going to get ahead of ourselves. Chapters 3 and , Get Prepared, You Can Do This! and The Importance of Meal Planning, are the workhorses of this book. I simply wouldn't be able to cook so many meals from scratch if I wasn't prepared to do so. I've outlined every possible suggestion, from stocking your pantry to reducing your material possessions, so that you can get organized and ready to cook. If your freezer or pantry isn't stocked with the right foods, if you don't have the appropriate equipment, and if you have no clue how to organize your time, then you're going to fall short of your expectations. You need the information in these chapters to make this diet work! Once you've implemented the organizational pieces from these preparatory chapters, you'll have the pleasure of perusing my absolute favorite grain-free, sugar-free, dairy-free family recipes, everything from Plantain Muffins for breakfast, to an Apple Spice Bundt Cake for dessert. I've included notes throughout the recipes with suggestions for batch cooking and meal planning to help you stay organized and find success in the kitchen. There is an extensive appendices section where you'll find the following: four weeks of menus (including ingredients lists to help with managing grocery shopping); menus for kids' packed lunches; a list of recipes that freeze well; and menus for holiday meals and celebrations. Additionally supplementary resources are available on my website (deeprootedwellness.com) in which I outline daily prep recommendations for the menus and explain how to double and freeze meals to be used in later weeks. The menus can be reformulated to meet your family's specific needs, but you should follow a similar pattern in that you prep and cook in advance, and freeze leftovers whenever possible. Organizing your time in the kitchen is critical, and these menus are designed to help you become an efficient cook while investing as little time as possible. My hope is that you're patient and persistent enough to keep working toward a healthier diet, and that this book is the catalyst for dramatic change. So let's get organized, get cooking, and keep sane while doing it! chapter one The Restrictive Diet for Optimal Health Science repeatedly demonstrates that poor diet leads to chronic and acute illness, but I've observed that the consequences of such a diet don't always manifest in ways that science would predict. To truly understand the benefits of healthy eating you have to look beyond the textbook definition of disease and practice the lost art of listening to your body and observing the outcomes. I haven't always been good at receiving cues from my own body, but my family's adoption of a restrictive diet free of grains, sugar, and dairy has helped me learn some positive listening skills. Although my kids may not consciously recognize the diet's benefits in the same way that my husband and I do, the results have been clear. So when I talk about a restrictive diet, I'm also talking about a choice to optimize your family's health. Families who are not in crisis mode might find my approach extreme and may instead favor a more moderate approach to their diet. These families can partially follow the included recommendations. But I've included details specific enough for those who may be in crisis so much that most available food choices, even in small quantities, can contribute to negative health outcomes in their families. Processed flours, refined sugars, preservatives, fillers, refined oils, food dyes, and all of these other food-like substances are slowly making us sick, but even many of the restrictive diets encourage the use of highly processed foods. My approach is about pure food, such as flours made from seeds that are ground up right before you add it to a recipe. The bottom line is that I don't believe processed foods are worth eating, even if they may "technically" fit into a restrictive diet. The hardest part of restrictive diets is that limiting your food choices can feel a lot like self-deprivation. What's a life without cheesy crackers or indulging in copious amounts of ice cream? Isn't this what makes a happy childhood? Even though these small "rewards" can be what get us through the day at times, the problem with this thinking is that we have created a false perception of reward. For example, we've all been trained to believe that food, especially sweets, makes an excellent reward for good behavior. I was at the playground recently when a mother told me the story of keeping M&M's on the back of her toilet as rewards for potty training. I was slightly put off by the idea of storing food on the toilet, but even more put off by teaching another human that good behavior equates to sweets, especially behavior that is so basic to the daily routine of being human. How have we gotten here? How many times in my life have I felt the need to reward myself with a brownie or ice cream when I'm feeling successful or when I've had a particularly bad day? Countless! If you're anything like me this is a habit you could happily live without. At some point in my life I started to actually listen to my body. I came to realize that eating sugar made me feel fantastic for all of 30 minutes. But I noticed that the sugar crash left me irritable and feeling like I needed more. The cyclical deceit put my body at the mercy of variable blood sugar and hazed my brain. I was knee-deep in brain fog, addicted to sugar (God knows what it was doing to my microbiome), and feeling like my kids were the most annoying humans on the face of this planet. And I ate sweet treats as a reward? This was how I rewarded myself, by surrendering to legal substance abuse and living life on an emotional roller coaster. Shouldn't reward feel better than this? When I talk about a restrictive diet, I'm talking about an act of self-love and respect. Next time you feel yourself craving a treat or another unhealthy food, first ask yourself whether you're making a loving, nourishing choice for your body. Will the crash that you experience later be worth the momentary pleasure? If the answer is no, then consider what would be a better choice. Is there a healthier food you could eat instead? Is your body really even hungry? Are you craving some other form of nourishment? Maybe what you really need is a break from your computer to take a step outside. Using the principle of primary vs. secondary foods can help explain that nourishment comes from many sources. The idea is that our body is fueled by more than just the food we eat. Primary foods are things like career, social life, home environment, and exercise, which provide you with nonfood nourishment. Although it's beyond the scope of this book to discuss how these other elements factor into disease etiology, I will say that you can eat all the kale in the world, but you're not going to feel your best if you wake up every day to work a job that leaves you mentally drained. The same goes for secondary foods—the actual food that provides you with energy. You can feel satisfaction in most areas of life, but you're not going to feel your best if you have poor eating habits. To demonstrate the principle of primary versus secondary foods imagine when you were a child, engaged in some type of incredibly fun activity, and your mother called you in for dinner. Were you hungry? Ravenous! But you were too busy playing to even notice that you needed to eat. You were fueling yourself with fun. Fast-forward to your adult self. If you're anything like me you count down the hours and minutes until you get the opportunity to snack again. At this point in my life I'm almost always willing to stop what I'm doing to eat, and I'm often eating when I'm not even really hungry. Sometimes I eat because I'm bored, sad, frustrated, hormonal, or tired. I'm fueling myself with secondary food when I should be thinking about primary food instead. You can extend the idea of loving boundaries to almost every aspect of your life. We're not necessarily restricting just ourselves; we're making choices that create boundaries with ourselves and our loved ones. There are times when we unfortunately have to cut ties with people who we feel have repeatedly drained our emotional well-being. I once quit a job because I left work every single day feeling like I left my soul in my office. I had drawn a loving boundary to protect my emotional well-being. You might be wondering how difficult it is to implement loving boundaries when it comes to food. The good news is that it's a lot easier to restrict your diet than it is to make many other life changes! Some of the difficult relationship issues that we often face are with our own family, and these issues can often be the most troublesome, time consuming, and energetically intensive. But in most cases we can't just walk away from family, nor should we. And not everyone has the luxury to quit their soul-destroying job, because they would lose important benefits, salary, and all of the financial security that comes along with being employed. But to lose a food that isn't supporting your body? What's the big deal? What do you have to lose? More important, what do you have to gain? Slow Death by Sugar Carbohydrates exist in one of three forms—fiber, starches, and sugar. Fiber is a structure unique to plants that is essential to the physical integrity of plant cells. Have you ever really thought about the fact that certain plants can stand hundreds of feet tall without any bones? Mammals would collapse into a pile of goop without their bones. Plants have fiber to thank for their rigid structures, while, among other things, we have fiber to thank for daily bowel movements. The recalcitrant structure of fiber makes it impossible for the human body to digest it. Fiber provides bulk to our stools and helps keep things moving along. Sugar and starches, on the other hand, are delivered to the bloodstream as glucose—readily available energy for our cells. Muscles contain "storage units" in which excess glucose is stored as glycogen. This storage mechanism is helpful in times when food isn't immediately available, a phenomenon that rarely affects the modern Western human. When glucose blood levels remain high and glycogen stores are full, the body then converts the excess glucose to fat, another mechanism that has lost its purpose in a society of overeaters with access to an overabundance of food. Storing excess energy in the form of fat would have served us well in times of famine, but this conversion now leaves the majority of us with swollen waistlines and snug clothing. Recommendations versus Actual Consumption The American Heart Association (AHA) is particularly concerned with our sugar intake, because excess sugar intake leads to fat accumulation, which leads to metabolic syndrome, which leads to heart disease and other metabolic diseases. The AHA therefore recommends the following limits on sugar consumption: nine teaspoons (38 g) for men, six teaspoons (25 g) for women, and three to six teaspoons (12–25 g) for children 2 to 18 years of age. The World Health Organization (WHO) has set similar limits, stating that ideally no more than 5 percent of daily caloric intake comes from added sugars. While the WHO is as concerned with heart disease as the AHA, their interest is a bit more broad: Their objective is to prevent obesity, dental caries (cavities), and numerous noncommunicable diseases that are often avoided through positive lifestyle choices. The recommendations set by the AHA and WHO include any form of added sugar such as table sugar, high-fructose corn syrup, honey, syrups, fruit juices, and fruit juice concentrates. It's no surprise that our intake of sugar far surpasses the recommendations of the AHA and WHO. In fact, Americans are eating two to three times the recommended limit. An average American is eating approximately 76 pounds of sugar every year, which works out to almost 1½ pounds of sugar every week or 22.4 teaspoons of sugar per day. This is an insane amount of sugar! Imagine cooking for your family in this way. A family of four would consume six pounds of sugar every week. Six! I'd have to put sugar in my water, eggs, fruit, all baked goods, salads, and pretty much every other meal that I prepared in order to use such a hefty load. Ah, now I'm starting to think like a processed food manufacturer. I find it to be particularly problematic that youth, especially boys, are consuming even larger amounts of sugar when the effects are clearly negative. I'll discuss more about these effects later, but sugar consumption among children is staggering. Despite what you may believe, sugar intake does not correspond with income level. People often associate poverty with poorer eating habits, but that's simply not the case with sugar. Excess sugar consumption is a problem that transcends socioeconomic status. Hidden Sugars Everywhere Most added sugars (36 percent) appear in the food stream in the form of sodas, energy drinks, and sports drinks. Thirteen percent appear as grain-based desserts, 10 percent as fruit drinks, 6 percent as dairy-based desserts, 6 percent as candy, and the remaining percentage as miscellaneous foods. A quick look at the consumption patterns of children shows that 59 percent of added sugars come from foods while 41 percent come from beverages. A study of children's eating habits showed that 57 percent of children at the age of two are consuming cookies or candy in a given day and that 16 percent of toddlers are drinking carbonated beverages during lunch. This same study noted that the most commonly consumed food by toddlers was french fries. We're feeding our two-year-olds french fries, cookies, and soft drinks? There are certainly more nutritious options out there. Sugar is found in 74 percent of packaged foods, from crackers and processed cheeses to canned and frozen meals. Some of the offenders contain minimal amounts while others give your body a toxic dose. For example, just one 12-ounce soda is 39 grams of sugar. Four grams of sugar is equal to 1 teaspoon, which means you're consuming nearly 10 teaspoons of sugar in just one soda—an amount that exceeds the AHA limits set for men, women, and children. Identifying sugar in a food can be tricky because sugar is called by 61 different names. Some of the most common names for sugars include sucrose, fructose, high-fructose corn syrup, corn syrup, barley malt, maltose, dextrose, rice syrup, and concentrated fruit juice. Don't fool yourself, sugar is almost inescapable. As I discuss in the A Note on Natural Sweeteners, page 67, even natural sweeteners like honey, maple syrup, and agave are all forms of sugar (and even date paste is a sugar, though it's the least "sugar-y" of the lot because it has fiber). Reading labels is a good starting point when trying to reduce your sugar consumption, but labels often don't distinguish between naturally occurring sugars such as fructose in peaches or added sugars like simple syrup in canned fruits. Many of the foods that are marketed as health foods are in fact as laden with sugar as their less healthy counterparts. You simply can't trust that because a food is marketed as healthy, you're buying a superior product. You can see in table 1.2 that sugar exists, often in incredible quantities, in foods that are commonly perceived as being healthy options. Table 1.2. Sugar content in common foods --- Food | Approximate sugar content in one serving (grams) Granola bar (1 bar) | 11 Organic fruit on the bottom yogurt (5 ounces) | 21 Fat-free organic fruit on the bottom yogurt (5 ounces) | 25 Apple juice (8 ounces) | 26 Peanut butter (2 tablespoons) | 3 Fat-free peanut butter (2 tablespoons) | 4 Energy bar (1 bar) | 24 Baked beans (½ cup) | 16 Ketchup (1 tablespoon) | 4 Whole wheat crackers (16 crackers) | 4 Mint chocolate chip ice cream (½ cup) | 20 Our accidental overconsumption of sugar is better understood when you're enlightened to the fact that some foods contain such large quantities of sugar. Not only that, but some of the serving sizes listed are incredibly small. Who eats just 16 crackers or a half cup of ice cream? And why do we have to add sugar to foods like peanut butter? The stuff is packed full of creamy, delicious fats for crying out loud! You can also see that the low-fat or fat-free versions of peanut butter and yogurt actually have more sugar (and more calories) than their fat-containing equivalents. When you remove the fats from a food you also remove the flavor, and removing the flavor requires a bit of a flavor boost—sugar. Upward trends in the prevalence of obesity started at nearly the same time that low-fat foods were being marketed as health foods. Lo and behold, sugar turns out to be responsible for many of the negative health outcomes that were previously hypothesized to be associated with fat intake. Glycation and Faulty Proteins Experts unanimously agree that sugar consumption plays a role in diabetes, obesity, and fatty liver disease, yet we're only beginning to understand the extent of the damage. Traditional concerns over sugar consumption focused on sugar equating to empty calories, but we're now learning that sugar isn't just a caloric void. We're discovering that its biological effects on the body are actually toxic. Sugar can negatively impact your mood, effectively lower pH to disrupt the mineral balance in blood (which also leads to osteoporosis and osteopenia), lead to weight gain and obesity, cause insulin resistance, increase inflammation, and impair cognitive ability. I'll briefly describe each of these consequences momentarily, but I'd like to first discuss the process of glycation and how it's likely the culprit in these numerous and diverse outcomes. Glycation is the process by which sugar effectively binds to other substrates in the body, such as proteins and fats. The end products are appropriately known as AGEs (advanced glycation end products). This discovery was noted in the early 1900s, but it wasn't until the mid-1980s that doctors tried to understand its link with diabetes and the aging process in general. Proteins are largely responsible for completing most of the functions that occur between our cells, which keeps the body in balance. Cell membranes welcome uniquely shaped proteins, and these proteins then regulate the flow of varying substances in and out of the cell, and allow for cell-to-cell communication. Think of the toddler toys that include varying shapes that fit through corresponding holes. You can't very well fit a star through the rectangle hole. Proteins behave in much the same way. But when a sugar molecule effectively binds to a protein, a misshapen protein is formed via the process of glycation. After glycation, AGEs are inappropriately shaped for the "hole," which means they simply won't fit and their function is therefore lost. Many of the negative consequences from AGEs don't present themselves until people are in their 30s and beyond. Our bodies are equipped with mechanisms to correct the faulty proteins, but those mechanisms function less optimally as we age, and the lifetime effects of exposure to radiation, poor eating habits, toxins, oxidative stress, and hormones begin to take their toll until we're simply unable to prevent AGEs from damaging our bodies. Damage from AGEs occurs in one of three ways: less functional proteins, impairment of the proteins when they link to other impaired proteins, or an increase in free radicals (the AGEs become a production source of free radicals). It's important to note that our modern diet is one that drastically increases the production of free radicals. Glycated proteins (AGEs) increase free radical production by a factor of 50! High-carb diets also increase glycation, but sugar seems to be particularly problematic. High-fructose corn syrup is an even greater source of free radical production, with a production rate 10 times higher than plain table sugar. Eating excessive carbs and sugar therefore damages tissues, fats, and proteins, and can even damage our DNA through the process of oxidation. It can also impact our DNA expression by turning the epigenetic switch on or off. Put another way, changes in the expression of DNA can result in the presentation of a disease that might otherwise not have expressed itself. To fully understand the process through which glycation causes cell damage we have to first understand the aforementioned free radicals and oxidation. Oxygen is the final electron acceptor in metabolic pathways within the body. When metabolism goes awry, oxygen is left with an incomplete or excessive number of electrons, which changes its energetic capabilities. Free radicals are sometimes referred to as reactive oxygen species, because, well, they're a species of oxygen that is no longer benign; they're reactive. Therefore, it's in our best interest to eat antioxidants so as to combat reactive oxygen that is capable of cell damage via oxidation. Antioxidants essentially neutralize free radicals and prevent them from damaging (oxidizing) our cells. Then there is the issue of inflammation. Dozens of degenerative disease such as diabetes, cataracts, atherosclerosis, emphysema, and dementia have been linked to inflammation that occurs as a result of deformed proteins. Remember that glycation results in misshapen proteins? Well, high levels of glycation have been linked to many of these same diseases, which is indicative of a link between glycation and inflammation. Future research will explore this link further, but for now it provides a direct explanation as to why sugar can actually be such a toxic substance. So keep in mind that when you eat sugar you're effectively impairing your proteins on some level. Cystic Fibrosis and Our Journey with June Cystic fibrosis (CF) is a genetic disease in which a person's DNA codes for faulty CFTR (cystic fibrosis transmembrane conductance regulator) proteins. Improper coding (from the mutated DNA), thus improper manufacturing of the CFTR protein, prevents the protein from performing its job within the body. CFTR proteins are responsible for regulating the movement of sodium chloride (salts) in and out of cells. There are around 1,900 different disease-causing mutations that result in a protein that is either inadequate in numbers, misshapen, nonexistent, or has a faulty opening. Such a seemingly simple function results in a domino effect of health consequences for individuals who carry the CF genes. Scientists are learning that these faulty CFTR proteins have cascading effects on the regulation of other substances in and out of cells, but the primary malfunction lies with the salt issue. Improper salt movement results in abnormally thick and sticky mucuses throughout the body. CF is a multi-organ disease and can impact every individual differently, but the primary organs to suffer include the lungs, pancreas, liver, and intestines. The role of mucus in the lungs is to remove varying substances—dead cells, bacteria, spent DNA—but these substances instead get "stuck" when the mucus is too thick. Combine these dead substances with the warm, moist, and oxygenated environment in the lungs and you have the perfect breeding ground for unwanted bacteria. People with CF can have a variety of organisms grow in their lungs, organisms that would not be problematic for you or me, but it's very difficult for them to remove these organisms given the viscous nature of their mucus. Routine treatments and therapies are therefore aimed at thinning the mucus and helping to prevent bacteria from taking hold. In the pancreas, CF results in thick mucus that traps digestive enzymes. Under normal circumstances these enzymes are exuded into the small intestines during digestion. Bile from the liver can also become abnormally thick in people with CF, preventing bile from reaching the intestines as well. People with CF can therefore have extreme difficulty digesting food and require digestive enzymes at every meal. Skipping the enzymes causes intense discomfort and, more important, severe malnourishment. While the inability to gain weight could seem like a blessing to some, the curse of constantly fighting malnourishment is a major struggle for some individuals with CF. Maintaining a healthy body weight is especially important because stored energy is needed to fight any major infection in the lungs. Since CF is genetic, it's not contagious; it's something you either have for a lifetime or you don't. It impacts approximately 30,000 people in the United States and over 70,000 people worldwide. My daughter is one of such individuals, but she's one of the lucky 10 percent who are considered pancreas sufficient—the enzymes from her pancreas successfully reach the small intestines, making digestive enzymes unnecessary for her. I cannot even begin to express the blessing of this scenario. Her lungs, however, seem to be more affected. My daughter takes frequent antibiotics during cold and flu season to help keep her lungs clear of infections, and she's been admitted for IV antibiotics when oral doses didn't do the trick. She wears a vest to perform airway clearance and dislodge any stuck mucus, two times per day, 20 to 30 minutes each session. Airway clearance techniques vary from country to country, but this is currently the most common method in the US. She inhales mucolytic drugs while wearing her vest in order to help thin the mucus, making airway clearance therapy more effective. June performs airway clearance twice per day, every day, and more often when she has a cough. These treatments involve inhaled mucolytics and a vest that helps to keep her lungs clear. This is just one form of airway clearance. My friends all know that their children aren't allowed at our house when they're sick. I've even pulled my daughter out of preschool multiple times to prevent her catching colds from other classmates. When she has a cough, we increase treatments and therapies to three or four times per day, which is a huge investment of time. Not only this, but every cold has the potential to turn into a severe infection for her. She takes antibiotics under circumstances that most people wouldn't dream of taking such a thing, but it's to prevent the lung damage that occurs from bacterial overgrowth in the lungs. Life expectancy for someone with CF is a moving target these days. It's hard to say for sure where that number currently lies, but the most recent suggestion puts it around 40 years of age. I expect this number will continue to rise, but had my daughter been born 30 years ago, we wouldn't have expected her to live into her teens. There are, of course, many individuals who have far surpassed that expectation with much gusto and fight, but the overall increase in longevity is a result of improved drugs and aggressive treatment with antibiotics. My daughter is among the first to have a protein-modulator drug available starting at the age of two. These protein-modulators are expected to be game changers for people living with CF, especially for those who start the drugs early in life and can prevent lung damage and bacterial colonization. Placing my child on a new drug at such a young age was a difficult decision, but I can already guess the long-term consequences of not having it. We'll take our chances and hope that the trajectory of her life is improved as a result. Microbes, pH, and Mood Now that we understand the process of glycation let's investigate some of the other negative outcomes associated with sugar consumption. One of the most prevalent issues that I see as a health coach is that a diet high in processed carbs and sugar influences the microbial diversity in the large and small intestines. For example, many people suffer from chronic yeast infections, a symptom that is treatable through fervent diet and lifestyle adjustments. Keep in mind that yeast infections can appear on any surface on the body; this isn't an issue unique to the female population. I've seen yeast overgrowth on people's trunks, faces, and limbs—it can happen anywhere. In fact, most any skin condition appears as a result of a microbiota imbalance or excess inflammation in the gut, which is why many doctors treat skin conditions such as acne with antibiotics. Of course we can much more holistically treat acne and other skin conditions by simply improving diet and learning to manage stress. Sugar consumption effectively lowers the pH of the body, making the internal environment more acidic. The goal is to maintain a relatively neutral pH in the body, but the American diet, which leans more toward acidity, encourages a high consumption of processed foods, sugar, excess carbs, and poor-quality meats. An acidic environment further contributes to the overgrowth of yeasts and other less desirable occupants in our gut. It also impacts our bones. Dr. Annemarie Colbin does a fantastic job of explaining the role of diet in bone health in her book The Whole-Food Guide to Strong Bones. She explains that the strength of our bones isn't limited to our calcium consumption but is a more complex process that involves numerous minerals and proteins. When our blood is acidic, our bones are prompted to release minerals in an attempt to balance the pH, which can ultimately weaken our bones. We should therefore aim to consume alkalizing diets that include very limited amounts of sugar, reasonable consumption of carbs, and high intakes of fresh fruits and vegetables, healthy fats, and healthy proteins in order to better care for our bones. I'm sure we've all recognized that sugar impacts our mood, especially when we're feeling a bit addicted. (I'll talk more about the addictive properties of sugar in a moment.) Many people and animals demonstrate symptoms such as depression and anxiety when deprived of sugar. Sugar further impacts our moods by contributing to variable blood sugar, which can lead to mood swings, irritability, and anxiety. A study in mice showed that sugar may be particularly problematic for adolescents who are developing the brain pathways responsible for their stress response. Adolescents are prone to feeling depressed or anxious until these pathways are fully developed, thus sugar consumption can heighten these emotions. If you look back at table 1.1 on page 3 that documents sugar intake based on sex and age for children, you'll see that adolescents are eating more than three times the recommended limit for sugar. When you consider that suicide is the second leading cause of death in the United States for people ranging from 10 to 34 years old, I often wonder how these numbers would change with improved diets that involved far less sugar consumption, although I haven't seen any supporting data yet. The Diabetic Crisis Weight gain and obesity are some of the most widespread results of excess sugar consumption. Centers for Disease Control and Prevention (CDC) data shows that 36.5 percent of US adults and 17 percent of US children are obese. (Remember that excess glucose is stored as glycogen, but excess beyond storage capacity is converted to fat. As you can see, we've got excess!) Some experts argue that even fruit sugars can be problematic for individuals who are especially sensitive to sugar, and that these sensitive individuals should eat very limited fruit and must drastically reduce their carb intake in order to better manage their blood glucose levels. We often assume that diabetes is limited to those who are overweight, but that's not always the case. Adults with a normal weight suffer from it as well. The average insulin level for men living in the United States is 8.8 micro international units per milliliter, and the level is 8.4 for women. Some specialists argue that two micro international units per milliliter is a more desirable number, and that anything over five is problematic. The incidence of diabetes in the United States has continued to increase since the early 1960s, with a drastic increase that began in the mid-1990s. From 1980 to 2012 the number of adults with diabetes nearly quadrupled, and in the last 10 years we've seen a 70 percent increase in adolescent diabetes. Adolescent diabetes is particularly problematic in that the progression of complications in youth is much faster than in adults, which can lead to premature metabolic and cardiovascular difficulties. An important distinction exists between type 1 and type 2 diabetes. Type 1, also called insulin-dependent diabetes, is an autoimmune condition that reveals itself early in life. Type 1 diabetics produce inadequate levels of insulin, the hormone responsible for delivering glucose to our cells. These individuals are therefore dependent on insulin injections to lower blood glucose levels and deliver glucose to the cells within the body. While little can be done to prevent type 1 diabetes, type 2 diabetes is a condition that is largely preventable through diet and lifestyle choices. Type 2 diabetics are insulin resistant, meaning that the pancreas manufactures insulin, but chronically elevated insulin levels cause cells within the body to become resistant and blood sugar levels remain high even in the presence of insulin. Type 2 diabetes was formerly known as late-onset diabetes since it was historically only seen in an aging population, but it's now a disease that affects both children and adults. In 2000, less than 3 percent of all new cases of diabetes were type 2. Fast-forward to 2011 and we find that 45 percent of all new cases are type 2. Type 2 diabetes now accounts for 90 to 95 percent of all diabetes in adults living in the United States. Even more troublesome is that approximately 37 percent of all adults are considered prediabetic, but only a fraction of those people are aware of their condition. Diabetes is clearly a disease that is on the rise, and prevention includes the elimination of sugar from the diet and reducing carb intake. Incidence of diabetes in the United States, 1958–2014. Data from the Centers for Disease Control and Prevention. Increased blood sugar, such as the condition created in diabetics, is responsible for the release of pro-inflammatory compounds called cytokines. While this is certainly problematic for diabetics, the release of cytokines occurs even when blood sugar is elevated for short durations—a condition that easily occurs in any individual upon the consumption of sugar. These increased levels of inflammatory compounds can suppress the immune system and also result in inflammation throughout the body including the brain. Your Brain on Sugar One of the more surprising effects of sugar consumption is related to cognitive ability. In his book Grain Brain, David Perlmutter cites a study showing that developing diabetes before the age of 65 resulted in increased risk of mild cognitive impairment by 220 percent. A study in rats showed that a diet containing high-fructose corn syrup impaired learning and memory. Surprisingly, these effects could be prevented by omega-3 supplementation, an essential fat that is lacking in the American diet. Studies of this nature demonstrate that insulin is able to pass through the blood-brain barrier, thus impacting the way in which all cells of the body utilize glucose. It is believed that because of this, thoughts and emotions are likely impacted by insulin resistance as well. A large 2012 study of over 3,000 elderly (mean age 74.2 years) showed that poor glucose control associated with diabetes substantially increased the rate of mental decline. Twenty-three percent of test subjects had diabetes, and two groups (diabetic and nondiabetic) were followed over the course of nine years. Not only did diabetics demonstrate greater decline in cognitive function, but their baseline cognitive scores were significantly lower at the beginning of the study. Researchers point to AGEs, inflammation, and other mechanisms as the drivers behind mental decline. Can't Stop, Won't Stop: Addiction at Its Finest The negative health outcomes associated with sugar intake are even further complicated by the fact that sugar has very addictive qualities, meaning our good intentions to consume less sugar can be easily overridden by our intense physical desire for the substance. Blood glucose levels immediately spike when consuming sugar, but levels soon dip since very little actual digestion takes place from the time sugar hits your stomach to the time glucose levels rise. Eating fruits or other whole foods that contain varying forms of sugar doesn't have this immediate spike because fibers and other more complex structures must be broken down before the sugar is released into your blood. However, the large spikes associated with sugar of any kind (natural sweeteners like maple syrup included) result in elevated levels of insulin, which then drives cravings for more sugar. Even as sugar drives cravings through a physiological need to satisfy insulin levels, it also drives cravings through the release of feel-good hormones. Sally Fallon Morell writes in The Nourishing Traditions Book of Baby & Child Care that sugar "produces dopamine and endorphins that mimic cocaine, morphine, opium, and heroine: sugar stimulates the production of adrenaline and norepinephrine, which mimic methamphetamine; and sugar feeds yeasts that control ethanol and acetaldehyde, resulting in symptoms of inebriation and hangover." She continues to say that you simply can't expect positive behavior from a child who is constantly overloaded with such an overabundance of mood-impacting hormones. As I discuss in chapter 2, in the section Marketing of Kid-Friendly Foods, many of these foods also contain food dyes—yet another substance known to impact behavior. If your child (or yourself) suffers from emotional or behavioral problems, the most effective approach is to tackle the problem from a dietary standpoint while also seeking psychological and behavioral help as needed. A number of studies using mice have clearly shown the extent of sugar addiction. One such study showed that when given the choice between cocaine or saccharin, the majority of mice chose saccharin. The researchers saw the same results when using sucrose (table sugar). These sources demonstrate that the desire for sweets goes beyond our physiological need for calories, since it doesn't seem to matter if the source of sweetness has calories or not. The results from the study are interesting in that while cocaine more effectively releases dopamine into the brain, something about the sweet taste of sugar delivered a greater reward than the neurological effects of cocaine. Sweetness triggers the pleasure center of the brain using a series of chemical reactions that involve taste receptors. This series of reactions produces dopamine and other pleasure hormones that leave us wanting more. Over time, our brains become immune to a certain level of dopamine and we need more of a stimulus to experience the same level of pleasure. Serotonin, a feel-good neurotransmitter, is also released during sugar consumption. Studies show that frequently eating sweet foods can deplete serotonin reserves, thus leading to depression. Grains, Grains Everywhere, but Are They Good to Eat? According to the Food and Agriculture Organization of the United Nations (FAO), "cereal grains are the most important food source for human consumption." Yet many people argue that not only are grains unnecessary, but they can actually be harmful, especially when consumed in large quantities. A true grain is produced from a grass such as wheat, rye, oats, or barley, and pseudo-grains from the seeds of broadleaf plants such as quinoa and buckwheat. A grain itself is a seed comprised of a shell (bran), embryo (germ), and endosperm (starch). The bran and germ store the most nutritious components of a grain, but these parts also contain many of the components that are detrimental to health. Consumption of grains increased in the 1970s as the low-fat craze drove consumers away from fat and toward carbohydrates. Since then the way in which we consume grains has drastically changed. This is due to a number of factors. The increased availability of fast food is one. That more women joined the workforce, thus leaving their home kitchens, is another. In the early 1900s, 90 percent of all flour products were prepared in the home, but by 1990 less than 10 percent were prepared at home. The majority of grains now being consumed are in the form of packaged and processed foods. As most people are well aware, grains are primarily comprised of carbohydrates, which are broken down into glucose. Insulin is produced as a result of increased blood glucose levels upon digestion, and a diet high in carbohydrates results in a high production of insulin, which can eventually lead to insulin resistance and associated diseases. Some experts even claim that elevated insulin resulting from a diet high in grains and sugar is the number one cause of overall disease. But it's not just the carbohydrate content of grains that can be problematic. Our First Offender: Phytic Acid Grains and pseudo-grains contain a large amount of a substance called phytic acid, an antinutrient that binds with minerals such as calcium, magnesium, iron, and zinc. When bound to phytic acid, these important minerals are unavailable for uptake and assimilation throughout the body. Even when eating a nutrient-rich diet, malnutrition from the overconsumption of phytic acid can result in mineral deficiencies, leading to bone loss and tooth decay. Phytic acid also inhibits digestive enzymes such as pepsin, amylase, and trypsin, which leads to incomplete digestion, thus causing digestive upset and further limiting nutrient availability. A diet rich in phytic acid is especially problematic for children who have underdeveloped digestive systems, because they require a highly nutritious diet for proper growth and development. The highest concentration of phytic acid is found in the bran and germ part of a grain. Surprisingly, white rice and white flour are both low in phytic acid because they've been stripped of both the bran and germ. Eating white rice or white bread may actually cause fewer problems when it comes to impaired digestion and mineral absorption; however, overprocessed bleached white flours and nonorganic white rice that are completely void of nutrients and contain toxic chemicals should be avoided. Phytic acid levels can be affected by the growing conditions of a plant, because phytic acid is a phosphorus-containing molecule. Higher levels of phytic acid are therefore found in greater concentrations when crops are grown using chemical fertilizers that have high phosphorus availability. Nuts, seeds, and beans also contain relatively high concentrations of phytic acid. However, eating nuts is often only problematic for individuals who frequently consume products made from nut flours or nut butters. They consume a larger volume of nuts than recommended, which is simply eating a handful of nuts once or twice a day. The same problem of overconsumption is true for diets that are comprised of excessive quantities of seeds or beans. Even so, you'd be hard-pressed to find an individual who eats quantities of seeds or beans in the same way that many individuals consume grains—for breakfast, lunch, dinner, and snacks. Moderation is key when it comes to phytic acid–containing foods. If you happen to consume a large amount of beans, nuts, or seeds, you may want to consider soaking, sprouting, fermenting, or all of the above as a way to minimize phytic acid consumption. Soaking and sprouting alone can increase the amount of phytase, the enzyme responsible for phytic acid neutralization, by three- to fivefold. It's also important to note that a vegetarian diet is extremely high in phytic acid. A vegetarian diet, especially for a child, needs careful monitoring in order to prevent malnourishment. Vegetarians will truly benefit from soaking, sprouting, and fermenting nuts, seeds, beans, and grains before consumption. You may be thinking that phytic acid doesn't initially appear to be a problematic component of grains since it also exists in other foods, but recall that it's our excessive consumption of grains that seems to be the problem. The human body produces a small amount of phytase, the enzyme responsible for phytic acid neutralization, yet our consumption of phytic acid exceeds what our bodies are capable of neutralizing. Grains inherently contain small amounts of phytase, which also aids digestion, but phytase is destroyed when grains are pulverized to produce the fine flours we've grown accustomed to enjoying. After processing, such flours are left with high levels of phytic acid and very little phytase to aid in digestion, which makes breads and cereals (specifically those high in bran or germ) especially toxic. Moving On to Lectins Grains contain lectins, carbohydrate-binding proteins with their own negative consequences. Not all lectins are inherently bad, however, as their unique structure allows them to embed within cell membranes and help regulate communication and movement of substances between cells. The protein portion of a lectin embeds itself within the membrane while the carbohydrate portion extends outward to perform its duty. However, some lectins such as prolamins and agglutinins cause harm to the digestive system and wreak havoc on the body's natural immune defenses. These types of lectins are responsible for reducing the body's ability to recognize hunger, blocking proteins responsible for building tissues, interacting with the gut barrier and mucosal lining in a negative way, allowing undesirable particles to cross the gut lining, and stimulating a pro-inflammatory response from the immune system. In order to truly understand the undesirable effects of lectins, we must first understand what it means to have "leaky gut," a profoundly simple yet damaging condition. The digestive tract relies on tight junctions between cells to regulate the absorption of nutrients across its membranes. Digestion begins in our mouths with mastication (don't forget to chew!), and digestive enzymes in saliva help to further prepare our food for the journey into the stomach where it is "attacked" by large amounts of acid. The acidic mixture is somewhat neutralized before making the long journey through the small intestines, an intricate winding tube covered in fingerlike projections covered in more fingerlike projections that are lined with digestive cells called enterocytes. As if this wasn't enough, enterocytes are coated in glycocalyx, a layer responsible for supplying digestive enzymes. Without all of these brilliant folds, creases, projections, and enzymes our intestines would have to be four and a half miles long to ensure adequate surface area for nutrient absorption. The remaining digestive slurry makes its way into the large intestines where it is feasted upon by billions of bacteria and yeasts that are responsible for extracting the last bits of usable nutrition from our food. The genius of our digestive tract relies on two very important assumptions. First, our intestines and the flora within are capable of breaking down food into its smallest components. Second, our intestines are able to selectively absorb the nutrients that can be safely and effectively incorporated into tissues, while simultaneously forcing larger particles to continue their journey through the great tube until they, too, have been broken down into their smallest parts. When this "filtration" system is incapable of recognizing appropriately sized particles, one is said to have leaky gut, a condition in which a faulty discrimination process allows particle entry from the interior of the gut into the rest of the body. When I say that lectins are capable of harming the tight junctions in the intestines, I mean that they destroy the cells and mechanisms that filter particle penetration and absorption. The particles that pass into the bloodstream are recognized as foreign invaders (called antigens), and the immune system signals for an attack. This attack leads to the release of pro-inflammatory cytokines and systemic inflammation. While this response is a perfectly reasonable way to cope with a foreign invader, the body's own defense strategies inadvertently further attack the lining of the gut. The result is a cycle of damaged cells, immune responses, more damaged cells, and so on. The issue of leaky gut is complicated by lectins because they not only damage the enterocytes and other cells that line the gut wall, but also bind to sugars and other molecules to aid in their movement across the intestinal barrier. So not only are lectins causing damage that enables gut permeability, but they also act as transporters through the gut lining. Once in the body, lectins can be a difficult thing to get rid of. They're nearly impossible to digest and are highly resistant to changes of temperatures and pH. It's an incredibly stable molecule. Moreover, because they're able to effectively bind to many different cells and tissues, they can also accumulate in the gut. This makes for a lengthy healing process for those with leaky gut. Lectins are also present in beans and other foods such as tomatoes, but again, we don't typically consume these foods in the same quantities as grains. Soaking, sprouting, fermenting, and prolonged cooking can deactivate some lectins such as agglutinins, but these preparation methods are no longer common practice in our modern society. Soaking Seeds and Beans Beans and seeds serve as an important food source for a number of animals, including humans. However, plants have adapted traits in their reproductive structures (seeds) to resist consumption and digestion by hungry vertebrates. Take mistletoe as an example, a semiparasitic plant whose seeds are dispersed after being consumed by a bird, passing through the digestive tract unharmed, and being deposited onto a new host branch via bird droppings. The name mistletoe comes from two Anglo-Saxon words quite literally meaning "dung on a twig." (You can think of that next time you get smooched under a hanging branch of mistletoe.) Mistletoe is not unique in that it is set on survival. Plants need successful reproductive strategies, but this means they are equipped with mechanisms to resist chewing, extreme acidic conditions in the stomach, digestive enzymes in the small intestines, and aggressive bacteria in the colon. They can resist all of the above through the use of hard-to-digest compounds such as phytic acid and other recalcitrant substances. Traditional preparation methods for beans, seeds, and even grains made use of soaking, sprouting, and fermenting—processes that help to degrade undigestible compounds. The Weston A. Price Foundation has a number of valuable resources on their website, or you can look into purchasing one of the resources noted at the end of this sidebar to help you better implement these strategies. In the meantime, I recommend that you simply start by soaking your beans and seeds. When a seed is soaked (a bean is nothing more than a seed from a legume), it is prompted to grow. Proteins become "unlocked" since the growing embryo will soon need to access these nutrients, and sugars break down into more digestible forms. Growth-inhibiting compounds will start to degrade since the seed is no longer in survival mode—it believes it has found suitable habitat. Use the instructions in the Roasted and Salted Walnuts recipe (page 173) for soaking seeds and nuts. These are best soaked in a light saline solution for 12 to 24 hours before cooking. You'll notice that I've used raw sunflower seeds in a few recipes including Plantain Muffins and Plantain Blender Pancakes. I've made an exception in these instances since the seeds are pulverized into a flour followed by baking. Both of these strategies improve digestibility. Beans are similar to seeds in that they, too, require 12 to 24 hours of soaking. They contain varying recalcitrant constituents, the most noticeable of these being oligosaccharides, which are complex sugars that are impossible to digest in the human digestive tract and are instead fermented in the colon by specialized bacteria. The byproducts from this anaerobic digestion are none other than carbon dioxide and methane gases, ultimately earning beans their nickname, the musical fruit. Soaking helps to break oligosaccharides into more digestible forms of sugar, helping to improve and mitigate the flatulent effect of beans. Place your beans into a bowl, large jar, or pot and add enough water for the beans to be completely submerged with an additional four to six inches of water on top. The beans will rehydrate and expand as they soak, so be sure to use an adequate amount of water (too much is better than not enough). Some cooks recommend changing the water halfway through, but this is something I can never remember to do. Strain and rinse the beans when the soaking period is complete, and cook the beans as instructed. ADDITIONAL RESOURCES Nourishing Traditions: The Cookbook That Challenges Politically Correct Nutrition and the Diet Dictocrats by Sally Fallon and Mary Enig The Art of Fermentation by Sandor Katz and Michael Pollan Wild Fermentation by Sandor Katz and Sally Fallon Morell Where Are the Omegas? Grains are also responsible for contributing to fatty acid imbalance, a hallmark of the Western diet. Grains are high in omega-6 fatty acids, a fat that elicits an inflammatory response. By contrast, grains lack the anti-inflammatory counterpart, omega-3. The two omegas work in tandem in the complex process of immunity and healing, but problems arise when omega-6 intake is far greater than its anti-inflammatory companion. Ideally, we would have a relatively balanced intake of the varying omegas, but that's often not the case. Most processed foods or foods prepared at restaurants are not only grain-based, but made using vegetable oils such as safflower, soybean, peanut, canola, corn, and others high in omega-6 fatty acids. But the story doesn't stop with the direct consumption of grains and oils. Conventionally raised animals are fed grains because they're an inexpensive and convenient source of food. This practice affects the fatty acid profile of the meats that we consume. Under natural conditions (such as grass-fed cows living in a pasture for their entire lives) cattle raised for meat have a 1:1 or 1:2 ratio of omega-3 to omega-6 fatty acids. But the ratio for grain-fed cows is closer to 1:10, a ratio that contributes to systemic inflammation in those who consume these meats. Wheat: The Grain in the Spotlight Some experts argue that there is little inherently wrong with consuming grains. They believe that the health-degrading characteristics of grains aren't an issue, but that the issue instead lies in our farming practices and our preparation methods. One such grain has received more controversial attention than any other grain in existence—wheat. Per capita consumption of wheat in the United States far exceeds the consumption of any other food, and wheat is the third largest crop in the world after rice and corn. This gluten-filled grain contains a form of sugar that is extremely easy to digest, giving wheat a higher glycemic index than straight-up table sugar. This means that the most commonly consumed food in the United States has a more profound impact on blood glucose levels than plain old sugar, yet our diabesity epidemic remains a mystery. Is it just me, or is there a blatantly obvious connection here? A look at wheat history shows that wheat hasn't always been available as the processed, fluffy breads that we know today. The first of many changes to wheat occurred in 1869 with the invention of the steel mill. While the modern milling technique produced an improved flour texture compared with the traditional stone mill, the problem was that such intense grinding destroyed the beneficial components of the bran and germ. The result was chronic vitamin B deficiencies that led to diseases such as pellagra and beriberi. But fear not, the experts caught on and started to fortify wheat flour in the 1930s. To this day, much of the nutritional value of wheat flour is accomplished from the addition of synthetic vitamins. While supplementation with synthetic vitamins is necessary in some instances, these vitamins are generally poorly absorbed when compared with their naturally occurring counterparts that exist in whole foods. The Broadbalk Winter Wheat Experiment was started in 1843 as a way to monitor and document changes in the production and nutritional value of wheat over time. Despite the nutritional loss from the new milling methods of the late 1800s, the nutritional value of wheat in its whole-food state remained relatively constant until the 1960s when a dwarf variety was selected for improved cultivation. The mid-1900s were a period in agriculture known as the Green Revolution, when a multitude of improved farming methods were developed in areas such as irrigation, crop management, hybridization, and chemical fertilizers and pesticides. The hybridized wheat was pest resistant, was easier to harvest, had better drought resistance, and was higher in gluten—a trait that produces the gorgeous bleached, nutritionally void, chewy bread products that are available everywhere. Data from the Broadbalk Experiment shows that the shallow root system of this new dwarf variety was unable to penetrate deep enough into the soil to access adequate minerals, thus producing a grain with overall lower mineral content. Remember how phytic acid binds with minerals to inhibit mineral absorption? Well, the phytic acid content of the dwarf variety remained constant, which ultimately translated into even fewer minerals available for uptake. Another major issue with the production of wheat is the widespread use of glyphosate, the main ingredient in an herbicide better known as Roundup. Glyphosate is not only sprayed to control weeds but also applied to many crops including wheat, barley, oats, canola, flax, peas, lentils, soybeans, and dried beans before harvest in a process called desiccation. Glyphosate effectively kills the crop, which according the Roundup Preharvest Staging Guide allows for earlier harvest, more uniform crop maturity, and increased combine efficiency. Roundup was certainly not intended for this purpose, yet the measurable increase in crop yield made this practice common in the 1990s. Glyphosate is now present in the majority of conventionally grown wheat as well as many other crops that are sprayed before harvest. Even more disturbing is that some reports state that glyphosate has made its way into our water cycle and can even be found on organic crops as a result of precipitation residue. In fact, the most interesting research happening right now in regard to our current epidemic of chronic illness is around glyphosate and its effects on the microbiome. In 2015 the International Agency for Research on Cancer classified glyphosate as a probable carcinogen, and its use is banned in the Netherlands and El Salvador. Varying interest groups worldwide have called for glyphosate bans, but governing bodies have not supported the requests. Glyphosate is known to suppress the function of one of the most important detoxification mechanisms in the body, cytochrome P450. Without this mechanism, the body cannot effectively rid itself of metals and other toxic compounds that are capable of damaging our nervous system. A 2013 review published in Interdisciplinary Toxicology demonstrates a strong correlation between the application of glyphosate on varying crops (primarily wheat, soy, and corn) and incidence of celiac disease, death from intestinal infections, thyroid cancer, acute kidney injury, and deaths from Parkinson's disease. The bottom line is that we're not entirely clear on the long-term effects of widespread use of glyphosate. But this much is clear to me: I'm not willing to use my body as part of an experiment to find out. Diets Void of Nutrients Now that we've explored some of the toxic highlights from eating grains, including overprocessing, phytic acid, lectins, omega-6 fatty acids, glyphosates, and issues specific to wheat, I want to briefly explore the greatest problem of all: consumption. Our substantial consumption of grains leaves little room for other foods. If we eat cereal or pancakes for breakfast, sandwiches for lunch, crackers and muffins for snacks, and pasta with bread for dinner, then when do we eat all of the other nutritious foods that are readily available to us? Sure, grains like rice, corn, and wheat have been staples for thousands of years, but people weren't eating these foods in the quantity (or form) consumed today. Have you ever grown your own grain, collected the seed, ground it into flour, and then made your own bread? There's a reason why very few home gardeners are this ambitious. I've grown a variety of interesting vegetables that require a bit more attention than, say, lettuce, but I have no interest in growing grains in my limited space. Grains provide a relatively low yield, especially traditional nonhybridized varieties, and the transformation of plant to edible product is incredibly labor intensive. Our ancestors were consuming grains when they were available, but I guarantee this didn't mean grains for breakfast, lunch, and dinner, 365 days a year. Even if you're reading this chapter as someone who's not ready to buy into the belief that all grains are bad all the time, then you should at least consider the fact that when you fill your belly with bread (or whatever grain-based food you frequently consume) you're wasting calories on a less nutritious food. Comparing the nutrient density of a grain to that of almost any vegetable, nut, seed, fruit, or whole-food animal product reveals that grains are an inferior choice. The fact that flour is fortified alone should be an indicator that you're eating a nutritionally subpar food. Luckily, better choices exist and are often readily available. Dr. Sarah Ballantyne (aka The Paleo Mom) compared essential vitamin and mineral content of the 30 most frequently eaten vegetables to eight whole, unprocessed grains. She found that "when compared to vegetables, calorie for calorie, vegetables contain double or more of every single vitamin... [and are] higher in most essential minerals." Hands down, grains simply aren't worth eating in such large quantities. What Constitutes a Healthy Fat? There's much confusion when it comes to dietary fat. For decades, people have believed that less fat is best and that high-fat diets will eventually lead to cardiovascular disease (CVD) and other health complications including obesity. However, the greater availability of low-fat foods that became popularized in the 1970s did nothing but fan the flames on what is now a modern-day public health crisis. When you remove the fat, you remove the flavor. And how do you make those foods flavorful once again? You load them up with sugar and refined carbohydrates, embellishments with clear negative health consequences. A 2016 article published in the Journal of Food and Nutrition Research compiled dietary data from 42 European countries in an attempt to identify the nutritional factors most influential on cardiovascular disease in Europeans. The results of the study showed that diets rich in carbohydrates, specifically those from cereal grains, potatoes, and alcohol, were correlated with a higher risk of developing CVD compared with a diet high in fat. In fact, high fat consumption was negatively correlated to CVD. Does this mean that fats offer a protective effect? Not necessarily. It's not so much that fat is protective as that a high-carb diet is disease causing. Saturated fats have received an especially large amount of negative attention, yet there's a lack of evidence proving these fats are the culprit in the development of CVD or coronary heart disease (CHD). Take France as an example. The French consume greater quantities of animal fats (a major source of saturated fats) than any other population, yet they have the second lowest worldwide CVD mortality. The saturated fat hypothesis influenced the widespread use of trans fat, a chemically manufactured fat that is commonly used in packaged foods due to its stable shelf life and high smoking point. A 2015 meta-analysis compiled data from 12 different studies, concluding that saturated fat intake was not associated with all-cause mortality (all deaths that occurred, regardless of the cause), CVD mortality, total CHD, ischemic stroke, or type 2 diabetes. However, consumption of industrial trans fats, even in extremely small amounts, was positively associated with all-cause mortality, CHD mortality, and total CHD. In other words, when we stopped eating saturated fats and replaced those fats with trans fats, refined carbohydrates, and sugar, we started getting sicker. Fats are an essential part of the diet that should come in varying forms. They fill a number of vital roles in the body. Fats are an excellent source of energy in that they are the slowest of all the macronutrients (carbs, proteins, and fats) to be metabolized. Some vitamins and minerals such as vitamins A, D, E, and K are fat soluble, meaning that you simply cannot absorb these nutrients without the presence of fat. The best source of these vitamins happens to be fatty foods. The human brain is comprised of about 60 percent fat. Indeed, fat, including cholesterol lipids, are essential for cellular metabolism throughout the body. Cholesterol controls the fluidity of cell membranes, which impacts the movement of substances in and out of cells, and influences the proteins that are embedded within. Fatty acids build cell membranes and myelin sheaths, the protective coverings on most nerve cells that form an electrically insulated layer. Without fats, our bodies are incapable of proper blood clotting, hormone production, muscle movement, or initiating an appropriate inflammation response. Fats are clearly an important component of a good diet. But the question is, "What constitutes a healthy fat?" All fats are comprised of long carbon chains with attached hydrogen atoms. The shape, length, and configuration of these chains translate into different functions throughout the body. Saturated fats are fully saturated with hydrogen atoms. The carbon chains are holding as much hydrogen as possible, a structure allowing for molecules to be tightly stacked, thus resulting in a substance that's solid at room temperature. There are varying types of saturated fats, such as lauric acid in coconut oil, that has gained much attention for its antimicrobial and heart-healthy benefits. Indeed, a number of different saturated fats exist in varying foods with their own unique health benefits. Unsaturated fats are either monounsaturated or polyunsaturated. Each is different based on the number of attached hydrogen atoms and double carbon bonds. These fats can be further divided into types such as omega-3 fatty acids, found in cold-water fish and walnuts; omega-6 fatty acids, found in vegetable oils; omega-9 fatty acids, found in avocado oil; and others. Distinguishing the difference between these types of fats isn't necessary for understanding what constitutes a healthy fat, but in general, each of these fats is beneficial when found in a whole-food source. The problem with unsaturated fats arises when the fats are extracted from the food, such as in corn, vegetable, soybean, peanut, and safflower oil. These fats are unstable, meaning that they can degrade in the presence of light, heat, oxygen, and pressure. Processing mechanisms often employ many of these techniques, yielding an oil full of chemical constituents that are harmful to the body. To make these oils more stable, scientists have turned them into hydrogenated oils, the major source of trans fats. The FDA concluded in June of 2015 that hydrogenated oils can no longer remain classified as GRAS (Generally Recognized as Safe), and therefore set a ban on their use starting June 18, 2018. Companies were granted a three-year compliance stage to make necessary changes to their products to reflect these new regulations. But don't be fooled. The FDA ended up extending the compliance date to January 2020, saying that companies needed more time to ensure a smooth transition. Furthermore, these processed oils most likely will be replaced by other toxic options such as Monsanto's Vistive Gold soybeans, a high oleic, GMO, Roundup-resistant soybean that became available to farmers in early 2018. These toxic alternatives are far from an improvement. The best fats to use for cooking include fats that are stable when heated. Good choices include saturated fats such as lard, tallow, coconut oil, and other fats reserved from cooking meats. Using a variety of sources is best since each of these fats has a different fatty acid profile. The aforementioned fats are not comprised of 100 percent saturated fats; they're a mix and fulfill varying physiological functions throughout the body. Olive oil and avocado oil are other good options for cooking. The paleo movement popularized the belief that olive oil (well known as a source of heart-healthy monounsaturated fats) should not be used for cooking since these molecules aren't considered to be stable at high temperatures. However, this belief was debunked by Sarah Ballantyne, aka The Paleo Mom. What I love about Sarah's work is that she has a doctorate in medical biophysics; the woman knows her chemistry! Dr. Ballantyne argues that the presence of varying phenolic antioxidants in extra-virgin olive oil protect the oil from oxidation, thus making it stable at temperatures as high as 410°F (210°C). In fact, extracts from olive oil and avocado oil can be added to canola oil to use for frying, and the antioxidant benefits make the canola oil more stable. Avocado oil is thought to have an even higher smoking point, possibly as high as 570°F (299°C). Cooking with avocado oil and olive oil is best when using extra-virgin or cold-pressed versions. Extra-virgin indicates that the oil was derived during a single press (the term extra-virgin is unique to olive oils). Cold-pressed indicates that the oil extraction process did not involve heat. Heat causes the food to release a higher quantity of oil, but the heating process also destroys the beneficial constituents of the oil. In summary, it's best to limit your cooking oils and fats to animal fats, unrefined coconut oil, extra-virgin cold-pressed olive oil, or cold-pressed avocado oil. Other oils such as cold-pressed walnut or flaxseed oils can be used in dressings, but avoid using such oils for cooking. Vegetable and soybean oils that are expeller pressed or highly processed, especially if they're not organic certified, should be avoided entirely. The Dairy Debacle Oh, dairy. What to do? While it seems to be crystal clear that sugar is slowly killing the Western dieter and that we can all benefit from eating far fewer (if any) grains, it is less clear as to whether dairy is problematic for the average individual. I'll present arguments both against and in favor of dairy and tell you a bit more about my own family's decision to eliminate dairy, but I'll first start by talking about bones and politics—the driving forces behind dairy's long-standing residence on the USDA's Food Guide Pyramid. David Ludwig and Walter Willett coauthored a 2013 article titled "Three Daily Servings of Reduced-Fat Milk: An Evidence-Based Recommendation?" In this article, these leading nutritional experts state that "humans have no nutritional requirement for animal milk, an evolutionary recent addition to diet." Keep in mind this is coming from two well-known, mainstream nutritionists. How can this be true? We've been told for decades to eat and drink dairy as a staple for bone health maintenance. The problem is that good science has very little actual influence on dietary recommendations. The National Dairy Council promotes high dairy intake, and research dollars are therefore poured into studies that support its consumption. An analysis of data quality from studies involving soft drinks, juice, and milk showed that financial sponsorship heavily influences the study's outcome. In fact, researchers found that unfavorable conclusions from consuming the beverage of study were completely absent from studies sponsored by interested parties. They concluded that industry funding results in a four to eight times greater likelihood of favoring the financial interests of the sponsor when compared with studies without conflicting funding sources. I believe this is a primary example of something we call bias. But in the unfortunate case of dietary recommendations, this bias is costing millions of people their health. Bone Health When we think of milk we think of calcium, and calcium is indeed what keeps our bones strong. We had to find a way to maintain our bones without consuming the dreaded fat, especially artery-clogging saturated fats, so the USDA recommended that most age groups consume three cups of reduced-fat milk per day in order to prevent osteoporosis and other bone-related diseases. This unfortunate recommendation stripped dairy of one of its finer qualities—rich, creamy, nutritious fat. No matter, the important thing was to supply our population with enough calcium to create strong bones. While Americans consume more cow's milk and dairy products per person than most other worldwide populations, American women over the age of 50 have one of the highest rates of hip fractures. Fracture rates for Europe, New Zealand, and Australia are even higher. These populations just so happen to consume even more milk per capita than the United States. Do you know what causes hip fractures in older women? Osteoporosis. But I thought we were preventing that with our three servings of milk per day. If milk isn't the solution to bone care, then what is? Bones are a complex matrix with a variety of functions. In the center is marrow interlaced with connective tissue, stored minerals, and fats. Vitamin A and specific bone-building enzymes are responsible for bone growth early in life, which is why a deficiency in vitamin A can cause stunted growth. Bones have an intricate composition that involves a collagen matrix with dynamic mineral deposits throughout. The collagen matrix is a lattice protein structure that comprises approximately 35 percent of our bones. Collagen is built from proteins and helps to provide our bones with flexibility. Our bones are not like wood or rocks, which don't flex; they have an inherent ability to bend as needed in response to muscle movements and impact. The collagen matrix is responsible for "trapping" mineral salts such as calcium phosphate to make up the other 65 percent of our bone structure. But it's not just calcium that is trapped within the matrix. Bones store magnesium, sodium, potassium, and other minerals in the process of mineralization. Minerals are continually flowing in an out of our bones in response to our body's needs, qualifying bones as highly dynamic organs that are continually being rebuilt. This is great news for those who suffer from weak bones. Adults regrow 5 to 10 percent of their bones every year, meaning that a full replacement can occur in about 10 years. Conditions such as osteoporosis can therefore be improved through dietary approaches, but once you're over the age of 30 or so, your bones can never be as healthy as they were in your youth. Rates of bone deposition can't keep up with reabsorption once you're over 30, which results in a small amount of bone loss over time. However, this information should by no means discourage you from improving your bone health via diet. Now, here's what interesting—if you dissolve a bone in an acid bath, the minerals dissolve away but the collagen (protein) matrix remains. That is, you're left with a matrix that cannot be broken; it bends. Alternatively, if you remove the collagen matrix from a bone, leaving only the minerals behind, you're essentially left with a structure that mimics chalk, a rigid yet easily broken substance. If you consider that populations who are consuming the greatest quantities of calcium are also suffering from the highest rates of fractures, then you can assume that calcium recommendations are only targeting the breakable, mineral component of our bones. A better approach would be to focus on the varying components of bones and how bones are created, degraded, and made rigid yet flexible. The question then becomes, how do we improve and maintain bone health if we don't eat loads of dairy? First off, we certainly need calcium, but not in the quantities found in dairy. Leafy greens and cruciferous vegetables such as kale, cabbage, broccoli, cauliflower, and brussels sprouts are all excellent sources of calcium. Additional food sources of calcium include oysters, soft-shell crabs, and foods with edible bones such as sardines and homemade bone stocks. Our bodies also require the help of two essential vitamins in order to properly assimilate calcium—vitamin D and vitamin K2. Vitamin D is actually a hormone, and it is found in very few foods with the exception of mushrooms, some fatty fish, and egg yolks. Dairy is a source of vitamin D, but only because it has been fortified with a synthetic vitamin. The absolute best source of vitamin D is from the sun, so getting outside every day is an easy way to get what you need. However, taking a vitamin D supplement during the winter months isn't a bad idea, especially if you live in a northern climate. Vitamin K2's role in bone development has been much ignored until recently, but it is responsible for depositing calcium into places like bones and teeth rather than into arteries. Foods high in vitamin K2 include natto (a fermented soy product), hard and soft cheeses, egg yolk, butter from grass-fed cows, chicken liver, salami, chicken breasts, and ground beef. Experts also speculate that some organ meats are especially high in K2, but this has yet to be verified. Beyond calcium, vitamin D, and K2, there are a number of other factors that help encourage strong bone development. Some of the other important bone-building vitamins, minerals, and macronutrients include saturated fats, phosphorus, vitamin A, magnesium, vitamin C, boron, manganese, zinc, copper, silicon, vitamin B6, folate, and many others. Annemarie Colbin, author of The Whole-Food Guide to Strong Bones, writes that "if we add up all these nutrients necessary for bone health, pretty soon we'll end up with... food!" But she also points out that it's not just food that enhances bone health, but also exercise and time spent outdoors. I already discussed the need for us to get vitamin D from the sun, but exercise stresses the bones in a way that positively encourages growth and development. Even the simple action of walking generates vibrations when the heel strikes the ground, and these vibrations move through the bone structure to stimulate growth. The healthy approach to developing and maintaining strong bones is much like the approach to overall health—eat a healthy, balanced diet, exercise, and spend time outdoors. Dairy for Children: Is It Really Necessary? Dairy is promoted as being especially essential for children, who "need" milk for proper growth and development. The American Academy of Pediatrics recommends that children should avoid cow's milk until age one, at which point whole milk should be introduced, but children over the age of two should be switched to 1% milk or skim milk. This recommendation to slowly wean a child from full-fat milk is a result of the low-fat craze that holds little scientific support. In fact, multiple studies have shown that children who consume lower-fat milk actually have higher BMIs (body mass index), which is a measure of body fat based on weight and height. A 2013 study of 10,700 children age two to four showed that the lower the percentage of fat in the milk they consumed, the greater their BMI and greater their risk for being overweight. A 2005 study followed 12,829 children age 9 to 13 and found that children who consumed three or more servings of milk per day had greater increases in BMI over the course of three years than those who drank less milk. This study also confirmed that the intake of 1% milk and skim milk had significantly greater impacts on increased BMI. There are a number of theories as to why we see increases in BMI and weight with greater consumption of milk, especially lower-fat versions. Perhaps this is the old tale of the chicken and the egg—maybe it's that the kids that drank lower-fat milk were larger to begin with and the low-fat milk was an attempt to prevent these larger children from further increasing BMI. Or perhaps it's because the hormones in the milk actually stimulate growth beyond what is normal. The fact that lower-fat milk had greater impacts on increased weight upholds the well-supported theory that decreased fat intake decreases satiety. These hungry people turn to other foods to find the calories they crave. People who consume low-fat milk are likely getting those additional calories from other low-fat foods that are often full of sugars and processed carbs, which, as we know, increase insulin production and fat storage. Whatever the trend, the recommendations from the American Academy of Pediatrics need to be revised. Parents should also be reserved about serving dairy to their children because it's a commonly ill-tolerated food, especially by infants and toddlers. Many young children suffer from reflux, colic, and eczema, which often result from food allergies and intolerances. The most common culprits are milk, eggs, soy, wheat, peanuts, tree nuts, fish, and shellfish. Milk and egg allergies don't often persist into adulthood, which indicates that there's something about the immature digestive system that simply can't properly digest milk or egg proteins or both. My son just so happened to be one of those individuals with both a transient milk and egg allergy. We discovered that he had a milk allergy when he was around four months of age. I hadn't yet served him dairy, but the milk proteins that I was consuming were being passed on to him through breast milk. His weight gain came to an abrupt halt and the doctor detected small amounts of blood in his stool, which is actually more common than you would think. This condition is known as occult intestinal blood loss and it occurs in 40 percent of normal infants. You're reading that correctly, milk is actually harmful to the gut of nearly half of all infants. Remember my discussion about leaky gut in the section about grains and how cells of the intestines need to be sealed tightly together in order to prevent the escape of partially digested proteins? Well, the infant gut is leaky by design, and the cells of the intestines don't fully seal until a child is around two years of age. This evolutionary advantage allows for the passing of hormones and other important molecules from breast milk into our baby's bodies, but it also means that we have to implement great care when introducing foods to an already sensitive system. The good news is that occult intestinal blood loss usually subsides as a child grows older. While it is beyond the scope of this book to discuss an indepth healthy approach for introducing solids and early feeding habits, an early introduction of dairy and rice cereal as first foods are outrageously terrible recommendations (see My Family on GAPS, page 33). Both foods should be saved for much later in life, when a child has a more developed gut. Lactose Intolerance and Problematic Proteins Lactose intolerance is estimated to be present in approximately 75 percent of the worldwide population. There's great variation among ethnicities, with only 5 percent of Northern Europeans demonstrating lactose intolerance, but a prevalence as high as 90 percent for Asians and Africans. In the United States alone, it's estimated that 30 to 50 million people are lactose intolerant. People who are lactose intolerant lack lactase, the enzyme responsible for breaking lactose down into glucose. The lack of lactase (say that five times fast) is often a result of genetics, but can also occur in response to diseases such as Crohn's, celiac, ulcerative colitis, gastroenteritis, and also in response to infections and chemotherapy. Lactose intolerance causes a slew of symptoms that resemble irritable bowel syndrome (IBS)—gas, bloating, nausea, stomach pain, and diarrhea. Some people who are lactose intolerant claim that while they can't tolerate pasteurized milk, they can tolerate raw milk. Milk naturally contains lactase, which is lost during the pasteurization process. The presence of lactase makes raw milk a more digestible source of dairy for those who can't tolerate lactose. Pasteurization is responsible for preventing a number of diseases such as tuberculosis, salmonella, giardiasis, and many other bacterial and parasitic infections. The presence of disease-causing pathogens in milk is more prominent in large factory farms or farms where a lack of proper sanitation and cleaning methods exist. That said, raw milk sourced from a reputable family farm is unlikely to be a source of such diseases. My family sourced raw milk from a friend in Vermont whose family owned a small dairy. They'd been consuming raw milk for decades without issue; their farming practices prevented the spread of undesirable bacteria and parasites. If you decide to go the family farm route to get your raw milk, just be sure to inquire about the dairy's sanitary practices. Milk contains whey and casein proteins that can be problematic for certain individuals whether it is caused by a sensitivity or an actual allergy. If you suffer from IBS, I highly recommend eliminating all dairy for a minimum of three weeks to see how your body responds. One study showed that 84 percent of people with IBS tested positive for milk protein antibodies, indicating a milk allergy. For others, either casein or whey (or both) can simply be irritating to the gut. Dairy and Autoimmune Disease One of the more unfortunate consequences of consuming milk, especially at a young age, is its role in the development of autoimmune diseases. Cow's milk is a source of proteins that mimic our own. At times, these proteins are recognized as harmful invaders, and the immune system responds by releasing antibodies. The problem is that the body loses its ability to distinguish between normal cells and milk proteins, and begins to destroy them all. When your body attacks its own healthy cells, you're considered to have autoimmune disease. Some examples include hyperthyroidism, rheumatoid arthritis, hypothyroidism, anemia, multiple sclerosis, type 1 diabetes, lupus, and others. People who are type 1 diabetic have an immune system that mistakenly attacks healthy pancreas cells that produce insulin. A strong link between early-childhood milk consumption and development of type 1 diabetes demonstrates that cow's milk is extremely difficult to digest for the immature system of an infant. These improperly digested proteins leak into the bloodstream, where antibodies are formed to attack the invaders. Unfortunately, these invaders look an awful lot like the body's own pancreas cells. Once this response is initiated, an individual's immune cells remain confused and the individual will be diabetic for a lifetime. A 1992 Finnish study cited within The China Study, a famed project that explored the relationship between diet and disease risk, measured milk antibodies in diabetic versus nondiabetic children. Diabetics consistently had higher milk antibodies. Additional studies since that time have shown that early weaning, early introduction of milk-based formulas (or milk), and childhood viral infections that compromise the immune system are all risk factors for developing type 1 diabetes. Genetics also play a small role in the development of diabetes, thus the American Academy of Pediatrics strongly recommends that infants with a family history of diabetes avoid milk until the age of two. An infant has a 13.1 times greater chance of developing type 1 diabetes when there's both a family history of the disease and not being breastfed for a minimum of three months, implying that the child was instead fed a milk-based formula. Not being breastfed for a minimum of three months alone increases risk 11.3 times. The authors of The China Study offer perspectives for comparison, stating that smoking increases likelihood of developing lung cancer only 10 times. The risk of developing diabetes from early introduction of milk is therefore extremely profound and should be discussed more often. Multiple sclerosis (MS) is another autoimmune disease for which a documented trend in development is similar to that of type 1 diabetes. The difference is that rather than attacking the pancreas, antibodies attack the cells of the myelin sheath, the coating that lines the nerves. Some of the initial studies of MS development focused on the consumption of saturated fats, but more recent studies suggest that dairy is the more likely culprit in disease onset and severity. Regardless, a change in diet that reflects the elimination of dairy can substantially improve disease outcome. Take It or Leave It All in all, there are certainly risks associated with consuming dairy, but these outcomes appear to manifest on an individualized basis. Personally, I've found that my family members are among the individuals who benefit from dairy exclusion. My son clearly has symptoms of leaky gut and systemic inflammation since he suffers from both asthma and allergies. The same is true for my husband since he, too, has asthmatic tendencies. Individuals who suffer from any type of inflammatory condition should avoid dairy as part of an anti-inflammatory approach aimed at disease management. We also avoid dairy with my daughter because of its mucus-forming capabilities, as CF is characterized by excessive mucus. Quite simply, the consumption of dairy is counterproductive in the treatment of her disease. As for myself, I personally notice very little difference whether I choose to eat or not eat dairy. There's evidence that supports that dairy can be beneficial in some instances. Studies supporting dairy intake have shown that consuming full-fat and fermented dairy can help protect against metabolic disease, type 2 diabetes, and cardiovascular disease. It can lower an individual's risk for stroke and coronary heart disease. Dairy from healthy, grass-fed cows offers an excellent source of fat-soluble vitamins, calcium, and anti-inflammatory fats such as linoleic acid. Further studies support the consumption of dairy as a beneficial source of calories for malnourished children. Despite evidence showing that dairy consumption may actually be beneficial, it's important to keep in mind that these benefits are only observed for individuals who can tolerate and digest dairy without issue, and there's much evidence showing that these rules simply don't apply to everyone. The best way to determine whether you can tolerate dairy is to embark on an elimination diet for a minimum of two to three weeks. Most of us never even question the foods we eat, which is why it's important to question our habits by trying something new and unconventional from time to time. I've known numerous individuals (myself included) who felt that certain foods agreed with their body until they tried eliminating these foods for an extended period of time. Sometimes we can't recognize what a food does to our body because we have no basis for comparison. We've only known how our body feels while eating that food, because we've always eaten it. Whole Foods to the Rescue We now know that sugar is toxic, overconsumption and processing of grains is harmful, and dairy isn't well tolerated by numerous individuals. Consumption of these foods can lead to serious health consequences. But what do we eat if we avoid all of these staples of the Western diet? Salad? Cardboard? What's left if we take away our grains, sugar, and dairy? I could use this section to implore you to eat beets because they contain high quantities of detoxifying pigments called betalains. Or I might try to convince you that anthocyanins in dark purple fruits such as blueberries are going to save you from the dangers of oxidation. Our society is obsessed with "superior" foods like spinach, acai berries, and turmeric that declare above-average nutritional benefits. (Okay, I admit that I kind of buy into the whole turmeric thing.) Maybe we could take a scientific approach and construct a diet of only the foods with the highest-ranking nutritional values. We'd surely be preventing heart disease, cancer, diabetes, obesity, arthritis, and numerous other chronic diseases that we could combat with a specific formulation of the perfect foods. The problem with extreme dietary activities is that most of us are busy with other concerns; personally, I don't have time to weigh out every dietary question that pops up. Should we eat cabbage or cauliflower tonight? Which will optimize our calcium intake for the day? Have I eaten enough antioxidants? Should I squeeze in a cup of blueberries before bed? My strategy is to eat real, whole foods and forget about the magic-bullet health claims. When I consider all of the evidence against sugar, grains, and dairy, what stands out is that these foods, especially the highly processed versions, are disease promoting. Repeated studies show that a change in diet corresponds with a change in health status. When you eat Western foods, you get Western diseases. While some experts point to genetics as the driving force behind disease etiology, the reality is that genetics contribute to less than 10 percent of disease. The author Chris Kresser described it best when he wrote, "Genes may load the gun, but the environment pulls the trigger." Less than 2 percent of all diseases result from a true genetic defect. Unfortunately, CF is one such disease, but this is all the more reason to protect the rest of my daughter's genetic profile, and I do this by providing her with good fuel for her system. What we're learning is that genetics are far more complicated than we previously thought and that a single gene simply cannot cause something like diabetes, heart disease, or cancer. It's instead the interaction of these genes and how the environment affects their expression. Studies of identical twins demonstrate this principle perfectly. Two individuals have identical genes, so you would expect the same disease outcome for both twins if genetics were the sole driving force behind disease development. Yet when we look at an identical twin that develops diabetes, the second twin has only a 13 to 33 percent chance of contracting the same. Yes, the genetics for diabetes are present, but it's the environment and the interaction of genes that trigger the response. Some experts have estimated that 50 percent of worldwide early deaths are caused by three factors alone—diet, indoor and outdoor air pollution, and smoking. Allow me to translate this for you: We're making ourselves sick (or, really, the companies in charge of our food supply)! Our diets (and air) are slowly killing us! But let's go back to the acai berries and turmeric. Yes, these foods prevent disease for varying reasons, but I'm arguing that it's less important that these foods prevent disease and more important that the alternatives (processed, Western foods) are causing disease. If you look at it that way, knowing what to eat then becomes really simple—you eat real food! When you take away the grains, sugar, and dairy you're left with options like fruits, vegetables, nuts, beans, seeds, meats, eggs, fish, and the like. Hopefully, I've stressed that overconsumption of most any food can be problematic, so we need to eat a variety of these things. A Broken System with Poor Advice When deciding what and how to eat, we simply can't count on the government or the medical community to give us sound advice regarding the correct combination of nutrients. Yes, there are some amazing individuals out there who are rising above to lead the way to positive change, but by and large we're at the mercy of a broken system. Agriculture subsidies fund crops like wheat, corn, soybeans, rice, and cotton, which drive the low costs for such commodities. It's a system that encourages overproduction and prevents farmers from implementing more environmentally sound practices or growing more nutritious foods like fruits and vegetables. The USDA spent almost $13 billion on farm program payments in 2016 and none of this money subsidized vegetable production. This money is instead keeping costs low for a loaf of bread. The sad truth is that money informs policy and unfortunately this doesn't mean that our health is being protected. A 2009 article published in the New York Times discussed extreme bias in medical schools throughout the United States and the astronomical amount of funding for medical schools that originates from pharmaceutical companies. The American Medical Student Association rates medical schools based on their conflicts of interest and the amount of money provided by the drug industry. Harvard Medical School, one of the most prestigious schools in the United States, received an F because millions of dollars in direct payments to professors and in research funds came directly from interest groups such as pharmaceutical companies. One Harvard professor was noted to have 47 affiliations with different companies. It would seem that our doctors are being trained to treat disease in a way that brings financial gain for drug companies. As a rule, doctors aren't being taught that avoiding milk until the age of two can help protect against type 1 diabetes. Instead, they're being taught that type 1 diabetes is treated with a lifetime of insulin injections. Prevention doesn't pay, and the system is set up to generate payees. We can't forget that making people sick is good for business. Dr. Mark Hyman said it this way in a Huffington Post article: "The basic fact is that one-third of our economy profits from making people sick and fat. The food industry sells products scientifically proven to kill more people than cigarettes, while our health care industry profits from providing more volume of care focused on medication and procedures, not better health." Corporations are allowed to make unlimited campaign contributions to politicians, and these contributors are informing important policy when it comes to health care and how we prevent disease. I can only imagine what these corporations are getting in exchange for their campaign dollars, but I doubt it's anything to provide the taxpayers with improved health. Politics is certainly one of the reasons that a low-fat, high-carb diet gained such popularity. We were told for decades that saturated fats and cholesterol would cause heart disease, but the resulting dietary changes created an upsurge in diabetes, obesity, and associated diseases. Drinking more milk led to more osteoporosis. Luckily, the growing body of scientific literature is starting to lay these myths to rest, and we're slowly watching the pointed finger move away from fats and rightfully toward sugar and processed carbohydrates. The Approach That Works I've really only described the tip of the iceberg when it comes to conflicts of interest and poor nutritional and medical advice. Nonetheless, hopefully it's clear to you that we need to change our diet and that we need to use a commonsense approach to enacting this change. We need to eat real food. The question then becomes "How do we do it?" You can start by making it your goal to eventually eat a nearly 100 percent whole-food diet that is free of sugar and processed foods, with very little (if any) grains or dairy. You start by going through the chapters of this book and learning how my own family made this change, and to become inspired by its long-term benefits and sustainability. Anytime you make a major change, especially one that involves the elimination of an undesirable habit or food, it's helpful to focus more on what you're getting than on what you're taking away. If you decide to start implementing a grain-free, sugar-free, dairy-free diet and all you think about is deprivation and how you're losing all of these fabulous foods, then you're focusing on subtraction, what you're giving up. A better approach is to focus on the positive health possibilities you are getting and the opportunity to experience some amazing foods that you've likely been missing out on. For example, I eat vegetables at nearly every single meal. Have you ever tried eating vegetables at nearly every single meal? Do you know how remarkable you start to feel when you eat like this? If I were eating sandwiches all the time I wouldn't have space in my diet for all of these other nourishing foods. I don't feel deprived of bread, I feel gifted by vegetables and the nourishment they give me. I encourage you to think about the benefits of dietary change, the possibilities in health, and the incredible additions you're going to be making to your diet as you change the way you eat. All of these whole foods are coming to the rescue. chapter two Feeding the Kids—Get Your Game Face On! When it comes to human health, children rank as one of my top priorities. Children are growing and developing the bodies, minds, and habits that will propel them into their future bodies, minds, and habits, and they need the right fuel if they're to develop to their fullest potential. Diseases that were once unique to an aging population such as obesity, heart disease, and diabetes are now developing in young children at alarming rates. The youngest child to have developed type 2 diabetes in the United States is three and a half years old. Behavioral and spectrum disorders are at an all-time high, and the number of drug-dependent children continues to grow. Varying theories exist as to why these conditions are steadily increasing, including that of diet. And with that in mind, I'm most interested in the growing body of evidence supporting the benefits of a healthy diet. Among that evidence are the stories of families who have experienced relief from varying symptoms and conditions through dietary interventions. As parents we have a responsibility to help our children learn and understand how to fuel their bodies in a healthy way. Feeding our kids the proper foods takes effort, but the payoff is substantial. Recall how you feel after eating entirely too much sugar. Personally, I've noticed that I'm far more irritable and my emotions are less stable. As an adult I'm able to stuff my emotions into an internal compartment and go on with my day, but children don't filter their emotions in this same way; a bad sugar binge can lead to explosive emotions that leave everyone in the family feeling drained. Although I'm using sugar as an example, chemical-laden processed foods can generate similar effects, especially in small children. Taking the time to feed your children real food will drastically help improve their mood, behavior, and overall health, which are all powerful motivators in the journey to achieve a better diet. Marketing of Kid-Friendly Foods Foods marketed toward children are often brightly colored, void of nutrients, and contain more sugar per serving than what should be consumed by an adult. The Center for Science in the Public Interest (CSPI) has reported that 43 percent of children's foods contain food dyes, stating this is problematic since dyes are associated with hyperactivity and other behavioral problems in children. CSPI has petitioned the Food and Drug Administration (FDA), requesting a ban on the following dyes: Red 3, Red 40, Yellow 5, Blue 1, Blue 2, Green 3, and Orange B (a dye permitted only on sausage casings). They support their request saying that "the European Union requires a warning label on most dyed foods indicating that such products 'may have an adverse effect on activity and attention in children,' encouraging manufacturers to switch to natural (or no) colorings." Why is it, exactly, that we need food dyes in our children's foods? Somehow we've become caught in a trap of believing that our children won't eat the same foods enjoyed by adults. The efforts to market kid-friendly foods have successfully created an entire line of processed junk for our children, which is supported by our belief that colorful food equates to kid food. Unfortunately, this assumption isn't entirely false. I have yet to buy my kids one single packaged, kid-friendly food, but my son asks me to buy some form of superhero gummies almost every time we're at the grocery store. The brightly colored foods in flashy boxes adorned with Ninja Turtles are enticing to his young mind—a testament to the food industry's successful propaganda. Of course your child wants the flashy sugar-loaded cereal rather than eggs and homemade muffins, but does this mean that your child won't eat the healthier alternative? They won't if you allow them to choose. I simply don't buy the sugar-laden kid food, which eliminates the choice altogether and ultimately saves us an argument. Grocery stores also do their part to enhance purchasing of kid-friendly foods by lining checkout aisles with candies, lollipops, chips, and other unhealthy foods that spark children's interest. We drag our children through the grocery aisles as they relentlessly ask for a variety of products, and we reach the checkout aisle feeling tired, run down, and ready to abort mission. I now understand why my mother often left the three of us girls at home. While I stick to my guns when my kids start asking for the candy bars, I see how many parents get tired of the fight and give in at this point in their shopping adventure. My advice to you is that if a food is marketed as a kid-friendly food, don't buy it. Run in the other direction. The same goes for many of the "all natural," "organic," or seemingly healthier children's products. Many of these products aren't much better when it comes to nutritional value. Although I will say that buying organic is definitely better than the conventional option. The bottom line is that your child is a human, and humans need real food. Healthy foods aren't usually sold in flashy boxes covered in Disney princesses. Don't let food marketers fool you into thinking that your child won't eat food unless it's packaged like a toy. Aborigines and Dinosaur-Shaped Chicken Nuggets Consider children who grow up in remote societies that consume meat, blood, organs, bitter roots, and seasonal fruits, vegetables, nuts, and seeds. Imagine a mother serving a dish to her child, but the child snubs whatever food has been offered, saying, "I don't like it." The mother rushes back to her primitive kitchen and throws a pile of dinosaur-shaped chicken nuggets into the microwave. The parents eat the nutritious meal prepared from fresh ingredients, while the child stuffs their face with a fake chicken product that's likely loaded with soy protein isolates, wheat, fillers, stabilizers, preservatives, food dyes, and of course just enough chicken to actually market the product as "chicken." The scenario I just presented may seem absolutely absurd, yet how many families across the developed world have fallen into this pattern with their own version of dinosaur-shaped chicken nuggets? When children refuse to try a new food, parents are quick to offer the kid-friendly foods that their child will willingly eat. Or even worse, most parents won't even try to offer new foods simply because they're tired of battling their children over picky eating. I get it; we choose our battles. As we parents slump over in complacency and exhaustion, our kids consume frozen pizza bites, fish sticks, fruit snacks, processed meats and cheeses, muffins, cookies, crackers, and whatever other convenient, kid-friendly foods they've grown accustomed to. I'm sure you're wondering how this feeding cycle has developed. The answer is quite simple: Parents provided these processed foods to their children, for whatever the reason, and now their children have developed a taste for processed foods. Trying to get children to eat anything other than these foods then becomes a major challenge. I'll offer suggestions for changing these habits momentarily, but I'd like to first help you understand a loving, logical argument that just might persuade you to stop offering dinosaur-shaped chicken nuggets (or whatever) to your children. Love Your Kids with Food One of the mistakes that we often make as parents is when we fail to respect the boundary between nourishment and a child's personal preference. Our kids are picky eaters because we've given them choices that satisfy our immediate desire for them to eat. And our reaction is to replace our initial offering of nutritious food with a more tantalizing food that will likely encourage them to eat, even at the risk of endangering their long-term health. We need to readjust our boundaries so as to focus more on nourishment and less on preference. When I offer my child something to eat and they refuse, I'm tempted to rush back to the kitchen and offer a different, more appetizing choice. This is especially true for my daughter, whose disease is characterized by malnutrition, improper growth, and an impaired ability to absorb nutrients. I'm so overly invested in the number that appears on the scale that I literally lose sleep over the subject before our quarterly clinic visits. To be perfectly honest, I have even loaded her up with food and water immediately before entering the doctor's office in hopes that those extra few ounces she consumes before stepping on the scale will guarantee a positive response from her CF team. I can't even tell you the number of times I've been tempted to load her up with unhealthy foods just to make that number grow at a rate beyond the normal growth curve. Yet I constantly remind myself that the foods I offer to my children are nourishing choices. If they choose not to eat, it's because they're not hungry. My long-term objective is to help my daughter grow and develop in a way that prevents the devastation of her disease—this is the loving choice I make for her each and every day—and I won't let my goal be overshadowed by a short-term investment in my desire to see her eat. I should note that my daughter is certainly not undernourished. In fact, I'd say she's thriving. I'd hate for you to think that I'm refusing to feed my child because I'm so darn stubborn about health food that I'm watching her waste away. She is currently around the 90th percentile for height and weight, and follows a normal growth curve—all signs that she's growing as expected. We've had issues in the past because she's tall and thin. In the world of CF, children are expected to maintain a BMI above the 50th percentile. Although her numbers seem perfectly average for a "normal" child, our previous CF team felt that her weight wasn't adequate for her height. They'd like for all CF kids to mimic little Michelin Men with rolls covering their bodies. Unfortunately, neither of my children adopted this trait. I blame my husband who's over six feet tall and has never weighed an ounce over 160 pounds in his life. I also want to add that some families with CF are not as fortunate as us; for them malnourishment is a major, life-threatening struggle. These families have had to make a few more exceptions than they would have liked simply because of their situation. While it's beyond the scope of this book to dive into the multiple reasons a child may develop into a picky eater, certain medications and medical conditions can completely zap a child's appetite. Many of these families are just doing their best to get anything into their child's belly. I'm oversimplifying the issue, because the majority of people fall outside of these special circumstances. The important point is that getting your kid to eat, whatever the circumstances, can often be a complicated issue. So please don't judge your neighbor whose child has severe autism when you see that all he eats are fish sticks and crackers. Our fellow parents could use a bit more grace, and chances are that we don't understand the full story. Okay, so back to loving our children with food. I encourage you to reflect on what it means to love your children through nourishment. Does it mean filling their bellies with processed, sweetened, kid-friendly foods that will most likely contribute to poor eating habits or disease? I believe that we've somehow missed the mark, and in order to hit that mark we need to take a step back and understand the long-term consequences of our actions. None of us want our children to develop juvenile diabetes or other chronic diseases normally seen much later in life. Can you imagine how heartbreaking that would be? Please know that I'm not condemning any choices you've made. Trust me, I've made (and will continue to make) my own mistakes. I simply encourage you to understand that love is expressed in numerous ways, and that one of those ways is by offering healthy foods to your children that will ensure that they continue to thrive. The GAPS Diet and Early Foods for Baby Gut and Psychology Syndrome (GAPS) refers to a combination of symptoms that are speculated to arise from severe gut dysbiosis (abnormal flora conditions within the intestinal tract). Dr. Natasha Campbell-McBride, author of Gut and Psychology Syndrome, noticed that several autistic children often developed one or more additional symptoms and conditions including dyspraxia, ADD, ADHD, asthma, allergies, dyslexia, depression, and schizophrenia. These same children often exhibit digestive issues such as gas, diarrhea, bloating, constipation, or frequent upset stomachs. She concluded that the condition within the gut was the cause of these varying conditions. If she could heal the gut, she could heal the condition. Dr. Campbell-McBride formulated the GAPS diet as an approach to correct gut dysbiosis, thus correcting any associated symptoms. The diet has varying stages, all with a focus on nutrient density and avoiding foods that could potentially irritate the bowels. Stage one involves the simplest foods—homemade bone broths, boiled meats, healthy fats, and boiled nonfibrous vegetables with seeds and peels removed. She recommends ferments and probiotics as an integral part of the healing process, saying that homemade raw fermented dairy and fermented vegetable juice (the actual fermented vegetables are added in later stages) are both excellent choices during this first stage. Raw organic egg yolks are added during the second stage. Soft boiled eggs that include the whites are added once the raw yolks are well tolerated. The second stage allows for the addition of herbs, more probiotic foods, and ghee. Avocado, pancakes made from nut butters, egg scrambles, and fermented vegetables are added during the third stage. The fourth stage expands preparation methods for meat, such that roasting and grilling may be added to the boiling method. Olive oil is added, as are freshly pressed green juices. The fifth stage begins to incorporate a few cooked fruits (apples, mangoes, and pineapples; citrus is not yet allowed) and some raw vegetables. The sixth stage allows for raw fruits and a few GAPS-approved baked goods that use fruit as a natural sweetener. A patient can move through the six stages of the GAPS diet in varying amounts of time, using the consistency of their stool as the primary indicator. Dr. Natasha Campbell-McBride has seen it take as little as two weeks or as much as one year's time. The idea is that you're slowly allowing the digestive system to heal and repair itself while simultaneously flushing out undesirable bacteria and replenishing the remaining bacteria with a healthier population. A GAPS patient who has successfully introduced all foods in stage six can then move on to the full GAPS diet, a protocol that is followed for at least two years. The full GAPS diet is grain-free, allows very few legumes, omits all processed foods, and focuses on quality and the addition of ferments. A GAPS patient then continues to eat healthy meats, fats, homemade broths, probiotic foods, vegetables, fruits, nuts, raw dairy, herbs and spices, and green juices. Overall, I'd have to say that the GAPS diet is not very restrictive, other than those initial stages that are necessary for rapid healing and transformation. My Family on GAPS I chose to use portions of the GAPS diet when introducing solids to my daughter in order to encourage healthy gut development. I opted not to introduce dairy due to its mucus-forming characteristics. I also avoided raw eggs since my son was allergic to eggs and I was concerned that my daughter, too, might have some of the same issues. Other than that, I followed the stages, slowly introducing one set of foods after another until my daughter was on the full GAPS diet by the age of 18 months. We started with bone broths and healthy fats (primarily animal fats), and slowly added boiled meats and vegetables. I chose to leave the peels and seeds of vegetables intact for the sake of time, but I stuck to non-starchy, nonfibrous vegetables in the beginning and then slowly branched out. I would boil the vegetables and fats in bone broth and create a puréed soup out of the mix that could be eaten for multiple meals. These soups could even be frozen and thawed to switch it up for some diverse combinations. I offered her small pieces of meat that required minimal chewing because it had been pressure-cooked or extensively boiled in broth. Allowing her to pick up the small bits of meat with her fingers also helped her develop the coordination and mouth skills she would need for more advanced feeding. I didn't know about the GAPS diet when I was introducing solids to my son. Though I'll never know for sure, I believe some of his allergic tendencies may have been at least partially mitigated had I implemented a gentler approach. Introducing solids to a baby in a safe and cautious way is accomplished using the GAPS diet and I wouldn't recommend doing it any other way. Healthy Eating Habits Start Early My hope is that mothers of young children will read this book and implement the following strategies in order to prevent the picky eating trap. I have now introduced many foods to two healthy, adventurous eaters and I believe my strategies can work for the majority of parents. There are certainly circumstances for which developing healthy eating habits (medical conditions, sensory issues, or medications) will be a bit more complicated and may even require professional intervention. I encourage families with these circumstances to seek early intervention. My approach boils down to one thing, and one thing only: I fulfill my obligation to feed my children by offering them a nourishing choice. If they refuse this choice, there's no other option. Dinner is dinner; I don't cook to order. When my son was around 18 months of age, he was on the path to becoming a picky eater. He would eat only cheesy macaroni, an odd homemade kale bread concoction, and puréed vegetables that were hidden in puréed sweet potatoes. It wasn't the worst diet, but he was eating the same foods at every meal. When I offered him something different, he would refuse, and so I'd replace that food with something that he was sure to eat. Our pediatrician gently pointed out that my own behavior was at the root of our picky eating situation. I had trained my son to know that I would always offer a familiar, tasty food. There was no incentive for him to try something different; the familiar foods were always available. She also pointed out that I would have to break the cycle if I were to make any improvements to his eating habits. The weeks that followed our conversation were challenging to say the least. I would offer my son the food that my husband and I were eating for a meal, and when he would refuse I wouldn't offer a replacement. He was clearly hungry and incredibly emotional, but he refused to eat what was placed before him. Our standoff was miserable for all of us. I was offering foods that he loved for snacks, such as fresh fruits and other healthy options, and every few days I'd offer a familiar meal that gave some reprieve. But for the most part, I offered the meals that I wanted him to eat and nothing else. Our standoff lasted somewhere between two and three weeks, but then something clicked and he just started eating whatever I gave him. He finally realized that there was one and only one food choice—take it or leave it. He chose to take it. While this may seem like an abrupt approach to conquering the picky eating trap, it's the approach most often recommended by professionals. Children need firm and consistent boundaries if they're expected to alter any behavior. The short-term discomfort that we all experienced during those few weeks has paid off thousands of times over. I am certain that my son's medical condition would not have improved so drastically if his diet had remained so limited. Taking a hard stance on food was the loving choice that my son needed if we were to avoid further deterioration of his health. When it came time to introduce solids to my daughter I knew I didn't want to repeat the picky eating cycle, which meant I was going to need a different approach. When she turned six months of age, I chose to implement many features of the GAPS protocol for introducing her to solids. The GAPS diet is designed to help an individual develop healthy digestion and immunity (or to heal digestion and thus the immune system). Knowing that my daughter had CF motivated my search for preventive strategies such as diet that could be part of her complementary care. The GAPS diet could benefit any individual, and I believe it to be an unsurpassed approach for introducing solids to a baby. Not only did I use an entirely different diet when introducing solids to my daughter, but I had already learned what happens when you offer the same foods repeatedly—you get a picky eater. I offered my daughter whatever nutritious GAPS foods I wanted her to eat, allowed her to eat as much as she needed, and very rarely offered an alternative choice. And can I just say again that I highly recommend this approach to any parent introducing solids to a baby? This approach worked wonderfully! One of the greatest benefits to our food introduction approach with my daughter was that we established healthy expectations surrounding food from the beginning, which meant there was no backpedaling or need for corrective behavior down the line. Furthermore, using the GAPS diet ensured that we were only introducing the most easy-to-digest and nourishing foods, which ultimately avoided unexplained tummy pains or rashes. My daughter very rarely developed diaper rash, which was much different from my son who was always having his irritated little bum lathered in thick white cream. Even though some pediatricians won't support my claim, I'm confident that the majority of diaper rash incidents can be avoided through diet. I saw it with my son and again with my daughter, and I've talked with numerous parents who have experienced the same. One thing to keep in mind when introducing solids to babies is that their appetites are always in flux. Don't interpret their refusal to eat as a dislike for a particular food—they're simply not hungry enough to eat it. Don't force them to eat by providing a "better" choice. Yes, there are days when my daughter, and son for that matter, barely eats, but I allow her the space to respect the ebbs and flows of her metabolic needs. Isn't that a positive attribute to encourage in our young kids anyway? I certainly wish I were better at listening to and honoring my needs, especially when it comes to hunger level. I give you my word that your child will eat when they're hungry; they won't starve themselves. Your only job is to offer food; you don't need to cater the food to their preference. Implementing this strategy in my own family has created a positive culture surrounding healthful foods. Both my daughter and my son will eat almost anything put before them and, as a result, we have minimal conflict surrounding mealtimes. Some coaxing and dislikes certainly happen at times, but it's not our norm by any means. Converting a Picky Eater If you feel that your child is a mildly picky eater, you'll likely be able to tackle the issue on your own as long as you're willing to make a plan and implement a bit of tough love. If your child is young, as my son was when we corrected his picky eating, you can simply refuse to offer an alternative food. Your child will eventually catch your drift. But if you feel that your child is picky above and beyond what you consider to be within a normal range, I recommend recruiting the help of a pediatrician, speech pathologist, occupational therapist, nutritional therapist, or alternative care provider with experience in whole-food nutrition and behavioral change. These providers can help assess your child's situation, implement nutritional interventions, and work with your family to formulate a strategy to meet your specific needs. One of the most important aspects of correcting picky eating is that a child must be repeatedly offered new foods in a low-pressure environment. Studies show that children won't even try a new food until it's been offered 8 to 15 times, but parents often stop offering after the child has refused that food just 3 or 4 times. Knowing that your child will likely reject a new food repeatedly should at least offer you some perspective and help you adjust your expectations. Experts agree that kids eat more new foods when those foods are paired with something familiar. Hunger will be a key motivator in your success, so try to avoid filling your kids up with snacks and calorie-rich beverages that will curb hunger at mealtimes. When you do offer new foods know that you're not forcing your child to eat; you're instead providing them with ample exploration opportunities, which lessens unfamiliarity and increases curiosity. Try to pick healthy options that will guarantee success, especially when you're just starting out. Offer those foods, along with a familiar option, and nothing else. Do not waiver in your expectations. This will only confuse the child and ultimately make this change more challenging. Some experts recommend the use of Applied Behavior Analysis (ABA), a system based on work and reward, but its use is often limited to eliciting behavioral change in autistic or spectrum children. For example, the child will get this (insert highly desirable item) after you try this (new food). Most experts agree that using a system of reward is not ideal for all kids, but there are instances in which this approach would be useful. If nothing else, please realize that change begins with you and that the effects will cascade down to other family members. Don't hold your children to an expectation that even you can't meet. Everyone has to be on board. Correcting the way our children eat also means correcting the way we eat. Be part of the solution, implement the strategies in this book for getting your kids more involved in the meal process, and commit to being consistent and upholding clear expectations. The struggle to change your child's eating habits will be well worth the payoff. ADDITIONAL RESOURCES Gut and Psychology Syndrome: Natural Treatment for Autism, Dyspraxia, A.D.D., A.D.H.D., Dyslexia, Depression, and Schizophrenia by Natasha Campbell-McBride Food Chaining: The Proven 6-Step Plan to Stop Picky Eating, Solve Feeding Problems, and Expand Your Child's Diet by Sheri Fraker, Mark Fishbein, Sibyl Cox, and Laura Walbert Getting Your Kids in the Kitchen Children are capable of far more than we sometimes give them credit for. My son has been responsible for a variety of household tasks since he was three and a half years old. Now at age five, his tasks include things such as washing and putting away his own clothes, folding his sister's cloth diapers and wipes, clearing the table after a meal, cleaning his room, brushing his teeth, carrying groceries, unloading the silverware from the dishwasher, taking out the compost, sweeping, vacuuming, and a variety of other self-care and household chores. Does he do these tasks willingly each time? Certainly not, but these chores are his responsibilities, he's perfectly capable, and the completion of his duties provides him with a sense of independence, self-reliance, and proud involvement. Children need to feel purposeful, and asking for their help with household tasks allows just that. In the same way that I expect my children to participate in household chores, I expect them to participate in food preparation. My goal is to raise competent humans who are capable of cooking for themselves and their families someday. I also want to inspire their interest in food, and the best way to get kids interested in anything is to let them be involved. I once managed a children's learning garden, where a small group of four-through-eight-year-olds was responsible for planting and maintaining an organic vegetable garden. The kids enjoyed their work, but more important they loved eating the fruits of their labor! I remember having a small argument over who got to eat a handful of raw brussels sprouts, which certainly isn't your everyday battle. The kids were interested in the food because they were involved. While my kids are far from capable of cooking a meal from start to finish, they're qualified to participate in smaller tasks during the food preparation process. I should note that it was not convenient to teach my children how to perform certain tasks. In fact, it made meal preparation much slower at first, but now that my son is more knowledgeable, capable, and efficient he's actually quite helpful with certain tasks. Again, not all tasks; he's just five. For example, I let him cook scrambled eggs on occasion, but I have to hover over him like a hawk to make sure the eggs don't burn. While it would be far easier for me to cook the eggs on my own, my thought is that this small investment of time will help him develop skills that enable him to contribute to the household in the future. How awesome will it be when I can ask my seven-year-old son to make us scrambled eggs and he can do it from start to finish? That's the goal, and we're on the path to accomplishing it. I bought my son a nylon kitchen knife set when he was three and it was a great introduction for unsupervised chopping. The knives obviously can't cut foods like carrots or winter squash, but he could use them to chop cucumbers, celery, bananas, plantains, and other soft fruits and vegetables. Now that he's older, I allow him to use real knives, but the nylon set was a good primer. We both especially liked the fact that he could be left unattended while chopping with the nylon set. Mr. Independent felt that my peering over his shoulder was less than desirable, and I felt that my time could be better spent on a different prep task. My two-year-old daughter now uses the nylon knives to chop bananas, avocados, red peppers, or cucumbers while I work in the kitchen. The knives are safe enough that she can do this unattended, and she always eats whatever she's chopping. Allowing young kids to experiment with a set of nylon knives and a few healthy foods is a great way to get them interested in eating a more diverse diet. One of the simplest yet most exciting things for my son to do in the kitchen is to operate appliances such as the food processor or blender. What can I say? Kids like buttons. I don't allow him free rein with the appliances since he would likely turn my $400 blender off and on as quickly as his little fingers could muster, so I have to do a bit of monitoring. My list of Jobs for Kids in the Kitchen (see sidebar) is a basic introductory list and is by no means exhaustive. The best way to figure out how your child can help you in the kitchen is by observing yourself in the kitchen and making time to teach your child how to do your most basic tasks. As your children grow older you'll be able to slowly entrust them with bigger tasks. I can't wait for the day when I can assign dinners to my children and remove myself from the kitchen entirely. Will they fail at times? Of course. But I wouldn't want it any other way. I want them to be experimenting with foods and flavors so they can develop their own style of cooking. I certainly wouldn't want to raise a child that's afraid to try something new out of fear of missing the mark. If you happen to have a small vegetable or herb garden, get your child involved. My two-year-old daughter is interested in helping with nearly every gardening task I perform, but the problem is that she's not actually all that helpful. The trick is to give her a job that makes her feel as if she's working alongside me, while not disrupting the actual work that has to be done. I give her a handful of the cheapest and biggest seeds I have (usually peas) and tell her to plant the peas. No additional instructions are provided. Random pea plants pop up all over the garden, but there are worse things in life. My children are also given their own pots to plant when I'm planting my seed starts. I used to have my son help with the flats that we use in the garden each year, but this was extremely frustrating for both of us. Providing him with his own pots, soil, and inexpensive seeds was a much better solution for everyone. He has the freedom to work at his own pace and I have the freedom to get the job done the way that I like. The last thing to remember is that kids aren't actually all that helpful in the kitchen when they're small or if they're inexperienced. There are days, weeks, and even months that go by when I haven't asked for my kids to help, not even once. I try to ask for their help on a semi-regular basis, but sometimes it's a hard thing to do; I don't always have the patience or time to deal with it. However, taking the time to teach your kids how to do even the simplest tasks in the kitchen will be hugely beneficial for the whole household. My son can now prepare the majority of the Plantain Muffin batter with minimal assistance. I still do the pouring, but it's a task that I should probably let him do now that he's older. Dealing with a mess is part of having kids. Don't let the mess deter you from teaching your child how to be a fully competent and functioning member of society. Your kids need experience in the kitchen in order to eat healthy for a lifetime. Don't deprive them of this skill. Jobs for Kids in the Kitchen Cracking eggs Whisking eggs Cooking scrambled eggs in a pan (supervision may be required) Stirring Opening cans with a can opener Scooping nut butters or dips onto a plate Adding preportioned spices and salt Measuring ingredients Pouring measured ingredients into dishes or batters Pouring batters into pans Sautéing vegetables (supervision may be required) Washing fruits or vegetables Chopping vegetables Gathering vegetables from the garden Mashing tuna for tuna salad Serving their own food Reheating foods on the stovetop, like soups (supervision may be required) Kid Foods Outside the Home For many of us who try to avoid grains, sugar, and dairy in the home, challenges arise from school functions, social gatherings, and grandparents or other family members who don't necessarily support (or know how to support) our decisions. We need to start by having a conversation regarding the nature of reward and how we can better celebrate our children without overloading their little systems with unhealthy foods and sugar. This conversation may need to include parents from your child's school, teachers and administrators, grandparents, or even your co-parent. I'm not opposed to indulging every now and again, which is exactly why I included a selection of recipes called Sweet Treats. But, as a society, the frequency of our celebrations and the general quality of the foods that we serve have far surpassed a moderate approach. We wouldn't have three-and-a-half-year-old toddlers developing type 2 diabetes if we were approaching food from the angle of optimal health. Start by encouraging your children and their caretakers outside of the home to think about celebratory events and activities that aren't food-related. Instead of sugary treats, children may instead want a small toy, a couple of stickers, some temporary tattoos, a superhero mask, some cool sunglasses, a small amount of money toward buying a larger toy, a visit to the park, a trip to the library, an evening of being a sous chef, helping Dad or Mom during a carpentry project, or any other special-occasion reward. Candy and sweets aren't the only items that kids appreciate. My son received a pen for Valentine's Day that allows you to select varying writing colors. It was taped to a card saying "I have just the 'write' friend!" The pen was a showstopper. We need to start brainstorming better ways to reward and celebrate our children, and start sharing this conversation with others. A great challenge presents itself when thinking about how to shift group thinking when it comes to healthy celebrations. I believe the first step is helping the appropriate parties (teachers, administrators, and parents) understand the scope of the issue—diabetes prevalence, obesity statistics, recommended sugar consumption versus actual sugar consumption—and understanding where sugars are hidden in the foods being provided to our children. Proper education surrounding the issue is largely absent unless you're actively seeking out this information. It's up to the enlightened parents to bring this information to everyone else's attention. The next step is to offer suggestions on how to change the typical mode of celebration. Sure, you can restrict people from bringing treats into the classroom for birthday celebrations and tell them to celebrate in other ways, but what would these other ways be? We're not trained to know how to celebrate without cupcakes covered in brightly colored icing. Parents are going to need solutions. Before I continue, I'd like to point out that there's a very clear distinction between celebrations in the classroom and celebrations at home. It's unfair to ask a child to celebrate without special treats and there's no reason to do this for a party at the house, especially when you have access to all of the wonderful sugar-free Sweet Treats recipes in this book! Food has been an integral part of celebrations for centuries and I'm not about to suggest that we change this custom. I've even offered two separate meal plan suggestions for parties in Holiday Meals and Healthy Celebrations (page 283). But the culture around food in schools is one that's not easily conformed to healthy celebrations, which is why I'm suggesting that we readjust our customs. Shared foods brought into schools by parents are most often required to be prepackaged so that children with food allergies and other food restrictions can be protected. Teachers and administrators can easily verify that a food is safe for a child with a food allergy if that food is still in its original package and therefore comes with an ingredients list. Sure, preparing a batch of my Chocolate Banana Cupcakes topped with Chocolate Icing would be a great alternative to store-bought treats, but these homemade foods just aren't allowed in schools anymore. Healthy celebrations in schools could incorporate a fun food project such as building the Strawberry Santas, Banana Snowmen, or Apple Slice Monsters, but preparing more complicated recipes might not be possible. My argument is to replace the candy, packaged junk food, and store-bought cupcakes laden with food coloring and hydrogenated oils, which likely means saving the sweet treats for the home when parents can have more control over the ingredients. My best advice is to generate a list of celebration ideas that are appropriate for classrooms and share those ideas with your child's teacher, assuming that they're on board. Don't just show up with the list. Instead, have a conversation with your child's teacher beforehand and make sure alternative celebrations are something your child's teacher is interested in implementing in the classroom. You can find numerous ideas online, but I'll briefly share a handful of suggestions. One of my favorite ideas comes from a local Montessori school that has the tradition of letting the birthday child walk around a large sun placed on the ground for each year of the child's life (a five-year-old has made five trips around the sun in their lifetime, thus walks five circles). They sing "Happy Birthday" to the child, and the parents send in one photo from each year of the child's life. The child then has the opportunity to share these photos with their friends. Other ideas include volunteering on the day of your child's birthday and reading a special book to the class in honor of your child. Do you know how special it would make them feel to have a parent participating in the classroom for a small part of the day, especially if it was a surprise? If you can't take time away from work to volunteer in the classroom, you can instead put together a relatively easy craft for the teacher to use that day for a celebration. You'll obviously want to ask the teacher first, but they'll likely be much more inclined to incorporate a craft into a celebration rather than hold a cupcake party. My last idea is primarily for teachers—the children can sit in a large circle and each take a turn saying something kind about the birthday child. I'm only listing a handful of ideas here, but none of these ideas involve junk food and junky little toys that will likely make their way into the trash by day two or three. Let's start adding some actual depth and value into our children's celebrations! When it comes to day-to-day foods at school, I pack all of the foods that my children will eat for the day. I didn't come to this decision lightly, because while I want to establish healthy eating habits, I don't want to create a culture of severe restriction. The children in our preschool eat a shared snack every day (and treats during celebrations) that's provided on rotation by different parents. Some of these foods are healthy options, but some are not, and I don't want my kids eating an unhealthy food every day of the week when they're at school. I instead pack something that my kids enjoy, and they do because they've never known any differently. My hope is that by having early discussions about our food choices and continuing to have open conversations, my children will develop a greater understanding of the many issues surrounding food and food culture. Just the other day I was telling my son that we only buy sweet corn when it's available at the farmers market and I know I'm purchasing non-GMO. While he certainly can't grasp the science behind GMO, he'll at least be familiar with the term and we can have deeper discussions about it down the road. I also tend to pack foods when my kids will be staying with their grandparents or any other caretaker for extended periods. I'm extremely fortunate in that everyone in my family is supportive and certainly agrees that this diet seems to be working for my family, though it can be somewhat of a challenge for others to feed my kids since most people are unaccustomed to our way of eating. Rather than continue to have discussions about food options, I pack the foods to take away the guesswork. However, you may be in a situation in which this isn't possible. In that case I recommend that you compile two lists. One list will include the foods that you don't want your child to eat. You need to be up-front about what you're avoiding. You don't even need to offer an explanation; just offer the list. The second list should be more extensive and offer numerous foods that you do want your child to eat. People have a tendency to think that restrictive diets equate to a complete lack of choices, but that's not the case. Drawing the caretaker's attention away from the restrictions will empower them to know that even with limits, choices abound. If you feel the need to offer an explanation for your restrictive diet, try to develop a short and sweet justification that focuses on positive outcomes. For example, don't ramble on about leaky gut and lectins. You're going to immediately lose your listener because you're speaking in terms that aren't relatable. Instead say something like "Olivia's temperament is much better when we avoid these foods. I appreciate your help in this endeavor." Now, that's something that people can understand. Will they agree? Who cares? The decision to eliminate certain foods from your family's diet is a personal choice and outsiders are only going to dwell on your choice if you feel the need to influence their opinion. Keep it simple, own your choice, and don't try to make everyone a convert. I'm most relaxed about food when it comes to parties outside of school, where I believe the majority of parties need to be held. I want my kids to understand that perfection isn't the goal; the goal is health. In order to stay well, they have to eat healthy foods most of the time, but eating a crummy hot dog and a bunch of chips with highly processed oils at a party a few times each year isn't going to be the end of the world. Party indulgences are where I make the most exceptions, although I have been known to pack our own healthy treats when others are enjoying a store-bought, Crisco-filled cake. You'll just have to make a decision that feels right for your family. My approach to feeding my kids outside the home might not be for everyone. We all set our own limits and decide how far we're willing to go with this type of diet. Personally, we're in a position that requires us to follow this diet for specific health needs. I put a lot of work and effort into feeding my family, and I don't want those efforts to be wasted on the frequent consumption of unhealthy foods when we are away from the home. This diet has been hugely beneficial for my family, and I feel that adherence to it is necessary in order to maintain positive results. Keeping my son on track has been fairly easy since he has an anaphylactic allergy to wheat. This alone has made every one of my choices much easier because there's often no choice at all; he simply can't eat what others are eating. My daughter is in a slightly different situation in that this diet is important for her preventive care, thus her devotion doesn't feel as imperative. Regardless, I still mostly follow the same set of principles for both children and try to uphold a food standard that works for our family. Lunch Boxes for Whole-Food Meals When it comes to packing lunch for your kids, you'll want to invest in a good lunch box that allows flexibility and freedom to pack whatever foods you'd like without having those foods leak into your child's backpack. I tested a number of lunch box styles and I'm happy to report that there are some really great and relatively affordable options out there. Numerous foods produce small amounts of moisture (such as tuna salad or sliced tomatoes) and you simply won't be able to pack these foods without an accommodating lunch box. I compared the Yumbox Tapas, Bentgo Fresh, Goodbyn Hero, and PlanetBox Rover. I'm happy to report that the Yumbox Tapas was my top pick, with the Bentgo Fresh sliding in as a close second. Really, you can't go wrong with either of these models, and they're both leakproof. I like the bento-style boxes, because they allow you to easily pack a variety of foods without those foods mixing together—dry foods can remain separated from wet, and small foods like nuts can be contained without getting lost among other foods. The bento-style boxes also allow a child to view their lunch in its entirety, meaning that they'll be more likely to sample each food. The silicon seal prevents leakage, even for foods that have watery dressings. I packed a thick soup in the largest compartment and there were no leakage issues. I wouldn't pack something like Chicken Noodle Soup with an extremely thin broth, but it worked well for Not Quite Your Mama's Chili. Just a side note: The manufacturer does not recommend packing liquids. The entire box is dishwasher safe, which makes for easy cleaning. However, it takes up quite a bit of space in the dishwasher, especially if you have more than one kid, so you may want to wash the outer shell by hand. Yumbox says that this handwashing will also help to preserve the seal. The Yumbox Tapas is a fairly large lunch box, holding 4.2 cups (995 ml) plus a dipper. While this may be slightly too large for a younger child, I would still buy this model so that it can grow with your child. At $30 per lunch box, you don't want to have to buy another one in a few years. The Tapas comes in a four- or five-compartment design. I slightly prefer the five-compartment model. For an additional $14 you can buy a second insert that will fit into the same outer shell, therefore having the option of either a four- or five-compartment tray. The clasp is easy enough for my five-year-old, although it's a bit challenging for my two-year-old. I would imagine a three- or four-year-old could operate the clasp with no issue. You can purchase an insulated sleeve ($12) for the Yumbox Tapas, but it's not necessary unless you plan to keep foods cold using an ice pack. Simply slide the lunch box into the insulated sleeve along with a thin, flat ice pack and your child's lunch is guaranteed to stay cool for at least five or six hours. Larger insulated bags that can accommodate the Tapas plus a snack and/or water bottle are available at a slightly higher cost, and may be more desirable for sending multiple meals and water with a child. The dipper container is what sets the Yumbox apart from the Bentgo—I often pack dips or other foods in small quantities that don't necessarily warrant a large compartment. The design of the Yumbox Tapas accommodates foods in large quantities in the largest compartment, yet also accommodates dips like peanut butter, hummus, guacamole, or even small amounts of nuts, seeds, or trail mix without needing an additional container. The Yumbox Tapas is a truly all-in-one lunch box. My last thought on lunch boxes is that you may want to purchase a stainless steel insulated thermos for packing hot soups, and you'll likely need a few containers for snacks. If you're looking for some ideas for foods to put in your child's lunch box, head over to my suggestions for Packed Lunches for Kids (page 280). chapter three Get Prepared, You Can Do This! I've witnessed numerous successful health transformations. Success usually boils down to three essential steps: 1. Make a plan. Simply saying that you want to achieve something isn't enough; you have to know how you're going to achieve it. Good intentions will only get you so far; you need guidelines and a solid strategy. 2. Be patient. We create habits over the course of our lifetime as our experiences mold our practices. You can't expect to change a lifetime development overnight. Permanent change takes time and you need to adjust your expectations. 3. Commit. You won't get it all right every time, but your commitment to a healthier lifestyle is what keeps you coming back for more. When you fall off the health wagon, forgive yourself, honor your commitment to make a change, and get back to it. I like to say that life is about progress, not perfection. This chapter will help you get prepared so that you can achieve success. The most practical approach may be to tackle one section each week until you feel that you're ready to start getting in the kitchen in a more organized way. Be patient with yourself and only take on what you can handle. Create a checklist with a goal of accomplishing one task each week. Breaking larger tasks into smaller, more manageable tasks can often elicit massive progress over time. When Change Feels Overwhelming There may be a number of necessary changes you need to make in order to slowly yet successfully transition your family to a grain-free, sugar-free, dairy-free diet made from whole-food ingredients. Start by recognizing that these are big changes that require an investment of time, energy, and often money. Do yourself a favor and start by admitting that you can't do it all at once. But you can do it with persistence, patience, practice, and a plan (did I just develop the four P's?). In order to better understand modern-day human nature, I'd like to point out that we live in the age of free two-day shipping; we're an instant gratification kind of society. Popular diet and exercise plans boast titles such as the 21 Day Fix, the 10-Day Detox Diet, the 7-Minute Ab Workout, and 21 Pounds in 21 Days. The list of quick-fix titles is quite extensive, but hopefully you see my point in that we're obsessed with the quick (and easy) way out. We want results and we want them now! Our anticipation of immediate satisfaction is partly influenced by marketing efforts that lead us to believe we can achieve greatness without actually putting in the time or effort. My encouraging words to you are that by reading this book and making a series of small and continual yet impactful steps toward a healthier diet, you can make changes that will last. Know that there's nothing immediate about big change. Choosing to feed your family differently is no small accomplishment and requires more patience and persistence than you may have ever known. But many families have gone before you and they, too, have successfully made these changes by persevering, sticking with a plan, and continuing to make small steps forward. Change doesn't happen overnight; don't hold yourself to an unrealistic expectation. Slow and steady wins the race. When I feel myself getting overwhelmed by a daunting long-term project, I try to think back on when I started the task. For example, I was overwhelmed with the inundation of CF information when we first got our daughter's diagnosis, and I have a long way to go before I know as much as I'd like. My ability to fully support her in this illness is partially dependent upon my deeper understanding of the disease. I frequently read CF literature and feel confused by the unfamiliar medical terms and gaping holes in my knowledge. So, what do I do? Do I just give up because it's too hard? No, I think back to the day of her diagnosis and how I wouldn't have even known to look for certain articles or bits of information, but now I have a better sense of direction when it comes to doing research and seeking understanding. Life is a long journey and I've got nothing but time. I do what I can today, forgive any perceived shortcomings, and keep moving forward. As a result, I'm substantially more knowledgeable about CF now than I was two years ago. Just imagine where I'll be in 20 years. The same is true for you and your family regarding a major change in diet. More than likely you're reading this book because you've recognized that there is a benefit from following a diet free of grains, sugar, and dairy. Think of how far you've already come! You can only keep moving forward from here. Be patient, be persistent, and commit to making it work, because it takes time. Making Time for Real Food I often hear people say that they can't cook from scratch because they don't have the time. While time limitations are often a major constraint, solutions exist. You just have to figure out what works for you. I challenge you to stop saying that you don't have time for cooking, because the truth is that we make time for what matters most. Instead, see how it feels to say, "I don't prioritize cooking." Prioritizing what's most important is the first step in finding time to get in the kitchen. I often encourage people to do a time study. This is a diary of sorts in which you record what you do throughout the day and for how long. What people usually notice is that they spend more time than they'd like to admit on social media, electronics, and TV. Setting boundaries around these activities can often help us find an extra 30-plus minutes in the day. In this age of technology, installing a tracking app on your phone can shed some light on the amount of time you actually spend piddling away on electronics. I have one such app and I'm often shocked at how much time I waste on technology alone. Another benefit of a time study is to learn if you spend too much time performing unimportant tasks. For example, being a parent to two young kids has taught me that there is always cleaning to be done. Always. I could clean from the time I wake up to the time I go to sleep and I would still have a mess. I've learned to be a little more comfortable with the clutter, so that I'm not spending every waking minute tidying up. I should also be clear that I'm not the overly tidy type to begin with, so this wasn't a major hurdle for me. But I know that cleanliness in the home can be a major time sink for some individuals. You just have to decide what's worth your attention and what you can let go. Finding more time also means simplifying your life. I've been exploring a minimalist approach to living and I love the message. The hard truth is that we invest time, lots of time, in our material possessions—time spent buying things, comparing reviews, working to pay for things, removing things from their packaging, disposing of the packaging, putting our things away, and keeping them clean. Acquiring and possessing material goods requires time, and each of us has to decide whether we want to spend our time with our things or if that's time that could be better spent, say, cooking a wholesome meal for the family. I'm continually reevaluating our material possessions. The grandparents bring the kids thoughtful little goodies more often than I'd like. While these precious little tokens bring the children joy for about five days, the kids are quick to throw them to the wayside and forget them. I don't mean to sound harsh, but these small gifts are unnecessary, teach bad habits and expectations, and quite frankly are a waste of precious time, energy, and resources. Of course I have material possessions that I truly value, but the majority of my possessions I could probably do without and not even notice. Finding time to cook means that you have to spend time removing, not just overcoming, hurdles that prevent you from living your most fulfilled and healthiest life. Cooking from scratch has such great rewards and is worth the time investment, but you have to decide where your other priorities lie along that spectrum and how you can make better use of this limiting resource. And don't sell yourself short; apply this lesson of time management to all things in your life. We may have a finite number of resources, but we're in charge of how to use those resources. People claim that they don't have enough money for a gym membership. This is true under some circumstances, but how many coffees, alcoholic beverages, or other unnecessary drinks did that person buy in a month? Do you see my point? We're in control. We have the power of choice, but we may have to give up one thing if we really want another. Finding time to cook doesn't mean that you have to make time at mealtime. I actually do far less cooking at mealtimes since that's usually the most chaotic time of day. Washing and chopping vegetables, roasting, sautéing, and cleaning are pretty much the last things I want to be doing at a time when everyone is tired and hungry. Instead, I cook or prep when it's convenient. I'll get more into specific strategies in the next chapter, but know that finding time to cook means finding any time to cook! For now, start evaluating your priorities in order to identify some shifts that can be made over the coming weeks and months. Don't sacrifice necessary activities like sleep and exercise; instead consider reducing activities that are not health promoting such as TV and screen time. Kitchen Equipment Essentials When it comes to preparing ingredients in new and exciting ways, having access to a variety of handy tools will be an asset. For example, spiralized zucchini noodles are a unique alternative to grain pastas, but you can only eat spiralized zucchini if you have a spiralizer. There's just no way to re-create these delicate little noodles with a knife. Kitchen basics, such as knives and cutting boards, will certainly get you started, but I highly encourage you to consider setting some funds aside to purchase a few specialty pieces of equipment. If I were to splurge on only two items, I'd go for a high-powered blender and an electric pressure cooker. These tools are versatile and make healthy eating more creative and achievable. I use both of these appliances a few times each week, and I am slightly embarrassed to admit that I even bring the blender along when we travel. I happen to own two high-powered blenders—a Vitamix and a Blendtec. I honestly don't think you can go wrong with either one. The Vitamix operates with more finesse, but the Blendtec just really pounds the heck out of whatever you're puréeing regardless of the quantity. I like that there's no plunger involved with the Blendtec, but that means foods often get lodged while blending. In my search for a minimalist life, I've often considered that owning just one of these high-powered blenders would be more than enough, yet I can't bring myself to part with either one. Each has its strengths and weaknesses: The Blendtec does batters slightly better, but the Vitamix does smoothies and frozen desserts slightly better. I will say, however, that there are a number of individuals in the CF community who prefer the Vitamix. Many individuals with CF require a feeding tube at some point in their lives due to malnourishment, and tube-fed meals must be blended into an extremely smooth liquid in order to pass through the tube without obstruction. My understanding is that the Vitamix does this far better than the Blendtec. Both blenders are extremely pricey, ranging from $230 for a refurbished Blendtec to $800 for the professional series. Refurbished Vitamixes start at $330 and their top-of-the-line products max out around $620. Both come with excellent warranties, although their policies change from year to year, so be sure to understand the warranty that comes with your exact model. One of the most exciting applications for a high-powered blender is its ability to turn almost any whole-food ingredient into a batter. For my Plantain Muffins and Plantain Blender Pancakes, I start by grinding sunflower seeds into a fine flour, a feat that would not be possible without the horsepower and blade of a superior blender. I then add chopped plantains and all of the other necessary ingredients to blend a smooth, delicious, and naturally sweetened batter from unsuspecting ingredients. Preparing frozen fruit desserts such as the Mango Lime Ice Cream or Chocolate Ice Cream is only possible if you have the right equipment. Blending dates into batters to create an Apple Spice Bundt Cake or Chocolate Icing is made possible by this dynamic and powerful piece of kitchen equipment. Conveying the necessity and versatility of a blender to the blender layperson is challenging, because they've never witnessed the efficiency and creativity that such a machine allows. But converts unanimously agree—we can't create food without our high-powered blenders! Smoothies, soups, sauces, desserts, and more are all possible because of this one (extremely expensive) machine. Is this a good item to place on your wedding or baby registry? Yes, I think so. I also recommend that an eight-quart electric pressure cooker make its way onto your registry or wish list. Many people will skimp and buy the six-quart version, but remember that it holds eight quarts in total and you have to leave headspace for cooking. This reduces the overall cooking volume to about six quarts. The six-quart model can only prepare four quarts at a time, which is entirely too small for batch cooking. I definitely overfill mine at times, but my eight-quart model will not hold any more than six and a half quarts, even when completely maxed out. The most popular brand of pressure cooker is the Instant Pot, but many other quality brands exist. I initially bought a GoWise USA brand pressure cooker ($90) and was extremely pleased with the gadget until it broke twice in two years. I suggested this brand to friends, and they have been using the GoWise USA for over a year without issue. Nevertheless, I ended up splurging on the eight-quart Instant Pot for $150 (I believe they have a less expensive model, but I was unaware of it at the time). The quality is outstanding thus far, but only time will tell. Larger models are available, such as the 14-quart model from GoWise USA, but the size of the unit and the inconvenience of storing and washing such a large piece of equipment wouldn't be worth the benefit to me. The greatest advantage to owning an electric pressure cooker is that it can cook recipes or components of recipes in a fraction of the time it would take using other cooking methods. I can steam sweet potatoes under pressure for Coconut and Cinnamon Sweet Potato Mash in just 15 to 20 minutes. Compare this with the hour or so it would take in the oven. Spaghetti squash and other winter squashes suddenly become convenience foods because the cooking time can be as little as 6 minutes for a squash that would take at least 45 minutes to bake in the oven. Most impressively, preparing hard-boiled eggs in the pressure cooker takes all of five minutes and renders an egg that is always easy to peel! The peels just flop right off. Another advantage of an electric pressure cooker is that it doesn't generate any heat, so it's an excellent tool to use during the summer months when you're doing your best to keep the house at a reasonable temperature. In the winter months, the electric pressure cooker will be a lifesaver when you want to create rich, flavorful, and nutrient-dense broths in just 2 hours compared with the 24 hours it would take on the stovetop. The bottom line is this: An electric pressure cooker offers you a quick and convenient way to prepare some of your most essential meal components. While I'd like to say that my high-priced blenders have replaced my need for a food processor, it's simply not true. I use it for certain recipes for blending (such as Lemon Coconut Date Balls), for grating (Cauliflower Hash Browns or Coconut Lime Cauliflower Rice), or for shredding (Dill Pickle Kraut). I own an 11-year-old Cuisinart and it is still going strong. I wouldn't recommend one of the cheap off-brands, simply because cheap products rarely perform well, but there are plenty of good brands out there. If you don't have the space for all of these gadgets and don't want to spend the money, I'm sure you could get by with just a high-powered blender, but you'd have to learn how to use it in a way that hasn't been necessary for me. While I approach most areas of my home from a minimalist perspective, I tend to go overboard when it comes to kitchen gadgets. The other gadgets listed in the sidebar Kitchen Equipment Essentials (page 48) aren't nearly as pricey as the gadgets I've already mentioned, so I don't go into detail regarding specific brands. Know that I certainly didn't acquire all of these items at once. I slowly accumulated theses gadgets, and I requested most of them as gifts. Many of the items will make perfect holiday gifts from relatives who are never quite sure what to buy for you. Make a list of the items that you'd like to get over time and be sure to share that list with your loved ones. I'm sure you already own a set of pots and pans, but I want to add a quick note about those essential kitchen items. I do not support the use of nonstick pans regardless of the quality, because the coating will eventually wear off and you'll be ingesting small amounts of toxins when it does. There are nonstick pans with longer life spans and even some that can be resurfaced by the manufacturers, but none that are guaranteed for a lifetime. Stainless steel and cast-iron pans are your best bet, not only because of the longevity of the pans but also because leaching of toxins won't even be a possibility. Moreover, the pans can be used on both the stovetop and in the oven. A variety of quality pan brands are available, but beware that many well-known brands manufacture lesser-quality versions offered at prices that aren't worth paying. I settled on a German brand, Fissler, for all of my pot and pan needs. These are extremely expensive products, but they're accompanied by a 50-year warranty. The worth of a product can often be measured by the extent of the warranty, and 50 years is about as good as it gets. The size of your pans will be a major limiting factor in your ability to double or even triple some recipes. I use a 10-liter (nearly three gallons) pot for bulk cooking, even when preparing sautés like the Probiotic Pork and Vegetables or the stuffing for Cottage Pie. I double or triple these recipes to reserve some for future meals, which would be impossible using my largest frying pan. Bulk cooking for freezing requires the use of a pan or pot that can accommodate an enormous quantity of food. I also own a five-gallon pot that I picked up for a mere $45. I press it into service when I'm serving a large crowd, but it's rare that I ever need something so large; the 10-liter pot usually does the trick. The Kitchen Equipment Essentials sidebar list reflects multiples of some items, such as muffin and bread pans, because baking four loaves at a time can maximize time spent preparing bread. The same principle applies to sheet pans, food storage containers, Pyrex baking dishes, and fermenting jars. You can only be as efficient as the size a vessel allows. Kitchen Equipment Essentials 2-gallon stockpot 3-gallon stockpot Large frying pan Large oven-safe pan such as cast iron or stainless steel High-powered blender 8-quart electric pressure cooker Food processor Immersion blender Wooden cutting board Plastic cutting board for meat Chef's knife Wooden spoons Metal spatula Silicon spatula Whisk Grater Spiralizer Silicon muffin molds (24) or two muffin pans Bread pans (4) Sheet pans (2 large) Large Pyrex (or other material) baking dish (11 × 15 inches; 28 × 38 cm) Medium Pyrex (or other material) baking dish (8 × 12 inches; 20 × 30 cm) Vegetable peeler Can opener Large glass jars for fermenting and food storage Airlock lid for fermenting (optional) Glass, Pyrex, stainless steel, or BPA-free plastic food storage containers Stocking Your Pantry and Freezer A well-stocked pantry and freezer makes cooking easier and more convenient. I don't have a huge diversity of foods in my pantry or freezer, but there's a rather large quantity of the things I do use. I buy as much as possible in advance for the items I store in the pantry and freezer, which means that my weekly purchases are primarily limited to foods that I buy fresh. Stocking your pantry and freezer serves three purposes: 1. Some of the items that I use on a regular basis could be hard to find, such as coconut aminos or grain-free tortilla chips. If necessary, you might have to buy a few items online. Knowing that I already have hard-to-find ingredients in the pantry allows me to prepare whatever recipe my heart desires. There's no ordering that special item and then waiting five days for it to arrive. 2. Many items that store well in a pantry or freezer can be bought in bulk, which saves money. For example, I buy cases of coconut milk, coconut cream, and SunButter, and huge bags of nuts and seeds, which saves us hundreds of dollars over the course of a year. I purchase bulk meat from local farms and stock up on freezable items when I find them on sale. 3. When you buy items in bulk, you're saving time. There's a small investment of time that goes into each item on your grocery list. Buying multiples of those items allows you to save time in the long run. In the Pantry Essentials and Freezer Essentials sidebars, I list items that I like to keep stocked in my pantry and freezer. You'll have to figure out which items are most cost effective and convenient for you to keep on hand. I suggest that you, too, stock up. I can't tell you how many times I've heard people say that they just don't have the ingredients for some of the recipes that cater to eaters with special diets. Don't let this be you! You'll need to have at least a few key items on hand to make a grain-free, sugar-free, dairy-free diet a reality for you and your family. Pantry Essentials Canned skipjack tuna Canned wild Alaskan salmon Sardines Peanut butter Almond butter Nuts: pecans, almonds, walnuts Seeds: raw sunflower seeds, hemp seeds, and pumpkin seeds Dried fruit: mulberries, goji berries, raisins, and dates Dried unsweetened coconut flakes Dried unsweetened shredded coconut Green and black olives Organic full-fat, unsweetened coconut milk Organic unsweetened coconut cream Coconut aminos Applesauce Organic olive oil Avocado oil Lard Organic cold-pressed coconut oil (unrefined) Raw apple cider vinegar White vinegar Balsamic vinegar Red wine vinegar Salsa Mustard Dried beans Canned diced tomatoes Canned crushed tomatoes Tomato paste Tomato sauce (sugar-free) Coffee Tea Freezer Essentials Meat and poultry Fish and seafood Bones and feet for making stock Frozen fruit Frozen vegetables Quality Matters: Where to Source Foods Figuring out where to buy certain foods at the best price and quality will take some time and effort on your part. Quality makes a difference, so it's worth taking the time to shop around and find a respectable product that's within your budget. When it comes to animal products, don't skimp. I know this is challenging because the sticker price for grass-fed beef or free-range eggs seems unreasonable. The problem is that cheap food products are cheap calories. They even have a different nutrient profile than their mindfully raised equivalent. For example, grass-fed beef has less overall fat, has a completely different fatty acid profile, and is higher in omega-3s than grain-fed beef. Conventionally raised cattle (grain-fed cattle) have a fatty acid profile that is known to elevate bad cholesterol (LDL) and influence the development of cardiovascular disease. Grass-fed beef doesn't have this negative impact on the body. It's worth the extra cost. I also urge you to consider the environmental implications of consuming conventionally raised animals. According to the EPA, agriculture accounted for 9 percent of our greenhouse gas emissions in 2014, and has been responsible for several negative effects on water and soil pollution. The health of our future planet will deteriorate if we don't make positive consumer choices. Choosing the right meats is about taking care of your immediate health, and also taking care of our environment and the health of future generations. I should note that I'm not saying that you have to buy certified organic beef. While organic would be great, you can find sustainably raised, grass-fed beef at many grocery stores or farmers markets. You just need to read the packaging or talk with the farmer to ensure that the beef was actually grass fed (raised on pastures) and doesn't contain hormones and antibiotics. Also be aware that some grass-fed beef is finished with grains, which increases the fat content and thus enhances the flavor of the beef. However, feeding cattle grain during those final weeks before slaughter negates the benefits of raising those cows on grass, and the fatty acid profile for this beef is then similar to that of a grain-fed cow. Cows should be fed grass from start to finish. The consumption of fish is another major dilemma when it comes to environmental sustainability and personal health. Fish can accumulate heavy metals in concentrations that exceed the concentrations found in their surrounding environment, a process known as bioaccumulation. Furthermore, destructive fishing practices are quickly depleting our ocean resources, which means that we have to choose sustainably harvested (or farm-raised) fish if we want these resources to be available for years to come. The Environmental Working Group (ewg.org) has a fantastic online Seafood Calculator that can help you determine the best fish to consume on a regular basis. You can quickly find the calculator through a Google search. Just plug in the requested information and use the guide to inform your seafood purchases. For canned seafood, Wild Planet brand is a good pick for sustainably harvested fish. My absolute favorite source for finding fresh, healthy, sustainable foods is our local farmers market. I like to eat a variety of seasonal foods, and shopping at the farmers market guarantees that I'll be selecting from the freshest ingredients around. Shopping at your local market allows you the opportunity to talk with the farmers about their farming practices, which can help you decide on the best-quality produce for the best price. Meeting your farmers and learning about their growing practices is the best way to ensure you're buying an affordable, superior product. I offer a few more farmers market shopping tips in the next section, Budget-Friendly Solutions, but don't underestimate the value of local food. Having a small vegetable garden is another great way to supplement your family's food budget. I have quite a large garden at this point and it supplies my family with a significant portion of our vegetable needs during those peak production months. I still rely heavily on the local farmers, grocery stores, and some online shopping, but my garden is a significant supplementary source of organically grown produce throughout the year. You don't have to have a large amount of space to grow your own food. If you're new to gardening, start extremely small, even as small as a container garden, and just see how it goes. The smaller the garden, the higher your chance of success, and a successful garden is one that is more likely to be recurring and grow over time (no pun intended). There are numerous products I use in my kitchen that I simply can't find at our farmers market, such as nuts and seeds, some fats, canned fish, olives, and many of the other items I like to keep stocked in my pantry. For those items I look to different stores, and I do the best I can. For example, small health food stores are often a great source for locally sourced products, but unfortunately, this type of store just isn't readily available where I live. I'll also add that I used to do more online shopping than I do now. While I genuinely appreciate the convenience of having food delivered straight to my front door, I don't appreciate the inconvenience and waste of the packaging. Our pantry area transforms into the staging area for recyclables, and online shopping instantly turns this area into a cluttered mess of cardboard. Is the hassle of dealing with the packaging worth the convenience of the instant deliverables? I'm not so sure it is, which is why I often prefer a monthly trip to Costco or a co-op that's 40 minutes away to purchase things like almond butter, coconut oil, avocado oil, seaweed snacks, sardines, frozen fruits and vegetables, and a variety of other affordable and often organic products. When I do need to buy products online I try to order as little as possible to cut back on the amount of packaging. It's important for us to remember that specialty diets can quickly increase our environmental impact if we aren't mindful as we implement them. Shopping in bulk and trying to find ingredients locally can reduce this impact. Is Organic Really Better? The short answer is yes, organic foods are a better option, a much better option. The complicated answer is that some natural pesticides approved for use on organic crops, such as pyrethrins and rotenone, are equally as toxic for human and environmental health as chemical pesticides. In general, the use of the more harmful organic pesticides is limited to extremely large-scale organic farms where monocropping (growing just a handful of crops again and again, which ultimately encourages pest infestations and depletes the soil of nutrients) is the norm. I'll discuss ways to ensure that you're accessing better-quality food, but I'd like to start by presenting a handful of issues surrounding human health and conventionally grown produce. Keep in mind that I've chosen to focus solely on human health; the environmental implications are a whole other issue. One of the most pronounced benefits I see to consuming organic products is that the use of genetically modified organisms (GMOs) is not permitted in foods that hold the USDA organic certification. GMOs are genetically designed to possess desirable traits. Genes are inserted into a plant's DNA, and this insertion codes for the creation of varying proteins that can enhance the plant's capabilities. Proponents of genetic modification (GM) claim that it may be the way to end world hunger because it allows for the creation of specialized food crops that can be grown in the desert and other less-than-desirable conditions. There's potential for developing plants with higher yield, greater nutrient content, and the necessary qualities to satisfy a growing world population. However, the Institute for Responsible Technology states that "the only two traits that are found in nearly all commercialized GM plants are herbicide tolerance and/or pesticide production." In short, we're using GM technology to assist in farming methods that more heavily rely on pesticide use. Soy, corn, cotton, and canola make up the majority of GM crops, with most of these plants being resistant to herbicides such as glyphosate (Roundup) and a lesser amount having the ability to produce their own pesticides. The benefit to an herbicide-resistant plant is that you can repeatedly spray that crop with herbicides in order to suppress the weed population, allowing the GM crop to flourish. Other lesser-known GM crops include Hawaiian papaya, zucchinis, sugar beets, and yellow squash. Notice that many GM crops, such as corn, canola, soy, and sugar beets (for making sugar), are ingredients found in processed foods. In fact, up to 80 percent of packaged foods available in the grocery store contain GMOs. Research shows a wide range of detrimental effects resulting from the consumption of GM foods in animals, such as toxicity in the digestive tract, liver and other organ damage, increased death rates, loss of ability to reproduce, infant mortality, heightened immune responses that can lead to food allergies, and tumors. The FDA has classified GMOs as generally recognized as safe (GRAS), yet there is a complete lack of evidence supporting this classification. In fact, numerous scientists and international authorities have criticized the United States' approval of GMOs, saying that these crops should not be released into the food chain until a safety profile is clearly established, a feat that seems near impossible given the growing body of research proving otherwise. Another shortcoming of conventionally grown produce is that it's grown using varying pesticides. One such pesticide, glyphosate (Roundup), has received growing attention over the past decade as it is now the most heavily applied herbicide in the world. Farmers have increased glyphosate use by 100-fold since the late 1970s, and its use is only continuing to increase due to wider availability and use of so-called Roundup Ready GM crops. Refer back to the section in chapter 1, Wheat: Grain in the Spotlight, page 16, for more information regarding the negative health consequences and usage of glyphosate. Some experts argue that the negative effects of consuming GMOs and those crops sprayed with glyphosate (among other issues with industrial food) are at the root of most Western diseases, especially those impacting our children. One simply cannot ignore the profound rise in disease incidence over the past few decades. It's clearer than ever that our food is making us sick. The book What's Making Our Children Sick by Michelle Perro, MD, and Vincanne Adams, PhD, paints a grim picture of industrial food and its direct implications for the health of our children. This book is one of the most important resources for any family facing medical and psychological challenges, as it's one of the first to clearly link glyphosate and GM foods to deteriorating gut health, thus the development of varying diseases and conditions. The authors are huge proponents of organic foods as part of a comprehensive and integrative approach to managing and reversing disease. Information such as what's provided in What's Making Our Children Sick inspires me to take more control over the food that my family eats. I can do this by growing what I can and purchasing as much as possible from small local farmers who are invested in better growing practices. Try starting conversations with your local farmers, and chances are you'll find that some of these smaller farms aren't utilizing toxic, organic pesticides, even if they're not certified organic. The organic certification is costly to maintain, thus is one of the driving factors behind higher costs for organic foods. It's therefore more economical for some small farmers to uphold organic practices without having the actual certification. But without this certification, they can't market their foods as organic despite their implementation of organic practices. Their choice helps to keep the cost of their produce lower, ultimately meaning that your conversations with these farmers can lead to better food quality for your family at a better price. I've only focused on two of the major issues surrounding conventionally grown food crops, but believe me when I say that issues abound. Avoiding these toxins and potentially harmful substances needs to be a priority for every individual, although I realize that affordability of organic foods can be a major constraint, especially when your best option is to buy from a grocery store if you have limited access to local foods. The Environmental Working Group (ewg.org) compiles an annual list of foods that are best to eat organic and a list of foods that are relatively safe to eat conventionally. These lists are the Dirty Dozen and the Clean Fifteen, respectively. Use these lists to help inform your decision regarding which foods are best to buy organic and which conventional foods are safer to eat. Last, remember that your dollars are votes that promote a way of life; make those votes count. THE DIRTY DOZEN Strawberries Spinach Nectarines Apples Peaches Pears Cherries Grapes Celery Tomatoes Sweet bell peppers Potatoes THE CLEAN FIFTEEN Sweet corn (non-GMO only) Avocados Pineapples Cabbage Onions Sweet peas (frozen) Papayas (non-GMO only) Asparagus Mangoes Eggplant Honeydew melon Kiwi Cantaloupe Cauliflower Broccoli Budget-Friendly Solutions Now that you're equipped with numerous ideas on how to turn your kitchen into a grain-free, sugar-free, dairy-free producing machine, I'd like to also help your wallet make the transition. We've been a one-income family for the better part of the past four years, so budgeting was a big factor in this transition. The following tips come from hard-earned experience as my family managed to implement this diet without going completely broke. Buy a small chest freezer. I never, ever, ever pay full price for meat, poultry, or fish. But in order to do this I need a place to store items when they go on sale. Never pay full price for meats and fish. Didn't I just say this? I'm saying it again! This is only possible if you implement my first recommendation to buy the freezer. I look for sale prices on meats and fish every time I go to the store or farmers market regardless of whether it's on my shopping list. If it's on sale, I buy a huge quantity and throw it in the freezer for later. Have an actual pantry area. We have a storage room in our basement and I've designated four or five small shelves there as a "pantry." Having this storage space allows me to stock up on dried goods and canned goods when I find them on sale. Get to know your farmers and ask about bulk purchasing. I buy beef and whole chickens in bulk from the local farmers, which saves hundreds of dollars every year. I also buy seasonal vegetables in large quantities when farmers are interested in getting rid of their excess supply. For example, this past fall I bought 11 giant Blue Hubbard squash for $20. The farmer was tired of hauling the enormous produce back and forth, so they welcomed the opportunity to unload. Each squash was normally $5 to $8, so even though a few of the squash went bad before I had the chance to use them, it was still a killer deal. Use less expensive cuts of beef. We don't eat steaks, because it's just not affordable. We instead eat ground beef, stew beef, and varying roasts. Some of the least expensive and most nutritious cuts of meat are organs. If you're feeling adventurous, beef heart can easily replace half of the ground beef in Not Quite Your Mama's Chili. Liver is less easy to substitute since it has a rather strong flavor. Buy whole chickens. I certainly enjoy cooking with breasts and thighs, but I buy whole chickens frequently because of the greater affordability. You can use whole chickens in the place of most shredded chicken recipes and you have the added bonus of being left with a chicken carcass. I store chicken bones in the freezer to use for bone stock at a later date. Buy your own bones, save your bones, and sometimes cook them twice. A nutritious store-bought bone stock is nearly impossible to find, and it's even more impossible to afford if you do actually find it. Save and store all animal bones in the freezer to use for making your own stock. I've found that I can actually make two batches of bone broth out of large beef bones that have adequate connective tissues attached. I get twice as much bone stock for the same price this way. Buy in bulk. I already discussed the advantages of bulk buying in the section Stocking Your Pantry and Freezer (page 48), but it's important for me to say it again. Many items are significantly cheaper when bought by the case or in bulk. Make a weekly meal plan. I make a quick meal plan every week and only buy the items that I need. This way I don't buy excess that eventually ends up in the compost pile. Much more on this in chapter 4, The Importance of Meal Planning. Shop only once each week. Yes, this saves you time, but it'll also save you money. How many times have you gone to the store to pick up just one item and left with $35 worth of groceries? It happens to us all. You didn't even realize that you needed these extra items until you saw them, which makes you wonder how badly you actually needed them. Check out weekly sales before creating a meal plan. I'm not great at this, but it's always really helpful when I look ahead and plan to incorporate items that are on sale. Have a flexible meal plan. Let's say you've planned to eat salmon with roasted broccoli, but you see that brussels sprouts are on sale this week. Forget the broccoli and eat the brussels sprouts instead. Be flexible. Buy beets with greens intact. I know this seems simple, but we eat a lot of beets and they're relatively expensive. Beet greens can be used much like spinach, so buy the beets with the greens and forget the spinach (or other greens) that week. Buy bags of produce. Items that are available in bags include apples, onions, potatoes, and a variety of other fruits and vegetables. We can easily use a bag of onions in a week and it costs far less than buying individual onions. Check out bulk food sections, especially spices. I had access to great bulk food buying when my family lived in Vermont. The selection isn't nearly as good or cost effective here in North Carolina, but I do what I can. Bulk spices are almost always more affordable than jarred spices. Grow your own food. If you decide to try growing a few choice items, choose items that are more expensive. For example, buying organic lettuces can add up pretty quickly, but they're relatively easy to grow and can save you $5 to $10 each week depending on your family's consumption. chapter four The Importance of Meal Planning I cook approximately 90 to 95 percent of our meals from scratch while juggling work, kids, home life, friendships, and exercise. I make time for cooking through efficient meal prep strategies. I've prioritized whole-food meals and have streamlined the process so that I'm not a slave to my kitchen. Even as I outline the strategies that have turned me into a total kitchen boss, please know that I sometimes fall short and miss the mark. I don't do everything perfectly—nobody does. This is especially so when we're dealing with a family crisis that requires the majority of my energy. My daughter was admitted to the hospital twice while writing this book, and meal planning and prep took a backseat to more pressing priorities. Times of crisis are when your body needs the most support, yet it's often the time when you don't have enough energy to meet those nutritional demands. For this reason I've included a section in this chapter called Vacation Foods and Major Life Events, page 65. Staying a few steps ahead is the best strategy, and this section is designed to help you do just that. When figuring out your own life balance in the kitchen, I'd like you to remember that you and your family eat 365 days per year, and want at least three meals per day. You can always count on the fact that someone will be hungry. Whoever is taking the lead in the kitchen should be anticipating that next meal. Anticipating the next meal is especially important if you're feeding small children who are not keen on patiently waiting for sustenance. How many times have you found yourself arriving home at dinnertime, panic stricken because you've forgotten to plan dinner—you know, the meal that you eat nearly every single day of your life? I don't understand it, either, but it happens to me more frequently than I'd like to admit. My peculiar situation of having a severely food allergic child, specifically to wheat, has forced me to anticipate meals in a way that most normal people don't. Quick options are few and far between, which means I always have to be ready. As a result I plan, prep, multitask, cook in batches, and freeze foods. While it takes a bit of extra brainpower when learning to think ahead and get organized in this way, it slowly becomes second nature and ultimately makes meal preparation a less stressful endeavor. In case I haven't stressed it enough already, learning to implement all of these strategies in an organized way will take time and practice. Do what you can, slowly become comfortable with a few new strategies, and then add another. Gradual forward movement will be the key to success! Understanding and Preparing for Anaphylactic Reactions The term food allergy has become quite popular these days. It's a catch-all term that includes symptoms ranging from digestive upset and bloating to full-blown anaphylactic reactions. It's my understanding that many people aren't actually "allergic," they're just "intolerant" or "sensitive," yet the loose use of the term allergy has made it difficult for parents like myself to convey the severity of an allergy to necessary parties. Clinically speaking, a true allergy manifests as anaphylaxis, allergic asthma, uticaria (hives), angioedema (swelling), allergic rhinitis, or atopic dermatitis (eczema). The response is mediated by a specific immunoglobulin (antibody) called immunoglobulin E (IgE). Non-allergic responses are mediated by different immonoglobulins including IgA, IgG, or IgM, or from T cells. The immune system produces immonoglobulins to fight bacteria, viruses, toxins, and even foods in the case of allergies and sensitivities. There are varying names for these responses and their associated reaction, but the term allergy is limited to an IgE-mediated response. An allergic reaction is a hypersensitive response from the immune system that can occur upon exposure to a food or environmental allergen. The level of response varies from person to person, but some responses can serve as a source of severe discomfort (seasonal allergies) while others are a life-threatening situation (anaphylaxis). The immune system serves to recognize foreign invaders and manufactures antibodies to attack those offenders. However, people with atopy (allergic tendencies) have overreactive immune systems that are programmed to attack when an invader isn't actually all that offensive (such as with wheat, eggs, or peanuts). Anaphylaxis most often occurs from the ingestion of food or in response to an insect sting. Some people are so allergic to certain foods that even inhalation or contact can elicit an anaphylactic response. The reaction will likely ensue within minutes of exposure, but delayed responses that occur 30 minutes to hours later are possible. Signs and symptoms of an allergic reaction include skin reactions such as hives or swelling, difficulties breathing, changes in skin color, drop in blood pressure, tightness in the throat, swelling of the mouth, tongue, or lips, repetitive vomiting, severe diarrhea, or feelings of confusion or anxiety. Mild symptoms include mild nausea, runny nose, itchy mouth, or a few hives. A person is said to be in anaphylaxis when two or more of these symptoms are occurring simultaneously, even if the symptoms are mild. If the response is limited to only one mild symptom (for example, a runny nose), then the reaction does not require epinephrine. But it is recommended to respond with epinephrine if more than one symptom is occurring or if the person is having difficulties breathing. As you can see, anaphylaxis is a multi-organ response and is not just limited to difficulties in breathing. My son is severely allergic to wheat and barley, although we believe his anaphylactic response is limited to ingestion and does not include contact or inhalation. His last reaction occurred in December 2017 from the ingestion of a gluten-free sandwich wrap that had been manufactured on shared equipment. His typical response upon ingesting wheat had been primarily a GI response (repetitive vomiting) with some swelling and hives, but his reaction had shifted, as allergies often do, and he almost immediately had difficulties breathing. I administered his EpiPen at the house then transported him immediately to the emergency room, where he was given two more doses of epinephrine, IV steroids, IV Benadryl, and four different nebulized breathing treatments, and was placed on oxygen for nearly two hours. I then knew: What used to be a mild anaphylactic reaction was now a severe life-threatening situation. My experience with Owen taught me that you always have to be prepared for the worst when it comes to anaphylactic allergies. If you have a child with minor to moderate allergies, their response to the allergen can advance without notice. We always knew this was a possibility, but I'm not sure what would have happened to my son if I hadn't been there to respond during the reaction. I had been trained by multiple physicians, but I didn't do a great job at conveying that information to the other people who cared for Owen simply because I didn't understand the potential for his reaction to intensify without any notice. Some advice: If your physician has instructed you to carry an EpiPen for your child, be sure that every person involved in their care fully understands how to prevent a reaction from occurring and how to use the EpiPen in the case of an emergency. Every child with food allergies needs an Emergency Care Plan. A template for a plan can be found on the Food Allergy Research & Education website (foodallergy.org). Your emergency plan, along with epinephrine, should travel with that child no matter where they go, a lifelong habit that starts early. The likelihood of your child having a severe anaphylactic reaction may be low, but there are no guarantees. Being unprepared for such a thing could be the greatest regret of your life. Meal Planning 101 I firmly believe that developing at least some semblance of a meal plan for the week will enable a family to successfully follow a whole-food diet, especially one that requires some creativity. I'm not saying that you have to be 100 percent organized when it comes to meal planning for this diet, but you need some sort of forethought in order to maximize your time usage throughout the week. Your goal is to optimize your time spent shopping, prepping, and cooking. Meal planning equates to efficiency. The sooner you embrace this fact, the sooner you'll be on the path to whole-food success! I'm sure there are people who can shop and cook for the week without implementing a meal plan of any sort; I'm betting they are also either eating more processed foods than they might like to admit or they are eating the exact same thing for every single meal. Meal planning allows me more freedom throughout the week because I can cater the plan to meet the demands of that particular week. If Tuesday through Friday are particularly busy, for example, I plan for meals that can either be prepped in advance or that will take very little effort on those days. Allow me to outline some strategies that can help you create a flexible and efficient meal plan: Don't plan to eat something new every single meal of every single day. Decide on the meals that you're willing to reheat or eat as leftovers, and then decide how many times you're willing to eat that food in one week. For example, grilled chicken is great when it's fresh off the grill, but it's also great as a leftover when chopped to top a cold salad, made into chicken salad, or reheated and served as a side. I therefore plan to make loads of grilled chicken at a time (enough to take over our entire four-burner grill) whenever it's on the meal plan. Excess can be easily frozen for a later date. Pick five meals to prepare for the week. These meals will serve as dinners, lunches, and even parts of breakfast. Build the meals to suit your family's needs and preferences. I usually plan for each meal to contain a protein, a vegetable or salad, and another vegetable or starch (in the form of a starchy vegetable like potatoes or winter squash). I don't serve a starch at every meal, but I most always serve one or two vegetable sides depending on the other meal components. Note that this is a general rule of thumb and that some meals don't quite fit this scenario. You'll also have to determine how your particular family likes to eat. It may be that a starch is 100 percent necessary at every single meal. Pick two to five different breakfasts that can be served throughout the week. My family tends to eat the same meals again and again for breakfast, but I like to have a bit of variety to keep everyone satisfied. Plan for snacks, even if you eat the same snacks every week. I can get by without snacking, but my children are a very different story. Snacks are essential for their growing bodies. The menus that appear in appendix A do not include between-meal snacks. I've left this up to the individual to decide, because snacking preferences vary greatly depending on the circumstances. Refer to the Quick and Easy Snacks on page 170 for a list of my go-to snacks; I always add ingredients for snacks to my shopping list before heading to the grocery store. If you do the same, you'll visit the grocery store with a comprehensive list of your weekly needs (don't forget soap!). It's easy to forget snack-y ingredients, especially when balancing other daily tasks. Know which meals freeze well and make more servings of those meals. For example, I always make around two and a half gallons of Not Quite Your Mama's Chili or Black Bean and Vegetable Soup since I know both of these soups freeze well. My weekly meal plans regularly incorporate meals or components of meals that are already frozen, because utilizing frozen meals saves time in the long run. For more information about freezing, see Your Freezer, Your Friend on page 64. Mix and match with leftovers. I only prepare five different meals for a week, which means these components are going to comprise an entire week's worth of lunches and dinners. Meals don't have to be fixed combinations of food; you just have to prepare enough of each meal component to last through the week. Jot down your meal plan and use this plan to make your shopping list. I like to plan my shopping days around the farmers market so that I'm able to get as many fresh, local ingredients as possible. I find the remaining ingredients at the grocery store. Make a combination of side dishes into a meal. Throwing together some quick sides can often create a meal when you're in a pinch. Obviously, meal planning doesn't go perfectly in the beginning (or even once you've practiced for a while), but a good grouping of sides and snacks can make for a wholesome meal when nothing else is available. For us, these "snack meals" can mean a plate of sliced cucumbers and red peppers with store-bought hummus, whole olives from a jar, sardines in olive oil, a small handful of nuts, and any other leftovers I can scrounge together in a pinch. Organic, nitrate-free hot dogs from the freezer or canned tuna are other good options. (Of course, this is only possible because I've stocked these foods in the pantry and freezer!) Adjust your plan to reflect your own family's appetites. The menu examples in this book are meant to help you get started, but know that these plans reflect the typical needs of my own family. I'd say that we eat an above-average amount of food due to our high level of activity. Your family's needs may be different, and may change according to the season. Essential Food Prep Strategies Time is by far the most limiting resource when it comes to food prep. I discuss ideas for time management in the section Making Time for Real Food in chapter 3, page 44, and I highly recommend reading that section if you haven't already. Making time for good food is all about prioritizing. Although this book offers numerous solutions to help you become more efficient in the kitchen, none of these solutions will work unless food prep becomes a priority for you and your family. The biggest piece of advice that I can offer you is to prep before you actually need to eat. Cooking meals with whole foods requires washing and drying vegetables, chopping ingredients, cooking ingredients, and then cleaning up whatever mess you've created in your kitchen. The whole process can easily take two (or three) hours from start to finish depending on your efficiency and the degree of disarray. If I were to cook from start to finish for every meal, I'd need to plan to be in my kitchen at least an hour or two before it was time to eat, and this is just not realistic, especially for breakfasts. Weekend mornings and afternoons are often a great time for me to get some food prep done for the week. The same is true for the occasional evening after I put the kids to bed and still have some energy left for tasks like chopping vegetables, cooking beans, or baking plantain bread. This hour or so is often the window that feels most meditative and calm since the low (and sometimes intensely bizarre!) hum of children has ceased for the day. I use this peaceful hour to enjoy some silence and sort through my busy thoughts, but you might find this to be the perfect opportunity to catch up on a podcast or audiobook. (I suggest Barbara Kingsolver's Animal, Vegetable, Miracle for a food-inspiring and soothing evening listen while preparing loving meals for your family.) I look at my meal plan to see which tasks can be performed in advance. One approach is to wash, dry, and chop all of your vegetables for the entire week, and store them in the refrigerator in large Ziploc bags (I wash, dry, and reuse these bags until they're falling apart). When I prepare salads I make enough for the entire week, and sometimes I even divide salads into individual portions using small food storage containers. This way I have a quick meal that doesn't even need a plate! I can use these salads as a base for whatever leftover ingredients I choose to put on top—tuna fish or sardines, grilled chicken, guacamole, olives, nuts or seeds, or other toppings of choice. Suggested Tasks to Perform in Advance Washing, drying, and chopping vegetables Washing, drying, and chopping fresh herbs Preparing an everyday salad to eat throughout the week Preparing a salad dressing or sauce for the week Making bone broth Whipping up a batch of Homemade Mayonnaise Marinating meats Making hamburger patties Baking or pressure-cooking winter squash Roasting, baking, or pressure-cooking sweet potatoes, potatoes, or beets to be used in varying salads and other side dishes Preparing a tuna or chicken salad, or at the very least, chopping the vegetables and herbs to be used in those salads Making a large pot of soup Baking and freezing multiple loaves of bread Roasting two or more whole chickens Soaking and cooking or pressure-cooking beans As you review your menu, consider the suggestions in the sidebar Suggested Tasks to Perform in Advance, and then use your prep time, whenever you have it during the course of the week, to complete those tasks. I also recommend lumping similar tasks together because this means you'll only have to clean up once. For example, chopping large amounts of various vegetables includes one or two cutting boards, countertops, and a mess on the floor around the chopping area. It might sound like a lot of work initially, but once you've washed, chopped, and bagged all of your vegetables for the week, you're done. I can't tell you how amazingly satisfying this can be. I use this same approach when turning on my oven or pressure cooker. Steaming foods in the pressure cooker doesn't actually dirty the insert. Many items can be steamed, including sweet potatoes, winter squash, and eggs (to hard-boil them). Preparing these items one after another without washing the insert in between will ultimately save you time. The same is true for the oven. Once it's on, I tend to pack it full or cook foods in successive order, especially during warmer weather when I don't want to have my oven blasting all the time. Once or twice a week is enough. The best part about prep work is that it sets you up for success for the week. If you've had a busy day and don't necessarily feel like cooking when you come home, you'll be far more inclined to go ahead and cook if you know that most of the prep work is already out of the way. Another approach to prep work involves the use of homemade raw and bagged freezer meals. This approach requires a decent-sized freezer and often the use of a Crock-Pot or pressure cooker to cook frozen meals that have not yet been cooked. This isn't a technique that has ever appealed to me, since I tend to freeze items after they've been cooked. I favor the approach where you prepare more than you'll need, eat some now, and freeze some for later, because it feels like a better time-saver and I appreciate the efficiency of storing already cooked meals in the freezer. However, I know a handful of people for whom freezing meals raw has worked well. If this approach appeals to you, start by reading the sidebar Freezing Meals Before They're Actually Cooked, and then choose recipes that can be chopped, bagged, and frozen raw. Most people who implement this approach pour the contents of these bags into a Crock-Pot in the morning, allow it to cook throughout the day, and return home in the evening to a piping-hot meal. (Note: You could likely make these meals in a fraction of the time using a pressure cooker.) People who are clearly better planners than myself use this technique to prepare meals for an entire month in one sitting! If this appeals to you, spend some time on Google and you're sure to find a plethora of expert freezer meals. Personally, I don't like to eat Crock-Pot meals every day. I like a variety of grilled, roasted, baked, sautéed, and raw ingredients, and using this technique simply doesn't allow for as much variation as my family prefers. However, I'm sure I could combine this method with what I'm already doing and it would complement it nicely. I highly recommend doing anything and everything in advance (within reason) when it comes to breakfast meal prep. I'm sure there will be a day when mornings aren't filled with hungry children and school start deadlines, but I don't see this day approaching in the next few decades. I am of the belief that breakfast is the most important meal of the day for my kids because it sets the tone for the rest of their day. Feeding them something sweet and sugary for breakfast sets them on the path to sugar cravings and unstable blood sugar levels. To avoid that I like to start them off with a healthy fat and protein. The problem is that creating healthy breakfasts can take more time than I'm willing to commit in the mornings. Thus the importance of breakfast prep! I prep frittatas, egg casseroles, and hard-boiled eggs; wash and chop vegetables for egg scrambles; cook breakfast sautés; and prepare breads or muffins in advance. The end result is a more nutrient-rich breakfast that sets a positive tone for the rest of the day. So be sure to account for breakfast foods when planning for prep work. You don't want to be cooking a 50-minute frittata first thing in the morning! Freezing Meals Before They're Actually Cooked I know a handful of individuals who simply despise eating leftovers. This would present a major challenge when trying to implement my method of meal planning, since it so heavily relies on bulk cooking, freezing cooked meals, and eating leftovers till the sun goes down. Freezing meals before they're cooked might be your solution if you've already decided that my method won't work for your family of eaters who have an aversion to leftovers. Some of the recipes in this book such as Pulled Mojo Chicken, Turmeric-Ginger Baked Chicken, Mexican Shredded Beef, and many of the soups yield extremely large quantities. The expectation is that leftovers will be frozen. The raw ingredients could instead be divided into one-meal portions and frozen until ready to be cooked. Meals that serve themselves well for freezing raw are those that require a pressure cooker, slow cooker, or oven. You simply chop and bag the ingredients, label the bag accordingly, and note any additions that need to happen before cooking. For example, the solid ingredients for the 40-Minute Beef Stew could be chopped and bagged, and the label on the bag could read "Beef Stew—add 8 cups beef stock." (Do not include liquid ingredients in the frozen bags; add these just prior to cooking.) The frozen ingredients could then be thrown into the pressure cooker, Crock-Pot, or large stovetop pot along with the beef stock (thawed, if frozen), and you'd proceed to prepare the recipe as instructed. Other soups that would lend well to this technique include Creamy Cauliflower Soup, Creamy Carrot Ginger Soup, Apple Butternut Soup, Black Bean and Vegetable Soup (only if using cooked beans), White Bean, Fennel, and Sausage Stew (only if using cooked beans), and Chicken and Vegetable Coconut Curry Soup. You'll obviously be skipping the sauté step for all of these soups since you're throwing a frozen block of solid ingredients into a large pot or pressure cooker along with the cooking liquid. Any frozen items that are placed into the oven such as Herb-Encrusted Drumsticks or OMGrain-Free Chicken Tenders will clearly need additional cooking time, but this is something you'll just have to experiment with because it's not a method that I use. Also keep in mind that items such as the drumsticks and chicken tenders will need to be spread out on a parchment paper−lined baking sheet for freezing; otherwise, you'll never be able to separate the frozen items if they're piled together before freezing. Once frozen, they can be lumped together in a bag and stored in the freezer. The Multitasker Wins the Race Think of multitasking as the advanced version of meal prep. Food prep methods including baking and pressure-cooking don't actually require your attention once the foods are cooking, which means that time spent waiting for these foods to cook can be filled with prep tasks for the next day's meal. Furthermore, interjecting unattended tasks (namely pressure-cooking and baking) throughout your day when you plan to be at home can save you time. For example, I often throw something in the oven in the early-morning weekend hours and go about preparing for the day that lies ahead while the food cooks. If you work at home as I do, this is particularly applicable. You can cook numerous foods in advance by simply taking a 15- or 20-minute break from work to complete a task in the kitchen. If I haven't had enough time to prep foods in advance for the week and I'm cooking a meal from start to finish, I often find that there's some downtime while I wait for an item to cook. Time for multitasking! This downtime can be filled with any number of tasks to make the following night's (or morning's) meal easier to prepare. Something as simple as filling five minutes with a task like chopping cilantro or garlic and storing it in the fridge for the next day's salad saves time in the long run. I've even used five spare minutes to crack and beat eggs for breakfast the next morning. If you've set aside some time to work in the kitchen, downtime should be nonexistent during that period. Fill that time with as much prep work as you can. If you're stirring a sauté or soup base every now and then, use the time in between to start another meal. You can easily make breads and muffins, chop vegetables, or assemble salads while stirring or completing other simple tasks in the kitchen with a little forethought and planning. Don't underestimate the impact that these small windows of prep time can have on your total weekly kitchen commitment! Batch-Cooking Basics Batch cooking happens automatically when you prep in advance and multitask in the kitchen. I'd say the major difference is that batch cookers like to prep the majority of their meals in one or two sittings, rather than spread the workload out over the course of the week. This may be the most realistic approach for someone who maintains an extremely busy or unpredictable weekday schedule. You'd be amazed at how much you can actually accomplish when you set aside time specifically for cooking large amounts of food. The meal plans described in this book utilize Saturdays and Sundays to complete some introductory-level batch cooking. Personally, I love having all meals prepped in advance by Monday, but I often don't make it happen. I tend to batch cook as much as I can handle on the weekends, which then leaves me with minimal prep throughout the week. Minimal prep before each meal offers me a moment of meditation and enjoyment, especially when most of the hard work is already done, since my time in the kitchen is often a welcomed change of pace from the hectic day that preceded it. For those who like cooking less or who don't find it deeply fulfilling, I recommend batch cooking to get all of the work out of the way. Batch cooking is especially popular among fitness gurus who are exceptionally focused on sticking with a calculated diet. They calculate the appropriate number of calories, carbs, fats, and proteins needed for each meal, build meals to reflect those numbers, cook everything for the week in one or two batch-cooking sessions, and then portion that food into individual meal containers. I'll be honest in that I'm in awe of these people and someday hope to become that organized. Not because I want to calculate the calories of every meal, but because it would be amazing to have a fridge full of preportioned, ready-to-eat meals for an entire week! But can you imagine the stacks of containers you'd need to accommodate this type of planning for a family of four? That's four containers per meal, three meals per day, seven days in a week for a total of 84 individually portioned meals. My head spins just thinking about the level of organization and containers this would take! However, if you're cooking for just one or two people, preportioning meals may be both viable and possible. When I organize my batch-cooking time I start by looking at my weekly meal plan and decide which tasks should be started first. These are the tasks that need my initial attention, but can then be left unattended while I prepare something else. I usually start with prep work that involves baking, pressure-cooking, and boiling. If my meal plan includes Plantain Sandwich Bread, Apple Butternut Soup (which requires a baked or pressure-cooked butternut squash), or Roasted Non-Starchy Vegetables, then I'll start my prep work by preparing these dishes first. First is plantain bread assembly, since this has the longest baking time. I next prep the squash, throw that in the oven, and lastly add in the non-starchy vegetable, let's say broccoli. I start with the item that will bake the longest, and I finish with the item that takes the least amount of time. You have to be choosy about pan size when doing this, and, of course, all the dishes in the oven, regardless of how long they take to bake, need to have the same oven temperature. You often have to increase your cooking time when you pack an oven full. How much depends on your individual oven. Textures of certain foods, such as the crunchiness of roasted vegetables, may be slightly sacrificed when the oven temperature is adjusted to meet the needs of the other occupants, but I find this sacrifice to be minimal. Baking bread while roasting vegetables may create a more humid oven environment, further altering the crunchy endpoint, but I barely even notice a difference. The benefit of having so many foods prepared at once makes up for the minimal change in texture. You may also have to adjust cooking times since you're cooking a group of foods at one temperature and that temperature may be higher or lower than what's specified in the recipe. (I wouldn't adjust the temperature for things like breads, cakes, or other baked goods, but you can get away with adjusting the cooking temperature for vegetables and sometimes meats.) If adjusting a recipe bothers you, you can cook multiple items at their required temperature and then adjust the temperature to suit your needs for a second round of baking. I've used both techniques and both work perfectly fine. Once you've started your unattended cooking, such as baking or pressure-cooking, you have a couple of options for the next phase. You can start washing, drying, and chopping vegetables, or you can start preparing a second round of foods to go into the oven. Let's return to the preceding example where I cooked breads, squash, and broccoli during my first bake. For a second bake, let's say I go on to prep an Eat Your Greens Frittata, Kobocha Casserole with Pecans, and Simple Whole Roasted Chicken. Of course, what you choose really depends on how much time you have for prep and how long you're willing to leave your oven on. I'm less inclined to bake large quantities of food in the summer when keeping the house cool is a priority. But if I'm turning on my oven, a second round of baking saves energy since the oven is already warm. The key to success when batch cooking is to maintain a steady workflow and keep the multitasking going. Some people will even set a timer and work until their allotted time runs out. Of course, this won't necessarily feel natural at first, since you're developing an entirely new skill. You might find yourself fumbling and feeling disorganized and overwhelmed, but practice makes perfect. I have slowly developed a sense of intuition when it comes to cooking, and with practice you, too, will develop the same. Your Freezer, Your Friend I highly recommend investing in a small chest freezer if you don't already own one. These small freezers don't take up a lot of room, and they can help you save quite a bit of time and money in the long run. I have two small freezers, which, for a family of four, gets the job done. I store frozen beef in one since I buy bulk meat from a local farm (beef is my largest bulk meat purchase, so it often needs an entire freezer to itself). In the other I store pork, poultry, organic hot dogs and deli meats, and foods that I've prepared and then frozen, including soups, stews, cooked meats, and breads. Miscellaneous items are scattered throughout such as bulk nuts or seeds, dates, frozen fruit, and other items I find on sale. (If you're planning to freeze whole raw and bagged meals and batch cook them for a week in advance, you'll definitely need a sizable freezer.) One advantage I have to owning a chest freezer is that I can prepare larger amounts of recipes in advance and store the excess for subsequent meals, which greatly reduces time spent in the kitchen. There are so many foods that can be cooked and frozen in advance, but you may not have room for all of these items if you're simply relying on the freezer in your refrigerator. My daughter is occasionally admitted to the hospital for IV antibiotic treatments, and on the occasions she's unwell we make the unexpected five-hour trip to the specialist. These trips are often last-minute affairs, and they leave me little time to prepare foods for my husband and son before I depart. Sure, my husband is capable of preparing a few meals, but that's not his norm and these periods of crisis are the wrong time for him to take on a whole new workload. We often don't take my son out to eat because of his allergies, so having a number of prepared frozen foods has been a lifesaver for my family on multiple occasions. I realize that if your family doesn't face similarly dire circumstances, this may sound like overkill to you. But there's no reason that your family can't adopt a similar approach and have meals on hand for when unpredictable circumstances prevent you from preparing home-cooked meals. Organizing Your Freezer and Labeling Food A freezer can quickly become a home cook's abyss of freezer-burned foods if you don't implement some organization. Like items must be grouped together and have their own designated space. For example, I put poultry on the left, unopened frozen fruits and vegetables are in the center, bacon and pork products go on the shelf area to the right, organic hot dogs and deli meats go in the basket, and prepared foods get stored on top of everything else. My second freezer is reserved for beef (roasts in the back, ground beef in the front, stew beef in the basket), with organ meats, bones, and fish on top. The freezer attached to my refrigerator holds prepared sauces, frozen opened bags of fruits and vegetables, ice, chicken carcasses, nuts, and a plethora of random items such as leftover glow sticks from the last Fourth of July party that we attended. Always storing food in airtight containers—whether it's a Ziploc bag, glass jar, or casserole dish—is your best bet for retaining freshness, in either the refrigerator or freezer. Proper labeling of freezer items is equally important as organizing the items themselves. You need to record what's in the container or bag and the date that it was prepared and frozen. For example, a label might read "Mojo Chicken 9/3/18." I use a black permanent marker and write directly on Ziplocs or onto a piece of painter's tape or masking tape that's been secured to the plastic or glass container. You could even use different colored tape or markers for different food categories—meats are red, vegetables are green, sauces are purple, and so on. Another idea is to download an app that tracks food storage. While I haven't actually used such an app, I've seen options for pantry, freezer, and refrigerator storage tracking. I actually love this idea, since you could take a look at this app while at the grocery store to know whether you should buy more of a particular item when it's on sale. Whatever system you use for labeling and freezer organization, know that it's an important step in making sure the foods you buy and prepare don't go to waste. Vacation Foods and Major Life Events My family doesn't dine out in restaurants due to my son's wheat allergy. The chance of cross-contamination is low, but his reaction is so severe that it's simply not worth the risk. This means that I still have to cook every meal for my family when we go away on vacation, but cooking is often the last thing I want to do when vacationing. We spend some extra money on getting a few more prepared foods than we would normally, like coconut sandwich wraps, natural deli meats and hot dogs, organic chips, and a few other acceptable convenience foods. But the truth is there are very few packaged foods I feel good about eating. Packaged foods only get us so far. The cooking still remains. Many people like to use vacations and holidays as a time to overindulge and enjoy a variety of junky foods and alcohol. I'd like for you to instead consider that vacation is a time for renewal. The foods you put into your body can help to support that renewal or they can prevent it. How many times have you returned from vacation feeling like you're ready to take a break from junk food? There's a better way, people! I make a meal plan for vacation week about two months in advance. I build the plan knowing what types of resources will be available for me to use. If we're camping, we'll need foods that can be stored in a cooler and easily reheated on a camp stove. If we're staying in a hotel with a kitchenette or in a house with a full kitchen, I have more flexibility regarding packed foods. My family doesn't often fly, but when we do I bring food on the plane, or at least enough for travel days when I'd prefer to avoid the overpriced convenience foods in the airport. I've brought salads, muffins, chicken salad, fruits, vegetables, and a variety of other foods. Just be prepared for some smiles and comments about your unusual luggage contents. While I've never done it, I believe families with children with allergies and other conditions requiring a special diet can get a physician's note to make the journey through airport security a bit easier, if necessary. While they still may not allow liquid foods, the note will help expedite the process of luggage scrutiny. I recommend that you call the TSA in advance, describe the nature of the situation, and ask that an agent offer guidance on carry-on limitations. Foods that are even questionably liquid (hummus, for example) should probably be avoided because TSA screeners will likely request that you throw these foods away if you're carrying more than the allotted three or four ounces. Knowing your limitations in advance will help you to develop a meal plan based on the resources that will be available to you while traveling and at your destination. Once you've created your weekly vacation meal plan you can start to prep and freeze the meals or components of meals well in advance. I simply complete one or two extra recipes each week leading up to vacation, meaning that I have a good part of our meals prepared and frozen by the time we leave. Half-gallon-sized glass jars are great for freezing some foods (but do not freeze liquids like soups in glass, because they'll expand and break the jar) since you can easily pack six to eight jars into a medium-sized cooler upright. This prevents the inevitable dilemma of constantly reorganizing the cooler and draining off melted ice water to prevent the water from seeping in through the lids of the now-submerged storage containers. The jars are completely waterproof and tall enough so that melted ice water can't reach the lids. Use these same jars for your nonfrozen items and stagger their storage next to the frozen jars to create a built-in cooling system: The frozen jars will keep the nonfrozen jars cool, while the frozen jars will thaw in a few days, making their contents available for consumption. Just be sure to keep an eye on the temperature of your cooler, because you'll likely have to start adding ice after day three or four depending on the number of frozen items that you started with and the temperature at which you're storing your cooler. The large jars can also be used to pack cooked components of meals that will need to be assembled later. For example, I usually plan for my family to eat Summer Potato Salad while vacationing. I chop the vegetables and place those in the bottom of the jar. I then place whole, cooked potatoes on top of the vegetables, seal, and refrigerate the jar. When we're ready to eat potato salad, I pour the contents into a bowl, dice the potatoes, add condiments (mayo and mustard), mix, and serve. I then store any leftovers in the original jar. This is a side dish that took all of five minutes to prepare. You can also pack jars with diced vegetables to be used for breakfasts, lunches, or dinners. If you're going to implement this strategy for packing vacation foods, then you need to be sure that you're starting the process of cooking and freezing well in advance. This allows you to spend those last few days leading up to a vacation preparing the fresh foods. If you're trying to cook an entire week's worth of food in a few days before you depart, you're going to feel completely overloaded. Major life events, such as the birth of a child, are another opportunity to plan well in advance. I froze a number of meals in the months before the birth of my daughter because we were planning to move from Vermont to North Carolina when she turned five weeks old. I knew that this period would be incredibly stressful and having meals already prepared helped alleviate some of the stress, especially given my son's dietary restrictions. Major events are times when our body needs its greatest support, which isn't often possible given high stress or high demand. People tend to rely heavily on restaurant or prepackaged foods that don't support the stress response in a helpful way. If you know that you have a major event coming up, do yourself a favor and plan to freeze an appropriate number of meals ahead of time. A Word on the Recipes and Menus A complete approach to meal planning and prep, including unusual circumstances such as vacations, is key to making this diet work for you and your family. Meal planning, batch cooking, multitasking, freezing foods, and planning ahead are all important tools in the development of better intuition in the kitchen, an intuition that will help you reach your goals to feed your family a healthy diet made from whole-food ingredients. The following sections combine all of these skills. The recipes include advice for batch prepping or cooking, storage, and for making it into a meal. The advice for prepping is designed to help you learn how to prepare the recipes in a way that reduces your overall cooking time, whether that time you save is today or in a few weeks when you're pulling leftovers out of the freezer. Storing leftovers is a major consideration in batch prepping, so I've made this information easily accessible using notes and icons. The advice for making it into a meal are suggestions that have to do with using each recipe in the book. You may find that some of the combinations feel out of the ordinary, but this book is about thinking outside the box when it comes to family meals. The recipes often call for "cooking fat" or "cooking oil." I only designate a specific type of fat when it actually matters. Cooking fats are typically lard, tallow, or reserved fats from cooked meats such as bacon grease, but olive oil and avocado oil can be used instead. The solid cooking fats are generally inexpensive, so use these whenever possible and reserve your more expensive cooking oils (olive and avocado oil) for use when a liquid oil is necessary. Coconut oil is another option for a cooking fat, but I don't use it often unless called for since it adds a specific (sometimes desirable, sometimes not) flavor to a dish. The four weekly menus in appendix A are to get you started on an efficient and organized path toward creating your own meal plans. (For those readers who want even more meticulous instructions that walk you through the menus step-by-step with prep sequences, please visit deeprootedwellness.com/grainfree where you can download a PDF for free.) A Note on Natural Sweeteners Maple syrup, agave syrup, and honey are often presented as healthy alternatives to table sugar since they contain trace minerals and antioxidants, but the benefits of eating these foods, especially when compared with other whole foods, is negligible. Raw honey boasts additional advantages such as its antiviral and antibacterial properties, and it certainly has its place as a natural remedy in the treatment of acute illnesses. However, I don't believe that any of these sweeteners have a regular place in the grain-free, sugar-free, dairy-free diet and have thus removed them from all the recipes. The point of this book is to teach a family how to avoid sugar on a daily basis and instead consume it in extreme moderation as a special treat for special occasions (namely birthday parties and holiday celebrations). When my family left Vermont, we brought with us a gallon of maple syrup. Three years later, we've only used about half. This is what I mean by moderation—treating sugar like a limited resource that warrants use only under special circumstances. Access to sugar, honey, maple syrup, and other natural sweeteners was once a privileged occurrence. Think back to people who lived centuries before us. Varying constraints (access and affordability) prevented sweeteners from being enjoyed by common folk on a regular basis. The trick now is in moderating consumption of a commodity that is readily accessible (and frequently consumed) by all. However, I'm well aware that the near-zero approach to sugar isn't practical for many families and that my view on the subject is extreme (see Slow Death by Sugar, page 3, for an explanation as to why I take this approach). I have therefore included recipes in the Sweet Treats section that are prepared using stevia or dried dates. Stevia is a plant with a flavor that's recognized by our sweet receptors, yet it actually contains zero sugar or calories. Stevia is available in a powdered form (the dried leaves are ground into a powder that has the consistency of confectioners' sugar), as a liquid extract, or mixed with varying artificial sweeteners. Some health food experts disagree when it comes to using stevia as a sugar replacement, saying that it can further disrupt hormone regulation or thyroid function in individuals who are already experiencing health issues, but it seems as though the major reason to avoid stevia has to do with its processing and added ingredients. Powdered forms should contain just the leaves and nothing more. A popular brand of stevia powder is mixed with erythritol, a natural alcohol sugar that can also be used as a sugar substitute, but is not always well tolerated. Liquid stevia should contain stevia extract, water, and perhaps one or two other recognizable ingredients. If you choose to use stevia, be sure to read the ingredient list before purchasing. The downside to using stevia is that besides being sweet, it has a very distinct flavor that not everyone appreciates. I have found that it can be used along with fruits in dishes like Mango Lime Ice Cream that require very little additional sweetness, but it doesn't make a great substitute for all sweet dishes. Stevia is about 200 times sweeter than table sugar, so start with a very small quantity and go from there. This also helps explain why a small bottle of stevia is so expensive; a little bit goes a long way. Monk fruit extract is another acceptable sugar replacement that, like stevia, is extremely sweet. Monk fruit has not been utilized in the recipes because of my lack of familiarity at the time of writing this book. Dates are the most common sugar replacement in the Sweet Treats recipes. Dates are a whole-food ingredient, have less sugar per serving than maple syrup and honey, and contain substantial fiber to slow sugar digestion. What's more, dates have a legitimate nutrient profile and are a decent source of potassium, calcium, magnesium, vitamin B6, vitamin A, iron, and even a small amount of protein. Our modern society has heavily integrated sweet treats into all sorts of occasions, and I want your family to have the option to celebrate these occasions in a healthier way. Recipe Icons Each recipe includes a set of icons to help you organize your prep time and inform you of proper food storage. The apron describes the amount of hands on time required to complete each recipe. The timer describes the total amount of time to complete the recipe, including the active time plus any unattended time. Total times are based on multitasking (sautéing onions while other vegetables for the dish are washed and chopped). Cooling times are only accounted for when it's a limiting factor in completing the recipe. The plate tells you the number of servings or quantity yielded by the recipe. Pay special attention to this number since some recipes yield large quantities that are intended for freezing leftovers. The refrigerator depicts the duration for which a recipe can be stored in the refrigerator. Recipes that do not store well in the fridge have a slash through the icon. Recipes that have no need to be stored in the refrigerator are missing the icon altogether. The snowflake depicts the duration for which a recipe can be stored in the freezer. Recipes that do not store well in the freezer have a slash through the icon. Recipes that have no need to be stored in the freezer are missing the icon altogether. breakfasts and "breads" perfectly baked bacon This foolproof method of bacon preparation is almost completely hands-off and makes perfectly crispy bacon every time. Don't forget to reserve the fat after the bacon is finished cooking. I prepare as much bacon as will fit in my oven at a time, use whatever is needed for the week, and then transfer the rest to the freezer. You can adjust the baking temperature on some recipes, but not this one. The bacon will burn if you cook it any hotter. 12 ounces (340 g) bacon (or desired amount) Preheat the oven to 300°F (149°C). Spread the bacon into a single layer on a large baking sheet. Bake it for 25 minutes, drain off any excess fat into a small jar for storage, flip the bacon, and bake it for another 20 minutes. Exact cooking time will vary depending on the bacon thickness. Most bacon will work for the given recipe, but thick-cut bacon will need to cook slightly longer. Drain the excess fat into the jar and place the bacon on a kitchen towel–lined plate, pat off the excess fat, and serve immediately. Make It a Meal: Crumble on top of Creamy Cauliflower Soup, add to your Everyday Salad, or serve with Eat Your Greens Frittata. Saving Excess Fat from Cooked Meats Most people discard fats from cooked meats such as bacon, ground pork, or ground beef. But these fats are an affordable and very valuable option for a healthy cooking fat, especially when you're buying quality meats. Be sure to reserve any solid fats that form at the top of cooled stocks and use them as cooking fats as well. Start saving these fats as an inexpensive way to improve your diet! Reserved fat from cooked meats or stocks Strain off the fat from cooked meats including ground beef, ground pork, or bacon by pouring the cooked meat into a fine-mesh metal colander over a bowl. Pour the collected fat into a glass jar and allow the fat to cool to room temperature. Once cooled, cooking liquid often accumulates underneath the layer of solid fat. You can remove the fat from the liquid and store the fat at room temperature for up to two months or for six months in the refrigerator. Alternatively, you can leave the fat sitting on top of the liquid, but it's best to store this in the refrigerator and use within two months. The fat keeps for quite some time, but the liquid portion will eventually go bad. You can transfer excess fat to the freezer for storage up to a year. Use melted, reserved bacon grease from Perfectly Baked Bacon as the cooking fat to prepare Roasted Non-Starchy Vegetables, Red and Yellow Rosemary Potatoes, or a Simple Whole Roasted Chicken. sage and rosemary sausage patties Prep these rich and flavorful sausage patties the night before, and simply throw them in the oven while you get ready in the morning. You'll love this hot and satisfying side that can easily be taken on the go or packed into a lunch box. The Eat Your Greens Frittata would make a nice accompaniment for a grab-and-go, no-mess breakfast that can be reheated at the office. It's perfect for those who don't have time to enjoy a sit-down breakfast at home. 2 pounds (910 g) ground pork 1½ teaspoons dried sage 1½ teaspoons onion powder 1½ teaspoons garlic powder 1 teaspoon dried rosemary 1 teaspoon salt Pepper, to taste Preheat the oven to 400°F (204°C). Combine all ingredients in a medium-sized bowl and use hands to work the spices into the ground pork. Divide the pork into 16 evenly sized balls. Next, form each ball into a small patty. Place the sausage patties on a baking sheet and cook for 9 minutes, flip the patties, and bake for another 8 minutes. Remove the patties from the oven and place them directly onto a kitchen towel–lined plate. Lightly press the tops of the patties with the towel to remove any excess fat. Serve immediately. Batch Cooking and Leftovers: Reheat on the stovetop or in a microwave. Spread cooked (or raw) patties on a parchment paper–lined baking sheet to freeze without sticking, then transfer to Ziploc bags for long-term freezer storage. Make It a Meal: Serve with Hard-Boiled Eggs, olives, sliced raw vegetables, and a piece of fruit. cauliflower-sausage breakfast casserole This hearty casserole is the perfect breakfast for the late fall or winter when you need something substantial to start your day. You'll need a large baking dish (or two smaller dishes, approximately 9 × 7 inches [23 × 18 cm]) to complete the recipe since it has such a large yield (because the dish holds up so well in the refrigerator or freezer). Most breakfast sausage is already spiced, but I often use unflavored ground pork to avoid the added sugars. Experiment with your own flavor profiles if you're using unflavored ground pork. 2 pounds (910 g) ground breakfast sausage 1 onion, diced 1 head cauliflower, chopped 1½ teaspoons salt 20 large eggs (or 16 extra-large eggs), beaten Preheat the oven to 350°F (177°C). Brown the sausage and onion in a large frying pan for 8–10 minutes, stirring frequently. Strain off any excess fat and reserve the fat for later use. Use 2 tablespoons of the reserved sausage fat to grease a 10 × 15-inch (25 × 38 cm) baking dish. Spread the chopped cauliflower into the bottom of the dish to form the base of the casserole and evenly cover the cauliflower with the sausage-and-onion mix. Whisk the salt into the eggs and pour the eggs evenly over the sausage and cauliflower. This dish appears to need more eggs, but the egg mixture will rise during baking and the casserole will set properly. Bake the casserole for 50–55 minutes or until completely set and the top is golden. Cut the casserole into 16 evenly sized pieces and serve immediately. Batch Cooking and Leftovers: Double the amount of sausage and onions and freeze half for use in a future casserole. Make It a Meal: Serve with small glass of Beet Kvass with Lemon and top it with Dill Pickle Kraut for a probiotic boost in the morning. vegetable egg scramble with avocado and salsa There's something about a high-fat, high-protein breakfast contrasted with brightly colored mixed vegetables that sets a positive tone for the day. I used two of my favorite vegetables, but you can prepare this dish using whatever vegetables you have in excess at the time. Try kale, zucchini, or leeks for just a few other options. Just be sure to adjust the cooking time since some vegetables take longer to cook. Adding fresh basil or chives is an option for enhancing flavor. 2 tablespoons cooking fat (lard or reserved fat from cooked meats) ½ small red onion, diced ½ red pepper, diced 2 large handfuls spinach, roughly chopped 8 eggs, beaten Salt, to taste Pepper, to taste 8–12 tablespoons Fermented Salsa Fresca 1 avocado, diced Heat the cooking fat in a large frying pan over medium heat and sauté the onion in the fat for about 2 minutes. Add in the red pepper and sauté for another 2 minutes. Add the spinach to the pan and sauté just until it begins to wilt, about 30 seconds. Pour in the eggs, add your desired amount of salt and pepper, and stir gently and frequently until the eggs are cooked through. Divide the egg-and-vegetable mixture among four bowls and top each serving with 2–4 tablespoons of salsa and a quarter of the avocado. Serve immediately. Batch Prepping and Leftovers: Prep the onions, peppers, and spinach ahead of time and store in refrigerator for up to 6 days. Make It a Meal: Serve with Carrot Cake Applesauce Muffins. Step 1. Using a sharp knife, cut the avocado in half by moving the knife around the pit, and then twist the avocado apart. The pit will remain in one half. Step 2. Hold the pit half of the avocado in one hand and use the other hand to swiftly lodge the knife into the center of the pit. Twist the knife to remove the pit and lightly thump the pit off the blade using a hard surface. Step 3. Holding the avocado half in your hand, use a knife to score the avocado flesh into cubes of your desired size. Repeat with the second half. Step 4. Use a large spoon to scoop out the diced avocado. probiotic pork and vegetables This recipe is a nontraditional take on breakfast, yet it's satisfying, quick to reheat in the morning (I allow my five-year-old son to reheat his portion in a pan for cooking practice), and full of nutrient-dense ingredients that will keep you full most of the morning. You can use whatever fresh herbs you have on hand to replace the dried herbs. I often use fresh tarragon, sage, and parsley since I often have an overabundance from my garden during the summer. You could also use 2 pounds (0.9 kg) of any seasonal green in the place of cabbage in this recipe—kale, collards, chard, or napa cabbage. Zucchini or any other seasonal vegetables of your choice can also be subbed for red pepper. There's a lot of flexibility in this recipe! 2 pounds (0.9 kg) ground pork 1 large yellow onion, diced 1 small cabbage (approximately 2 pounds [0.9 kg]), shredded 2 medium zucchinis, halved and sliced 4 cloves garlic, minced 1 tablespoon dried tarragon 1 teaspoon dried basil 2 teaspoons salt Pepper, to taste 2 cups (340 g) Dill Pickle Kraut or raw sauerkraut 2 avocados, diced (optional) Brown the pork in a large frying pan or large pot for approximately 10 minutes. Once browned, strain the pork through a fine-mesh colander over a bowl to collect the excess fat. Set the pork aside. Using the same pan, add 2 tablespoons of the reserved pork fat to the pan and sauté the onion over medium heat for about 2 minutes. Add in the cabbage and cook for an additional 7 minutes, stirring frequently. Add the zucchinis, garlic, tarragon, basil, salt, and pepper and cook 5 minutes more or until the vegetables reach the desired texture. Remove the pan from the heat and stir in the cooked ground pork. Serve each portion immediately topped with ¼ cup (43 g) raw sauerkraut and a quarter of an avocado, if using. Batch Prepping and Leftovers: Double the recipe and store one-fourth in the refrigerator; freeze the other fourths for quick breakfast meals. Make It a Meal: Serve with Plantain Muffins and top with Dill Pickle Kraut. cauliflower hash browns Don't get me wrong, I have nothing against potatoes, but I do love that you can reinvent a classic breakfast dish using a nutrient-dense cruciferous vegetable. These hash browns could double as a breadlike conduit to lay flat on a plate and top with The Tuna Salad Upgrade or as a bun for Herbed Beef Burgers. Just be sure to shape the "bread" accordingly. 1 head cauliflower, approximately 2½ pounds (1.1 kg) 4 eggs 1 tablespoon dried parsley 1 teaspoon garlic powder 1 teaspoon onion powder 3–4 tablespoons cooking fat (reserved bacon grease preferred), divided Salt, to taste Use the grater on a food processor to grate the cauliflower. It can be done by hand, but it's not easy and it takes more time. Combine the grated cauliflower, eggs, parsley, and garlic and onion powders in a large mixing bowl. Mix until everything is evenly distributed. Do not add salt until after the cauliflower hash browns are cooking in the pan, as the salt will pull water out of the raw cauliflower and you'll be left with a soppy mess. Heat a large frying pan on medium heat and evenly coat the pan with 1 tablespoon of the cooking fat. Using a ⅓-cup (80 ml) measuring cup, scoop the cauliflower mix into the pan and press each scoop into a ¾-inch-thick patty using the back of the measuring cup. Lightly sprinkle salt over the patties, cook for 3–4 minutes, flip, salt, and cook for another 3–4 minutes until both sides are golden brown. Repeat until you've used the entire mix. Be sure to add more cooking fat to the pan before adding consecutive rounds of cauliflower hash browns. Serve hash browns immediately. Batch Cooking and Leftovers: To save time (but sacrificing the crunchiness), bake the cauliflower mixture in a 400°F (204°C) oven for 25–30 minutes. If prepping ahead, store grated cauliflower in the fridge for up to 5 days. Make It a Meal: Serve with Probiotic Pork and Vegetables, or use as a base for fried eggs, Perfectly Baked Bacon, and fresh diced tomatoes. eat your greens frittata Frittatas and other egg preparations like the Cauliflower-Sausage Breakfast Casserole are my most frequently prepared breakfast dishes since they can be made in such large quantities and store nicely in the refrigerator for the week. This light frittata is loaded with the flavors of summer with its heavy reliance on tomatoes, basil, and garlic. You can sub in any fresh herbs of your liking including dill, oregano, and fresh chives. Vegetable substitutions can also be made: Try using leftover portions of Simple Spaghetti Squash to line the bottom of the pan before adding the other ingredients. The dish has better flavor and texture when the vegetables are sautéed first, but it's not entirely necessary. 12 eggs 2 tablespoons cooking fat (lard or reserved fat from cooked meats) 1 yellow onion, diced 2 bunches kale, washed and chopped, ribs intact 4 cloves garlic, minced 1 cup (50 g) thinly sliced, loosely packed fresh basil 2 teaspoons sea salt 1 large tomato, halved and thinly sliced Preheat the oven to 350°F (177°C). Whisk the eggs together and set aside. Heat the cooking fat in an oven-safe pan (such as cast iron or stainless steel) on the stovetop over medium heat and sauté the onion in the cooking fat for approximately 3 minutes. Add in the kale and garlic, and sauté for an additional 2 minutes until the kale is slightly wilted. Remove the pan from the heat and mix in the basil and salt. Pour the eggs evenly over the top of the greens, arrange sliced tomatoes on top of the eggs, and bake the frittata for 45–50 minutes or until the top is golden. Allow the frittata to cool for 5–10 minutes before dividing it into eight even pieces. Serve immediately. Batch Prepping and Leftovers: If doubling the recipe, use a greased baking dish, and freeze half for later. Make It a Meal: Serve with sliced avocados or Banana Nut Bread. asparagus and mushroom quiche with almond flour crust I love having the option to prepare a creamy and colorful dish for special-occasion breakfasts or even potlucks. You can also prepare mini quiches in muffin tins, which can be good (albeit more time consuming) for special-occasion brunches. CRUST 2½ cups (240 g) almond flour ¼ teaspoon salt 1 egg, beaten ¼ cup (55 g) melted lard or tallow, more for greasing FILLING 1 tablespoon cooking fat (lard or reserved fat from cooked meats) 1 small onion, diced ½ pound (225 g) baby bella or shiitake mushrooms, sliced 12 ounces (240 g) asparagus, trimmed and cut into 1-inch (2.5 cm) pieces 4 cloves garlic, minced 1 teaspoon salt, divided 6 eggs, beaten 1 can (5.4 ounces [160 ml]) coconut cream 2 teaspoons Dijon mustard 3–4 cherry tomatoes, thinly sliced (optional) CRUST INSTRUCTIONS Preheat the oven to 350°F (177°C). Mix the almond flour and salt together in a medium-sized bowl. Pour the egg and melted lard into the almond flour mixture and stir until the liquid is absorbed and a dough has formed. Place the dough into a well-greased 9-inch (23 cm) pie pan and use your fingers to press the dough evenly into the pan. Using a fork, pierce the bottom of the crust about 10 times, evenly spreading the pierces throughout, and bake the crust for 10 minutes. Prepare the filling while the crust bakes. FILLING INSTRUCTIONS Preheat the cooking fat in a medium-sized pan and sauté the onion in the fat for about 2 minutes. Add the mushrooms and asparagus, and continue to cook for an additional 6 minutes. Add the garlic and ½ teaspoon of the salt, and sauté all ingredients for another 2 minutes. Remove from the heat. Prepare the egg mixture by blending the eggs with the coconut cream, mustard, and remaining ½ teaspoon salt. I use an immersion blender, blending just long enough to combine the eggs with the coconut cream. The coconut cream will not mix into the eggs without blending (a whisk will be useless). Fill the piecrust with the vegetable sauté, spreading the vegetables evenly in the bottom of the crust. Pour the egg mixture over the top. Tomatoes can be arranged on top of the egg mixture, if using. This is primarily for aesthetics. Place the quiche in the oven and bake for 40–45 minutes or until golden and firm in the center. Allow the quiche to cool for about 10 minutes before dividing it into eight servings. Serve immediately. Batch Cooking and Leftovers: Prep the dough and vegetables in advance to save time. Make It a Meal: Serve for a special brunch with Perfectly Baked Bacon, Cauliflower Hash Browns, Pecan Bread, and Infused Water. spaghetti squash porridge This deliciously sweet and creamy breakfast porridge will hit the spot when you want something that resembles a huge bowl of oatmeal. With far fewer carbohydrates and a greater concentration of healthy fats and proteins than a grain porridge, this is a much better choice to start the day off right. You can sub in any sugar-free dried fruit in the place of raisins. Figs, mango, goji berries, or mulberries are great choices, too. You can also add extra goodies like hemp hearts or pumpkin seeds for an even heartier bowl. 1 prepared Simple Spaghetti Squash, flesh removed and roughly chopped 1 can (13.5 ounces [398 ml]) unsweetened full-fat coconut milk ¾ cup (85 g) chopped walnuts ½ cup (85 g) raisins, packed 1 teaspoon cinnamon 1 teaspoon vanilla extract Salt, to taste Combine all ingredients in a medium pot, cover, and bring to a simmer. Turn the heat to low and continue to simmer, uncovered, for 15 minutes, stirring frequently. Try to chop and break up the spaghetti squash as it cooks to form a creamier consistency. Remove the porridge from the heat and serve hot. Batch Cooking and Leftovers: Easy to reheat, and tastes better over time! Prep a day or two before serving, and double it and freeze half for later use. Serve in the same week as Simple Spaghetti Squash and batch prep squashes for both meals. Make It a Meal: Pair with a contrasting savory beverage, Truly Green Smoothie, or add protein with Sage and Rosemary Sausage Patties. AN EVERYDAY BASIC simple spaghetti squash Spaghetti squash is a surprisingly easy and diverse addition to any culinary repertoire... once you learn how to prepare it, that is. Spaghetti squash can be used as an excellent substitute for pasta in a variety of dishes, including "Pasta" Bowls. It can also become a unique breakfast dish, like the Spaghetti Squash Porridge. It's affordable, easy, delicious, and versatile—a real gem among the winter squashes! My family's frequent consumption of spaghetti squash has been made far easier by owning an electric pressure cooker. What takes about 10 minutes in the pressure cooker takes as much as an hour in the oven. I often prepare two squashes at once and use them for different purposes throughout the week. Leftovers can be stored in the refrigerator in a sealed container for up to 7 days or in the freezer in a freezer-safe bag for up to 4 months. You could even choose to prepare as many squashes as will fit in your oven in one bake, remove the flesh from the squashes after cooking, and store each squash in a freezer bag for quick meals in the following months. Freezing Simple Vegan Pesto, Sun-Dried Tomato Tapenade, and Grilled Chicken Breasts with Basil and Thyme will allow you to pull each of these items from the freezer to create Greek-style "Pasta" Bowls, a delicious and complete freezer meal. OVEN INSTRUCTIONS Preheat the oven to 350°F (177°C). Place the entire whole squash on a baking sheet and place it in the oven for 45–60 minutes or until the squash can be easily pierced with a fork. Cooking time depends on the size of the squash. Once the squash has cooled enough to handle, remove the stem from the squash using a large, sharp kitchen knife. Cut the spaghetti squash into two equal halves lengthwise and remove the seeds from the squash using a spoon. Using a fork, scrape out spaghetti-like strands. Note: You can first halve the spaghetti squash, remove the seeds, and place it facedown on a parchment-lined baking sheet to reduce the cooking time by 15 minutes. PRESSURE COOKER INSTRUCTIONS Remove the stem from the squash using a large, sharp kitchen knife. Cut the spaghetti squash into two equal halves lengthwise and remove the seeds from the squash using a spoon. Place the spaghetti squash halves facedown in the pressure cooker on top of the included rack. Add 1 cup (235 ml) of water and cook on high pressure for 6–7 minutes, depending on the size of the squash. Release the steam as soon as it's done and scrape out spaghetti squash as indicated in the oven instructions. Step 1. Allow whole cooked squash to cool enough to handle, then remove end with a sharp knife. Step 2. Cut squash in half lengthwise. Step 3. Use a large spoon to remove seeds. Step 4. Remove flesh with a fork or spoon to create "spaghetti." apple walnut crisp cereal * plus 12–24 hours for soaking The sophisticated crunch of walnuts combined with the delicate sweetness from apples and cinnamon makes this breakfast cereal a win for the whole family. It's easily prepared in advance, helping you breeze through the morning before hustling out the door. I suggest serving this breakfast with Homemade Coconut Milk, but you can use Homemade Almond Milk if you prefer. A combination of whatever nuts you have on hand can be used to replace the walnuts. Try raw pumpkin seeds for a nut-free version. 2½ teaspoons salt, divided 5 cups (1.2 l) water, for soaking 1½ pounds (680 g) whole raw walnuts (about 5½ cups), soaked overnight 4 pounds (1.8 kg) apples (about 10 small apples) 1 tablespoon cinnamon 1 teaspoon lemon zest ½ cup (100 g) coconut oil, melted Homemade Coconut Milk, prepared four times (see Batch Cooking) Dissolve 2 teaspoons of the salt in the water. Combine the salt water and walnuts in a large bowl or glass jar and allow the nuts to soak overnight. Strain and thoroughly rinse the walnuts after soaking. (See Soaking Seeds and Beans, page 14, for more information.) Preheat the oven to 350°F (177°C). Core and dice the apples into ½-inch (1.3 cm) cubes (do not remove peels), and roughly chop the walnuts. Combine the apples, walnuts, cinnamon, lemon zest, and remaining ½ teaspoon of salt in a large mixing bowl. Mix everything until well combined. Pour coconut oil over the apple-walnut mixture and mix until evenly coated. Evenly distribute the apple-walnut mixture onto two parchment paper–lined 12 × 16-inch (30 × 40 cm) baking pans. Bake for 30 minutes, stirring halfway through. Allow the apples and walnuts to completely cool before placing the cereal in airtight containers for storage. Serve the cereal topped with your desired amount of Homemade Coconut Milk. Batch Cooking and Leftovers: Make three or four batches of Coconut Milk to guarantee you'll have enough milk for several meals. Make It a Meal: Serve with a refreshing glass of Infused Water or Hibiscus Zinger Iced Tea. carrot cake applesauce muffins These light yet insanely filling little muffins are densely packed with flavorful ingredients that the whole family will love. I serve these muffins as a breakfast side or a quick snack throughout the week. Make sure to pay attention to rationing since kids will devour these muffins if given the chance. 10 eggs 2 cups (490 g) unsweetened applesauce 1 cup (130 g) coconut flour ½ cup (100 g) melted coconut oil 4 tablespoons cinnamon 2 teaspoons vanilla extract 2 teaspoons baking powder ½ teaspoon salt ¾ cup (75 g) shredded carrots ¾ cup (130 g) raisins ¾ cup (85 g) chopped walnuts Preheat the oven to 400°F (204°C). Whisk the eggs, then add in the applesauce, coconut flour, coconut oil, cinnamon, vanilla, baking powder, and salt. Whisk together all ingredients to form a smooth batter. Using a large spoon, mix in the remaining ingredients. Use a ¼-cup (60 ml) measuring cup to scoop batter into 24 silicon muffin molds or paper-lined muffin pans. Bake the muffins for 18 minutes or until the tops are just barely set. The muffins do not appear to be cooked through, but they'll continue to set as they cool. Muffins are best 24 hours later, which allows time for the flavors to meld, but can be served once completely cool. Batch Cooking and Leftovers: Work in batches if you double this recipe. Make It a Meal: Pull from the freezer to use in packed lunches along with sliced raw vegetables, Turkey Cucumber Rolls, and Fiesta Sunflower Seed Hummus. hearty almond flour bread Hearty Almond Flour Bread is the ultimate food to power up for a day of intense activity. It is densely packed with healthy fats and proteins, the macronutrients that will sustain energy the longest. I use a store-bought blanched almond flour, but you can make your own using a high-powered blender or food processor. Use caution not to overprocess the almonds or you'll end up with almond butter. The high concentration of nuts and nut flours in this bread will go a long way. I eat very small servings at a time to prevent nut overload. 2 cups (190 g) almond flour ¼ cup (25 g) flaxseed meal (or ground flaxseed) 2 tablespoons coconut flour ½ teaspoon sea salt ½ teaspoon baking soda 5 eggs 2 tablespoons coconut oil, melted, divided ¼ cup (28 g) chopped walnuts ¼ cup (35 g) sunflower seeds ¼ cup (35 g) pumpkin seeds Preheat the oven to 350°F (177°C). Combine the almond flour, flaxseed meal, coconut flour, salt, and baking soda and mix together in a medium-sized bowl. Add in the eggs and 1 tablespoon of the coconut oil, and whisk until a batter forms. Work relatively quickly because this batter will thicken as it sits. Stir in the walnuts, sunflower seeds, and pumpkin seeds using a large spoon. Use the remaining coconut oil to grease a 4½ × 8½-inch (10 × 20 cm) bread pan. Place the bread mixture into the pan and smooth it flat using the back of a spoon or spatula. The batter won't pour, so it will need to pressed into the pan to take on the correct shape. Bake the bread for 30–35 minutes or until the top begins to turn golden. Allow the bread to cool for about 5 minutes before removing the loaf from the pan and placing it on a cooling rack. Allow the bread to completely cool before cutting. Batch Cooking and Leftovers: The recipe freezes very well: Double it and freeze half! Make It a Meal: Top a small slice of bread with Garlicky Greens and a fried egg for a delicious, keto-friendly breakfast. plantain sandwich bread You don't have to completely give up sandwiches simply because you've given up on grains! This sandwich bread isn't quite as squishy as Wonder Bread, but it's a big step up from the grain-free store-bought options that taste more like chalk or cardboard than bread, and it holds together well once completely cooled. It's perfect for the occasional sandwich craving or for packed lunches for the kiddos! Try adding in your favorite dried herbs and spices for a more flavorful bread. 6 yellow plantains (no black spots but not green; see A Note about Plantains, page 93, for more info) 8 eggs ½ cup (120 ml) avocado or olive oil, more for greasing ½ cup (65 g) coconut flour 2 teaspoons baking powder 2 teaspoons baking soda 1 teaspoon salt Preheat the oven to 350°F (177°F). Peel and dice the plantains into 2-inch (5 cm) pieces. Place the plantains, eggs, and oil into a blender or food processor and blend until a smooth batter forms. Add the remaining ingredients and blend for another 15–30 seconds, just until evenly mixed. Evenly pour the batter into two well-greased bread pans and bake for 45 minutes or until an inserted fork comes out clean. Allow the bread to cool for about 10 minutes before removing the bread from the pan and placing it on a cooling rack. Allow the bread to completely cool before slicing. Batch Cooking and Leftovers: If you don't eat the bread quickly (within 4 days), halve the recipe and make just one loaf, as it becomes stale and brittle quickly. Make It a Meal: Top with a scoop of The Tuna Salad Upgrade and fresh heirloom tomato slices. plantain tortillas I cannot emphasize enough the excellent quality, texture, and taste of these simple tortillas. Your family will absolutely adore grain-free tacos made from 100 percent whole-food ingredients! Try serving these tortillas to guests along with delicious fillings and sides for a stunning example of how adventurous a restrictive diet can be. 2 plantains (yellowish green, not fully ripe, see A Note about Plantains, page 93), peeled and cut into 2-inch (5 cm) pieces ¼ cup (60 ml) avocado oil 1 egg 1 teaspoon vinegar ½ teaspoon baking soda ½ teaspoon salt Preheat the oven to 425°F (218°C). Blend all ingredients together in a blender or food processor for about 30 seconds to form a batter. You can add 1–2 tablespoons of water if the mixture will not blend, but be reserved with the addition of water. Using a ⅓-cup (80 ml) measuring cup, scoop the batter onto a parchment paper–lined baking sheet, allowing for 6 inches (15 cm) of space between scoops, and about 3 inches (7.5 cm) of space from the edge of the pan. You need to leave enough space for each tortilla to be smoothed into a 5- or 6-inch (12.5–15 cm) round. Using the back of a spoon, smooth each scoop into a flat circle about ¼ inch (6 mm) thick to form the tortillas. Bake the tortillas for 10 minutes. Allow the tortillas to slightly cool before carefully moving them to a serving plate. Batch Cooking and Leftovers: Not great for leftovers, so plan to make these on a day you have the time. Make It a Meal: Taco night! Top the tortillas with Pulled Mojo Chicken or Mexican Shredded Beef with Chimichurri Sauce, Pico de Gallo, and Garlicky Guacamole. Plantain tortillas shown with Pulled Mojo Chicken, Fermented Salsa Fresca, and Garlicky Guacamole. plantain muffins (with pecan bread variation) * or 2 loaves of bread How often do I prepare these muffins? Every week. Why? Because they're that good. Plus I love having a guiltless bread product to pair with breakfasts or serve as a snack for the kids. These muffins are so moist, fluffy, filling, and flavorful. And I love the fact that they're plenty sweet, even without the addition of any sugar. The plantains need to be ripe, which means yellow with some black spots. If the end product isn't sweet enough and is slightly on the dry side, you've used the plantains too early. If it's mushy and doesn't seem to set properly, the plantains were too ripe. You may have to make this recipe a few times to get the hang of it, but it will be well worth the effort! 1 cup (145 g) raw sunflower seeds 1½ tablespoons cinnamon 2 teaspoons baking powder 1 teaspoon baking soda ½ teaspoon salt 4 ripe plantains, peeled and sliced into 2-inch (5 cm) pieces 4 eggs ½ cup (100 g) coconut oil ½ cup (120 ml) water Preheat the oven to 350°F (177°C). Grind the sunflower seeds into a flour using a high-powered blender or food processor. Do not overblend or the seeds will start to turn into a seed butter. If using a high-powered blender, 5–8 seconds of blending should be adequate, but it will take closer to 30 seconds in a food processor or less powerful blender. The flour will have the texture of almond flour. Scrape down the sides and corners after blending to free any lodged flour. Add the remaining ingredients to the blender or food processor in the order listed in the ingredients list and blend just long enough to form a smooth batter. Pour the batter evenly among 24 silicon muffin molds or paper-lined muffin pans, filling the cups about three-quarters full. The exact volume of batter depends on the size of the plantains. If you have excess batter, pour the remainder into additional muffin molds (if available) or into a greased bread pan for a long, flat bread that can be cut into quarters or thirds depending on its size. Bake the muffins for 25 minutes or until firm to the touch. If you have excess batter in a bread pan, this may take an additional 5–10 minutes to cook depending on its size. Allow the muffins to cool for about 5 minutes before transferring them to a cooling rack. For a delicious Pecan Bread variation, add 1½ cups (170 g) chopped pecans and pour the batter into two greased bread pans. Bake the bread for 55 minutes or until completely set. Batch Cooking and Leftovers: For batch cooking: Grind flour for both batches first. Then proceed in two batches (blenders are too small for a double batch). Freeze muffins for quick snacks or packed lunches. Make It a Meal: Serve with Garlicky Greens and diced tomatoes, or fried eggs and Dill Pickle Kraut for a sweet and savory nutritious breakfast. A Note about Plantains Plantains are an inconspicuous grain substitute that can be blended and baked into breads, batters, and cakes. Plantains have a slightly higher starch content than bananas, resulting in a bread product with excellent texture and natural sweetness. I don't suggest eating plantains raw. They should instead be blended and baked; or sliced, slathered in coconut oil, and then baked, fried, or grilled. Bananas can be used in the place of plantains in these muffin, bread, and pancake recipes if you're unable to find this fruit or if you're uncomfortable with using conventionally grown plantains. I see organic plantains on rare occasions (ask your local health food store if this is something they can special order), but organic bananas are often easy to find. To substitute bananas for plantains, replace four plantains with six large bananas, because bananas have a much smaller mass. You can also experiment with adding small amounts of cassava flour to the recipes to help replace any lost starch. This is an unnecessary step that is only recommended for those who like to deviate from recipes and experiment with their own creations. I will say that using plantains yields a superior flavor profile since plantains have less of an actual flavor when compared with bananas, but the bananas work perfectly well. You won't even know the difference if you've never had plantains. Knowing when a plantain is ready to eat can be challenging and requires a bit of practice and patience. Plantains are much like bananas in that they start out green and slowly transition to yellow. As plantains ripen they develop a number of black spots on the peel. A yellow plantain without black spots is not yet fully ripe, as you would expect. Ripe plantains will have some black spots, and they yield a finished bread product with the perfect balance of starch, natural sweetness, and moisture. The starches convert to sugars as the plantains ripen, ultimately reducing the starch content. As this starch is lost, you also start to lose the integrity of the plantain after it's blended and cooked. Overripe plantains have far more sugar content and less starch, so the final bread product is very sweet, mushy, and doesn't hold up well. The bread or pancake will still taste great, but you'll be left with a bread product that feels as if it's saturated with moisture. Using plantains also means that you may have to organize some shopping and cooking around the ripeness of the fruit. If this feels too challenging, simply purchase plantains well in advance and freeze them when they reach their ideal ripeness. The frozen plantains can then be thawed and used in any of these recipes as needed. The same is true for bananas. If your plantains are overripe, simply pair them with underripe bananas or plantains to balance out the starch and sugar content. These instructions may initially appear to be complicated, but I give you my word that learning to use plantains is worth the minimal effort. You can view instructions for how to peel plantains at deeprootedwellness.com/grainfree. plantain blender pancakes Let's be honest, I rarely make pancakes for my family since it requires that I stand at the stove for nearly 30 minutes first thing in the morning. I instead use this recipe on special holidays or weekends when time restraints are nonexistent. These pancakes are so good that they don't require a single topping; they can truly stand alone! Notice that this recipe closely resembles the Plantain Muffins recipe. ½ cup (75 g) raw sunflower seeds 2 teaspoons cinnamon 1 teaspoon baking powder ½ teaspoon baking soda ¼ teaspoon salt 2 ripe plantains (see A Note about Plantains, page 93), peeled and sliced in 2-inch (5 cm) pieces 2 eggs ¼ cup (60 ml) water 1⁄3 cup (65 g) coconut oil, for cooking, divided Grind the sunflower seeds into a flour in a high-powered blender or food processor. Do not overblend or the seeds will start to turn into a seed butter. If using a high-powered blender, 5–8 seconds of blending should be adequate, but it will take closer to 30 seconds in a food processor. The flour will have the texture of almond flour. Scrape down the sides and corners after blending to free any lodged flour. Add the remaining ingredients, except the coconut oil, to the blender or food processor in the order listed and blend just long enough to form a smooth batter. Heat a large frying pan over medium-low heat and add approximately 2 tablespoons of the coconut oil to the pan. Using a ¼-cup (80 ml) measuring cup, pour batter into the pan to form pancakes. You can usually cook four pancakes at a time, but this depends on the size of your pan. Cook each pancake for approximately 3 minutes or until the edges begin to brown, flip, and cook for an additional 2–3 minutes. Continue cooking pancakes, being sure to add 1–2 tablespoons of coconut oil before each consecutive batch to prevent sticking. Serve pancakes with fresh fruit or simply by themselves. Batch Cooking and Leftovers: Freeze pancakes on a waxed paper–lined baking sheet, then transfer after frozen to Ziploc bags. The batter is nearly identical to Plantain Muffins, so do a double batch of batter and make muffins with the other half (see the note on muffin batch prepping on page 93). Make It a Meal: Serve topped with chopped fruit and a side of scrambled eggs or Vegetable Egg Scramble with Avocado and Salsa. banana nut bread This grain-free version of banana nut bread is so delicious (and nutritious) that you'll quickly move on from the sugar-laden version you've grown accustomed to. It's perfectly sweet and has just the right amount of crunch from the walnuts. I often buy bags of overripe bananas when they go on sale and then store them in the freezer for future use as banana bread. Buying walnuts and almond flour in bulk helps make this recipe far more economical. Shown on page 69. 6 overripe bananas 1½ cups (145 g) almond flour 4 eggs ½ cup (120 ml) water ½ cup (100 g) coconut oil, more for greasing 1 tablespoon vanilla extract 2 teaspoons baking powder 1 teaspoon baking soda 1 tablespoon cinnamon 1 teaspoon nutmeg ½ teaspoon salt 1 cup (115 g) chopped walnuts Preheat the oven to 350°F (177°C). Blend all the ingredients except the chopped walnuts in a high-powered blender or food processor until a smooth batter forms. Mix the chopped nuts into the batter and divide the batter between two greased bread pans. Bake the bread for 55 minutes. Allow the bread to cool for about 5 minutes before turning the pans over onto a cooling rack, releasing the bread from the pans where it will remain till completely cool. Batch Cooking and Leftovers: Double the recipe and freeze a few loaves for use at a later date. Make It a Meal: Pack into a lunch box along with Hard-Boiled Eggs and Roasted Non-Starchy Vegetables for a simple yet filling lunch. main courses baked salmon with avocado-mango salsa People are often intimidated when it comes to preparing fish, but there's no reason to shy away from cooking this nutritious protein. My foolproof preparation provides you with an easy main course to flavor with a terrific salsa. I always serve this Baked Salmon with Avocado-Mango Salsa, but you could instead use Chimichurri Sauce, Pico de Gallo, or any other sauce of your choice. No time to make a sauce? Just add a squeeze of lemon and enjoy! Shown on page 97. 1¹⁄₂ pounds (680 g) wild-caught Alaskan salmon, cut into 6 equal fillets 1¹⁄₂ tablespoons cooking oil (avocado or olive oil preferred) Salt, to taste Pepper, to taste Avocado-Mango Salsa Preheat the oven to 425°F (218°C). Evenly coat each salmon fillet with oil and place the fish, skin-side down, on a baking sheet, leaving about 2 inches (5 cm) of space around each fillet. Sprinkle the fish with salt and pepper, and bake for 8–10 minutes or until the salmon appears just ever so slightly rare in the center. The salmon will continue to cook as it cools, yielding a fillet that is cooked through. Reduce your cooking time by about 2 minutes if you like your fish more rare. Allow the salmon to rest for 2 minutes before topping it with salsa and serving immediately. Batch Cooking and Leftovers: Try repurposing it into a salmon salad, much like The Tuna Salad Upgrade. Make It a Meal: Add Coconut Lime Cauliflower Rice or Coconut and Cinnamon Sweet Potato Mash, include a small Everyday Salad for a well-rounded dinner. shrimp and mixed vegetable green curry Serve this delectable shrimp curry over Simple Spaghetti Squash or Coconut Lime Cauliflower Rice and you'll have a meal with some incredible depths of flavor. Your kitchen will be smelling like Thai cuisine fit for a king, and you'll have a family that's excited about eating all of the vegetables hidden among the sweetness of creamy coconut! I use Thai Kitchen brand green curry paste. I'm sure you can find curry paste recipes to make on your own, but this paste does not contain questionable ingredients and it has a long shelf life when stored in the refrigerator after opening. 2 tablespoons coconut oil 1 onion, diced 2 carrots, diced 1 bunch of kale, chopped into bite-sized pieces (ribs intact) 1 red pepper, diced 3 cloves garlic, minced 1 can (13.5 ounces [398 ml]) unsweetened full-fat coconut milk 2 tablespoons Thai Kitchen green curry paste 1¹⁄₂ teaspoons lemon zest 2 tablespoons thinly sliced fresh basil leaves 3⁄4 teaspoon salt 1 pound (455 g) shrimp, peeled and deveined Heat a large frying pan on medium heat, add the coconut oil, and sauté the onion for about 3 minutes. Add the carrots, sauté for an additional 3 minutes, and then add the kale, red pepper, and garlic and sauté for 3 minutes more. Reduce the heat to low, pour in the coconut milk, and add the curry paste, lemon zest, basil, and salt. Stir to dissolve the curry paste into the coconut milk. Bring the coconut-and-vegetable mix to a low simmer, add the shrimp, and simmer for an additional 5 minutes, stirring the shrimp for even cooking. Serve immediately. Make It a Meal: Serve over a Simple Spaghetti Squash or Coconut Lime Cauliflower Rice. shrimp scampi with tomatoes and zoodles This dish was created by chance, but it is definitely one of my finer kitchen "accidents." Finding whole-food recipes that take less than 30 minutes from start to finish can feel like an impossible task, but this healthy version of shrimp scampi fits the bill. Not only is it quick, it's also packed full of deliciously bright flavors that are sure to please most any palate. Zoodles (zucchini noodles) are created using a vegetable spiralizer (countertop versions work the best) or with a julienne peeler if a spiralizer is not available. ¹⁄4 cup (60 ml) cooking oil (avocado or olive oil preferred) 5 cloves garlic, minced ¹⁄₂ cup (120 ml) dry white wine 1 tablespoon lemon juice ¹⁄₂ pound (225 g) Roma tomatoes, diced 2 tablespoons dried parsley 1 teaspoon dried oregano Pinch of red pepper flakes 1 teaspoon salt 1 pound (455 g) shrimp, peeled and deveined 2 medium zucchinis, spiralized (see note above) Heat the cooking oil in a large pan over medium heat and sauté the garlic in the oil for about 2 minutes or until fragrant. Add the white wine, lemon juice, tomatoes, parsley, oregano, red pepper, and salt, and continue to cook for an additional 5 minutes or until the liquid is reduced to a thick sauce. Add in the shrimp and cook for another 2–4 minutes or until the shrimp is solid in color and pink. Remove the scampi from the heat. Cut the zucchini noodles in pieces 4–5 inches (10–12.5 cm) long and stir into the hot scampi. The noodles will lightly steam from the heat. Serve immediately. Make It a Meal: Add bulk by serving over a bed of Simple Spaghetti Squash. A side of Everyday Salad with Red Wine Lemon Vinaigrette rounds out the meal. simple whole roasted chicken A classic whole chicken is always a safe bet when you're looking for an economical crowd pleaser. I find myself relying on whole chickens often since it's difficult to find a local farm that's willing to part with just the chicken breasts or thighs. This simple preparation boasts a perfectly crispy skin covered in just the right amount of herbs and salt. Cooking two whole chickens simultaneously is a great time-saver; in fact, I never cook just one. Use a pan large enough to hold both chickens in order to save space in the oven. You can remove the meat from the cooked chicken and freeze the meat in freezer bags, or you can simply freeze the entire cooked whole chicken. Both of these techniques work great for making less work down the road. If you have enough freezer space, you could even cook six to eight chickens at one time and store them all in the freezer. 1 whole chicken, approximately 4 pounds (1.8 kg) 1¹⁄₂ tablespoons cooking oil (olive or avocado oil preferable) 1 teaspoon garlic powder 1 teaspoon dried sage 1 teaspoon dried thyme 1 teaspoon salt Preheat the oven to 425°F (218°C). Remove the giblets and neck from the chicken cavity, if present. Store these parts in the freezer to use for making stock at a later date. Evenly coat the entire chicken with oil. Mix together the garlic powder, sage, thyme, and salt and evenly sprinkle the mixture over the entire chicken, sprinkling any excess into the chicken cavity. Bake the chicken for 15 minutes and then reduce the heat to 375°F (191°C) and bake for another 45–65 minutes or until the juices run clear. Exact bake time depends on the size of the chicken. In general, it takes about 20 minutes of cooking time per pound of chicken. Allow the chicken to cool for 10 minutes before serving. Batch Cooking and Leftovers: Reserve the chicken carcass and freeze for later use. Use extra chicken in Grilled Chicken Salad with Fresh Vegetables and Chicken and Vegetable Coconut Curry Soup. Make It a Meal: Serve with Grain-Free Gravy, Apple Butternut Soup, and Garlicky Greens. pulled mojo chicken This is one of my family's absolute favorite recipes! Pulled Mojo Chicken scores perfectly in all categories—taste, ease of preparation, versatility, and freezer storage. This brightly flavored chicken can be served in salads, on sandwiches, over Plantain Tortillas, or all of the above. 2¹⁄₂–3 pounds (1.1–1.4 kg) boneless chicken breasts 2–2¹⁄₂ pounds (910 g–1.1 kg) boneless chicken thighs, excess fat trimmed 1 tablespoon onion powder 1 tablespoon garlic powder 2 teaspoons dried oregano 1 teaspoon cumin powder 1 teaspoon salt ¹⁄4 cup (60 ml) lime juice 1 orange, juiced Place the chicken into an electric pressure cooker or into an oven-safe baking dish if you don't own a pressure cooker. Mix together the spices, lime juice, and orange juice, and pour the mixture evenly over the chicken. Secure the pressure cooker lid and cook on high pressure for 30 minutes. Release the pressure when done. If using an oven, cover the dish with aluminum foil and bake the chicken in a preheated oven at 375°F (190°C) for 35 minutes. Use a slotted spoon to transfer the chicken to a large bowl and allow it to rest for about 5 minutes or until it can be handled. Using clean hands or two forks, shred the chicken. Pour a small amount of cooking liquid into the shredded chicken and toss before serving. Serve hot. Batch Cooking and Leftovers: Freeze at least half of this recipe after it has been prepared since it is so big. (Include liquid; it helps to preserve and enhance the flavor of the chicken after it's thawed.) Make It a Meal: Serve with Plantain Tortillas, Garlicky Guacamole, Chimichurri Sauce, and Pico de Gallo for grain-free taco night. grilled chicken breasts with basil and thyme Herbed grilled chicken breasts are a summertime favorite for my family. Grilling outside means that we get to enjoy beautiful weather while also preparing a nutritious and simple meal that's refreshing, light, and easily served or repurposed for multiple meals. I always make an extremely large amount of grilled chicken because it can be easily added to most any meal or repurposed into Chicken Salad with Fresh Vegetables or "Pasta" Bowls. Grilled chicken along with olives and diced avocado are some of my favorite additions to a filling Everyday Salad. Preparing a few sauces in advance (or pulling them from the freezer), such as Sun-Dried Tomato Tapenade, Simple Vegan Pesto, Homemade Mayonnaise, or Fresh Basil and Garlic Balsamic Vinaigrette, makes grilled chicken a versatile addition to most any meal. Simply freeze any leftovers for a quick meal later in the month. Although this recipe calls for 5 pounds (2.3 kg) of chicken, you can prepare even more for freezing. 5 pounds (2.3 kg) boneless chicken breasts (I prefer thinly sliced) 2 tablespoons cooking oil (olive or avocado oil preferred) 1 tablespoon garlic powder 1 tablespoon onion powder 2 teaspoons dried thyme 2 teaspoons dried basil 2 teaspoons salt Preheat the grill to high heat. Evenly coat each chicken breast with oil and place on a large baking sheet in a single layer. Lightly sprinkle the garlic and onion powders, thyme, basil, and salt on one side of the chicken breasts, flip, and repeat. Place the chicken on the grill for 8–12 minutes (8 minutes for thinly sliced breasts, 12 or more for full sized) until the edges are cooked through. Cooking time varies depending on size of the chicken breasts and temperature of the grill. Flip the chicken and cook for another 5–8 minutes (5 minutes for thinly sliced breasts, 8 or more for full sized), or until juices run clear when cut through the thickest part of the meat. Allow the chicken to cool for 5 minutes before serving. Note: Chicken breasts can be prepared in the oven or on the stovetop if you don't have a grill. For the oven, place the entire baking sheet of breasts into a preheated oven at 400°F (204°C) and bake the chicken for 15–20 minutes. If using the stovetop, place the chicken breasts into a large frying pan over medium heat (add 1–2 tablespoons of olive or avocado oil to the pan first). Flip the breasts after about 10 minutes, allowing the other side to cook for an additional 7 minutes. Exact cooking time will vary depending on the size of the breasts. Batch Cooking and Leftovers: For freezing: Spread the individual breasts onto a waxed paper–lined baking sheet, then place the baking sheet into the freezer. Once the breasts are frozen, transfer to a freezer bag for storage. Add Homemade Mayonnaise and some vegetables to create Grilled Chicken Salad with Fresh Vegetables, or use on top of an Everyday Salad or "Pasta" Bowl. Make It a Meal: Serve with Grilled Zucchini and Yellow Squash, Dilly Sweet Potato Salad, and sliced cucumbers. AN EVERYDAY BASIC homemade mayonnaise * If blending by hand, it will take about 15 minutes. You can make mayonnaise by hand—my preferred method—as indicated in the recipe instructions. But be prepared for a lot of whisking. An immersion blender makes this process easier, but it's not necessary and takes a bit of practice to get it right. In fact, I have only been successful preparing mayonnaise by hand. Whatever method you choose, you will be shocked by the perfectly creamy, tangy, and rich consistency of the homemade mayo you make! After the mayo is prepared you can try adding different spice combinations or minced raw garlic for added flavor. You can also use lime in the place of lemon for a fun variation. 1 large egg yolk 1 tablespoon lemon juice 1 tablespoon raw apple cider vinegar ¹⁄₂ teaspoon Dijon mustard ¹⁄₂ teaspoon salt, plus more to taste 3⁄4 cup (175 ml) avocado oil (or olive oil), divided WHISKING BY HAND INSTRUCTIONS Combine the egg yolk, lemon juice, vinegar, mustard, and salt in a medium bowl. Whisk until blended, slightly frothy, and bright yellow, about 30 seconds. Whisking vigorously and constantly, slowly add ¼ cup (60 ml) of the oil to the yolk mixture a few drops at a time, to form an emulsion. This will take about 6 minutes, so be patient. Using a ⅛-teaspoon measuring spoon will help prevent adding too much oil at a time. If you hurry this step, your mayo will not form and your ingredients will be wasted. Gradually add the remaining ½ cup (120 ml) oil in a very slow, thin stream, whisking constantly until the mayonnaise is thick, about 5 minutes (the mayonnaise will be light in color, but the exact color depends on the color of your oil). Mayonnaise is best if chilled about an hour before use, but can be used immediately. IMMERSION BLENDER INSTRUCTIONS I suggest watching a YouTube instructional video before attempting this method. Combine all ingredients in a slender glass or jar in the order listed. Place the immersion blender on the bottom of the glass, start to blend, but do not move the blender from the bottom of the glass until the mixture begins to thicken, about 5–10 seconds. Slowly move the immersion blender up and down in the glass until the remaining oil is combined and you reach your desired consistency, 10–15 seconds. Mayonnaise is best if chilled about an hour before use, but can be used immediately. Batch Cooking and Leftovers: Double the batch if you want to prepare Summer Potato Salad, The Tuna Salad Upgrade, and Simple Egg Salad all in one week, but plan to eat it all that week. Make It a Meal: Use the mayo to prepare Summer Potato Salad to serve alongside Grilled Chicken Breasts with Basil and Thyme and Grilled Zucchini and Yellow Squash. grilled chicken salad with fresh vegetables If your child isn't particularly keen on eating vegetables, this recipe just might change their mind. Rich mayo, herbs from grilled chicken, and lots of fresh vegetables make this a wonderfully nutritious (and diverse) meal for any age group. This recipe is a great way to repurpose leftover chicken into a new meal. The tastiest way to make this salad is by using leftover Grilled Chicken Breasts with Basil and Thyme, but you can use a Simple Whole Roasted Chicken, Pulled Mojo Chicken, or any other leftover chicken you have on hand. You can also substitute any of the vegetables for ones that your family enjoys. Don't have red pepper? Just add extra cucumber and carrot. No celery? Try peas. (Don't forget that fermented vegetables like Dilly Beans or others using the Basic Brine are great options, too!) This is not meant to be a complicated recipe, so just use whatever vegetables your family enjoys. 2¹⁄₂ pounds (4–5 cups [1.1 kg]) Grilled Chicken Breasts with Basil and Thyme, diced 1 red pepper, finely diced 1 medium carrot, grated ¹⁄₂ medium cucumber, finely diced 3 stalks celery, finely diced Homemade Mayonnaise, about 1 cup (115 g) 2 tablespoons Dijon mustard 1 teaspoon onion powder 1 teaspoon garlic powder ¹⁄₂–1 teaspoon salt Pepper, to taste Mix the chicken, red pepper, carrot, cucumber, and celery in a large bowl. In a small bowl, mix together the mayonnaise, mustard, onion powder, garlic powder, salt, and pepper and pour the mayo mixture over the chicken and vegetables. Mix until evenly coated. Batch Cooking and Leftovers: Freeze cubed chicken to assemble the dish in the future, stored with a label stating: "Chicken Salad; add 1 grated carrot, ½ diced cucumber, etc." (see Freezing Meals Before They're Actually Cooked on page 61). Labeling is especially helpful when using for a vacation or weeknight meal. Stores longer than 4 days in the refrigerator if you don't dress it immediately, so wait to dress the salad till you're ready to eat it. Make It a Meal: Serve with Summer Cucumber and Tomato Salad and Roasted Beet and Citrus Salad for a summertime meal that can be largely prepped in advance. turmeric-ginger baked chicken I simply cannot imagine another dish that's so simple to prepare, yet packs so much depth of amazing flavors. There's virtually zero prep work involved, and the chicken cooks itself while you use that valuable time to prep for future meals. If you're like me, you'll quickly add this recipe to your repertoire of "emergency" meals. Start the meal by throwing a Simple Spaghetti Squash into the oven, next prepare the chicken, and finally throw in a tray of Roasted Non-Starchy Vegetables (I'd use broccoli). You'll have a piping-hot meal in about an hour that took minimal effort on your part. Use the baking time to hang with the kids after the school day or prepare a meal for later in the week. Chicken breasts can be used in the place of chicken thighs, but I prefer dark meat for this dish. Garnish the finished dish with fresh cilantro for an even more flavorful meal. 4–5 pounds (1.8–2.3 kg) boneless chicken thighs 1 teaspoon turmeric powder 1 teaspoon ginger powder 1¹⁄₂ teaspoons salt 1 can (13.5 ounces [398 ml]) unsweetened full-fat coconut milk Preheat the oven to 350°F (177°C). Arrange the chicken in a single layer in the bottom of a 10 × 15-inch (25 × 38 cm) baking dish. Evenly sprinkle turmeric, ginger powder, and salt on top of the chicken and pour coconut milk over the top. Bake the chicken for 30 minutes. Allow it to cool for about 5 minutes before serving. Batch Cooking and Leftovers: I often immediately freeze half since the dish yields such a large quantity of food. Freeze the chicken along with some of the sauce in a Ziploc freezer bag. The recipe doubles well. Just divide the end yield into four evenly sized portions—one for eating and three for freezing. Make It a Meal: Serve over spaghetti squash for a largely hands-off meal, or serve over Coconut Lime Cauliflower Rice using the coconut milk as a sauce. Steam or roast some broccoli—follow the recipe in Roasted Non-Starchy Vegetables for a quick and complete meal. OMGrain-free chicken tenders My children (and husband) love these chicken tenders because they're a fun and delicious finger food. But I love them because they're so flippin' easy to make! The delicate undertones of coconut take this classic kid-friendly dish to the next level when it comes to taste and simplicity, and the shredded coconut makes the perfect grain-free breading. When shopping for ingredients, look for chicken tenders that are ready to be breaded. You can also use large chicken breasts (not thinly sliced) and cut the breasts into strips that are about 1½ (3.8 cm) inches thick. If you're looking for a perfectly golden chicken tender, you can transfer the pan to the top rack in the oven and broil the chicken for the last 2 minutes of the cooking time. Be sure to keep an eye on it so the chicken tenders don't burn. I only broil the tenders when I have someone to impress, which is almost never, but it's nice to have the option. Lightly frying the chicken tenders in a few tablespoons of avocado oil or lard on the stovetop is another great option, especially if you'd prefer not to use the oven on a hot day. The result is a healthy version of a classic comfort food. No one will even notice that you didn't use real breading. 3 eggs 1¹⁄₂ cups (170 g) unsweetened shredded coconut 1¹⁄₂ teaspoons salt 2 pounds (910 g) chicken tenders Preheat the oven to 425°F (218°C). Beat the eggs together in a bowl. Set aside. Mix the unsweetened shredded coconut with salt in a wide, shallow bowl. You'll be covering the chicken tenders in this mixture, so it might be easier to use a plate if you don't have a bowl with a wide base. Dip each chicken tender and cover completely in egg, then immediately transfer into the coconut, turning the chicken until it's completely and evenly coated. Transfer the chicken onto a parchment paper–lined baking sheet. Bake the chicken tenders for 10 minutes, flip, and cook for another 7–10 minutes or until cooked through. Batch Cooking and Leftovers: If you want a super-easy weeknight meal component, take an hour to prepare and cook as many chicken tenders in the oven as you can (you'll be limited by pan size and oven space). Cool, then transfer the pans to the freezer, and store the frozen tenders in a Ziploc freezer bag. Reheat just like frozen store-bought chicken tenders: Bake at 425°F (218°C) for 10–12 minutes or until hot. Make It a Meal: Serve with Crispy Sweet Potato Fries and a Summer Cucumber and Tomato Salad for a kid-friendly meal to share with your smallest of dinner guests. herb-encrusted drumsticks Drumsticks are one of the most economical cuts of chicken, especially when you're buying organic. This recipe is packed full of flavor, is inexpensive, and has the added benefit of supplying you with bones to use for Chicken Stock. Use some caution when feeding this dish to kids: This is a particularly flavorful chicken, one that a picky eater may find overwhelming. (For a less adventurous eater, the drumsticks can simply be coated in oil and salt, and then baked as directed.) Removing the meat from the bone before serving can also encourage a picky kid to enjoy what might otherwise feel unfamiliar. ¹⁄4 cup cooking oil (avocado or olive oil preferred) 3 tablespoons garlic powder 3 tablespoons dried parsley 2 tablespoons onion powder 2 tablespoons dried thyme 1¹⁄₂ tablespoons dried sage 1 teaspoon smoked paprika powder ¹⁄4 teaspoon cayenne 1 teaspoon salt 12 chicken drumsticks (about 3 pounds [1.4 kg]) Preheat the oven to 400°F (204°C). Pour the oil into a small bowl and set it aside. Mix the garlic powder, parsley, onion powder, thyme, sage, paprika, cayenne, and salt together in a small bowl and set it aside. Evenly coat a piece of chicken with oil and then dredge the chicken through the herbs and pat the herbs onto the drumstick. Place the chicken onto a baking sheet or large Pyrex baking dish. Repeat this process until all drumsticks have been covered with oil and herbs. Bake the drumsticks for 45 minutes, turning after 25 minutes. Allow the chicken to sit for about 5 minutes before serving. Batch Cooking and Leftovers: Whole cooked drumsticks can be frozen on a parchment paper–lined baking sheet and then stored in a Ziploc freezer bag for later use. If there are leftovers, remove the meat from the bone and use it for Grilled Chicken Salad with Fresh Vegetables, Chicken and Vegetable Coconut Curry Soup, or Chicken Noodle Soup. Always reserve bones for stock. Make It a Meal: Serve with Black Bean and Vegetable Soup. flavorful turkey burgers The secret to a flavorful and moist turkey burger is the addition of egg. The egg makes the meat mixture a bit harder to work with (the burgers do not lend well to grilling), but the result is an amazing burger that is never dry. Add in an array of flavorful herbs and you have the perfect turkey burger. Ground turkey is often one of the most affordable ground meats available, making this an economical, simple, and delicious alternative to beef burgers. 2 pounds (910 g) ground turkey 2 eggs 2 teaspoons garlic powder 2 teaspoons onion powder 2 teaspoons dried basil 1 teaspoon dried sage 3⁄4 teaspoon salt Pepper, to taste 2 tablespoons cooking fat (preferably lard or reserved fats from cooked meats, but cooking oil will also work), divided Combine all the ingredients in a bowl except the cooking fat and use your hands to mix everything together. Form 10 even balls to be formed into patties immediately before cooking. This mixture is harder to work with than ground beef for beef burgers, so it'll take a bit more finesse to create shapely burgers. Preheat a large frying pan on medium-low heat, add 1 tablespoon of cooking fat, shape the preformed balls into patties, and carefully fill the pan with as many burgers as will fit. Cook the burgers for about 10 minutes, flip, and cook for an additional 10 minutes. Repeat this process until all burgers have been cooked, adding more cooking fat to the pan before adding additional burgers. Batch Cooking and Leftovers: Cooked burgers can be frozen for a quick meal, but note they'll be slightly dried out. Another option: Double the recipe and freeze half of the prepared meat mixture to cook at a later date. Make It a Meal: Serve with Crispy Sweet Potato Fries and an Everyday Salad with Italian Dressing. herbed beef burgers When you're not eating burgers on a bun, the need for some herbs becomes apparent. Try wrapping this flavorful American classic with romaine lettuce or Plantain Tortillas for a healthy and filling meal. However, my family most often enjoys these delicious patties on their own, simply dipped in mustard. If you don't own a grill, you can instead panfry the burgers over medium heat. You'll need to increase your cooking time to 2–4 minutes longer than what is indicated for the grill preparation. Be sure to reserve any fat that remains in the pan (see Saving Excess Fat from Cooked Meats, page 71) after cooking. The instructions yield a medium-cooked burger; adjust the cooking time to reflect your own burger preference. 3 pounds (1.4 kg) ground beef 1 tablespoon onion powder 1 tablespoon garlic powder 1 tablespoon dried oregano 2 teaspoons dried rosemary 1⁄8 teaspoon crushed red pepper flakes 1¹⁄₂ teaspoons salt Preheat the grill to high heat. Place all the ingredients into a medium-sized bowl and use your hands to knead the herbs and spices into the meat. Once they are evenly distributed throughout, form 12–14 evenly sized balls and form each ball into a hamburger patty. I like to portion out the balls before forming even one patty to be sure that I've divided the meat correctly. Place each hamburger on the hot grill and cook for 13 minutes, flipping after 7 minutes. Exact cooking time depends on the thickness of the burgers and the temperature of your grill. Transfer the cooked burgers to a plate and serve immediately. Batch Cooking and Leftovers: Prep burgers in advance to make life easier: Double the recipe and freeze as many raw burgers as you'd like. (Remember to put parchment paper or waxed paper between the burgers to prevent them from freezing together.) Burgers can be cooked frozen (increase cooking time by 4–5 minutes), or thawed in the refrigerator overnight. Note: Frozen cooked burgers will be slightly dry after being reheated. Make It a Meal: Serve with Summer Potato Salad and an Everyday Salad with Fresh Basil and Garlic Balsamic Vinaigrette. mexican shredded beef As one who grew up mostly vegetarian I'll be the first to admit that beef roasts posed a particular challenge to me when I was learning to cook meat. Thank goodness for a pressure cooker and some spices, because I'm guaranteed to serve up some restaurant-quality beef shredded into a taco-ready masterpiece! This recipe is a foolproof preparation for moist, fall-off-the-bone, flavorful beef. You can prepare this dish in the oven by placing the beef and all other ingredients into a large baking dish, covering the dish with aluminum foil, and baking it at 275° (135°C) for 4–5 hours. But, as you can see, using an electric pressure cooker produces the same dish in a fraction of the time. 4¹⁄₂–5 pounds (2–2.3 kg) beef roast or stew beef 2 teaspoons garlic powder 2 teaspoons onion powder 1 teaspoon chili powder 1 teaspoon cumin powder ¹⁄₂ teaspoon smoked paprika 1 teaspoon salt 5 cups (1.2 l) Beef Stock or enough to cover the roast Evenly coat both sides of the beef roast with spices and salt, and place it in the bottom of an electric pressure cooker. Pour the stock over the roast and cook the roast on high pressure for 1 hour and 15 minutes. Release the pressure when the cooking time is complete. Remove the beef from the liquid and allow it to cool for 5–10 minutes before pulling the meat apart with two forks. The beef will easily fall apart at this point and can even be shredded by hand (my preferred method) if allowed to cool long enough. Discard any large pieces of fat. Pour a small amount of the cooking liquid back onto the shredded beef for added moisture, and serve hot. Note: For extremely large batches use the oven method, because you're limited by the size of your pressure cooker. Batch Cooking and Leftovers: Reserve the cooking liquid for use in future soups and stews with similar flavor profiles such as Not Quite Your Mama's Chili. (Or freeze the liquid until you're ready to use it.) For freezing, add the desired amount of beef to a freezer-safe container or bag, and cover the beef in cooking liquid to maintain moisture and flavor. Make It a Meal: Serve for taco night with Plantain Tortillas, Chimichurri Sauce, Garlicky Guacamole, Fermented Salsa Fresca, and shredded romaine lettuce. garlic and cumin slow roast with napa cabbage Don't be deterred by the extended cooking time for this dish—the active time is minimal. The dish is largely unattended because it's left in the oven to cook, and it has the added advantage of being a one-pan meal. It's a wonderfully flavorful dish that's perfect for a Saturday at home with the kids. Start the roast, play outside, come in to chop some vegetables, switch out the meat, and voilà, dinner is served! 2¹⁄₂ pounds (1.1 kg) beef roast ¹⁄₂ teaspoon cumin powder ¹⁄₂ teaspoon onion powder 3⁄4 teaspoon salt plus more if needed 1 head garlic 1⁄2 cup (120 ml) apple cider vinegar 1⁄2 cup (120 ml) water 1 onion, sliced 1 small head napa cabbage, shredded 1 red pepper, thinly sliced 3 tablespoons coconut aminos Preheat the oven to 275°F (135°C). Evenly sprinkle both sides of the roast with cumin powder, onion powder, and salt. Heat a large cast-iron or other oven-safe pan over medium-high heat. Place the roast into the pan once it's hot, searing the roast for about 4 minutes on each side. Place the head of garlic on its side and slice through the center, exposing the middle of the cloves. Pour the vinegar and water into the hot pan, add the onion, and place the garlic (clove-side down) into the pan. Place the roast in the oven for 2 hours and 15 minutes. Remove the roast and the garlic from the pan, leaving behind the liquid and onion. Turn the oven up to 450°F (232°C). Place the shredded cabbage, red pepper, and coconut aminos into the hot pan and toss. The pan will likely be very full but the cabbage will cook down. Return the pan to the oven and roast the vegetables for 10 minutes or until the cabbage reaches your desired consistency. Allow the roast to rest while the cabbage cooks. Remove the cabbage-and-red-pepper mixture from the oven, stir, salt to taste, and serve sliced beef over the cabbag- and-red-pepper mix. Batch Cooking and Leftovers: Cook two batches (one to eat and one to freeze), but only if you have two oven-safe pans. If preferred, place the vegetable mixture into the Ziploc freezer bag along with the beef for freezing, which will help to improve the flavor over time. Make It a Meal: For a more filling meal, serve alongside Coconut and Cinnamon Sweet Potato Mash, or make it a roast beef and cabbage sandwich by preparing the Plantain Sandwich Bread. cottage pie * If you are baking the sweet potatoes in the oven, plan on the total cooking time to be 2 hours and 30 minutes. This upgraded, healthier version of the traditional Cottage Pie is a stand-alone meal that most any kid will enjoy. The warmth of mashed sweet potatoes smothering a bed of ground beef and mildly flavored, familiar vegetables makes it a great recipe to try when transitioning the family to a whole-food diet. However, Cottage Pie is not a dish to cook from start to finish in one day. I almost always prepare the sweet potatoes and stuffing and assemble the pie a day or two in advance, cover it with aluminum foil to store in the refrigerator, and bake it another night. I often put it in the oven before my family heads to the gym or soccer practice at 4:00 or 5:00 p.m. and use the Delayed Start feature on my oven so that it cooks while we're away. We come home hungry and dinner is ready to eat! 4 pounds (1.8 kg) sweet potatoes (about 7 large or 12 small) 2 pounds (910 g) ground beef 1 large onion, diced 1 bunch celery, chopped 5 medium carrots, chopped 1 bunch kale, finely chopped 6 cloves garlic, minced 1 pound (455 g) frozen peas 2 teaspoons dried basil 2 teaspoons dried thyme 2 teaspoons dried sage 2 teaspoons salt, divided Place the sweet potatoes into the electric pressure cooker on the steamer rack and add 1 cup (235 ml) water. Cook the potatoes on high pressure for 20 minutes for large potatoes or 15 minutes for small potatoes. Release the steam and remove the potatoes from the pressure cooker to cool. Alternatively, bake the sweet potatoes by placing them in an oven-safe dish covered in aluminum foil in a preheated oven at 400°F (204°C) for about an hour or till the potatoes can be easily pierced with a fork (exact cooking time depends on the size of the potatoes). While the potatoes are cooking, heat a large frying pan over medium heat, place the ground beef into the pan, and break it apart as best you can using a metal spatula. Add in the onion, celery, and carrots and continue to sauté, breaking the ground beef apart, for about 10 minutes. Add in the kale, garlic, peas, basil, thyme, sage, and 1½ teaspoons of the salt, and continue to sauté the beef-and-vegetable mixture for another 5 minutes. The vegetables (or meat, for that matter) don't have to be fully cooked since they'll be baked in the pie. If you're planning to bake the Cottage Pie at this time, preheat the oven to 350°F (177°C); otherwise wait to preheat the oven till you're ready to cook the pie, but continue with the following steps. Evenly spread the vegetable-and-beef mixture into the bottom of an 11 × 15-inch (28 × 38 cm) baking dish. Remove the skins of the sweet potatoes and return the flesh to the pressure cooker insert (dump out the cooking liquid before doing so and give it a quick rinse) or to the baking pan used to cook the sweet potatoes. Thoroughly mash the potatoes using a potato masher, stir in the remaining ½ teaspoon of salt, and evenly spoon the potatoes on top of the meat-and-vegetable mix. Smooth the potatoes flat using the back of a spoon. You can either store the pie in the refrigerator covered in aluminum foil at this point, or bake it uncovered for 1 hour. Allow the Cottage Pie to cool for about 10 minutes before serving. Batch Cooking and Leftovers: The entire dish can be prepared in advance and frozen whole, but I choose not to do this because I only own one pan large enough. I instead double the beef and vegetables recipe, assemble a pie to eat for the week using half, and place the other half into a Ziploc freezer bag to be frozen for use on a later date. Make It a Meal: Serve with an Everyday Salad with Italian Dressing. marinated grilled pork chops Simple marinades provide you with a flavor profile that will have people believing you spent hours in the kitchen, when the reality is that most of that time was hands-off. Take a few minutes to start this dish in the morning and you'll have a delicious protein for that evening's meal. You can start to marinate the pork chops as many as 24 hours before you plan to cook, but marinating past that point will start to change the muscle fibers in the meat, resulting in a stringy pork chop. 4 pork chops ¹⁄₂ cup (120 ml) Chicken Stock or water ¹⁄4 cup (60 ml) coconut aminos ¹⁄4 cup (60 ml) cooking oil (avocado or olive oil preferred) 2 cloves garlic, minced Zest from ¹⁄₂ lemon Salt, to taste Combine the pork chops and all the ingredients except the salt in a shallow container with a lid or Ziploc bag. Be sure that the meat is submerged in the liquid, and store it in the refrigerator for 2–24 hours to marinate. Preheat the grill to medium-high heat, salt the pork chops, and place them on the grill once it's hot. Alternatively, you can panfry the pork chops in 2 tablespoons of cooking oil over medium heat. Cook each side for 4–6 minutes or until the center is no longer pink. Exact cooking time depends on the thickness of the chops. Allow the pork chops to rest for about 4 minutes, then serve immediately. Batch Cooking and Leftovers: Best served immediately. If you want to eat pork chops for more than one meal in a week, double the marinade recipe and store it in the refrigerator until you're ready to marinate the meat (start marinating up to 24 hours in advance). You could even reuse the same marinade as long as an adequate amount remains. Make It a Meal: Serve with Grain-Free Tabbouleh and Coconut and Cinnamon Sweet Potato Mash. vegetable sides and salads summer cucumber and tomato salad Mid-July marks the season to start preparing this summery salad on a regular basis. Fresh cucumbers and tomatoes from your home garden or local farmers market put any store-bought vegetable to shame. Using fresh ingredients is key in preparing simple yet delicious and satisfying salads. The crunch of watery cucumbers, the satisfaction of heirloom tomatoes, and the sweetness of fresh basil and balsamic are the perfect combination to serve on a hot, humid day. The speed at which this recipe can be prepared will have you coming back for more time and again! 1 pound (455 g) small cucumbers (about 5) 1 pound (455 g) mixed heirloom tomatoes (about 2 large or 8 small) 1 clove garlic, minced ¹⁄4 cup (60 ml) Fresh Basil and Garlic Balsamic Vinaigrette Salt, to taste Dice the cucumbers and tomatoes into bite-sized pieces and toss together with garlic, dressing, and salt (if desired). Serve immediately. Batch Prepping and Leftovers: Chop vegetables as early as 4 days in advance, but reserve dressing for when you plan to serve the salad. Only dress the portion of salad that will be eaten immediately. The salt in the dressing causes the tomatoes and cucumbers to lose their juices and the salad will become extremely watery over time. Make It a Meal: Serve with grilled or boiled corn on the cob (see But Isn't Corn a Grain?, page 158) and Grilled Chicken Salad with Fresh Vegetables for a seasonal, light meal on a hot summer day. grilled zucchini and yellow squash * more for marinating (optional) This simple yet satisfying dish is one that I love especially during the summer when I have an abundance of zucchini in the garden. Marinating these gems with some coconut aminos and simple spices yields a quick, simple dish that most kids will love. Better yet, get the kids involved and let them practice their knife and measuring work! Be sure to buy organic versions of these vegetables, since conventionally grown zucchinis can be genetically modified (GM). 1 pound (455 g) zucchinis (about 3 medium zucchinis) 1 pound (455 g) yellow squash (about 4 small squash) 3 tablespoons coconut aminos 2 tablespoons cooking oil 2 teaspoons garlic powder 2 teaspoons onion powder Salt, to taste Preheat the grill to high heat. If no grill is available, prepare the recipe as follows, but bake the zucchinis and squash in a preheated oven at 425°F (218°C) for 15 minutes. Cut the zucchinis and squash into lengthwise quarters or halves (depending on size) and place them in a bag or large mixing bowl (do this directly on the pan you plan to place in the oven if using the baking method). Mix together the coconut aminos, cooking oil, garlic powder, and onion powder in a small bowl and pour the marinade over the top of the zucchinis and squash. Toss until all vegetables are evenly coated. You can allow this to marinate in the refrigerator for up to 6 hours or place the vegetables on the grill (or into the oven) immediately. If quartered, cook zucchini and squash for 3 minutes on each of their 3 sides (9 minutes total). If halved, cook each side for 5 minutes (10 minutes total). Remove the vegetables from the grill and salt to taste. Serve immediately. Batch Cooking and Leftovers: Reduce your cooking load later in the week by chopping and adding leftovers to a Summer Cucumber and Tomato Salad or an Everyday Salad. The vegetables can be chopped and the marinade can be mixed as much as 5 days in advance. (Store the two components separately until you're ready to start marinating.) Make It a Meal: Serve with Grilled Chicken Breasts with Basil and Thyme, Grain-Free Tabbouleh, and a pitcher of Hibiscus Zinger Iced Tea for a colorful and delicious meal. AN EVERYDAY BASIC everyday salad Making a large salad every week should become a habit, especially in the summer. This assures you have a quick, nutritious side to complete your meal plan for the week. You can use whatever ingredients you like, but don't skimp and don't make it boring! Salads taste best when created with varying greens, uniquely flavored vegetables, healthy fats, and delicious proteins. A correctly built salad has lively visual appeal, can easily stand alone as a filling meal, and doesn't leave you feeling hungry an hour later. Start by making a "base" salad of greens and vegetables, one large enough to last for an entire week (large enough to serve 20 people!). Add in varying proteins, fats, and dressings at different meals to mix and match, which prevents boredom from repetitive combinations. GREENS (CHOOSE 1 OR MORE) Arugula Baby bok choy Baby kale Baby leaf lettuce Dandelion leaves (use sparingly) Green leaf lettuce Micro greens Mixed greens Napa cabbage Romaine Spinach Watercress VEGETABLES (BETTER WITH MORE VARIETY) Artichoke hearts, sliced Banana peppers Beets (cooked), peeled and sliced or diced Beets (raw), grated or very thinly sliced Bell peppers, slice or diced Broccoli (cooked or raw), diced Carrots, grated or very thinly sliced Cucumbers, sliced Fermented vegetables Onion (red, yellow, white, or green), thinly sliced Purple cabbage, shredded Radishes, grated or thinly sliced Sauerkraut Sprouts Tomatoes, diced FRESH HERBS (CHOOSE 1 OR MORE) Basil Chives Dill Fennel leaves Onion tops Parsley Sage Thyme PROTEINS (CHOOSE 1–3) Bacon pieces Beans Bean sprouts Chicken, tuna, or egg salad Eggs (hard-boiled, fried, or scrambled) Fiesta Sunflower Seed Hummus Grilled meats Hummus Leftover meats Nuts Sardines Seeds HEALTHY FATS (CHOOSE 1 OR MORE) Avocados or Garlicky Guacamole Nuts Olives Olive or avocado oil Seeds DRESSINGS Chimichurri Sauce Fresh Basil and Garlic Balsamic Vinaigrette Italian Dressing Pico de Gallo Raw apple cider vinegar and olive oil Red Wine Lemon Vinaigrette Sun-Dried Tomato Tapenade Tahini-Miso Sauce Batch Cooking and Leftovers: A large salad will last for about 6–7 days in the refrigerator. Do not dress the entire salad! The dressing should be stored separately, and you should only dress the portion of salad that is placed on your plate at each meal. I prepare the entire salad in one sitting, placing the washed and chopped greens in the bottom of a large stainless steel bowl with the other chopped vegetables layered on top. I then place a large dinner plate on top of the bowl and store the salad in the center rack of the refrigerator (my vegetables will start to freeze if I store it on the top shelf). A large food storage container can be used instead, but I don't own one large enough to accommodate such a large salad. I have found that Saran Wrap is unnecessary; the salad stays fresh enough by simply using a plate as a lid. Make It a Meal: Serve repeatedly as a side dish for varying meals, but it can easily stand alone when topped with The Tuna Salad Upgrade, Fresh Basil and Garlic Balsamic Vinaigrette, sliced olives, roasted sunflower seeds, and diced avocado. Salads can contain any number of ingredients including dandelion or wild plantain leaves, micro greens, edible flowers, or fresh herbs. roasted non-starchy vegetables Roasting is one of the easiest and tastiest vegetable preparations. This is a general recipe—you can plug in most any vegetable or combination of vegetables to create a quick and easy side that most kids will enjoy. Some of my family favorites include roasted multicolored green beans from the garden, red peppers with zucchini chunks, and broccoli with carrots. Try whatever's seasonal or on sale! Shown on page 121. 2 pounds (910 g) non-starchy vegetables 3–4 tablespoons cooking oil (avocado or olive oil) or melted cooking fat (bacon grease is preferable) 1 teaspoon garlic powder 1 teaspoon onion powder Salt, to taste Preheat the oven to 450°F (232°C). Cut vegetables as desired. For example, cut broccoli into bite-sized florets, carrots into ½-inch (1.3 cm) slices, peppers into long strips, or leave vegetables like green beans and asparagus whole. Pile the vegetables onto a parchment paper–lined 12 × 16-inch (30 × 40 cm) baking sheet. Evenly pour oil or cooking fat over the top, and toss the vegetables until evenly coated. Spread the vegetables into a single layer and evenly sprinkle garlic and onion powder on top. Bake for 20–25 minutes, stirring halfway through. Exact cooking time varies depending on the vegetable and how that vegetable was cut. Remove the pan from the oven and evenly sprinkle your desired amount of salt on top of the vegetables. Toss and serve immediately. Batch Cooking and Leftovers: Prep in advance by cutting the vegetables and storing them in the refrigerator for up to 5 days. If you don't like leftover roasted vegetables, bake only the amount of vegetables you plan to eat for that meal and reserve the rest for a second meal another night. Make It a Meal: Serve with Roasted Beet and Citrus Salad and Marinated Grilled Pork Chops. garlicky greens Garlicky Greens is a flavorful way to enjoy most any green. You can substitute an onion for the leek, and you can use any greens in the place of collards. Collards take longer to cook than most other greens, so you'll have to reduce your cooking time if using kale, chard, bok choy, or another green. For a more enhanced flavor, try topping the greens with your favorite sauce or dressing (see Sauces, Dips, and Dressings, page 193). Excess cooked greens can be easily frozen for future meals. 2 tablespoons cooking fat 4 small bunches of collards, chopped, ribs intact 1 leek, cleaned and chopped 1⁄3 cup (80 ml) Chicken Stock or water 4 cloves garlic, minced 1 teaspoon salt, or to taste Melt the cooking fat in a large skillet or frying pan on medium heat. Add in the collards, leek, and stock, and sauté the mixture for about 15 minutes, stirring frequently. Add in the garlic and sauté for another 5 minutes or until the greens reach your desired texture. Remove the greens from the heat, mix in the salt, and serve. Batch Cooking and Leftovers: I often double this recipe since it's so easy to store in the freezer, but you'll be limited by the size of your pot. Greens will not expand in the freezer, so I store leftovers in freezer-safe glass jars. Make It a Meal: Use as a base for fried eggs, diced fresh tomatoes, Fermented Salsa Fresca, and diced avocados for an easy breakfast dish that takes very little time to prepare and is packed full of nutrition! grain-free tabbouleh Parsley, lemon, and garlic are the stars of the show when it comes to tabbouleh. Although the traditional recipe is made with bulgur wheat, you honestly don't need any grains when cauliflower acts as the perfect accompaniment. This flavorful, densely nutritious, low-carb, and brightly colored dish is the perfect side for most any protein. I use an English cucumber for this dish, which is a large cucumber, 12–14 inches (30–35 cm) in length. English cucumbers are my preferred store-bought cucumber since they are usually wrapped tightly in plastic and the peel has not been coated in a waxy substance like most other store-bought cucumbers. You can sub in three medium cucumbers if you have access to local, fresh ingredients. Also notice that the dish uses half of a head of cauliflower. Plan to prepare Cauliflower Hash Browns or Coconut Lime Cauliflower Rice in the same week to use up any leftovers. You can buy bagged, riced cauliflower at most grocery stores or make it yourself by roughly chopping a head of cauliflower and running it through the grater on your food processor. Rice all of your cauliflower for the week in one sitting and store excess in the refrigerator until it's ready to be used. 3–3¹⁄₂ cups (320–375 g) riced cauliflower, about ¹⁄₂ head 1 bunch parsley, chopped 1 large tomato, diced 1 English cucumber, diced (see note above) 1⁄3 cup (42 g) minced red onion, about ¹⁄₂ small onion 2 cloves garlic, minced ¹⁄4 cup (60 ml) olive oil 1 lemon, juiced 1¹⁄₂ teaspoons salt Rice the raw cauliflower using the grater on a food processor, or you can buy bags of riced cauliflower at many grocery stores. Combine all the ingredients in a large bowl and mix. Serve immediately. Batch Cooking and Leftovers: This dish holds up better than you would guess, but it quickly deteriorates after day 4. You can rice your cauliflower and chop the vegetables up to 4 days in advance, storing these in the refrigerator in airtight containers or bags. Simply wait to dress the tabbouleh until you're ready to eat it. Make It a Meal: Serve with Herbed Beef Burgers and Coconut and Cinnamon Sweet Potato Mash. roasted brussels sprouts with bacon Your holiday guests will love the combination of toasty bacon, fragrant onions, and perfectly caramelized brussels sprouts—it doesn't get any better than that! This is a great dish for introducing brussels sprouts to the kids. If you happen to forget to pull the bacon from the freezer, don't worry: You can chop frozen bacon, though it will require a sharp knife and a bit of muscle. 2 pounds (910 g) brussels sprouts, trimmed and halved (about 7 cups) 1 large onion, thinly sliced 2 cloves garlic, minced 12 ounces (340 g) bacon Preheat the oven to 425°F (218°C). Place the brussels sprouts, onion, and garlic in a heaping pile on a 12 × 16-inch (30 × 40 cm) parchment paper–lined baking sheet. Slice the bacon into 1 × 1-inch (2.5 × 2.5 cm) pieces by leaving the bacon in its original stack (straight from the package) and slicing every inch. Break the bacon apart as best you can until single pieces are formed. You don't have to spend too much time on this step since the bacon will break apart more as it's cooked and stirred. Place the bacon pieces onto the brussels, onions, and garlic, and mix everything together. Spread the mixture into a single layer and bake for 40 minutes, stirring every 10 minutes. (This is especially important since it helps to coat the brussels sprouts and onions in bacon grease for even cooking.) Serve immediately. Batch Cooking and Leftovers: Prep all ingredients in advance and store together in a Ziploc bag in the refrigerator until you're ready to prepare the dish. Make It a Meal: Serve as a delicious side to accompany a Simple Whole Roasted Chicken, Grain-Free Gravy, and Red and Yellow Rosemary Potatoes. coconut lime cauliflower rice Missing white rice will be a thing of the past once you try this replacement that has far fewer carbs and much better flavor. The richness of coconut is perfectly complemented with tangy lime and cilantro. Cauliflower rice can easily become a main dish by simply adding leftover cooked chicken, beef, shrimp, or any other protein of your choice. For more information on how to rice cauliflower, see Grain-Free Tabbouleh, page 128. 2 tablespoons coconut oil 1 medium onion, diced 1 red pepper, diced 1 medium head cauliflower, riced 1 can (5.4 ounces [160 ml]) unsweetened coconut cream Juice from 1 lime ¹⁄₂ bunch cilantro, minced 2 teaspoons salt, more to taste Preheat a large frying pan over medium heat. Add the coconut oil and sauté the onion for about 5 minutes, stirring frequently. Add the red pepper and sauté for another 3 minutes. Pour in the cauliflower and stir frequently for about 2–3 minutes, just until the cauliflower starts to change color. You don't want the cauliflower to become mushy or you'll lose the rice texture. Pour in the can of coconut cream and mix the rice until the cream appears to be absorbed, about 2 minutes. Remove the pan from the heat and stir in the lime, cilantro, and salt. Serve immediately. Batch Cooking and Leftovers: You can rice the cauliflower and chop the vegetables up to 4 days in advance and store in the refrigerator. Simply wait to cook the rice until you're ready to eat it. Make It a Meal: Serve topped with Shrimp and Mixed Vegetable Green Curry. roasted cabbage wedges with tahini-miso sauce Roasted cabbage wedges are a striking dish that can act as an excellent conduit for your favorite dressing or sauce. I just so happen to love cabbage wedges with a thick and creamy Tahini-Miso Sauce, but the flavor possibilities are endless (see Sauces, Dips, and Dressings, page 193, for some options)! I use green cabbage, but red cabbage makes an excellent substitute, especially if you're trying to add vibrant color to a meal. Red cabbage has a sweeter, stronger flavor with a slightly tougher leaf, but the two can be used interchangeably here. You could even use both for a decorative effect. 1 head cabbage (about 3 pounds [1.4 kg]) 2 tablespoons cooking oil (avocado or olive oil preferred) ¹⁄4 teaspoon coriander powder Tahini-Miso Sauce Preheat the oven to 425°F (218°C). Cut the cabbage into 10 wedges by placing it on a cutting board with the core facing up. Slice straight through the cabbage on one side of the core to remove approximately one half of the cabbage. This half can be cut into four wedges. Continue removing wedges from the cabbage by cutting around the core and being careful to keep the cabbage wedges intact. See Dill Pickle Kraut (page 242) for a visual demonstration. Place the wedges on a parchment paper–lined baking sheet and brush them with cooking oil. Turn the wedges over and repeat. Evenly sprinkle coriander over the wedges and bake for 25 minutes or until the edges are browned. Serve cabbage wedges topped with Tahini-Miso Sauce or any dressing of your choice. Batch Cooking and Leftovers: Cabbage wedges don't store particularly well. These become limp and lifeless in the refrigerator, and no one in my family is excited to eat them as leftovers. Better to cook only the desired amount, and then refrigerate the rest for a quick side dish later in the week. Make It a Meal: Serve with Flavorful Turkey Burgers and Crispy Sweet Potato Fries. bok choy and red peppers with thai peanut sauce I'm always looking for ways to use new and diverse greens such as bok choy—a wonderfully mild and crisp green that's most familiar as an ingredient in Asian-flavored vegetable preparations. Use the entire leaf, including the thick stem, for a mix of flavor, texture, and color. I love how the sweetness from the red peppers, carrots, and onions is accented by the creamy goodness of a delicious peanut sauce. Try serving these flavorful vegetables along with OMGrain-Free Chicken Tenders for a delightfully sweet and fragrant small meal. 2 tablespoons coconut oil 1 medium onion, halved and thinly sliced 2 medium carrots, thinly sliced in rounds 1 bunch bok choy, chopped 2 red peppers, thinly sliced in long strips 4 cloves garlic 1 teaspoon salt Thai Peanut Sauce Heat the coconut oil in a large pan over high heat. Add in the onion and carrots, and sauté the mixture for about 5 minutes. Add in the bok choy, red peppers, garlic, and salt, and continue to sauté for another 7 minutes. Prepare the Thai Peanut Sauce while the vegetables cook. You can either pour the sauce over the top of the vegetables and toss the mixture until the vegetables are evenly coated, or serve the sauce on the side. Serve immediately. Batch Cooking and Leftovers: Prepare in advance by chopping and bagging the vegetables and then storing them in the refrigerator until you're ready to cook. The Thai Peanut Sauce recipe can be doubled and frozen for use at a later date. Make It a Meal: Serve over a bed of Simple Spaghetti Squash with leftover Simple Whole Roasted Chicken. massaged kale salad with lentils I just love a good, hearty kale salad! This dish is sure to leave your taste buds feeling satisfied from all of the flavorful, crunchy, and creamy ingredients. Meanwhile, your belly will be in a state of nutritional bliss! Try preparing this salad in advance as a quick yet substantial lunch for busy workdays. Kale is one of the simplest greens to grow, and like most cruciferous vegetables it offers a variety of unique health benefits. Crucifers boast high concentrations of calcium and have a cancer-fighting quality that is only reaped when the vegetable is eaten raw and chewed well. Enzymes that exist within the cell walls are released during mastication, which initiates a reaction that yields a cancer-fighting compound. Blending crucifers into smoothies is one way to achieve this benefit, as is massaging it to disrupt the cell walls. SALAD 1 cup (210 g) dried French lentils 3 cups (710 ml) water or stock 1 bunch kale, stems removed and torn into bite-sized pieces ¹⁄₂ small red onion, finely diced 1 can (14 ounces [400 g]) hearts of palm (or artichoke hearts), thinly sliced 1 avocado, diced 1 pint grape tomatoes, diced ¹⁄₂ bunch parsley, minced 4 hard-boiled eggs, sliced DRESSING 3 tablespoons red wine vinegar 2¹⁄₂ tablespoons olive oil 1 clove garlic, minced 1 tablespoon lemon juice 2 teaspoons Dijon mustard ¹⁄4 teaspoon cumin powder 1⁄8 teaspoon dried oregano ¹⁄₂ teaspoon sea salt Pepper, to taste Combine the lentils and water in a small pot, bring the water to a boil, cover the pot, and simmer for 40 minutes or until the lentils are cooked. Prepare the dressing and salad while the lentils cook. Combine all dressing ingredients in a small jar with a tight lid, shake vigorously, and set aside. Place the kale into a large mixing bowl, pour half of the dressing over the kale, and massage with your hands for approximately 2 minutes or until the kale becomes soft and wilted. Once the lentils have finished cooking, drain and rinse them with cool water until they reach room temperature. Combine the kale, lentils, red onion, hearts of palm, avocado, tomatoes, parsley, and eggs in a large bowl, pour the remaining dressing on top, and toss. Serve immediately. Batch Cooking and Leftovers: Prepare the kale, chopped vegetables, lentils, eggs, and salad dressing separately up to 4 days in advance for extremely quick meal assembly on a busy weeknight. You could prepare a double batch of lentils and freeze the excess to prepare this salad again in the future, but be sure to label your freezer bag. If you want to serve this salad over the course of 3–4 days as a lunch, leave out the egg and avocado and add when serving. Make It a Meal: Serve with Coconut and Cinnamon Sweet Potato Mash and a warm cup of Winter Immunity Tea for a hearty wintertime salad meal. coconut and cinnamon sweet potato mash * If you are baking the sweet potatoes in the oven, plan on the total cooking time to be 1 hour and 10 minutes. Who wants the diabetic coma that follows the consumption of marshmallow-covered sweet potato casserole so often found at the Thanksgiving buffet when you can just add coconut oil and cinnamon to achieve a sweet yet nutritious and guiltless side? This fragrant and flavorful dish is good enough to serve for special occasions, yet it's simple enough for any old weeknight. I have even been known to use mashed sweet potatoes as a breakfast food to serve with Probiotic Pork and Vegetables. Although this may seem like a large amount of sweet potatoes, the final product is less than you would expect because you lose quite a bit of mass when you peel the cooked potatoes. I therefore almost always double (or even triple) this recipe, especially since it can be easily paired with so many other dishes. 3 pounds (1.4 kg) sweet potatoes, about 5 large or 9 small 1 cup water (for pressure cooker method) ¹⁄4 cup (50 g) coconut oil ¹⁄4 teaspoon cinnamon powder ¹⁄4 teaspoon salt If using an electric pressure cooker, place the sweet potatoes on the rack, add water, and cook on high pressure for 20 minutes. Release the steam when done. If using an oven, preheat the oven to 400°F (204°C). Place the sweet potatoes in a baking dish covered with tinfoil and bake for 50–60 minutes or until soft. Carefully peel the sweet potatoes, discard the peels, and place the remaining flesh in a large bowl or pot (you can also use the baking dish or pressure cooker insert to cut down on dirty dishes). Add the remaining ingredients and mash the sweet potatoes using a potato masher until they are creamy. Serve immediately. Batch Cooking and Leftovers: Leftovers work well alongside Grilled Chicken Breasts with Basil and Thyme. Use this recipe as a base for Garlicky Greens and your protein of choice, or even make it as a side dish for breakfasts like Probiotic Pork and Vegetables. Make It a Meal: Serve as a simple breakfast with two fried eggs and a couple of pieces of Perfectly Baked Bacon. red and yellow rosemary potatoes Roasted potatoes are an easy and inexpensive side to pair with most any protein. I prefer the creaminess of yellow potatoes, but I most often mix in some red potatoes to make this an especially colorful dish. Choose whichever variety you'd prefer, but try to find organic potatoes if your budget allows since potatoes are listed as one of the Dirty Dozen (see Is Organic Really Better?, page 51, for more information). The recipe calls for dried rosemary, but you could instead use a couple of sprigs of fresh rosemary from the garden. Add the fresh rosemary halfway through the bake time to prevent burning. Be sure to toss it well with the potatoes and oil. 4 pounds (1.8 kg) red and yellow potatoes, about 15 small potatoes (any combination of the two) 1 large onion, thinly sliced 4 cloves garlic, minced 1 tablespoon dried rosemary 4 tablespoons cooking oil (avocado or olive oil) Salt, to taste Preheat the oven to 425°F (218°C). Dice the potatoes into 1-inch (2.5 cm) cubes and heap them into a pile on a parchment paper–lined baking sheet along with the onion, garlic, and rosemary. Pour the oil evenly over the top of the potatoes and use your hands to mix until all ingredients are evenly coated. Spread the potato mix into a single layer. Place the potatoes in the oven and bake for 45–55 minutes, stirring halfway through (add your fresh rosemary at this time, if applicable). Evenly sprinkle the potatoes with salt and toss to combine. Serve immediately. Batch Cooking and Leftovers: Best eaten fresh, but for leftovers reheat on the stovetop or in the oven for optimal flavor and texture. With that said, my kids don't seem to mind these reheated in the microwave. The potatoes and onion can be chopped, bagged, and refrigerated up to 5 days in advance. You can freeze this dish as indicated in Batch Cooking and Leftovers for the Roasted Roots, page 139. The only difference is that you'll reheat the rosemary potatoes at 425°F (218°C) rather than 450°F (232°C). Make It a Meal: Serve alongside the Eat Your Greens Frittata for a made-ahead, hearty breakfast option. roasted roots When a chill is in the air it's time to pack the oven with some gorgeous fall-flavored vegetables that, fortunately, are readily available at your local farmers market. What better way to celebrate a colorful leaf display than with a local, colorful dish to match? Roasting root vegetables brings out their natural sweetness in a way that doesn't even require the addition of spices. Some great root vegetable choices include sweet potatoes, parsnips, carrots, beets, turnips, onions, and even leeks. Pick just one or two of the vegetables, or create a medley using whichever are in season. 4 pounds (1.8 kg) mixed root vegetables 3 tablespoons cooking oil (avocado or olive oil preferred) 1⁄8 teaspoon salt, more to taste Preheat the oven to 450°F (232°C). Dice the vegetables to match cooking times. For example, beets take slightly longer to cook than carrots, so I cut the carrots into larger pieces than the beets. Pile the diced roots onto a parchment paper–lined baking sheet, drizzle the oil over the top, and toss until all vegetables are evenly coated. Spread them into a single layer and bake for 45–55 minutes, stirring halfway through. Exact cooking time depends on the vegetables and size of your pieces. Sprinkle salt over the top of the vegetables and lightly toss. Serve immediately. Batch Cooking and Leftovers: The vegetables can be chopped, bagged, and refrigerated up to 5 days in advance to make preparation easier when you're ready to cook the dish. If time allows, reheat in the oven or a toaster oven to yield a better texture, but the stovetop or microwave will also work. If prepping for later use, remove the portion you want to freeze 10 minutes before it has finished cooking. Freeze your desired portion on a parchment paper–lined baking sheet and then transfer the vegetables to a freezer bag for long-term storage. Make It a Meal: Pair with frozen OMGrain-Free Chicken Tenders for an instant freezer meal, or serve with Creamy Cauliflower Soup topped with bacon bits made from Perfectly Baked Bacon. (Best to use leftover bacon, as the oven temperature for the bacon and vegetables is very different.) crispy sweet potato fries You may have to prepare these fries a few times before you find your ideal cooking temperature, but this recipe is so worth it! My kids love sweet potato fries, and this quick and nutritious side takes minimal attention once the fries are cooking. I often chop enough fries for the week in one sitting, and then simply cook them when needed. When I'm finished using the lard, I leave it in the pan to use again and again until it's gone. You can make this recipe using unrefined coconut oil, but you have to reduce the heat since unrefined coconut oil has a lower smoke point than lard. (Refined coconut oil has a higher smoke point than unrefined, but you'll want to buy a brand like Nutiva that uses a steam-processing method for refining.) The fries will take closer to 30 minutes to cook when using unrefined coconut oil and they're not quite as crunchy, but they're still delicious. You can also sub in parsnips or carrots if you want to try using a different vegetable. 2 pounds (910 g) sweet potatoes, about 3 large or 5 small 1 cup (220 g) Homemade Lard or Tallow Salt, to taste Cut one slice, approximately ¼ inch (6 mm) thick, from the long side of the sweet potato, creating a flat side. Place the sweet potatoes flat-side down onto the cutting board to prevent them from rolling and continue cutting the potato into ¼-inch-thick slices. Next, cut each slice into ¼-inch-thick fries. Preheat the lard to medium heat in a large frying pan. Once melted, the lard should be approximately ¼ inch (6 mm) deep. More or less is okay; it doesn't have to be exact, since you'll be stirring the fries. It's best to start preheating the lard when you're about halfway done cutting the fries. Drop the fries into the hot lard and stir frequently, about every 3 minutes, until the fries are beginning to brown and appear crispy, about 25 minutes total. You can most likely fit all of the fries into the pan at once (not all of the fries will be submerged in the lard at one time, thus the need for frequent stirring), but you may have to work in batches depending on the size of your pan. Remove the fries from the pan using a slotted spoon and place them on a paper towel– or napkin-lined plate. Sprinkle salt evenly over the fries and cool for 2 minutes before enjoying. Batch Cooking and Leftovers: Best served fresh, but my kids will usually eat them as non-crunchy leftovers anyway. I prep all of the fries in advance, storing them in a Ziploc bag in the refrigerator until they're ready to be cooked. The size of your pan will likely mean you will only be able to prepare four servings at a time. To make a larger batch, coat the fries in oil and bake at 400°F (204°C) for about 40 minutes (stirring halfway). The fries will be delicious, but they won't be crispy. There is leftover lard in the pan after stovetop cooking, so I plan to serve this side at least two, sometimes three times in one week and reuse the lard until it's gone. Make It a Meal: Serve with OMGrain-Free Chicken Tenders and broccoli prepared using the recipe found in Roasted Non-Starchy Vegetables for a classic kid-friendly meal. AN EVERYDAY BASIC homemade lard or tallow Saturated fats are stable when heated (this prevents food oxidation) and are therefore a good choice as a healthy, nutrient-dense cooking fat. Tallow is made from beef, while lard is made from pork. Talk with your local farmers or butcher shops to find a good source of healthy fat to render into lard or tallow. Pastured animals that have access to fresh grass every day are always your best option. Cows should be eating nothing more than grass, and pigs and chickens should be fed organic or non-GMO feed. If you don't have a slow cooker you can instead render fat on the stovetop, heating a pan on low and letting the fat melt off the pieces. However, you'll need to tend to the fat in order to prevent burning. Rendering on the stovetop is a much more labor- and time-intensive process than using a slow cooker. 2–8 pounds (0.9–3.6 kg) beef or pork fat Cut the fat into 2-inch (5 cm) cubes. This doesn't have to be done perfectly, but uniform sizes are best. (Note: It's easiest to work with cold fat.) Place all the cubed fat into a pressure cooker with a slow-cook function, or into a Crock-Pot. Cook the fat on low temperature for 24 hours. The fat will render from the animal tissues and create a liquid in the pot. Carefully (the fat is hot!) strain the liquid fat through a metal fine-mesh colander into glass jars for storage. The liquid will appear almost yellow in color, but will cool to a solid white. Lard that appears darker in color after cooling has been slightly overcooked—but don't worry, it's still good to use. If additional fat remains on the original 2-inch (5 cm) pieces, return those pieces to the Crock-Pot or pressure cooker and continue to cook until you've rendered most of the usable fat. Don't cook it longer than 2 days, however, as the fat will start to overcook and it will become brown in color, indicating oxidation. As the liquid cools you may notice a very small amount of water in the bottom of a jar. If this happens, you will need to store your rendered fat in the refrigerator as this liquid can go bad sitting on the countertop. This usually only happens with the last jar to be poured, since fat floats on top of water and the fat is therefore the first liquid to be poured from the vessel, making the last jar the recipient of the water. Store all other jars either in the freezer for long-term storage or on the countertop for up to 2 months. Batch Cooking and Leftovers: I make extremely large batches (1½–7 pounds [0.7–3.2 kg]) of lard or tallow in order to save time in the long run. Rendered fat stores indefinitely in the freezer, so there's no reason to have to repeat this process more often than once a year, especially if you're supplementing with reserved fats from cooked meats. dilly sweet potato salad Nothing says "potluck" quite like a huge bowl of this Dilly Sweet Potato Salad. The sweetness of the potatoes is accentuated by zesty vinaigrette, and the addition of dill gives it visual and culinary appeal. The unique flavors of this dish may be challenging for a young child transitioning to a whole-food diet. Consider setting a small portion of the sweet potatoes aside to remain undressed until you feel that your child will be more agreeable to such strong flavors. SALAD 3 pounds (1.4 kg) sweet potatoes, diced into 3⁄4-inch (1.9 cm) cubes 2 tablespoons cooking oil (avocado or olive oil) ¹⁄4 cup (13 g) lightly packed minced dill DRESSING ¹⁄4 cup (60 ml) olive oil 2 tablespoons red wine vinegar 1 clove garlic, finely minced 1 lemon, juiced 1 teaspoon Dijon mustard ¹⁄₂ teaspoon salt Preheat the oven to 425°F (218°C). Pile the potatoes onto a 12 × 16-inch (30 × 40 cm) parchment paper–lined baking sheet, and pour the cooking oil over the top. Toss until the sweet potatoes are evenly coated with oil and spread them into a single layer. Bake the potatoes for 45 minutes, stirring after 25 minutes. Prepare the dressing while the sweet potatoes cook. Combine all dressing ingredients in a small jar with a lid, secure the lid, and shake until well combined. Set aside. Place the cooked sweet potatoes into a bowl, pour your desired quantity of dressing over the top (start with half and adjust to taste), and add the dill. Stir the salad until well combined and evenly coated. Dilly Sweet Potato Salad can be served at room temperature or chilled. Batch Cooking and Leftovers: The dressing recipe yields ½ cup (120 ml). I typically use about ⅓ cup (80 ml) for the sweet potato salad and reserve the rest for use on Roasted Non-Starchy Vegetables or an Everyday Salad. It can be stored on the countertop for up to 3 weeks or 2 months in the refrigerator. Tasks that can be performed in advance to complete this dish include chopping, bagging, and refrigerating the sweet potatoes until you're ready to cook the meal, mincing the dill (storing it in the refrigerator in an airtight container), and preparing the dressing. Make It a Meal: Serve with a chilled Summer Cucumber and Tomato Salad and Herb-Encrusted Drumsticks. summer potato salad Potato salad offers you a unique opportunity to increase your vegetable intake in an inconspicuous manner. Adding a multitude of vegetables increases the salad's bulk and contributes subtle textures and colors to a creamy, savory dish. Traditional potato salad is often considered to be unhealthy, but I would argue that it's actually quite the opposite when quality ingredients are used. The ingredients for this salad are available starting in mid-summer from local farms and gardens, and preparing your own mayo ensures the use of quality fats. Potato salad is a family favorite that is frequently consumed (in large quantities) throughout the summer and into the early fall when fresh vegetables abound and easy sides are in high demand. Having a prepared dish that's ready to serve just waiting in the refrigerator makes a busy summer day feel easier. I most often prepare this dish using yellow potatoes, but red or russet potatoes work as well. Most potato salad recipes use celery, but I prefer cucumbers since I always have such an overabundance in the summer. Feel free to sub in celery if you'd like. 3¹⁄₂–4 pounds (1.6–1.8 kg) potatoes Water, for cooking (see instructions) 1 red pepper, finely diced 1 medium cucumber, finely diced 1 bunch green onions, chopped ¹⁄₂ cup (36 g) minced dill 6 Hard-Boiled Eggs, diced 1¹⁄₂ cups (340 g) Homemade Mayonnaise (prepare a double batch and you'll have leftovers) 1 tablespoon raw apple cider vinegar 1¹⁄₂ teaspoons salt Place clean potatoes on the rack in the pressure cooker along with 1 cup (235 ml) of water. Cook the potatoes on high heat for 15 minutes and release the steam when done. Remove the lid and allow the potatoes to cool. If a pressure cooker is not available, place the potatoes in a large pot completely covered with water, bring the water to a boil, and allow the potatoes to cook for about 30 minutes or until easily pierced with a fork. Strain off the water and allow the potatoes to cool. Once the potatoes are cool enough to handle, dice them into bite-sized pieces and combine the potatoes with all of the other ingredients in a large mixing bowl. Gently mix the potato salad until the ingredients are evenly dispersed and coated with mayo. Serve potato salad immediately or transfer to the refrigerator to completely cool before serving. Batch Cooking and Leftovers: The recipe yields quite a bit of food, so I don't recommend doubling it unless you plan to serve it to guests. I try to cook the potatoes in advance since they can often take quite a bit of time to cool. Prep your potatoes, chop your vegetables, and prepare the mayo the night before you plan to serve the dish. Undressed potato salad can be stored in the refrigerator for up to 6 days, which makes it a good choice for pre-prepping and taking on vacation. Simply add your mayo, mustard, vinegar, and salt immediately before you plan to serve. Once the salad is dressed, you can store it in the refrigerator for up to 4 days. Make It a Meal: Serve with Grilled Chicken Breasts with Basil and Thyme, Summer Cucumber and Tomato Salad, and Grilled Zucchini and Yellow Squash on a hot summer day. kobocha casserole with pecans Kobocha squash is one of the superstars of the winter squashes, yet it's a variety that people often ignore. With a sweet, dry flesh, kobochas can be easily incorporated into casseroles without the need for added sugar. This dish is so sweet, in fact, that you may even be able to trick your kids into believing that they're actually eating dessert! Unlike a butternut, the flesh of a kobocha is extremely dry, which produces a firm texture that complements the light crunch of the chopped pecans. Flavors from cinnamon with coconut undertones make this a truly wonderful dish. Make sure to cook the squash a day or two in advance of serving, otherwise this dish is far too time consuming for an average weekday. 1 kobocha squash, about 4¹⁄₂–5 pounds (2–2.3 kg) 4 eggs 2 cans (5.4 ounces [160 ml] each) unsweetened coconut cream 2 teaspoons cinnamon powder 1 teaspoon salt 2 tablespoons coconut oil, for greasing 1¹⁄₂ cups (180 g) pecans, chopped Preheat the oven to 400°F (204°C). Cut the kobocha squash into two even halves, remove the seeds, and place them facedown on a parchment paper–lined baking sheet. Bake the squash for 40–50 minutes or until it's easily pierced with a fork. Reduce the heat on the oven to 350°F (177°C). (Note: Kobochas do not hold together if cooked in the pressure cooker. I use this method for spaghetti and butternut squash, but I'm left with a crumbly mess that's nearly impossible to work with when using it for kobocha.) Using a large spoon, remove the flesh of the squash from the peel and place it in the blender or food processor with eggs, coconut cream, cinnamon, and salt. You may have to work in batches for this. First blend half of the squash with half of the other ingredients and then repeat with the remaining squash. Pour the squash mixture into a greased 10 × 15-inch (30 × 40 cm) baking dish. Sprinkle the pecans evenly on top of the squash and bake the casserole for 1 hour at 350°F (177°C). Serve hot. Batch Cooking and Leftovers: If you want an immediate, ready-to-serve meal, plan to bake the squash on Day 1, prepare and bake the casserole on Day 2, and serve it on Day 3. If this casserole is too large for your family, simply halve the recipe and freeze the other half of the cooked squash to use for a second casserole later in the month. Alternatively, prepare two casseroles in separate dishes and freeze one by covering it in Saran Wrap and then aluminum foil. Make It a Meal: Serve with local link sausages made from pasture-raised pork and an Everyday Salad with Italian Dressing. roasted beet and citrus salad This salad is a refreshingly delicious twist on my favorite earthy vegetable. If you're new to the wonderful world of beets, start here with this tangy, sweet, and vibrantly colored salad, and you won't be disappointed! Beets contain unique pigments, betalains, that are particularly effective at supporting the liver in detoxification. Some of these pigments are destroyed during cooking, which is why I often reserve a small beet for grating raw into the prepared salad. DRESSING ¹⁄4 cup (60 ml) cooking oil (avocado or olive oil) ¹⁄4 cup (60 ml) balsamic vinegar 1 tablespoon mandarin orange juice 1 tablespoon lemon juice 1 teaspoon lemon zest ¹⁄₂ teaspoon mandarin orange zest 1 teaspoon salt SALAD 3 pounds (1.4 kg) beets, diced into 1-inch (2.5 cm) cubes 1 pound (455 g) mandarin oranges, peeled and diced into ¹⁄₂-inch (1.3 cm) cubes Preheat the oven to 400°F (204°C). Prepare the dressing by combining all ingredients in a small jar with a leakproof lid. Shake to combine and set aside. Pile the diced beets onto a 12 × 16-inch (30 × 40 cm) parchment paper–lined baking sheet. Shake the dressing again before evenly pouring half of it over the beets. Reserve the other half of the dressing for after the beets have cooked. Toss the beets with the salad dressing, spread them into a single layer on the baking sheet, and bake for 45 minutes, stirring halfway through. Remove the beets from the oven and allow them to cool for about 5 minutes before pouring them into a large bowl with the mandarin oranges. Pour the remaining dressing on top and mix everything together. This salad can be served warm or chilled. Batch Prepping and Leftovers: Simply serve any leftovers on top of a bed of baby spinach with a piece of grilled chicken for a quick and delicious lunch on the go. The beets can be chopped, bagged, and refrigerated up to 5 days in advance. You can also prepare the oranges and dressing in advance, but these are easiest to prepare while you wait for the beets to cook. Make It a Meal: Serve with an Everyday Salad topped with Fresh Basil and Garlic Balsamic Vinaigrette and Turmeric-Ginger Baked Chicken. soups and stews creamy cauliflower soup This is a thick, creamy, and savory soup that's so simple to prepare. Try topping each bowl of soup with a hefty serving of homemade bacon bits made from Perfectly Baked Bacon. You can use 1 pound (455 g) of frozen cauliflower in the place of one fresh head, which is often a more economical choice. I often prepare this soup as a double batch since it can easily accompany many of the main courses featured in this book including Grilled Chicken Breasts with Basil and Thyme, Simple Whole Roasted Chicken, Mexican Shredded Beef, and Garlic and Cumin Slow Roast with Napa Cabbage. Added bonus: This soup is a great way to get your kids to consume bone broth during the winter months when you're trying to boost and maintain their immunity. Stovetop preparation is possible if you don't have a pressure cooker. Simply sauté the onions and garlic as indicated, add the cauliflower and stock, bring the soup to a boil, and simmer for about 30 minutes or until the cauliflower is soft and falls apart easily. Proceed with the remainder of the preparation as directed. 1 tablespoon cooking fat (lard or reserved fat from cooking meats preferred) 1 large yellow onion, sliced 4 cloves garlic 1 large head cauliflower, roughly chopped 3–4 cups (710–945 ml) Chicken Stock (exact quantity depends on the size of your cauliflower and desired soup consistency) 1 can (5.4 ounces [160 ml]) unsweetened coconut cream 2 teaspoons salt Pepper, to taste Using the sauté function in an electric pressure cooker (see the note above for stovetop instructions), melt the cooking fat and sauté the onion for about 5 minutes, add the garlic, and sauté until the onion is caramelized and brown, about 7 minutes total. Add in the cauliflower and 3 cups (710 ml) stock, and cook on high pressure for 10 minutes. Release the steam when done, add the coconut cream, salt, and pepper, and blend the soup with an immersion blender or in batches using a blender or food processor. Adjust the soup thickness using the remaining stock. Serve immediately. Batch Cooking and Leftovers: Use as a base for varying protein leftovers such as Pulled Mojo Chicken, Herb-Encrusted Drumsticks, Garlicky Greens, Roasted Roots, or Red and Yellow Rosemary Potatoes. Or chop leftover meat and vegetables into bite-sized pieces, and add them to the soup. See Prepping for Soups and Stews (page 152) for more information. I often double this recipe since it can serve as a versatile side for busy weeknight meals or be frozen for a later date in Ziploc freezer bags. Make It a Meal: Top with bacon bits made from Perfectly Baked Bacon, and serve with Roasted Roots and an Everyday Salad with Fresh Basil and Garlic Balsamic Vinaigrette. Prepping for Soups and Stews Soups and stews are some of my favorite wintertime meals. They're simple to prepare, highly nutritious, and yield large quantities of food that can be easily frozen for use on a later date. Put simply, they're the quintessential meal for the techniques I discuss throughout the book. However, these simple meals can become extremely time intensive when trying to prepare the meal from start to finish in one cooking session since there are often multiple steps involved. Chicken Stock and Beef Stock should always be prepped in advance. I keep stock on hand throughout the winter since I know that it will always be used in one way or another. You can prep the stock as far in advance as two weeks, or as late as the morning before you plan to make a soup or stew (for a pressure cooker method only; the stovetop takes 24 hours). Stocks can even be frozen in Ziploc freezer bags, but this requires a good bit of freezer space. Preparing the other components for soups and stews in advance will also make for lighter work on the nights you plan to cook. For example, Chicken and Vegetable Coconut Curry Soup requires that you cook a whole chicken, a task that requires very little active time. Cook the chicken the night before while you eat dinner, or cook it or during one of your prep days, and you'll have one of the main soup components ready to go. Vegetables for soups and stews can also be chopped in advance. If you find that you have an extra 10 minutes while waiting for dinner to finish cooking, start chopping and bagging the vegetables to be used in the soup the following night. Some of the soup recipes require the use of dried beans, which is another component that should be prepped in advance. Soaking beans, preparing stock, and then cooking the soaked beans in the stock is a multistep process that is actually largely hands-off and quite simple, unless you're trying to do it all in one day. Please note that stocks should not be salted before cooking dried beans. I'm not sure why, but salted liquid prevents the beans from cooking. Soups will quickly become your go-to wintertime meal once you implement a bit of organization and forethought in the kitchen. Storing and Using Fresh Ginger You'll need to keep ginger on hand if you plan to make Creamy Carrot Ginger Soup often (which you should). Store fresh ginger in the freezer. You can store the entire rhizome (the lateral root produced by a ginger plant) in the freezer or cut it into one- or two-inch pieces so that you have meal-sized portions readily available. The easiest way to peel ginger is by using the side of a spoon. Be sure to view a demonstration video online if you're not already familiar with this simple trick. Frozen ginger can be cut with a sharp knife and some effort, but use caution so as not to accidentally cut your hand. Alternatively, frozen ginger can be grated, which is a safer method. creamy carrot ginger soup I just love the refreshing, tangy flavor of ginger in a creamy soup. It instantly brightens my mood on a cold winter night. The whimsical color of this soup brings me back to warmer summer months when Mexican sunflowers (Tithonia rotundifolia) are exploding in the garden and I gather the burning orange blossoms to brighten every corner of my home. Frozen carrots can replace fresh carrots. A stovetop preparation is possible if you don't have a pressure cooker. Simply sauté the vegetables as indicated, add the stock, bring the soup to a boil, and simmer the soup for about 30 minutes or until the carrots are soft and fall apart easily. Proceed with the remainder of the preparation as directed. 2 tablespoons coconut oil 1 onion, sliced 2 pounds (910 g) carrots, roughly chopped 2 cloves garlic, roughly chopped 1-inch (1.3 cm) piece of fresh ginger, peeled and chopped 5 cups Chicken Stock 1 can (13.5 ounces [398 ml]) unsweetened full-fat coconut milk 1 teaspoon salt Using the sauté function in an electric pressure cooker (see the note above for stovetop instructions), melt the coconut oil and sauté the onion for about 5 minutes, add the carrots, garlic, and ginger, and sauté until the onions are caramelized and brown, about 7 minutes total. Add in the Chicken Stock, and cook on high pressure for 10 minutes. Release the steam when done, add the coconut milk and salt, and blend the soup with an immersion blender or in batches using a blender or food processor. Serve immediately. Batch Cooking and Leftovers: I often prepare a double batch of soup, eat half, and freeze the remaining half for a later date. See Prepping for Soups and Stews for more information. Make It a Meal: Serve with OMGrain-Free Chicken Tenders and Bok Choy and Red Peppers with Thai Peanut Sauce. AN EVERYDAY BASIC chicken stock This simple and affordable preparation is a must for every home cook. Homemade chicken stock is one of the simplest ways to improve the flavor and nutritional value of numerous dishes. The dissolved amino acids in homemade stocks are beneficial for repairing tissues within the colon and joints. Stock by itself is an excellent beverage for the treatment or prevention of cold and flu. Using chicken parts such as feet, necks, and backs (which are some of the least expensive bones) will yield a stock that is higher in dissolved amino acids and is sure to "gel" when cooled. This gelling characteristic is indicative of high gelatin content, but the stock will become liquid again when heated. 1 whole chicken carcass (about 1 pound [455 g] of bones) 5 stalks celery, roughly chopped 3 carrots, roughly chopped 1 onion, quartered with peel intact 5 cloves garlic, halved 2 quarts (1.9 l) water 1 bay leaf 1¹⁄₂ teaspoons vinegar Combine all the ingredients in an electric pressure cooker and cook on high for 2 hours (see the accompanying note for stovetop instructions). Allow the stock to cool for 15–20 minutes before releasing the steam. Remove the bones and vegetables, and strain the liquid through a fine-mesh strainer into jars or directly into the dish you're preparing. I often pour the stock through the strainer into a large bowl before transferring it to jars, a method that results in less mess. Store Chicken Stock in the refrigerator or freezer. Note: Stock can be made on the stovetop, but doing so will require additional water because it needs to be simmered for at least 24 hours (some chefs recommend 48 hours) to fully extract the therapeutic and nutritive benefits from the bones. Batch Cooking and Leftovers: Batch sizes will be limited by the size of your pot or pressure cooker. (I prefer to store the frozen bones and use them as needed since they require less freezer space.) If storing in the fridge, leave the layer of fat on top; this helps seal and preserve the stock. (Some people say that stock can even store for months in the refrigerator as long as the layer of fat stays intact, although I've never tried it.) AN EVERYDAY BASIC beef stock The benefits of homemade stocks are endless, and the flavor profile is far better than most any product you can buy in the store. See the Chicken Stock recipe, page 154, for more details on nutrition and consistency. Homemade Beef Stock often yields a decent amount of fat that can be reserved for cooking. You can easily collect the fat from the stock once it has chilled—a solid layer of fat forms on top, which can be removed and stored in the refrigerator for cooking. Many people roast beef bones for about 15 minutes at 350°F (177°C) before preparing the stock in order to improve overall flavor. 3 pounds (1.4 kg) beef bones 6 stalks celery, roughly chopped 4 carrots, roughly chopped 1 onion, quartered with peel intact 8 cloves garlic, halved 4 quarts (3.8 l) water 3 bay leaves 1 tablespoon vinegar Combine all the ingredients in an electric pressure cooker and cook on high for 2 hours. (See the note in Chicken Stock for stovetop instructions.) Allow the stock to cool for 15–20 minutes before releasing the steam. Remove the bones and vegetables, and strain the liquid through a fine-mesh strainer into jars or directly into the dish you're preparing. I often pour the stock through the strainer into a large bowl before transferring it to jars, a method that results in less mess. Store Beef Stock in the refrigerator or freezer. Batch Cooking and Leftovers: You can often make two batches of beef stock using the same bones as long as connective tissue remains on the bones after the initial cook is complete (this cannot be done with chicken or poultry bones since they're much smaller and have less tissue). I've even made three batches of broth from the same bones by slightly reducing the amount of liquid with each consecutive cook. Assuming you have ample freezer space, freeze each consecutive batch after it has cooled in Ziploc freezer bags for up to 4 months. If not, refreeze the bones and be sure to label the bag with how many times they've been cooked. If storing in fridge, leave the layer of fat on top. apple butternut soup The seasonal fall flavor of butternut squash and the tart yet slightly sweet flavor of Granny Smith apples truly welcome the changing of the seasons. This naturally sweet and creamy soup is one that most any kid would enjoy. I often prepare this recipe along with Apple Walnut Crisp Cereal in the fall when apple season is at its peak. Preparing the butternut squash in an electric pressure cooker while the apples bake makes this an even quicker meal to prepare. Halve and deseed the squash, and then place it on the rack in the pressure cooker with 1 cup of water and cook on high pressure for 10 minutes. 1 butternut squash, about 3 pounds (1.4 kg) 3 Granny Smith apples, peeled, cored, and diced 2 tablespoons melted coconut oil 1 tablespoon cinnamon powder 1 teaspoon ginger powder ¹⁄₂ teaspoon salt 2 cans (13.5 ounces [398 ml] each) unsweetened full-fat coconut milk 1 cup (235 ml) water or stock to adjust thickness Preheat the oven to 400°F (204°C). Remove the stem of the butternut squash, stand the squash on its end, and cut it into two even halves lengthwise. Remove the seeds and place the squash facedown on a parchment paper–lined baking sheet. Bake the squash for 45–55 minutes or until it's easily pierced with a fork. Once the squash is in the oven, heap the apples onto a baking sheet. Pour the coconut oil on top and toss the apples until evenly coated with oil. Spread the apples into a single layer, place them into the oven along with the squash, and bake for 25 minutes or until soft. Using a large spoon, scoop the flesh of the squash from the peel and place it in a large pot with the apples, cinnamon, ginger powder, salt, and coconut milk. Use an immersion blender to purée the soup until it's completely creamy. Adjust the thickness by adding the desired amount of water. Work in batches in a blender if you don't have an immersion blender. Heat the soup to your desired temperature and serve. Batch Cooking and Leftovers: Save time by prebaking the squash and apples. This way on the day of the meal, all you will have to do is throw everything in a pot, blend, and heat. A recipe that could take you over an hour turns into a 15-minute meal. I often double the recipe and divide it into thirds—one-third for eating now and two-thirds for the freezer. See Prepping for Soups and Stews (page 152) for more information. Make It a Meal: Serve with a Simple Whole Roasted Chicken and an Everyday Salad with Red Wine Lemon Vinaigrette. If baking both the soup ingredients and the chicken simultaneously, set the oven temperature to meet the requirements of the chicken, and then extend the squash cooking time by about 10 minutes. black bean and vegetable soup * plus 12–24 hours for soaking Black bean soup brings me back to my early childhood when vegetarian stews were the norm in a household that rarely ate meat. My diet has drastically changed since that time, but my love for a bold yet simple bean soup has not diminished. Black beans and vegetables flavored with Mexican spices offer a soup that boasts powerful flavors similar to that of a hearty chili, but in a lighter way. Please note the yield for this soup and be sure to use an adequately sized pot (at least 9 liters, or 2½ gallons). Halve the recipe if your pot is not large enough. Beans are a food that can be as difficult to digest as a grain if not prepared correctly. Be sure to soak your beans for a minimum of 12 hours before preparing this delightfully nutritious soup (see Soaking Seeds and Beans, page 14, for more information). Do not use salted stock, as this prevents the beans from cooking. Beans should always be salted after being cooked. If you simply don't have the time or desire to prepare dried beans, you can replace them with canned beans: 1 pound (455 g) of dried beans is equal to approximately four 15-ounce (425 g) cans of beans. Drain and rinse the canned beans before adding them to the soup, and reduce the amount of stock by about 2 cups (475 ml). 1 pound (455 g) dry black beans, soaked overnight 10 cups (2.4 l) Chicken Stock or Beef Stock 2 tablespoons cooking fat (lard or reserved fat from cooking meats preferable) 2 large onions, diced 1 bunch celery, sliced 4 medium carrots, sliced 2 red peppers, diced 3 medium zucchinis, diced 1 pound (455 g) frozen corn or 2 ears of fresh corn, kernels removed 1 head garlic, peeled and minced 1 tablespoon chili powder 1 tablespoon cumin powder 1 teaspoon smoked paprika 1¹⁄₂ tablespoons salt, or to taste 1 can (28 ounces [830 ml]) diced tomatoes Submerge the black beans in water and soak the beans for 12–24 hours (longer is better, but 12 hours is the absolute minimum; see Soaking Seeds and Beans, page 14). Strain and rinse the black beans. Place the beans and stock into an electric pressure cooker, secure the lid, and cook on high for 30 minutes, releasing the pressure when complete. Prepare the rest of the soup while the beans cook. Soaked beans can be prepared on the stovetop, requiring approximately 2 hours to simmer. Watch your cooking liquid, adding more as necessary. Preheat the cooking fat in a large pot on the stovetop and sauté the onions, celery, and carrots for about 5 minutes. Add in the red peppers, zucchinis (add corn at this time if using fresh), garlic, chili powder, cumin powder, paprika, and salt and continue to sauté until all vegetables are soft, about 10 minutes. Add in the corn (if using frozen) and tomatoes, and bring the soup to a low simmer. Pour in the beans and stock, bring the soup to a simmer, and serve immediately. The flavors improve over time. Batch Cooking and Leftovers: Divide the recipe in half: Eat one half and freeze the other. Prepare the beans a day or two before you cook the soup to drastically reduce your total cooking time the day of serving. You can chop and bag the vegetables in advance for an even quicker meal. See Prepping for Soups and Stews (page 152) for more information. Make It a Meal: Serve with leftover Pulled Mojo Chicken and a dollop of Garlicky Guacamole on top. You can even prepare a batch of Plantain Tortillas for a more filling meal. But Isn't Corn a Grain? You'll notice that I've added fresh and frozen corn to a handful of recipes in this cookbook even though corn is one of the most commonly eaten grains worldwide. The difference is that fresh corn—corn on the cob—is eaten before the seed is fully mature and is therefore considered a starchy vegetable. If you allow corn to continue to mature, the seed will fully develop. The corn is then dried and ground into a flour. It is at this point that corn becomes a true grain. I select organic corn, since otherwise, this crop relies heavily on pesticides and the use of genetically modified (GM) seed. Buying frozen organic corn is often your best option except for when fresh organic corn is available at your local farmers market. However, even with following all of these precautions, there are still individuals who cannot tolerate corn even in its immature starchy vegetable state. These individuals should, unfortunately, avoid corn altogether. not quite your mama's chili * plus 12–24 hours for soaking This chili recipe incorporates all of the traditional ingredients required to create a flavorful, hearty bowl of steamy chili, but I've lightened it up ever so slightly with the addition of kale. I'm always looking for convenient (and undetectable) ways to incorporate more greens into our diet and this recipe fits the bill. This chili also lacks the heat that so many children dislike. Feel free to add in a few red pepper flakes or a chopped jalapeño if you're seeking a spicier option. You can use ground turkey or pork in the place of ground beef if desired—I often use half beef and half pork. Refer to Black Bean and Vegetable Soup (page 158) for information on subbing canned beans for dried. Also see But Isn't Corn a Grain? (page 158) for a brief explanation as to why I think fresh corn is an acceptable ingredient despite its use as a grain. ¹⁄₂ pound (225 g) dried black beans 8 cups (1.9 l) Chicken Stock or Beef Stock 2 pounds (910 g) ground beef 2 tablespoons cooking fat (lard or reserved fat from cooking meats preferable) 2 large onions, diced 1 green pepper, diced 6 cloves garlic, minced 1 bunch of kale, chopped (ribs intact) 1 can (14.5 ounces [410 g]) diced tomatoes 1 can (6 ounces [170 g]) tomato paste 1 pound (455 g) frozen corn or 2 ears of fresh corn, kernels removed 1 tablespoon chili powder 1¹⁄₂ teaspoons cumin powder 3⁄4 teaspoon smoked paprika ¹⁄₂ teaspoon dried oregano 1 tablespoon salt Submerge the black beans in water and soak the beans for 12–24 hours (longer is better, but 12 hours is the absolute minimum; see Soaking Seeds and Beans, page 14). Strain and rinse the soaked black beans. Place the beans and stock into an electric pressure cooker, secure the lid, and cook on high for 30 minutes, releasing the pressure when complete. Prepare the rest of the chili while the beans cook. Soaked beans can be prepared on the stovetop, requiring approximately 2 hours to simmer. Watch your cooking liquid, adding more as necessary. Preheat a large pot and brown the ground beef for about 10 minutes. To do this, stir the beef frequently, breaking it apart as you go. Transfer the beef into a bowl and set aside. Using the same pot, melt the cooking fat and sauté the onions for approximately 5 minutes; add the pepper and garlic, and sauté for another 5 minutes. Add in the remaining ingredients and cook for an additional 5 minutes. Return the beef to the pot, and remove the beef-and-vegetable mixture from the heat until the beans are finished cooking. Once the beans are done, pour the entire contents into the pot with the beef and vegetables. Bring the soup to a simmer and cook on low for about 30 minutes (optional). Serve immediately. Batch Cooking and Leftovers: I highly recommend doubling this recipe and freezing half for a later date, but this will require the use of a very large pot (about 10 liters, or nearly 3 gallons). See Prepping for Soups and Stews (page 152) for more information. Make It a Meal: Serve with Plantain Tortillas and Pico de Gallo, or with an Everyday Salad and Italian Dressing. white bean, fennel, and sausage stew * plus 12–24 hours for soaking This is the perfect dish to serve when you're hosting guests. This stunning, fragrant, and all-around deliciously flavorful stew takes just an hour to prepare and it yields enough to feed most any size dinner party (see the accompanying Make It a Meal section for a complete meal suggestion). This is another stew recipe that will require the use of an adequately sized pot (at least 9 liters, or almost 2½ gallons). Working with two separate pots is always an option, but this will require cleaning both vessels when finished. You can substitute four 15-ounce (425 g) cans of white beans (strained and rinsed) for the dried beans. If doing so, reduce the amount of chicken stock by about 2 cups (475 ml). 1 pound (910 g) dried white beans 12 cups (2.8 l) Chicken Stock 2 pounds (910 g) sausage links 2 tablespoons cooking fat (lard or reserved fat from cooking meats preferred) 2 large onions, diced 1 large fennel bulb, halved and thinly sliced, tops chopped 1 bunch celery, sliced 8 cloves garlic, minced 2 red peppers, diced 1 cup (235 ml) dry white wine 2 cans (14.5 ounces [411 g] each) diced fire-roasted tomatoes 1¹⁄₂ tablespoons dried rosemary 1 teaspoon smoked paprika 1 bunch parsley, minced 1 tablespoon salt Submerge the white beans in water and soak the beans for 12–24 hours (longer is better, but 12 hours is the absolute minimum; see Soaking Seeds and Beans, page 14). Strain and rinse the soaked beans. Place the beans and stock into an electric pressure cooker, secure the lid, and cook on high for 30 minutes, releasing the pressure when complete. Prepare the rest of the stew while the beans cook. Soaked beans can be prepared on the stovetop, requiring approximately 2 hours to simmer. Watch your cooking liquid, adding more as necessary. Preheat the grill to high heat and cook the sausage links while you prepare the vegetables. Cook the links for about 10 minutes, flip, and cook for another 6 minutes until cooked through. Links can also be baked at 400°F (204°C) for about 15 minutes, flipping halfway through. Set the sausages aside until cool enough to handle. Preheat a large pot over medium-high heat, melt the cooking fat, and sauté the onions, fennel, and celery for about 7 minutes, stirring frequently. Add in the garlic and peppers, and sauté for another 5 minutes. Add the wine, tomatoes, rosemary, smoked paprika, and parsley. Bring the stew to a simmer and allow it to simmer for about 15 minutes. Slice the sausage into bite-sized pieces and add it to the simmering stew. The beans should be done at this point. Pour the entire contents of the pressure cooker into the vegetable-and-sausage mixture, add salt, stir, and allow the stew to simmer until ready to serve. Batch Cooking and Leftovers: Prepare twice as many sausages and freeze the leftovers for later use. See Prepping for Soups and Stews (page 152) for more information. Make It a Meal: Serve to dinner guests after first enjoying a plate of raw mixed vegetables with Fiesta Sunflower Seed Hummus as an appetizer, then with Roasted Beet and Citrus Salad and a stunning Everyday Salad with Fresh Basil and Garlic Balsamic Vinaigrette. End the evening with a slice of Apple Spice Bundt Cake. Step 1. Cut the fennel bulb in half, place it on the cutting board cut-side down, and slice the entire bulb similar to an onion, leaving more space between cuts. I usually only slice the bulb three times from the outside of the bulb toward the center. Step 2. Thinly slice the bulb perpendicularly to the cuts you just made. chicken and vegetable coconut curry soup This Thai-inspired soup boasts a beautifully layered flavor profile with the tang of citrus, creaminess of coconut, sweetness of red peppers, and accents of cilantro and curry paste. In addition to its delightful flavor, this soup is fragrant and colorful—all excellent qualities for a warming soup on a cold winter day. If you don't have any red curry paste, you can use instead 1–2 tablespoons of curry powder. The two have different flavors, but both work well for this recipe. Be sure to reserve and freeze the chicken carcass for making Chicken Stock in the future. 1 whole chicken, about 4 pounds (1.8 kg) 6 cups (1.4 l) Chicken Stock, divided 2 tablespoons cooking fat (lard, reserved fat from cooked meats, or coconut oil) 1 large onion, diced 2 medium carrots, sliced 1 red pepper, diced 1 bunch bok choy, chopped 1 tablespoon peeled, grated ginger 8 cloves garlic, minced ¹⁄₂ pound (225 g) frozen peas 2¹⁄₂ tablespoons Thai Kitchen red curry paste Zest from 1 lemon 2–3 teaspoons salt 1 can (13.5 ounces [398 ml]) unsweetened full-fat coconut milk 1 bunch fresh cilantro, finely chopped Place the whole chicken onto the rack in an electric pressure cooker, add 1 cup (235 ml) Chicken Stock, secure the lid, and cook on high pressure for 35 minutes. Release the steam and remove the lid to allow the chicken to cool. The chicken can also be prepared in the oven by following the instructions for Simple Whole Roasted Chicken. Prepare the chicken as instructed, but only coat it in oil; do not add the spices. Prepare the rest of the soup while the chicken cooks. Preheat a large pot over medium-high heat, melt the cooking fat, and sauté the onion and carrots for about 5 minutes or until the onion becomes translucent. Add in the red pepper, bok choy, ginger, and garlic, and sauté for another 5 minutes or until the vegetables are soft. Add in the frozen peas, red curry paste, lemon, salt, remaining stock, coconut milk, and any liquid from the pressure cooker. Bring the soup to a simmer. Remove the chicken meat from the bone and chop the chicken into bite-sized pieces. Place the meat into the soup and reserve the bones for making stock. You can go ahead and prepare a batch of Chicken Stock at this time, or reserve the carcass in the freezer for a later date. Stir in the cilantro and remove the soup from the heat. Serve immediately. Batch Cooking and Leftovers: Doubling this recipe is great, but you'll need a large pot (10 liters or 3 gallons), and you'll have to prepare the whole chickens in the oven because two chickens will not fit into the pressure cooker. You could pressure-cook them one after another, but this will actually take more time. See Prepping for Soups and Stews (page 152) for more information. Make It a Meal: I like serving this soup with Crispy Sweet Potato Fries. The sweetness from the fries nicely complements the flavors of the soup. chicken noodle soup Who says you can't eat soul-warming Chicken Noodle Soup when you don't eat grains? Turnip "noodles" are surprisingly delicious and give this soup a uniqueness that will be appreciated by everyone in the family! Turnips are one of the easier vegetables to grow, but I'm never quite sure what to do with them since neither my kids nor I particularly like the flavor of them when roasted. This soup has come to the rescue more times than you'll know when fall turnips are pouring out of the garden. You'll need a decent spiralizer to make a soup that's visually identical to the real deal; use a countertop version if you have one. If you're just not convinced that turnip "noodles" will be your thing, then simply leave them out and enjoy a delicious bowl of chicken and vegetable soup. A noodle-less version is the healing meal that I prepare as a nourishing gift to my kids or friends when someone is feeling unwell. 1 whole chicken, about 4 pounds (1.8 kg) 8 cups (1.9 l) Chicken Stock, divided 2 tablespoons cooking fat (lard or reserved fat from cooking meats preferred) 1 large onion, diced 3 medium carrots, sliced 1 bunch celery, sliced 1 pound (455 g) turnips (about 3 medium), spiralized 10 cloves garlic, minced 1¹⁄₂ tablespoons salt 1 bunch fresh parsley, finely chopped Place the whole chicken onto the steam rack in an electric pressure cooker, add 1 cup (235 ml) Chicken Stock, secure the lid, and cook on high pressure for 35 minutes. Release the steam and remove the lid to allow the chicken to cool when done. The chicken can also be prepared in the oven by following the instructions for Simple Whole Roasted Chicken. Prepare the chicken as instructed, but only coat it in oil; do not add the spices. Prepare the rest of the soup while the chicken cooks. Preheat a large pot over medium-high heat, melt the cooking fat, and sauté the onion, carrots, and celery for 8 minutes or until they begin to caramelize. Cut the spiralized turnips into pieces about 3–5 inches (7.5–12.5 cm) in length. Add the garlic and turnips to the pot, and sauté for another 3 minutes. Don't overcook the turnips or they'll lose their texture. Pour in the remaining stock and liquid from the electric pressure cooker, and bring the soup to a simmer. Add in the salt and parsley, and remove the soup from the heat to prevent overcooking the turnip noodles. Chop the chicken into bite-sized pieces and stir into the soup. Serve immediately. Batch Cooking and Leftovers: This soup doesn't freeze particularly well because of the turnip noodles. However, it can be easily frozen without the noodles. The noodles can instead be sautéed the day of serving and added after the soup has thawed and been reheated. See Prepping for Soups and Stews (page 152) for more information. Make It a Meal: Serve as a stand-alone meal and add Apple Spice Bundt Cake for dessert. 40-minute beef stew Most beef stew recipes require a minimum of eight hours of cooking with the use of a slow cooker, but the preparation with an electric pressure cooker accomplishes the same thing in a fraction of the time. You can still use a slow cooker for this recipe: Simply combine all ingredients and cook on low heat for eight hours. If using this method, I recommend preparing the ingredients the night before. In the morning, simply throw everything into the slow cooker. I love that this beef stew is rich, flavorful, hearty, and can be easily served as a one-pot meal. I've also found this to be a good recipe for finicky eaters since it contains a number of subtly flavored and familiar ingredients. Shown on page 149. 2 pounds (910 g) stew beef, cubed 2 pounds (910 g) yellow potatoes, diced into 1-inch (2.5 cm) cubes 2 onions, diced 5 carrots, thinly sliced in rounds 1 bunch celery, sliced 1 pound (450 g) fresh green beans, cut into 1-inch pieces, or cut frozen green beans 1 head garlic, peeled and minced 8 cups (1.9 l) Beef Stock 1 teaspoon dried tarragon 2 bay leaves Pepper, to taste 1 tablespoon salt, more to taste Combine all the ingredients in an 8-quart electric pressure cooker. You may have to slightly reduce the amount of vegetables and stock if using a 6-quart version. Secure the lid and cook the soup on high for 20 minutes. If preparing on the stovetop, place all the ingredients into a large pot and allow the soup to simmer, covered, for about 2 hours or till the beef is easily pulled apart. Allow the pressure cooker to sit for 10 minutes before releasing the steam. Remove the lid, add your desired amount of salt, mix, and serve. Batch Cooking and Leftovers: If you want extra stew for freezing, simply prepare the ingredients to make a second batch of stew while the first batch is cooking. Empty the pressure cooker of its contents when the first batch is complete and start the second batch while you enjoy the first. See Prepping for Soups and Stews (page 152) for more information. Make It a Meal: Serve with Plantain Sandwich Bread for dipping, or with an Everyday Salad with Red Wine Lemon Vinaigrette for a lower-carb option. snacks and smaller meals Quick and Easy Snacks Some of the items on this list are recipes from the book, but many are quick snack foods that you can throw together in a matter of minutes. I believe that snacks should be small, uncomplicated morsels that can tide the kids over between meals. If they fill up on snacks (or calorie-rich beverages like juice or milk), then you can't possibly expect them to have an appetite for the wonderfully nutritious lunch or dinner that you prepare. I've included a handful of packaged snacks with recommendations for store-bought foods that I buy for my own family. Apple slices with nut or seed butter Banana Nut Bread Carrot Cake Applesauce Muffins Coconut Cream Goji Bites Cold-Pack Dill Pickles Fruit Fruit kebabs 100 percent grass-fed beef sticks Hard-Boiled Eggs Homemade (Fiesta Sunflower Seed Hummus) or store-bought hummus Organic grain-free chips Plantain Blender Pancakes (leftovers) Olives Plantain Muffins Roasted and Salted Walnuts (or seeds) Superfoods Trail Mix Smoothies Turkey Cucumber Rolls Raw vegetables, sliced turkey cucumber rolls You can prepare a number of these protein-packed bites as an appetizer for guests or as a delightfully savory snack that can go in your kids' school lunches. You can string them on a skewer or individual toothpicks to guarantee that they won't come unrolled en route to school. I've tried slicing the cucumber using a mandoline, but the slices came out too thick, even on the thinnest setting. You really need a vegetable peeler. I buy deli meats that are free of hormones and antibiotics, and from animals that are certified humanely raised. For hummus, I buy a variety of brands, but closely check the ingredients list. You can also prepare Fiesta Sunflower Seed Hummus for a homemade, bean-free version. 1 large or 2 small cucumbers 4 slices turkey breast (see note above) 4 tablespoons hummus (see note above) Use a vegetable peeler to cut the cucumbers into thin slices, lengthwise. Form a "sheet" of cucumbers by lining up the thin slices lengthwise with a small amount of overlap between each one. Make the sheet as wide as the slice of turkey. You'll make 4 sheets in total, one for each piece of turkey. Place one piece of turkey on top of each sheet of cucumbers and evenly spread 1 tablespoon of hummus across the turkey. Carefully roll the cucumber into what looks like a sushi roll. You can serve it as is or slice the roll into pieces resembling sushi. Serve immediately. Batch Cooking and Leftovers: If packing in a school lunch, pack the lunch box with an ice pack. Make It a Meal: Serve 2 turkey rolls with apple slices and peanut butter (or Apple Slice Monsters, if you're feeling ambitious), and raw sliced vegetables to dip in Garlicky Guacamole for a kid-friendly packed lunch. superfoods trail mix Finally, a chocolaty trail mix you can feel good about serving to your kids! The sweetness of the mulberries and goji berries combined with the crunch from the cacao nibs makes for a sweet and crunchy snack minus the refined sugar found in most store-bought trail mixes. Notice that this is a nut-free recipe that can be taken into your child's nut-free school zone! Try subbing in your favorite nuts or seeds for a personalized mix. 2 cups (120 g) coconut flakes 1 cup (150 g) hemp hearts 1 cup (130 g) cacao nibs 1 cup (110 g) dried mulberries ¹⁄₂ cup (55 g) dried goji berries ¹⁄₂ teaspoon salt Combine all the ingredients in a large jar, cover the jar with a lid, and shake until the ingredients are evenly mixed. Batch Cooking and Leftovers: This recipe takes very little effort and yields a good amount. If it turns out to be a family favorite, you can always double the recipe and freeze half. Make It a Meal: Serve ¼ cup of the trail mix along with Turkey Cucumber Rolls, Summer Cucumber and Tomato Salad, and Dilly Sweet Potato Salad for a packed lunch for the kids. roasted and salted walnuts * plus 12–24 hours for soaking Much like grains, nuts contain compounds like phytic acid and enzyme inhibitors that are difficult to digest or prevent the absorption of nutrients. Soaking nuts in warm salt water for 12–24 hours helps to increase nutrient availability, improve digestibility, and degrade compounds that are less than desirable for consumption. This extra step takes very little active time, but makes a huge difference in the digestibility, health benefits, and flavor of nuts. And soaking nuts results in a creamy texture. I use walnuts in this recipe, but you can use any nut or seed of your choice. When cooking small seeds like sunflower seeds, reduce the baking time. The nuts and seeds need to be cooked until they're crispy and dry so that they no longer contain any water. 1 tablespoon plus ¹⁄4 teaspoon salt, divided 4 cups (945 ml) warm water 4 cups (510 g) raw walnuts Dissolve 1 tablespoon of salt into the water using a bowl or jar large enough to hold the entire volume of nuts and water combined. Once the salt is dissolved, add the walnuts to the bowl or jar and allow the nuts to soak at room temperature for 12–24 hours. After soaking is complete, preheat the oven to 250°F (121°C). Strain the walnuts through a colander and rinse well to remove any salt water. Pour them onto a clean towel and toss them around to remove any excess water. Spread the walnuts in a single layer on a baking sheet and sprinkle with the remaining salt. Bake the walnuts for 1 hour, stirring every 20 minutes. Allow the nuts to completely cool before placing them in an airtight container. Batch Cooking and Leftovers: This recipe can be easily doubled or even tripled. The ease of preparation and the long freezer storage time make them an excellent choice for large batches, and they don't need to be thawed before eating. cold-pack dill pickles Homemade pickles are a snack staple in our house! These crispy dill pickles are easy to make and retain all the nutrients that would be lost if they were heated at high temperatures for canning. Preparing your own pickles takes very little time, and it's a tremendous upgrade from store-bought varieties that can contain food dyes. You can add ingredients like red pepper flakes, jalapeño peppers, or peppercorns for a spicier version. 2¹⁄4 cups (530 ml) warm water 2 pounds (910 g) pickling cucumbers, quartered into spears ¹⁄₂ large bunch of dill 3 cloves garlic, smashed 1 teaspoon whole mustard seed 1 tablespoon salt 13⁄4 cups (415 ml) apple cider vinegar Heat the water while you cut and pack your cucumbers. The water just has to be warm enough to easily dissolve salt. Place the dill, garlic, and mustard seed into a ½-gallon-sized glass jar or divide ingredients among three quart-sized jars. Lean the jar on its side while placing the cucumber spears upright into the jar, packing them as tightly as you can without damaging the cucumbers. Pack a second tier of cucumbers if using a ½-gallon-sized jar. Place the salt in a separate 1-quart-sized jar and pour the water over the top. Stir to dissolve. Pour the vinegar into the salt water and mix. Pour the water-and-vinegar mixture over the top of your cucumbers and place a lid on the jar. Refrigerate the jar, allowing a minimum of 2 days before eating. Batch Cooking and Leftovers: Pickles make a great addition to salads, such as The Tuna Salad Upgrade or Simple Egg Salad, which means that a double batch is often in order. However, you will be limited by space in your refrigerator, so plan accordingly. strawberry santas * depends on strawberry size These adorable little treats are so much fun for the kids to make! Strawberry Santas are a delightful, easy, and nutritious treat for holiday parties. They also make for a fun indoor winter activity on a snowy day. The recipe for Coconut Whipped Cream makes more than you'll need. You can simply store excess in the refrigerator for up to 2 weeks. Just be sure to whip the cream again before serving it. Coconut Whipped Cream 1 pound (455 g) strawberries ¹⁄₂ teaspoon flaxseeds Place a small amount of whipped cream into the corner of a small plastic bag. Cut a small hole into the corner of the bag to create an icing pipe. Remove the tops of the strawberries. Slice a round from the bottom of each strawberry and keep both the top and the bottom together as a set. Place the strawberry round on a plate, pipe a circle of coconut cream on top of the round, place the top of the strawberry onto the whipped cream, and finish the hat with a small dab of whipped cream on top. Complete the Santa by placing two flaxseeds where the eyes should be. Enjoy immediately. Batch Cooking and Leftovers: Strawberries tend to go bad quickly, so I don't recommend you prepare a double batch unless you're certain your family will eat the Santas within 3 days. Leftover whipped cream can be stored in the refrigerator for up to 2 weeks. Make It a Meal: Serve with a variety of easy, light finger foods around the holidays when you're experiencing holiday-food burnout. Try pairing them with raw sliced vegetables dipped in Avocado-Mango Salsa and OMGrain-Free Chicken Tenders. banana snowmen Changing your diet doesn't mean that you have to miss out on fun food ideas for the holidays; it just means preparing something a little different. Your kids will love assembling these Banana Snowmen for the winter holidays and it's a treat-like snack you can actually feel good about eating! The ingredients list includes only enough to build the snowmen. I suggest having far more ingredients on hand if you're doing this project with kids, because they will surely munch on the ingredients during assembly. 3 bananas 5–10 strawberries 10 blueberries ¹⁄4 cup (37 g) raisins 3 small slices of carrot 1 tablespoon sunflower seeds Cut the bananas into 1-inch-thick (2.5 cm) rounds. You can get about 10 rounds per banana. Place three banana rounds onto each skewer to form the snowman bodies. Remove the tops of the strawberries and slice them in half lengthwise if using large strawberries. Keep them whole if using smaller strawberries. Place the strawberry on top of the bananas followed by one blueberry to form a hat. Carefully cut the carrot slices into triangles to use as noses. Decorate the snowmen using raisins, carrot triangles, and sunflower seeds. Serve immediately. Batch Cooking and Leftovers: The bananas will start to brown after 2 days, so only prep as many snowmen as you plan to eat within that 2-day period. Make It a Meal: My kids and I assemble the snowmen over the winter holidays along with Strawberry Santas, Lemon Coconut Date Balls, and Chocolate Walnut Brownies topped with Chocolate Icing. The kids are able to help, which has now become our tradition! apple slice monsters These fun and healthy snacks are made from 100 percent whole-food ingredients. It's the perfect recipe for a Halloween gathering, as a unique school project, or on days when you're feeling like putting a bit of creativity into your child's snack. The ingredients only list what you'll need to make eight monsters. You'll likely want extra blueberries and strawberries if kids are helping, because they'll likely munch on these ingredients as you build. You can use any nut or seed butter to attach the tongue and eyes, but SunButter keeps the flavor consistent with the sunflower seed teeth. Assembling Apple Slice Monsters in a school setting would be a fun and manageable project to do with a large group of children, but be sure to avoid any SunButter that was processed on shared equipment with nuts or peanuts, if any students in the classroom have nut allergies. 2 green apples 2 tablespoons sunflower seeds 3 strawberries 2 tablespoons SunButter 10–16 blueberries Quarter the apples and carefully remove the seeds, leaving as much of the apple flesh as possible. Cut a wedge out of the peel side of the apple, keeping the wedge slightly off center. This leaves more room for the eyes on the top, and less space for the mouth on the bottom. Place approximately 10 sunflower seeds into the top of each mouth, poking the pointed side of the seed into the apple flesh. Remove the tops of the strawberries and cut them into thin slices. Use a small dab of SunButter to adhere the strawberry into the mouth as a tongue. Adhere the blueberry eyes with a small dab of SunButter. Each monster can have one, two, or even three eyes. Repeat with the remaining apple quarters and enjoy. Batch Cooking and Leftovers: If stored in the fridge, apples will start to brown over time. Better to prep 4–6 hours in advance and they won't lose any of their color. Spritz them with a lemon water mixture if you're trying to prevent them from browning. Make It a Meal: Add to your child's lunch box as a playful treat along with an Herbed Beef Burger, Grain-Free Tabbouleh, and Coconut and Cinnamon Sweet Potato Mash. bacon-bundled green beans I tested this recipe with varying vegetables, including asparagus, but green beans came out as the surprising winner. These savory little morsels are a hearty and nutritious finger food for any party. Not only are they delicious and visually stunning, but they're so easy to make! These beans store well in the refrigerator and make a great addition to a packed lunch. 1¹⁄₂ pounds (680 g) green beans, washed and trimmed 12 ounces (340 g) bacon Preheat the oven to 350°F (177°C). Using eight or nine green beans at a time, form a small bundle and tightly wrap the green beans in a piece of bacon from the top to the bottom. Place the bundles on a baking sheet, allowing an inch (2.5 cm) of space between bundles. Bake the green beans for 1 hour, flipping halfway through. Serve the green bean bundles immediately. Batch Prepping and Leftovers: This is a recipe that can be easily doubled, so plan to use leftovers for snacks and meals throughout the week. Leftovers are delicious paired with soups such as Creamy Cauliflower Soup. Make It a Meal: Pair with Apple Butternut Soup and a Massaged Kale Salad with Lentils for a hearty wintertime meal. deviled eggs Deviled eggs are one of my favorite prep-ahead proteins. Buying free-range eggs that come from hens fed a diet free of GMOs (seek out a local source and have them confirm this) guarantees that you're consuming one of the most nutrient-dense proteins in existence. Eggs from healthy chickens are loaded with protein, omega-3 fatty acids, HDL cholesterol (the good kind), and loads more vitamin E and A than store-bought eggs. Deviled eggs are creamy, savory, and delicious little morsels of nutrition! And they store and pack well. You can use a decorative icing pipe to fill each egg if you want a fancified dish for serving to guests. Using the pressure cooker method to prepare the hard-boiled eggs yields an egg that is much easier to peel, making it possible to complete this recipe in far less time than using the stovetop method. Shown on page 169. 12 Hard-Boiled Eggs ¹⁄4 cup (55 g) Homemade Mayonnaise 1¹⁄₂ teaspoons Dijon mustard ¹⁄4 teaspoon salt 1⁄8 teaspoon paprika Peel the eggs and cut each egg in half. Remove the yolks and place the yolks into a small bowl with the mayonnaise, mustard, and salt. Mash using a fork until the mixture is completely smooth. Using a small spoon, evenly distribute the yolk mixture back into the egg whites. Place the finished eggs on a plate and evenly sprinkle paprika on top. Batch Cooking and Leftovers: I always assume that we'll eat two eggs (four deviled eggs) per person for a meal or one egg (two deviled eggs) for a snack. Double the recipe if it's for a whole meal. Leftovers are quickly eaten in my household. We use them as the protein in salads or for a quick snack with a piece of fruit. Prepare the Hard-Boiled Eggs up to 5 days in advance. Make It a Meal: Serve with an Everyday Salad with Red Wine Lemon Vinaigrette and a fresh, local peach for a light packed lunch in the summer. Replace the peach with fresh corn on the cob when in season. coconut cream goji bites These little treats seem to disappear almost as quickly as I can make them. They're wonderfully fatty little snacks for the kids, and I make them when I want something that's quick, easy, satisfying, and doesn't make a huge mess. Plus, I love all of the superfoods in them! These sweet and creamy morsels are a treat that both parents and kids can feel good about eating. They need to remain chilled or they'll melt, so send them with an ice pack if they're taken on the go. 4 cups (450 g) unsweetened shredded coconut 1 tablespoon coconut oil ¹⁄₂ teaspoon salt ¹⁄₂ cup (55 g) dried goji berries ¹⁄₂ cup (55 g) dried mulberries 1 cup (150 g) hemp hearts Combine the coconut, coconut oil, and salt in a high-powered blender and blend on high until the coconut becomes a liquid, about 6 minutes. You have to occasionally stop the blender to scrape the coconut down from the sides with a rubber spatula. Add the goji berries and mulberries and blend on high for an additional minute. Add the hemp hearts and blend just until combined, about 5 seconds. Divide the mixture in half and place one half between two pieces of waxed or parchment paper. Using a rolling pin, smooth the mixture until it's as thin as a cracker, about ⅛ inch (3 mm) thick. Carefully slide the waxed paper onto a baking sheet. Repeat with the second half and refrigerate the mixture for 1 hour. Once the mixture has completely hardened, remove it from the refrigerator and heavily score 2-inch (5 cm) squares with a knife or pizza cutter into the surface of the mixture. Break apart the squares, place them in an airtight container, and store them in the refrigerator. The squares will melt or become soft if stored at room temperature. Batch Cooking and Leftovers: This is a great, calorie-dense snack to have on hand in the refrigerator or freezer. If doubling the recipe, work in batches as the size of your blender will be a limiting factor. Prepare two batches, spread into thin layers, and then pile the sheets on top of each other. You can chill multiple sheets at a time this way. Make It a Meal: Pack into your child's lunch box (don't forget the insulated sleeve and ice pack) along with Deviled Eggs, sliced raw vegetables, Fiesta Sunflower Seed Hummus (or a store-bought variety), olives, and a small handful of Roasted and Salted Walnuts. collard wraps If you don't have a small garden or visit your local farmers market, it's time to start! These simple and delicious wraps are easy to prepare, and the collards adapt the wonderful flavors of whatever you put inside. However, it's hard to find a collard worth wrapping at the grocery store. Big, beautiful, fresh leaves are best found in your home garden or at the farmers market. I like to keep my wraps relatively small in diameter and increase the number of wraps I serve at one sitting, but you can overstuff Collard Wraps if you'd prefer to eat just one. 8 large collard leaves, stem removed at base of leaf PROTEIN OPTIONS (CHOOSE ONE) The Tuna Salad Upgrade Simple Egg Salad Fiesta Sunflower Seed Hummus Grilled Chicken Breasts with Basil and Thyme (sliced) Grilled Chicken Salad with Fresh Vegetables Pulled Mojo Chicken OTHER TOPPINGS (CHOOSE AS MANY AS YOU'D LIKE) Chimichurri Sauce Pecan Parmesan "Cheese" Tomatoes, diced Red onion, thinly sliced Olives, sliced Lettuce, shredded Avocados, diced Lay the collard leaves flat and distribute your protein of choice evenly among them along the mid-rib of the leaf, leaving the top of the leaf empty for folding downward. (Note: The side of the leaf with the thick stem will break when bent, so be sure to place the stuffing atop the thickest part of the stem, closest to the leaf base.) Distribute your other toppings on top of the protein. Fold over one side of the collard, followed by the top of the leaf, and lastly roll the remaining side to form a wrap. Serve immediately. Batch Cooking and Leftovers: Prepared collard wraps keep for only about 12 hours, so you'll need to prepare the wraps fresh each day. Simply prepare the stuffing ingredients and store these in the refrigerator till you're ready to assemble the wraps. Make It a Meal: Pair with Summer Potato Salad or Dilly Sweet Potato Salad for a quick packed lunch or light dinner. Step 1. Place the stuffing along the mid-rib of the leaf, leaving the top of the leaf empty for folding downward. Step 2. Fold over one of the sides of the collard. Step 3. Fold down the top of the leaf. Step 4. Roll up the remaining leaf to form a wrap. "pasta" bowls * after preparing meal components Creating varying flavor profiles atop a bed of a spaghetti squash can be an excellent way to use up leftovers. But don't underestimate these dishes! Serving any of the following flavor-packed options is a sure way to convince anyone that grain-free eating is creative, filling, and delicious! "Pasta" Bowls make for a quick and easy weeknight dinner as long as the meal components have been made in advance. You can either prepare them in advance on Saturday and Sunday (prep days) or pull the components from the freezer (see the following Batch Cooking and Leftovers section). GREEK BOWL 1 Simple Spaghetti Squash Grilled Chicken Breasts with Basil and Thyme† Sun-Dried Tomato Tapenade† Simple Vegan Pesto 1 jar (12.1 ounces [343 g]) kalamata olives, sliced 2–3 handfuls spinach (optional) MEXICAN FIESTA BOWL 1 Simple Spaghetti Squash Pulled Mojo Chicken† or Mexican Shredded Beef† Chimichurri Sauce† Garlicky Guacamole Fermented Salsa Fresca THAI PEANUT BOWL 1 Simple Spaghetti Squash Grilled Chicken Breasts with Basil and Thyme† Bok Choy and Red Peppers with Thai Peanut Sauce ITALIAN BOWL 1 Simple Spaghetti Squash Hearty Meat Bolognese† Pecan Parmesan "Cheese" † Use half of the recipe. Freeze the other half if you don't plan to use it immediately. Determine your bowl of choice and combine the desired amount of each component into a bowl. Serve "Pasta" Bowls warm. Batch Cooking and Leftovers: Store each meal component in a separate storage container in the refrigerator for up to 5 days (components like Sun-Dried Tomato Tapenade can be stored much longer; refer to the individual recipes for more guidance). Assemble components immediately before serving. Many of the recipes used to assemble "Pasta" Bowls can be pulled from the freezer if pre-prepared (refer to Recipes That Freeze Well, page 285, for a complete list). For example, the Greek-style "Pasta" Bowl: Prep two spaghetti squashes (freeze one), one batch of Grilled Chicken Breasts with Basil and Thyme (freeze half), a single batch of Sun-Dried Tomato Tapenade (freeze half), and a double batch of Simple Vegan Pesto (freeze half). This means next week you have everything ready to thaw and eat! Just top with fresh kalamata olives and spinach and serve. Make It a Meal: Serve your desired "Pasta" Bowl with a glass of Infused Water or Hibiscus Zinger Iced Tea for a 100 percent homemade meal, beverage and all! AN EVERYDAY BASIC pecan parmesan "cheese" This recipe originated when I was teaching raw foods cooking classes in my home. Participants were always shocked at how truly delicious this cheese substitute is. Its rich, nutty flavor will almost make you believe you're eating the real deal! ¹⁄₂ cup (60 g) pecan halves 1 tablespoon nutritional yeast 1 tablespoon olive oil ¹⁄₂ teaspoon salt Place the pecan halves into a food processor and process until the pieces are approximately the size of peas. Add in the nutritional yeast, olive oil, and salt. Process again until it's a coarse crumb. Avoid overprocessing, because you want to maintain texture and crunch to your "Parmesan." Serve immediately. Batch Cooking and Leftovers: This recipe freezes well. Make a large batch by spreading a single layer of it on a parchment paper–lined baking sheet, freezing it, and then pouring it into a freezer-safe container. The result will be a condiment that can be easily portioned out as needed. If preparing in larger batches, keep an eye on the salt content to avoid an overly salted outcome. the tuna salad upgrade Tuna salad is a relatively quick, easy, and nutritious food to prepare for busy weeknights or to have on hand for packed lunches. What I love about this salad is that it's actually quite bulky thanks to the addition of vegetables. It will be a nutritious way to fill your family's bellies! Skipjack tuna has less mercury compared with albacore (and it also happens to be less expensive), but neither should be eaten more than twice per week (refer to the Consumer Guide to Seafood from the Environmental Working Group, ewg.org). I purchase brands of canned, sustainably line-caught tuna to help protect the oceans from being overfished. You could also prepare the recipe using canned wild Alaskan salmon or sardines. Both have lower mercury content and are high in omega-3 fatty acids. Traditional tuna salad is often prepared with relish or pickles. I often use fermented vegetables such as green peppers, Dilly Beans, or radishes in the place of the celery in order to achieve this same flavor profile. You can use the Basic Brine to create your own unique ferments for use in tuna salad. 3 cans (5 ounces [142 g] each) tuna ¹⁄₂ cup (115 g) Homemade Mayonnaise 1 tablespoon Dijon mustard 4 stalks celery, finely diced ¹⁄₂ red pepper, finely diced 2 tablespoons finely diced red onion, about 1⁄8 onion Salt, to taste Pepper, to taste Place the tuna in a medium-sized bowl and mash it with a fork until all of the pieces are broken apart. Stir in the mayonnaise and mustard until mixed well. Add in all the remaining ingredients and mix until well combined. Serve immediately. Batch Cooking and Leftovers: This recipe does not lend well to batch cooking unless you're serving the dish for a large group of people. Make It a Meal: Perfect for school lunches with raw, sliced vegetables, Cold-Pack Dill Pickles, a Carrot Cake Applesauce Muffin, and a small handful of nuts. simple egg salad This egg salad appears on our table (and in the kids' lunch boxes) on occasions when I'm just too busy to pull anything else together. You can make this dish with any number of eggs to suit your specific needs at the time. Everyone is always happy with this simple yet flavorful and nutritious salad. You can add vegetables like grated carrots, pickles, onions, celery, or chopped ferments for a more flavorful dish. 12 Hard-Boiled Eggs, peeled 1⁄3 cup (75 g) Homemade Mayonnaise 1 tablespoon Dijon mustard ¹⁄4 teaspoon salt Place the eggs into a medium-sized bowl and mash using a potato masher or fork. Add the remaining ingredients and continue to mash and mix until you've achieved your desired consistency. Serve immediately. Make It a Meal: Serve on Plantain Sandwich Bread along with lettuce and tomato for a traditional sandwich, over an Everyday Salad with Fresh Basil and Garlic Balsamic Vinaigrette for a nutritious lunch, or simply as a dip for sliced cucumbers as a quick snack. AN EVERYDAY BASIC hard-boiled eggs Fresh Hard-Boiled Eggs can be difficult to peel, but the pressure cooker method completely eliminates this problem. It's by far my preferred method! Hard-Boiled Eggs are great for snacks, in recipes like Deviled Eggs and Simple Egg Salad, or even for a quick on-the-go breakfast. They're quick, versatile, and packed with healthy fats, proteins, and other necessary nutrients. Finding a local source for fresh, pastured eggs is the absolute best choice since you can talk with the farmer about their methods to guarantee the chickens have not been fed GMO grains. Organic is always best, but I fervently avoid GMOs. Desired number of eggs (see Batch Cooking and Leftovers below) Water, enough to cover the eggs, or 1 cup (235 ml) (pressure cooker method) STOVETOP INSTRUCTIONS Place the eggs in a pot and cover them completely with cool water. Place a lid on the pot and heat the pot on high. Bring the water to a boil, allow it to boil for 1 minute, turn off the heat, and allow the eggs to sit in the hot water for 10 minutes covered. Transfer the eggs to a bowl fill with cold water. Allow the eggs to sit in the water to cool for about 5 minutes. ELECTRIC PRESSURE COOKER INSTRUCTIONS Pour 1 cup (235 ml) cool water into the bottom of the pressure cooker. Place the rack into the pressure cooker insert and gently line the rack with your desired number of eggs. Secure the lid and cook on high pressure for 5 minutes. Release the pressure when the cooking time is complete and immediately transfer the eggs to a bowl filled with cold water. Allow the eggs to sit in the water to cool for about 5 minutes. Batch Cooking and Leftovers: Works well in large batches—I prepare 12–18 Hard-Boiled Eggs at a time. Try peeling the eggs as soon as they're done cooking to make a grab-and-go salad topping or snack. Eggs can be stored in their shells in the refrigerator for up to 10 days, or out of the shells for about 5 days. bacon liver pâté Organ meats are some of the most nutritious foods in existence, but their palatability can be a challenge. Liver has unmatched concentrations and bioavailability of iron, vitamin A, and various other nutrients that are important factors in building a healthy immune response. Bacon Liver Pâté was born from my dislike of yet strong desire to tolerate liver on a regular basis. My goal was to enhance my family's immune response, especially during cold and flu season. I've applied the "just add bacon" tactic to this pâté to produce a creamy spread that I can thankfully enjoy (and feed to my children) on a regular basis. If you don't like liver, but want to make it part of your diet, this recipe is for you. If you love liver, you're in luck because this recipe is also for you. 8 ounces (225 g) bacon, chopped 1 large onion, sliced 3 cloves garlic, roughly chopped 1⁄3 cup (80 ml) dry white wine 1 pound (445 g) grass-fed beef liver, roughly chopped 1 teaspoon dried rosemary 1 teaspoon tarragon ¹⁄₂ teaspoon salt 2–4 tablespoons water Heat a large pan over medium heat and sauté the bacon along with the onion and garlic until the onion begins to turn translucent and the bacon has released most of its fat. Pour in the white wine, bring the mixture back to a simmer, and add in the remaining ingredients except the water. Continue to sauté the mixture until the liver is completely cooked through, 6–10 minutes depending on the size of your pieces. Remove the pan from the heat and place the meat-and-onion mixture into a high-powered blender. Blend the mixture on high, pressing it down into the blades till a creamy consistency is reached. You may need to add water 1 tablespoon at a time till you reach a consistency that can be blended. Add as little water as possible. Serve immediately. Batch Cooking and Leftovers: The recipe yields a lot; I divide the pâté into four containers and freeze three, eating only one immediately. Make It a Meal: This is one of the few instances in which I break out a box of acceptable grain-free crackers made from almond flour or cassava flour. I then add olives, sliced raw vegetables, and fresh fruit to make a small yet satisfying meal. sauces, dips, and dressings italian dressing Italian dressing is one of the easiest dressings to make, and your homemade version will boast flavors more delightful and refreshing than any store-bought brand. Use it as a marinade for vegetables before you throw them on the grill or in the oven, or use it as a simple topping for any salad. The oil will harden if stored in the refrigerator, which is why I store it on the countertop. If you do choose to store in the refrigerator (or even the freezer), it takes about an hour, sometimes more, at room temperature for the oil to liquefy again. ¹⁄₂ cup (120 ml) olive oil ¹⁄4 cup (60 ml) white vinegar 2 tablespoons apple cider vinegar 2 tablespoons water 1 tablespoon lemon juice 1 teaspoon garlic powder 1 teaspoon dried parsley 3⁄4 teaspoon dried basil ¹⁄₂ teaspoon dried oregano ¹⁄₂ teaspoon salt Combine all the ingredients in a jar that seals tight, and shake well to combine. Can be stored at room temperature for 2 weeks. Batch Cooking and Leftovers: I almost always double (or triple) the recipe as prep for future meals. You could even make enough dressing for an entire year in one prep session using a number of small jars with lids, and store in the freezer. Make It a Meal: Homemade dressings are what make an Everyday Salad truly tasty. Serve a dressed salad with The Tuna Salad Upgrade, Dilly Beans, and diced avocado. red wine lemon vinaigrette This simple salad dressing is as diverse as it is easy to prepare. The use of common ingredients ensures that you'll almost always be prepared to throw this together in a pinch. Pour this dressing over an Everyday Salad or your favorite Roasted Non-Starchy Vegetables. Try adding fresh herbs such as dill or parsley for additional flavor. ¹⁄₂ cup (120 ml) olive oil ¹⁄4 cup (60 ml) red wine vinegar 2 tablespoons fresh lemon juice 2 tablespoons raw apple cider vinegar 1 tablespoon coarse ground mustard 1 clove garlic, minced ¹⁄₂ teaspoon salt Combine all the ingredients in a jar that seals tight, and shake well to combine. Can be stored at room temperature for 2 weeks. Make It a Meal: Use this dressing to drizzle over Roasted Cabbage Wedges to replace the Tahini-Miso Sauce. Serve the dressed cabbage with Coconut and Cinnamon Sweet Potato Mash and Herb-Encrusted Drumsticks. From left to right: Red Wine Lemon Vinaigrette, Italian Dressing, and Fresh Basil and Garlic Balsamic Vinaigrette. fresh basil and garlic balsamic vinaigrette Basil and balsamic create a rich and sweet addition to any salad. This is by far my kids' favorite salad dressing! I've used varying types of balsamic vinegar to create the dressing. I suggest a thicker vinegar, almost as if it has been reduced, because it results in a dressing that seems to smother and stick to whatever vegetables you've chosen to dress. Making large batches of this dressing in the summer when basil is readily available ensures that you're using quality ingredients. Dressings store well over the course of months, making them an excellent food to prep in bulk for freezing when fresh ingredients are in season. ¹⁄₂ cup (120 ml) balsamic vinegar (see note above) ¹⁄₂ cup (120 ml) organic olive oil ¹⁄4 cup (5 g) minced fresh basil 1 clove garlic, minced ¹⁄₂ teaspoon salt Combine all the ingredients in a jar that seals tight, and shake to combine. Can be stored at room temperature for 2 weeks. Make It a Meal: Use this dressing on an Everyday Salad made from shaved fennel, grated beets, and diced oranges for a unique summer salad. Serve it with Grilled Zucchini and Yellow Squash and Herbed Beef Burgers. tahini-miso sauce This flavorful sauce really packs a punch and is perfect for dishes that might otherwise taste bland. This thick, creamy sauce adheres to most any food and is absolutely delicious paired with steamed or roasted vegetables. Miso is made from a variety of beans including black beans, soybeans, mung beans, and even garbanzo beans. This fermented condiment, which originates from Japan, can be found in the refrigerator section of your local co-op or health food store. The strong, pungent flavor of miso can be overpowering by itself, but small quantities mixed into sauces and soups add a distinct and delightful twist to everyday meals. You can use half a clove of minced fresh garlic in the place of garlic powder for a fresh flavor. ¹⁄₂ cup (130 g) tahini 2 tablespoons water 1¹⁄₂ tablespoons coconut aminos 1 tablespoon white vinegar 1 tablespoon miso ¹⁄₂ teaspoon garlic powder ¹⁄4 teaspoon salt Combine all the ingredients in a bowl and whisk together using a fork or a whisk until completely smooth. Serve the sauce over the top of most any dish (see Batch Cooking and Leftovers below for suggestions). Batch Cooking and Leftovers: Consider preparing a double batch of Tahini-Miso Sauce for storage in the refrigerator as a quick condiment since the sauce keeps for such a long period of time. Roasted Cabbage Wedges are the suggested meal for serving with this sauce, but it could be used with any other dish that needs a flavor upgrade. Make It a Meal: Prepare Turmeric-Ginger Baked Chicken with Garlicky Greens smothered in Tahini-Miso Sauce. Serve it with a side of Coconut Lime Cauliflower Rice or over a bed of Simple Spaghetti Squash. chimichurri sauce Chimichurri is a light, yet densely flavored Argentinian sauce made primarily from fresh herbs and garlic. I adore this recipe over Mexican Shredded Beef or Pulled Mojo Chicken for its bright flavor and colorful accent. Be sure to use a quality organic olive oil when preparing this dish to enhance the nutrient (and flavor) profile. Herbs are a concentrated source of vitamins and minerals, which makes this sauce a nutritious topping for your favorite Mexican dish. 1 bunch flat-leaf parsley, roughly chopped ¹⁄₂ bunch cilantro, roughly chopped ¹⁄₂ cup (120 ml) olive oil 2 tablespoons (30 ml) raw apple cider vinegar or red wine vinegar 1 lemon, juiced 2 cloves garlic, roughly chopped ¹⁄₂ teaspoon cumin powder ¹⁄₂ teaspoon salt Blend all the ingredients together in a blender or food processor until the herbs are mostly smooth and finely chopped. Batch Cooking and Leftovers: I always prepare a double, sometimes triple batch of this sauce since it freezes so easily. You'll need to reduce the amount of lemon juice and garlic if quadrupling the recipe. Tips on Freezing Leftovers: Use an ice cube tray to freeze the sauce in individual servings and transfer the frozen cubes to a Ziploc freezer bag for long-term storage, or put leftovers into a quart-sized freezer bag, place the bag on the counter, and use your hands to smooth the sauce flat, pushing out any air in the process. Freeze the bag flat because it will be easier to store this way. I opt for the flat-bag freezing method since I reuse the entire contents within a week. Make It a Meal: Serve over Mexican Shredded Beef, Coconut Lime Cauliflower Rice, and a side of Plantain Tortillas. From left to right: Pico de Gallo, Garlicky Guacamole, and Chimichurri Sauce. thai peanut sauce Introducing this sweet sauce to a meal will make your eaters believe you have culinary skills beyond what is expected of a home cook. Most peanut sauce recipes use brown sugar or honey, but a similar effect is accomplished using naturally sweet coconut aminos. The sauce is creamy, sweet, and boasts vibrant undertones from garlic, lime, and ginger, making it an excellent choice when you're craving a sweet and savory dish. Peanuts are a crop that can be heavily sprayed with pesticides. I therefore recommend buying organic peanut butter with just two ingredients: peanuts and salt. Manufacturers squeeze all sorts of ingredients into peanut butter, especially sugar, so be sure you're buying a brand that's free of added sugar and oils. ¹⁄₂ cup (135 g) peanut butter (see note above) 1⁄3 cup (80 ml) water 2 tablespoons coconut aminos 1 lime, juiced 2 teaspoons grated ginger 1 clove garlic, minced Salt, to taste Combine all the ingredients in a shallow bowl and whisk together using a fork or a whisk until the sauce is thick and creamy. Serve the sauce over most any dish (see Batch Cooking and Leftovers below for suggestions). Batch Cooking and Leftovers: Leftover sauce can be stored in the refrigerator for up to 2 weeks or in the freezer for up to 2 months. Use leftovers to dress Simple Spaghetti Squash or Simple Whole Roasted Chicken, or use to add flavor to Coconut and Cinnamon Sweet Potato Mash or Coconut Lime Cauliflower Rice. If you enjoy the diversity and flavor of this sauce, you can prepare a double or even triple batch and store leftovers in the refrigerator or freezer for use at a later date. Make It a Meal: This sauce is great with Bok Choy and Red Peppers and OMGrain-Free Chicken Tenders. You can pair these dishes with a bowl of Creamy Carrot Ginger Soup for a more filling meal. simple vegan pesto Pesto is such a versatile sauce to have on hand since fresh basil and garlic instantly elevate most any dish—Vegetable Egg Scramble with Avocado and Salsa, Simple Spaghetti Squash, Roasted Non-Starchy Vegetables, or Grilled Chicken Breasts with Basil and Thyme. The simplicity of this sauce and its versatile nature make it an essential for every home cook! The early months of summer are a good time of year to consider prepping batches of fresh pesto to be frozen for use during the winter months. Fresh basil is an abundant and readily available ingredient from your home garden or local farmers market. Take advantage of this bounty! 1 cup (50 g) packed fresh basil leaves ¹⁄4 cup (32 g) pine nuts ¹⁄4 cup (60 ml) olive oil 1¹⁄₂–2 teaspoons fresh lemon juice 1 clove garlic, roughly chopped ¹⁄4 teaspoon salt Combine all the ingredients in a food processor or blender and process until mostly smooth. Batch Cooking and Leftovers: Leftover pesto will brown where exposed to air, but is fine to eat. Can be easily frozen into individual servings using an ice cube tray or quart-sized Ziploc bag (See the Chimichurri Sauce recipe for instructions.). You can easily double this recipe, but you'll need to reduce the amount of garlic if tripling or quadrupling. Make It a Meal: Use to prepare Greek-style "Pasta" Bowls or as a topping for a fried egg with a tomato slice served over Hearty Almond Flour Bread for a high-fat, low-carb breakfast. sun-dried tomato tapenade If you enjoy olives then you will absolutely love this savory topping. The distinct sweetness of sun-dried tomatoes brings out the tart goodness of an assortment of olives and capers to create a topping that is both refreshing and bold. It's so good that I eat it by the spoonful! Tapenade is packed full of healthy fats that keep you feeling full longer, making it an excellent candidate for adding to breakfast foods like scrambled eggs or frittatas. Don't limit your use of tapenade to lunch and dinners, because it can be used in so many other ways! If you're not working with a good blender or food processor, you may need to soak the sun-dried tomatoes in water for a few hours before making this tapenade. 9 sun-dried tomato halves ¹⁄₂ cup (120 ml) olive oil 3⁄4 cup (100 g) pitted and drained kalamata olives ¹⁄₂ cup (65 g) pitted and drained green olives 2 tablespoons capers 1 cup (50 g) roughly chopped parsley, packed 1 clove garlic, roughly chopped Combine all the ingredients in a food processor or blender and process until you reach a consistency similar to a finely blended salsa. Some small chunks are to be expected, but all ingredients should be finely minced. Batch Cooking and Leftovers: I suggest preparing a double batch of this recipe and dividing it among three separate jars—one for immediate use and two for freezing. Leftovers can be repurposed to flavor many dishes including Greek-style "Pasta" Bowls, Eat Your Greens Frittata, Grilled Chicken Breasts with Basil and Thyme, on a sandwich made from Plantain Sandwich Bread, or as a topping for an Everyday Salad. Make It a Meal: Prepare a Simple Spaghetti Squash and top it with Sun-Dried Tomato Tapenade, Simple Vegan Pesto, and leftover Simple Whole Roasted Chicken. Sun-Dried Tomato Tapenade and Simple Vegan Pesto. fiesta sunflower seed hummus * plus 1 day for soaking Not everyone can easily tolerate beans, which is why I've included this delicious hummus substitute made from 100 percent raw ingredients. This recipe is quick, easy, and makes more than enough hummus to serve on salads, as a dip, or simply by the spoonful! Cumin, garlic, and chili powder combine to create a flavor similar to your favorite taco seasoning, but without the added fillers. See Soaking Seeds and Beans (page 14) for information on the benefits of soaking for enhanced digestibility. 2 cups (290 g) raw sunflower seeds, soaked overnight 8 sun-dried tomato halves, soaked overnight 1 clove garlic, minced 2 tablespoons (30 ml) olive oil 1⁄3 yellow pepper, diced ¹⁄8 white onion, diced 1 teaspoon chili powder 3⁄4 teaspoon cumin powder 1¹⁄4 teaspoons salt 2 lemons, juiced Water, to create desired consistency ¹⁄4 bunch fresh cilantro, minced Soak the sunflower seeds and sun-dried tomatoes in separate jars overnight. (This prevents the sunflower seeds from taking on a burnt orange color from the tomatoes.) Strain both ingredients through a colander and rinse. Place the sunflower seeds, sun-dried tomatoes, and garlic into a food processor or blender and process until the mixture is creamy, about 4 minutes. You may have to keep scraping down the sides with a rubber spatula to get a uniform texture or add your olive oil if it's simply too thick. Waiting to add the oil helps to better pulverize the sunflower seeds into a paste. Add all the remaining ingredients except for the cilantro and process again until well combined and creamy, about 4 minutes more. Add the cilantro and process just long enough to mix the cilantro throughout. Do not overprocess or it will change the color and flavor of the hummus. You can even mix the cilantro in by hand if you're concerned about overprocessing. The hummus is best if chilled for about an hour before serving, but can be served immediately. Batch Cooking and Leftovers: Leftovers don't freeze well. Halve the recipe if hummus isn't a family favorite. Make It a Meal: Serve for dipping with raw sliced cucumbers, carrot sticks, and red peppers. garlicky guacamole You can buy premade guacamole from a store, but the 10 minutes it takes to prepare homemade, fresh Garlicky Guacamole is totally worth the effort. Plus the flavor is leagues ahead of store-bought varieties. The creamy goodness of this guacamole makes it one of the tastiest and most versatile dips in existence! Try it on salads and proteins, as a dip for vegetables, or as a delicious and filling breakfast condiment. It's hard to go wrong with anything made from avocados. Try adding 2 tablespoons of minced cilantro for additional flavor. 2 ripe avocados 1 lemon, juiced 1 clove garlic, minced ¹⁄₂ cup (85 g) finely diced tomatoes 2 tablespoons finely diced red onion ¹⁄4–¹⁄₂ teaspoon salt Combine the avocado and lemon juice in a bowl and mash it into a paste using a fork. Add the remaining ingredients to the avocado paste and mix until all ingredients are evenly distributed throughout the guacamole. Serve immediately. Batch Cooking and Leftovers: Guacamole will oxidize and turn brown when in contact with air. To prevent browning, cover with Saran Wrap, store along with the pit, or squeeze lemon or lime juice on the surface. Doubling, tripling, or even quadrupling this recipe for a party can be made easier with the use of a potato masher to work the avocados. Reduce the amount of garlic if quadrupling the recipe. The tomatoes, garlic, and red onions can be prepped up to 3 days in advance. Make It a Meal: Serve on an Herbed Beef Burger with Fermented Salsa Fresca and an Everyday Salad with Italian Dressing for a low-carb meal. Add in some Crispy Sweet Potato Fries for the kids or if carbs are not a concern. pico de gallo This fresh salsa is far superior to any of the jarred salsas available in the grocery store. I often prepare this salsa in the summer when tomatoes are fresh off the vine and zingy, cool flavors are just what my body craves. Wait to salt this dish until you're ready to serve it. The salt causes the tomatoes to weep, and you'll have quite a bit of excess liquid if it sits too long. If you salt it earlier, you can just pour off the liquid before serving, if necessary. 2 cups (340 g) finely diced grape tomatoes (about 1 pint) ¹⁄4 green pepper, finely diced ¹⁄4 small red onion, finely diced 1 small jalapeño, seeds removed, minced ¹⁄₂ bunch cilantro, finely chopped 1 clove garlic, minced 1 lime, juiced ¹⁄4 teaspoon salt Mix all the ingredients together in a medium-sized bowl and serve immediately. Batch Cooking and Leftovers: This recipe can be easily doubled or tripled. Vegetables can be chopped and refrigerated up to 4 days in advance. Make It a Meal: Enjoy grain-free taco night made from Plantain Tortillas, Pulled Mojo Chicken, Pico de Gallo, Chimichurri Sauce, and Garlicky Guacamole. avocado-mango salsa Don't underestimate the powerful flavor profile of these simple ingredients. Sometimes less is more, and this salsa is a great example of how you can use a few limited ingredients to brighten up any boring meal. Creamy avocados, sweet mangoes, the ever so slightly pungent crunch of red onions, and the zippiness of lime come together in this tantalizing and colorful salsa. 1 ripe avocado, finely diced 1 mango, finely diced 1 tablespoon minced cilantro 1 tablespoon minced red onion 1 clove garlic, minced Juice of ¹⁄₂ lime Pinch of salt Mix everything together in a medium-sized bowl. Serve immediately. Batch Cooking and Leftovers: All ingredients (except for the avocado and salt) can be prepped up to 3 days in advance. Save time by preparing a double batch of this salsa to be used for multiple meals. Make It a Meal: Serve with Coconut Lime Cauliflower Rice and a bowl of Creamy Carrot Ginger Soup. Step 1. Orient the mango so that you can remove both "cheeks." Do this by cutting along the contour of the seed. Step 2. Carefully remove the peel from the remaining portion of the mango. Step 3. Firmly holding the seed, carefully remove the remaining flesh from around the seed. Step 4. Score the mango "cheeks" in a checkerboard pattern, but do not cut through the peel. Scrape out the diced mango cubes with a large spoon. hearty meat bolognese Jarred or canned pasta sauce most often contains sugar, an addition that is entirely unnecessary. Rather than pay loads of money for organic sugar-free versions, make your own nutritious Bolognese using grass-fed beef from a local farm. You won't have to make this recipe often because it yields a huge quantity of deliciously hearty sauce that holds up well in the freezer. I also love that preparing my own sauce allows me the opportunity to add lots of fresh vegetables. Fresh herbs can be used in the place of dried herbs if you so choose. Fresh tomatoes can be used as well, but you'll need to first simmer and blend the tomatoes into a sauce-like consistency before adding the mixture to your Bolognese. 2 tablespoons cooking fat (lard, reserved fat from cooked meats, or olive oil) 2 onions, diced 1 pound (455 g) mushrooms, diced 3 carrots, diced 2 zucchinis, diced 1 head garlic, minced 2 cans (28 ounces [793 g] each) crushed tomatoes 2 cans (28 ounces [793 g] each) fire-roasted crushed tomatoes 2 tablespoons dried parsley 1¹⁄₂ tablespoons dried basil 1¹⁄₂ tablespoons dried oregano ¹⁄₂ tablespoon dried thyme 1 teaspoon salt, or to taste 2 pounds (910 g) ground beef Preheat a large pot over medium-high heat, melt the cooking fat in the pot, and sauté the onions for 4–5 minutes. Add in the mushrooms and carrots, and sauté for another 5 minutes. Add in the zucchinis and garlic, and sauté until all the vegetables are soft, about 10 more minutes. Pour in the canned tomatoes, herbs, and salt, and bring the sauce to a simmer. The amount of salt added depends on whether you're using salted or unsalted canned tomatoes. Brown the beef in a separate pan while the sauce simmers. Add the cooked beef to the sauce and allow everything to simmer for 10 minutes. Serve the sauce immediately. Batch Cooking and Leftovers: This is a great recipe to freeze for future use, since it yields such a large amount. I often divide this recipe into thirds: Two-thirds are frozen in freezer-safe bags, and one-third is eaten immediately. If you double the recipe for Pecan Parmesan "Cheese" and Simple Spaghetti Squash, it's possible to assemble Italian-style "Pasta" Bowls entirely from the freezer. Make It a Meal: Serve over lightly sautéed zoodles (see notes in Shrimp Scampi with Tomatoes and Zoodles for instructions), and top the dish with Pecan Parmesan "Cheese." Serve with a side Everyday Salad and Italian Dressing. grain-free gravy I've tried this recipe with a variety of vegetables but none compare to the color and flavor achieved with onions, zucchinis, and celery. Grain-Free Gravy is such a simple and delicious upgrade for any weeknight or holiday meal. The thick, creamy goodness is a much healthier alternative to more traditional gravies made from cornstarch and other unhealthy thickeners. Simple Whole Roasted Chicken 1 onion, diced 5 stalks celery, diced 2 medium zucchinis, sliced 4 cloves garlic, halved 1 tablespoon cooking oil (avocado or olive oil preferred) 1–2 teaspoons salt ¹⁄₂–2 cups (120–470 ml) Chicken Stock Prepare the whole chicken as instructed in Simple Whole Roasted Chicken, and set it into a 9 × 13-inch (23 × 33 cm) baking pan. Set the uncooked chicken aside and prepare the gravy ingredients before placing the chicken into the oven. Combine the onion, celery, zucchinis, and garlic in a bowl and toss with the oil until all vegetables are evenly coated. Pack the vegetables into the baking dish alongside the chicken. Cook the chicken as instructed in the Simple Whole Roasted Chicken recipe. Remove the pan from the oven and transfer the cooked vegetables to a blender (or a vessel for use with an immersion blender). Carefully transfer the whole chicken to a large plate to cool, and pour the remaining drippings into the blender along with the vegetables. Add your desired amount of salt (start with a teaspoon and add more to adjust) and blend until smooth. Adjust the consistency of the gravy by adding warm Chicken Stock (the stock can be preheated on the stovetop in a small saucepan). Serve the gravy immediately Batch Cooking and Leftovers: This recipe makes enough gravy for two whole chickens, but can be used for other gravy-worthy dishes including Sage and Rosemary Sausage Patties. Freeze leftovers. Be sure to blend the thawed, reheated gravy immediately before serving since some separation can occur after freezing. Make It a Meal: Serve over a Simple Whole Roasted Chicken, Red and Yellow Rosemary Potatoes, and green beans prepared using the instructions for Roasted Non-Starchy Vegetables. smoothies and other drinks infused water These refreshing beverages can be served over ice on a hot day as a healthy and refreshing upgrade when you're craving something a bit more flavorful than water. Even better, they can be enjoyed by guests at a party (making a large batch of Infused Water in a large clear glass vessel makes for colorful décor). Try other creative combinations such as rosemary-watermelon, mango-lime, or any other blend that suits your fancy! CITRUS WATER ¹⁄₂ orange, sliced into thin rounds ¹⁄₂ lemon, sliced into thin rounds ¹⁄₂ lime, slice into thin rounds RASPBERRY-LIME WATER 1 lime, sliced into thin rounds 1 cup (120 g), raspberries fresh or frozen PINEAPPLE-MINT WATER 6-inch (15 cm) sprig of mint 1 cup (170 g) diced pineapple, fresh or frozen BLACKBERRY-SAGE WATER 4 large sage leaves 1 cup (140 g) blackberries, fresh or frozen IMMUNE-BOOSTING, ANTI-INFLAMMATORY WATER ¹⁄₂ lemon, sliced into thin rounds 1-inch (2.5 cm) piece ginger, sliced into thin rounds 1-inch (2.5 cm) piece turmeric, sliced intothin rounds Choose any of the listed flavor combinations. Place the ingredients in the bottom of a ½-gallon-sized (or 2-liter) glass jar. Mash ingredients like berries if using fresh berries (this is not necessary for frozen, which seem to fall apart on their own). Fill the jar with water and allow the water to infuse for about an hour. Batch Cooking and Leftovers: You can chop your ingredients up to 5 days in advance, which is a time-saver if you plan to heavily rely on flavored waters. homemade almond milk * plus 12–24 hours for soaking † 475–945 ml Homemade almond milk is a quick and easy way to up your health game in the kitchen. Store-bought milk substitutes are full of ingredients including thickeners, flavorings, preservatives, and fortified vitamins and minerals that I'd prefer to avoid. This homemade, creamy goodness contains just two ingredients and takes just minutes to prepare. You can use this recipe to prepare other nut- and seed-based milks such as homemade hemp milk. Sub out the almonds for 1 cup (150 g) hemp hearts or any other nut or seed to achieve the perfect milk substitute. 1 cup (140 g) raw almonds, soaked overnight 2–4 cups (475–945 ml) water, more for soaking Place the almonds in a jar and cover with water. Allow the almonds to soak overnight. Soaking is optional, but it helps to soften the almonds and improve digestibility. (See Soaking Seeds and Beans, page 14.) Drain and rinse the almonds. (You can skip this step if you didn't soak your almonds.) Combine the water and almonds in a blender and blend on high for 1–2 minutes or until the almonds become a fine meal. The amount of water you use will determine the thickness of the milk. I tend to try to stretch the almonds a bit further by using more water, but you should use less water if you want a thicker, creamier milk. You'll have to play with the recipe to achieve your preferred consistency. Pour the contents into a nut milk bag while holding the bag over a large mixing bowl (see Homemade Coconut Milk, page 219). If you don't have a nut milk bag, line a fine-mesh strainer with cheesecloth (or an old, clean T-shirt), hold the strainer over a bowl, and carefully pour the mixture onto the cheesecloth. Gather the nut milk bag (or four corners of the cheesecloth) and twist to form a ball. Using both hands, squeeze as much liquid from the almonds as possible. The leftover almond pulp can be spread into a thin layer and dried in a dehydrator or in the oven at 250°F (121°C) to make a flour. Alternatively, the wet pulp can be made into crackers. Pour the milk into a jar and store it in the refrigerator. Contents will settle; shake before serving. Batch Cooking and Leftovers: While this freezes well, the amount of freezer space required to store almond milk isn't likely worth the time savings. I would just plan to make a fresh batch each week, unless preparing for a family vacation (where a block of frozen almond milk could help chill other items in your cooler). You can easily double or even triple the recipe if your family uses a lot of almond milk, but you may have to work in batches since the size of your blender will be a limiting factor. Apple Walnut Crisp Cereal with Homemade Almond Milk. homemade coconut milk This nondairy milk is so delicious that you're going to have to hide it from your kids! It's good enough to drink on its own, but I most often use it for Apple Walnut Crisp Cereal, morning tea or coffee, or soups. It can also make for a delicious warm beverage for the kiddos on a cold or lazy afternoon. This milk is easy, creamy, flavorful, and will be adored by coconut lovers everywhere! Coconut milk is high in fat and will separate in the refrigerator. The effect is more pronounced the longer the milk is refrigerated; the milk can even form a solid layer of fat that floats above the liquid portion. If this happens, place the jar of milk in a warm-water bath till you can once again shake the contents back together. 4 cups (945 ml) warm water 2 cups (225 g) shredded unsweetened coconut ¹⁄₂ teaspoon vanilla extract (optional) Heat the water on the stovetop until it's warm, but not boiling. Using warm water helps to release the fat from the coconut, creating a creamier milk. Combine the warm water, coconut, and vanilla extract in a blender and blend for 1 to 2 minutes or until the coconut becomes a fine meal. Pour the contents into a nut milk bag while holding the bag over a large mixing bowl. If you don't have a nut milk bag, line a fine-mesh strainer with cheesecloth (or an old, clean T-shirt), hold the strainer over a bowl, and carefully pour the mixture onto the cheesecloth. Gather the nut milk bag (or four corners of the cheesecloth) and twist to form a ball. Using both hands, squeeze as much liquid from the coconut as possible. The leftover coconut pulp can be spread into a thin layer and dried in a dehydrator or in the oven at 250°F (121°C) to make a flour. Alternatively, you can replace half of the coconut flour in the Carrot Cake Applesauce Muffins with leftover wet pulp. The pulp can be stored in the freezer until you're ready to prepare the muffins. Pour the milk into a glass jar for storage and store it in the refrigerator. Contents will settle; shake before serving. Batch Cooking and Leftovers: This recipe can be easily doubled, but you may have to work in batches since the size of your blender will be a limiting factor. Step 1. Blend the unsweetened shredded coconut with warm water for about a minute or until the coconut becomes a fine meal. Step 2. Pour the milk through a nut milk bag over a large mixing bowl. Step 3. Squeeze the milk from the bag using two hands. date-sweetened hot chocolate Store-bought hot chocolate mixes are often made with high-fructose corn syrup and hydrogenated oils. Why would you ever prepare such a thing when you can instead enjoy an amazing cup of guiltless, date-sweetened hot chocolate? I can't think of a more perfect hot beverage to enjoy as a special treat with the kids on a cold day. You can make this into a sweetened coffee beverage as a substitute for sugar-laden coffee drinks. To do so, simply reduce the amount of milk by half and sub in 1 cup (235 ml) of coffee or espresso. Sweetened coffee beverages are a source of unnecessary calories and sugar, and this substitute may help slowly wean you from your morning sugar bomb. Gradually reduce the amount of dates that you add until you can eventually skip the sweetness altogether. 2 cups (475 ml) Homemade Almond Milk 3 tablespoons cacao powder 3 dates, pitted ¹⁄4 teaspoon vanilla extract Combine all the ingredients in a high-powered blender, and blend on high until the beverage reaches your desired temperature. If your blender does not heat foods, you can instead blend the ingredients together and then heat the hot chocolate in the microwave for about 1 minute or in a small saucepan on the stovetop. Batch Cooking and Leftovers: You can certainly prepare a double batch, but it settles after about 20 minutes, so it's a beverage that you'll want to drink immediately. sweet-tooth-zapping banana milkshake Don't underestimate the simplicity of this recipe—it's a quick, sweet, creamy, and perfectly balanced treat for yourself or your kids when you want to satisfy your sweet tooth in a healthy way—a guilty pleasure without the side of guilt! I like to keep a bag of prefrozen banana slices tucked away in the freezer for this milkshake or for quick snacks throughout the week. I'll often buy large bunches of bananas when they're on sale and nearing the end of their life. Not only is this treat easy and delicious, but it's also economical! 2 bananas, sliced and frozen ¹⁄₂ teaspoon cinnamon ¹⁄₂ teaspoon vanilla extract 1¹⁄₂ cups (175 ml) Homemade Almond Milk Combine all the ingredients in a blender. Blend until smooth and creamy. Enjoy immediately. Batch Cooking and Leftovers: I recommend preparing only the amount that you plan to consume immediately (or follow the instructions in Freezing Smoothies, page 222), but you can easily do a double batch. Be sure to plan ahead for this recipe by freezing peeled and sliced bananas ahead of time. Make It a Meal: Serve this as an after-school snack along with sugar-free beef jerky made with grass-fed beef. Freezing Smoothies Smoothies don't take an exorbitant amount of prep time, but the process can be streamlined by batch prepping and freezing. Start by preparing a double batch of whichever smoothie you prefer (your blender won't likely hold more). Pour the contents into freezer-safe Mason jars. Look on the side of the jar and you'll see a line that states, "for freezing." Only fill the jar to this line, allowing headspace for expansion. Overfilling will cause the jars to break. You can stop after just one batch or continue prepping consecutive batches since the blender is already dirty. Smoothies can be stored in the freezer for up to one month, so prep as many smoothies in one session as you'd like, keeping in mind that freezer space will likely be limited. Transfer the smoothie to the refrigerator 12 to 24 hours before you want to drink it. It may still be slightly frozen, but it should be ready for drinking after about an hour of sitting at room temperature. If you drink smoothies for breakfast, this would mean transferring the smoothie to the countertop immediately upon waking and drinking it after you've gotten ready for the day. Give it a good shake before drinking. The smoothie will be slightly more watery than before it was frozen, but the flavor still will be excellent and the convenience may be worth the trade-off. You could also try freezing smoothies in kid-sized portions using reusable baby food pouches to send in packed lunches, but you'll have to experiment to see if the smoothie thaws by lunchtime. It can even act as the ice pack to keep foods cool, but the quality of your insulated lunch bag will influence the rate at which the smoothie thaws. apple cinnamon smoothie I love serving this smoothie when fresh apples become available at the end of the summer. When it's not quite cool enough to turn on the oven, this smoothie does a fabulous job at capturing the essence of fall flavors without the heat from warm foods. This Apple Cinnamon Smoothie can be served warm or chilled. For extra chill, slightly reduce the amount of almond milk and add in a few ice cubes. For a warm smoothie, allow the smoothie to blend in the blender until warm, or briefly heat the smoothie before serving. 2 large handfuls spinach 2 apples, core removed ¹⁄₂ cup (60 g) pecans 2 cups (470 ml) Homemade Almond Milk 1 teaspoon cinnamon Combine all the ingredients in a blender and blend until completely smooth. Enjoy immediately. Batch Cooking and Leftovers: Best if consumed immediately (or follow the instructions in Freezing Smoothies, page 222). If preparing in advance, dice and freeze the apples on a parchment paper–lined baking sheet and then transfer the apples to a freezer-safe bag for long-term storage. The apples can then be used to prepare a frozen version of the smoothie. (A good option when apples are in season and you're looking for a preservation method that requires little effort.) peanut butter and banana smoothie This simple smoothie is a great entry-level green drink for kids. The strong, familiar flavors of banana and peanut butter easily mask the flavor of spinach, making it nearly undetectable. Be sure to take a look at the recipe for the Sweet-Tooth-Zapping Banana Milkshake for some great ideas on prepping ahead. 2 large handfuls spinach 2 bananas, sliced and frozen 4 tablespoons peanut butter 1¹⁄₂ cups (355 ml) Homemade Almond Milk Combine all the ingredients in a blender and blend until completely smooth. Enjoy immediately. Batch Cooking and Leftovers: Best consumed immediately (or follow the instructions in Freezing Smoothies, page 222). Be sure to dice and freeze the bananas in advance. (I always have frozen bananas on hand.) my favorite mango smoothie I absolutely love the flavor of mango combined with just the right amount of sweetness from banana. While I enjoy all of the smoothie recipes in this book, this recipe is by far my favorite. I have even prepared it for a group of preschoolers whose parents were shocked that their child would ever drink such a thing! It's a truly delicious green smoothie. 2 large handfuls spinach 2 cups (240 g) frozen diced mango 1 banana 6 tablespoons hemp hearts 2 cups (470 ml) Homemade Almond Milk Place all the ingredients in a blender and blend until completely smooth. Enjoy immediately. Batch Cooking and Leftovers: Best if consumed immediately (or follow the instructions in Freezing Smoothies, page 222). I most often buy frozen diced mangoes, but you can freeze your own by spreading the diced mango on a parchment paper–lined baking sheet and freezing. See Avocado-Mango Salsa for instructions on how to cut a mango. tropical paradise smoothie This is a perfectly beautiful green smoothie that captures the bright flavors of a tropical island. Sweet tropical fruits are nicely complemented with tart limes and creamy bananas. Enjoy this smoothie on a hot day when a large, hot meal just doesn't feel appetizing or when you want something cool and refreshing to curb your appetite. 2 small handfuls spinach 4 kale leaves 1 cup (120 g) frozen diced mango 1 cup (170 g) frozen diced pineapple 1 banana 2 cups (475 ml) coconut water 2 tablespoons lime juice Combine all the ingredients in a blender and blend until completely smooth. Enjoy within 2 hours. Batch Cooking and Leftovers: Best if consumed immediately (or follow the instructions in Freezing Smoothies, page 222). truly green smoothie You could call this smoothie a "salad in a blender." I absolutely adore the creamy, green goodness of this smoothie. Not only do I love its refreshing savory flavor, but I also instantly feel like I've done something good for my body. Try serving the smoothie with a couple of Hard-Boiled Eggs for a quick, easy, and nutrient-dense meal on a hot summer day. Some people might find the high fiber load in this smoothie to be challenging to digest. If this is the case, omit the water and avocado, blend all of the ingredients (you'll have to keep pushing them down into the blades, but they'll eventually start to blend), and strain the mixture through a nut milk bag or cheesecloth to extract the juice. This technique can be used to juice any of your favorite fruits and vegetables without the use of a juicer. Juices should not be frozen and should be consumed within 24 hours. They'll start to settle, but you just need to give them a good shake before consuming. 2 large handfuls spinach 8 outer romaine leaves, roughly torn into pieces 2 celery stalks, roughly chopped 1 green apple, cored ¹⁄₂ large cucumber, roughly chopped ¹⁄₂ lemon, peeled and seeds removed ¹⁄₂ avocado 1 small piece of white onion (about 2 tablespoons chopped) Pinch of salt 2 cups (475 ml) water 8 ice cubes Combine all the ingredients in a blender and blend until completely smooth. Enjoy within 2 hours. Batch Cooking and Leftovers: Best if consumed immediately (or follow the instructions in Freezing Smoothies, page 222). vanilla strawberry beet smoothie "Beets and strawberries?" you say. Don't knock it until you've tried it! The powerful liver-detoxifying properties of raw beets are subtly paired with refreshing strawberries and hints of vanilla. The high antioxidant content of this deep red smoothie will get a big thank-you from your body's detoxifying mechanisms. It's one of my favorites, given its rich color and powerful health benefits. Try subbing the strawberries with frozen dark sweet cherries and blueberries for a sweeter, darker smoothie. 2 large handfuls spinach 2 small beets, peeled and roughly chopped 2 cups (130 g) frozen strawberries 2 tablespoons hemp hearts ¹⁄₂ teaspoon vanilla extract Dash of cinnamon 2 cups (475 ml) water Combine all the ingredients in a blender and blend until completely smooth. Enjoy within 2 hours. Batch Cooking and Leftovers: Best if consumed immediately (or follow the instructions in Freezing Smoothies, page 222). winter immunity tea My family frequently drinks this tea going into cold and flu season in the fall and throughout the winter. The mild flavors help to support your immune system in the fight against bacterial and viral infections. As with all herbal remedies, consistency is necessary in order to yield results. 4 tablespoons dried echinacea (best if a mix of roots, stems, and flowers) 3 tablespoons dried rose hips 3 tablespoons dried nettle Combine all the ingredients in a small jar with a lid and shake until evenly mixed. Use a tea ball to steep 1 tablespoon of tea mixture in 1 cup (235 ml) of hot water and enjoy. You can use a French press to make a larger quantity of tea at one time. Enjoy daily during cold and flu season or drink up to 3 cups per day when sick. Batch Cooking and Leftovers: Loose tea can be stored out of direct sunlight for up to a year. Winter Immunity Tea shown with Tummy Ache Tea and Bedtime Tea. tummy ache tea You don't necessarily have to have a tummy ache to enjoy the soothing benefits of this calming tea. My kids love this tea's glowing warmth when they're not feeling well, but they also like it as an after-dinner drink that helps settle a full stomach before bed. Add a couple of drops of stevia for a lightly sweetened tea. 5 tablespoons dried peppermint 3 tablespoons dried ginger 3 tablespoons fennel seeds Combine all the ingredients in a small jar with a lid and shake until evenly mixed. Use a tea ball to steep 1 tablespoon of tea mixture in 1 cup (235 ml) of hot water and enjoy. You can use a French press to make a larger quantity of tea at one time. Enjoy daily or drink up to 3 cups per day when sick. Batch Cooking and Leftovers: Loose tea can be stored out of direct sunlight for up to a year. bedtime tea Having a tea on hand specifically for bedtime can help set the tone for a smooth transition to the bedroom and a good night's rest. The only caveat is that you shouldn't allow your child to drink too much immediately before going to sleep or they might wet the bed! We often enjoy this calming tea about an hour before bedtime. Its fragrant and relaxing essence is the perfect way to close the day. Note that people with ragweed allergies may have a mild allergic response to chamomile. 5 tablespoons dried chamomile 3 tablespoons dried catnip 3 tablespoons dried lemon balm Combine all the ingredients in a small jar with a lid and shake until evenly mixed. Use a tea ball to steep 1 tablespoon of tea mixture in 1 cup (235 ml) of hot water and enjoy. You can use a French press to make a larger quantity of tea at one time. Batch Cooking and Leftovers: Loose tea can be stored out of direct sunlight for up to a year. hibiscus zinger iced tea I love the tart, refreshing flavor of zinger teas, but it's nearly impossible to find a store-bought version that doesn't contain added flavoring. Luckily, you can easily make your own! You can drink this as a hot tea, but I prefer to make large batches to enjoy as an ice-cold beverage on a hot day. Shown on page 213. 2 cups (100 g) dried hibiscus petals 1¹⁄4 cups (95 g) dried orange peel 1 cup (26 g) dried spearmint 1 cup (30 g) dried lemongrass 1 cup (75 g) dried rose hips Water Ice Combine the dried herbs in a ½-gallon-sized (or 2-liter) jar that allows for some headspace at the top. You won't be able to shake your herbs for mixing if they're too tightly packed. Cover the jar with a lid and shake in varying directions until the herbs are evenly distributed throughout. If you don't have a jar large enough, mix the ingredient together in a large bowl and pack the tea into smaller jars (this is also a great idea for holidays gifts). To make one batch of iced tea (approximately 1 gallon), bring 6 cups (1.5 liters) water to just under a boil. Place 1 cup (50 g) of dried tea into a ½-gallon-sized jar or bowl and pour the hot water on top. Allow the tea to steep for 10–15 minutes, stirring occasionally. Fill a gallon-sized (3.8-liter) pitcher or pourable jar two-thirds full of ice. Place a metal fine-mesh strainer over the top of your pitcher or jar and carefully pour the hot tea through the strainer over the ice. Fill the pitcher or jar to the top with cold water or more ice to yield a gallon of iced tea. Stir the iced tea and serve immediately or store in the refrigerator. Batch Cooking and Leftovers: Loose tea can be stored out of direct sunlight for up to a year. Once the tea is prepared, it should then be stored for 6 days in the refrigerator as a cold beverage. If doubling the recipe be sure to use adequately sized containers. ferments AN EVERYDAY BASIC basic brine You can ferment most any vegetable (such as broccoli, cauliflower, peppers, etc.) using brine. I've included recipes for some of my favorites here. Leafy greens like kale, collards, spinach, and cabbage can be fermented using the dry salt method—the method demonstrated in Dill Pickle Kraut (page 242). The process is straightforward: You add salt and massage the greens to release their juices. In other words, leafy greens will create their own brine. But vegetables like carrots, green beans, and cauliflower cannot be massaged in this way and instead require the addition of brine. The key to successfully fermenting any vegetable is making sure the vegetable stays submerged in the brine during fermentation. This prevents the growth of undesirable molds and bacteria, and guarantees proliferation of Lactobacillus and other beneficial bacteria and yeasts. I have included a few techniques for mold prevention in these recipes, but using a fermenting weight along with a pickle pipe or air lock is by far the most successful and effective method. You can start fermenting using these recipes, but you can also experiment with your own creations using this simple brine. It's best to avoid using chlorinated water for brines since it may prevent the growth of beneficial bacteria. However, it'll still work if this is all you have. Brine recipes generally call for 1–3 tablespoons of salt per quart (945 ml) of water. I've found that 2 tablespoons of salt creates my preferred saltiness and texture. Adding too little salt results in a mushy vegetable, but adding too much can make your vegetables too salty. Experiment to find your own perfect ratio of salt to water. 2 tablespoons salt 1 quart (945 ml) water Dissolve the salt in the water and pour the brine over your desired vegetables. Batch Cooking and Leftovers: Only prepare the amount of brine that you'll need to ferment your desired vegetables. The recipe can be easily doubled or tripled if preparing large batches of ferments. fermented salsa fresca This salsa is one of the easiest ferments to incorporate into your diet on a regular basis. It's versatile, refreshing, and brings a uniquely delicious and nutritious flavor to your favorite dishes. I most often enjoy this salsa with Garlicky Greens, topped with two or even three fried eggs and some diced avocado for a quick and nutritious breakfast meal. Use this fermented salsa to replace store-bought salsa for any occasion. 3 cups (510 g) diced tomatoes ¹⁄₂ cup (55 g) finely diced onions 3⁄4 cup (85 g) finely diced green pepper 2 cloves garlic, minced Juice from 1 lime 2 teaspoons salt 2 tablespoons minced cilantro Mix all the ingredients together in a medium-sized bowl. Allow the mixture to sit for about 5 minutes while the tomatoes release some of their juices, creating a brine. Spoon the vegetables into a quart-sized jar, leaving about 2 inches (5 cm) of headspace at the top of the jar. Leave behind as much liquid as possible since there will be excess. Pack the salsa into the jar and pour in just enough liquid to completely submerge the salsa. Place a fermenting weight on top of the salsa, if available. Alternatively, you can partially fill a small Ziploc bag with water and use this as a weight instead. Place a clean towel or cheesecloth around the top of the jar and secure the cloth with a rubber band. You can also use an air lock or pickle pipe if you have one. Lastly, you can use a jar lid, but you will need to "burp" the jar (simply unscrew the lid just enough to release the gases and tighten it when done) every day. Allow the salsa to sit at room temperature for 2–3 days. Place a tight lid on the salsa when fermentation is complete and transfer it to the refrigerator. Batch Cooking and Leftovers: Preparing an extremely large batch is a great idea since this salsa is so versatile and seems to easily make its way into many dishes. Increase the amount of garlic to three cloves if doubling the recipe, four cloves if tripling, or five cloves if quadrupling. Make It a Meal: Serve over Mexican Shredded Beef, shredded romaine lettuce, Garlicky Guacamole, Pico de Gallo, and grilled corn on the cob for a filling and colorful taco salad bowl. basily carrots Basily carrots are the perfect ferment recipe for the novice! These carrots are bright and crunchy, and they have the added benefits of being partially digested by microbes. Carrots are a great snack for kids, so why not increase the nutritional value by fermenting before serving? Your kids will love the unique flavors and their tummies will thank you for the probiotic-rich foods! Be sure to see my note regarding mold (see the Dilly Beans recipe, page 240). I like to use tall, 24-ounce (0.7-liter) jars, because my kids seem to enjoy eating the longer carrots. But you can use any jar you'd like; just cut the carrots to the appropriate size. The great thing about fermenting is that you can even use an old salsa or marinara sauce jar if that's all you have. Try other fresh herbs in the place of basil such as rosemary, tarragon, sage, or any other herb that your family enjoys. 3⁄4–1 pound (340–455 g) carrots, washed 5 fresh basil leaves, thinly sliced 1 clove garlic, smashed and peeled ¹⁄₂ recipe for Basic Brine Cut the carrots into long, thinly sliced or french fry–shaped sticks. Trim the carrot length so that when standing upright in a wide-mouth 24-ounce jar (or whatever sized jar), there is approximately 1½ inches (3.8 cm) of space between the end of the carrot and the top of the jar. Place the basil and garlic into the bottom of the jar and pack the carrots upright into the jar as tightly as you can. The tighter the carrots, the less likely they'll be able to float when the brine is added. Pour the brine over top of the carrots, making sure that the carrots are completely submerged. Place a fermenting weight on top of the carrots, if available. Alternatively, you can partially fill a small Ziploc bag with water and use this as a weight instead. However, the weight isn't necessary as long as your carrots are very tightly packed. Place a clean towel or cheesecloth around the top of the jar and secure the cloth with a rubber band. You can also use an air lock or pickle pipe if you have one. Or you can secure a lid onto the jar, but you will need to "burp" the jar (simply unscrew the lid just enough to release the gases and tighten it when done) every day. Allow the carrots to sit at room temperature, completely submerged in brine, for 3–5 days. After 3 days, check the flavor of your carrots to decide if you'd like to ferment them any longer. Once your desired flavor has been achieved, remove the cloth, lid, and weight, and store the carrots (with a lid) in the refrigerator. Batch Cooking and Leftovers: Do not freeze ferments, since freezing will destroy the living yeasts and bacteria responsible for the fermentation process. You can easily double, triple, or even quadruple the recipe to save time in the future and have ferments on hand. Consider mixing and matching your vegetables for a variety of ferments. Make It a Meal: Put into a lunch box along with Sage and Rosemary Sausage Patties, sliced cucumbers and red peppers, Roasted and Salted Walnuts, and a Chocolate Banana Cupcake. dilly beans I used to prepare dilly beans by canning, but I haven't canned a thing (except for applesauce) since discovering ferments! These perfectly crunchy little beans are tangy, garlicky, and have just the right amount of dill. The added nutritional benefits of fermenting compared with canning make it my first choice when storing excess foods from the garden. A small amount of mold can grow on the brine surface at times. Simply scrape the mold from the surface and enjoy your dilly beans. Discoloration of the beans or mold growing on the beans themselves is a sign that something has gone wrong. Mold shouldn't grow if the beans stay submerged in the brine, but if it does happen, toss the beans and start again. See Dill Pickle Kraut (page 242) for information about where you can learn more regarding fermentation safety and troubleshooting. 1 pound (455 g) green beans, washed and trimmed 3 large dill leaves or 1 dill flower head 2 cloves garlic, smashed and peeled ¹⁄₂ teaspoon whole mustard seed ¹⁄₂ recipe for Basic Brine Trim the green bean length so that when standing upright in a wide-mouth quart-sized jar, there is approximately 1½ inches (3.8 cm) of space between the end of the bean and the top of the jar. Place the dill, garlic, and mustard into the bottom of the jar and pack the green beans upright into the jar as tightly as you can. The tighter the beans the less likely they'll be able to float when the brine is added. Pour the brine over the top of the green beans, making sure that the beans are completely submerged. Place a fermenting weight on top of the beans, if available. Alternatively, you can partially fill a small Ziploc bag with water and use this as a weight instead. However, the weight isn't necessary as long as your beans are very tightly packed. Place a clean towel or cheesecloth around the top of the jar and secure the cloth with a rubber band. You can also use an air lock or pickle pipe if you have one. Lastly, you can secure a lid onto the jar, but you will need to "burp" the jar (simply unscrew the lid just enough to release the gases and tighten it when done) every day. Allow the green beans to sit at room temperature, completely submerged in brine, for 5 days. After 5 days, remove the cloth, lids, and weights, and transfer the beans (with a lid) to the refrigerator. Make It a Meal: Dilly beans can be eaten whole as a side or snack, or they can be finely chopped and added to salads including an Everyday Salad, The Tuna Salad Upgrade, and Grilled Chicken Salad with Fresh Vegetables. Serve with Basily Carrots and a handful of Roasted and Salted Walnuts or Deviled Eggs for a great after-school snack. From top left and moving clockwise: Beet Kvass with Lemon, Basily Carrots, Fermented Salsa Fresca, and Dilly Beans. dill pickle kraut There's a reason that flavored krauts have suddenly become popular—they're amazing! I've tried a few different kraut flavors, but dill pickle–flavored kraut is by far my favorite. This versatile condiment elevates the flavor profile of any dish and also provides gut-enhancing microbiota. The microbial population changes over time as the kraut ferments; you can have all of it if you start to eat the kraut as early as 10 days after fermentation begins and continue to let it ferment as you slowly eat away at your creation. To do so, simply remove a large enough portion of the kraut to last for about a week, replace the cabbage leaves, weights, and lid, and allow the fermentation to continue while you enjoy the small sample batch. Some people let krauts ferment for months on end. This is possible with many ferments as long as the vegetable remains submerged in the brine. Exposure to air will cause it to go bad. You can find fermentation troubleshooting information on the North Carolina State Cooperative Extension Home Food Preservation resource page. Look under the Pickles and Fermented Foods section. You can easily find this resource with a Google search. 3¹⁄₂ pounds (1.6 kg) whole cabbage (do not buy preshredded cabbage for ferments) 1–1¹⁄₂ tablespoons salt 4 tablespoons packed, minced dill 1 clove garlic, minced 3⁄4 teaspoon whole mustard seed You'll need to work with a bowl much larger than you think because you'll be massaging the cabbage, which tends to make a mess. Your equipment needs to be clean, but not sterile. Remove two large outer leaves from the cabbage, trying to keep them intact, and set them aside (do not shred these leaves). Shred the remaining cabbage using a knife or food processor. Sprinkle salt over the cabbage as you add it to the bowl. Adding salt as you chop allows the salt to start breaking down the cabbage cells and extracting the water to create a brine. Add the remaining ingredients, mix, taste, adjust the salt if necessary, and allow the cabbage to sit for about 5 minutes to let the salt start removing the juices. Using clean hands, massage the cabbage with as much force as possible until you've created enough brine to completely cover the cabbage when packed into jars. This process can take up to 10 or 15 minutes depending on your efficiency, your technique, and the water content of the cabbage. I find it easiest to place the bowl on the floor and sit above it, allowing me to use my body weight to massage the cabbage. Using one ½-gallon-sized or two quart-sized jars, tightly pack the cabbage into the jar(s), pressing firmly to remove any air bubbles. Pour the remaining brine over the top of the cabbage so that it's completely submerged. Neatly fold the reserved cabbage leaves to create a barrier that will prevent the cabbage from floating above the brine. The shape and size of your folded leaf should fit tightly inside the jar, right on top of the kraut. Place a fermenting weight or small Ziploc bag filled with water directly onto the large cabbage leaf to keep everything weighted down. Be sure to remove any small pieces of cabbage that are stuck to the inside of the jar and exposed to air. Cabbage exposed to air will often mold. Place an air lock (preferred method) or cheesecloth secured with a rubber band on top of your jar(s). Allow the kraut to sit at room temperature for a minimum of 10 days, but 3 weeks or longer is ideal in order to achieve greater microbial diversity. If white mold begins to grow on the brine surface, simply remove it as best you can. The kraut is still safe to eat. Remove the whole cabbage leaves, weights, and air lock or cheesecloth, place a lid on the jar, and transfer it to the refrigerator for storage. Batch Cooking and Leftovers: Once you get comfortable with the kraut-making process, I recommend buying a gallon-sized fermenting jar and doubling this recipe to save time. Make It a Meal: I use kraut to top most breakfast meals. Dice a bowl of fresh tomatoes, top it with two fried eggs, Garlicky Guacamole, and Dill Pickle Kraut. Serve the dish with a Carrot Cake Applesauce Muffin or a piece of fruit for a brightly colored, fresh breakfast. Step 1. Reserve the outer leaves. Stand the cabbage on its top with the stem facing up, and slice along the core to remove about half of the cabbage. Step 2. Continue to slice along the core, removing the final wedges. Step 3. Cut the cabbage half and wedges into smaller sections before shredding. Step 4. Shred the cabbage half and wedges. Salt the shredded cabbage as you add it to the bowl. Step 5. Use your hands to massage the juices from the salted cabbage. Step 6. Place the cabbage into a large glass jar (I've doubled the recipe and am using a gallon-sized jar in the photo). Use a funnel if available. Step 7. Use your fist or a blunt kitchen tool to pack the cabbage into the jar as you go. You want to remove as much air as possible. Step 8. Fit the reserved outer cabbage leaves into the jar and place them on top of the shredded cabbage to form a barrier. Step 9. Place fermentation weights or a Ziploc bag filled with water on top of the large cabbage leaves to keep everything submerged. Step 10. Place an air lock lid on the jar, or secure a clean towel over the top of the jar using a rubber band. beet kvass with lemon There's nothing quite like beet kvass to bring out the rich color, powerful liver-supporting antioxidants, and earthy flavor of beets. The flavor of this highly nutritious beverage is perfected with a twist of citrus or the addition of a few slices of fresh ginger before fermenting. You can use whey, sauerkraut juice, or kvass for a starter culture. I initially used juice from Dill Pickle Kraut (which provided a less-than-desirable flavor), but now I reserve the last ¼ cup (60 ml) of kvass for use in the next batch. Kvass will occasionally turn out thick and viscous, a texture created by excess sugars in the beets. The texture will improve slightly after 2–3 weeks of refrigeration but can be avoided by using fewer beets in future batches. 2 teaspoons salt 1¹⁄₂ quarts (1.4 l) water ¹⁄₂ lemon, thinly sliced 3⁄4 pound (340 g) beets, tops removed ¹⁄4 cup (60 ml) starter liquid (see note above) Dissolve the salt in the water and set aside. Place the lemon slices at the bottom of a ½-gallon-sized Mason jar. Dice the beets into ¾- to 1-inch (1.9–2.5 cm) cubes, enough to fill the jar one-third full. Place the beets on top of the lemons and pour the brine over the beets. A few beets will float, but they'll mostly stay on the bottom of the jar. Cover the kvass with an air lock, or a cheesecloth or towel secured with a rubber band, and allow the kvass to ferment on the countertop for about 3 days. If a film starts to grow, remove it as best you can and allow the kvass to continue fermenting. Once fermentation is complete, strain the kvass into a large bowl, discard the beets, and pour the kvass into glass jars with plastic lids for refrigeration (metal lids will corrode). Batch Cooking and Leftovers: Some people recommend that you let kvass age for a couple of weeks before drinking it (I only do this when it has a viscous texture). Make It a Meal: Serve as an after-dinner drink to aid in digestion, or use it to replace the water in the Truly Green Smoothie. sweet treats coconut whipped cream This rich, creamy, fluffy, and just-sweet-enough topping is a wonderful substitute for dairy-based whipped cream. In fact, the additional flavors of vanilla and coconut make it even more delicious! Use this whipped cream as a topping for any of the cakes or pies in this book, or over fruit for a light and nutritious after-dinner dessert. 1 can (13.5 ounces [398 ml]) coconut cream 4 drops stevia extract ¹⁄₂ teaspoon vanilla extract Place the can of coconut cream into the refrigerator and allow it to chill for at least 8 hours. Place a glass bowl in the freezer for about 10 minutes before making your whipped cream. Turn the can of coconut cream upside down and open it from the bottom. Pour out the liquid and reserve this for using in smoothies or cooking. Use a spoon to remove the remaining cream and place it into your chilled bowl. Use a hand mixer to whip the cream for about 7 minutes, until it appears fluffy and peaks form. You don't have to be as cautious about over-whipping as you do with dairy-based whipping cream. You really can't mess it up unless you don't whip it long enough. Add the stevia and vanilla, and whip the coconut cream for another 2 minutes. Serve immediately. Batch Cooking and Leftovers: If stored in the refrigerator, whip the coconut cream for a minute or two before serving. This recipe can be easily doubled. chocolate icing Unlike other attempts at dairy-free icing, this recipe holds up at room temperature. You may get a bit of melting if temperatures exceed 80°F (27°C), but overall it performs incredibly well. I served it at my son's fifth birthday party on Chocolate Banana Cupcakes and everyone agreed that the rich chocolate and coconut undertones made it the best chocolate icing they'd ever had! You can create beautiful icing toppings using an icing pipe, which you can purchase at most grocery stores. This extra decorative step will give your grain-free desserts a professional and enticing look. You can also use this icing to top Chocolate Walnut Brownies. 1 cup (200 g) coconut oil 1 cup (280 g) pitted Medjool dates, packed 1 teaspoon vanilla 2⁄3 cup (160 ml) almond milk Pinch salt 2⁄3 cup (110 g) cacao powder Combine the coconut oil, dates, vanilla, and almond milk in a high-powered blender. Blend the mixture till it's creamy and very few date pieces remain. Add the salt and cacao powder and blend the icing again for about 10 seconds or till well combined. The icing is slightly warm when it comes out of the blender but can be used immediately or stored at room temperature for up to 1 day. Batch Prepping and Leftovers: Makes enough to ice 24 cupcakes. If pulling from the freezer or fridge, allow the icing to return to room temperature and stir before trying to spread or pipe it onto cupcakes. chocolate walnut freezer fudge You will love everything about this creamy, chocolaty, and perfectly sweet freezer fudge! Walnuts provide a distinct and delicious crunch to a thick and decadent dessert that satisfies the craving of the chocoholic. The fudge becomes too soft at room temperature, so you'll need to serve it with a plate positioned over an ice pack or ice if you're serving it at a party and want to leave it out for guests. Or you can simply walk around with a tray to treat your guests. Either way, I guarantee it won't last long! This recipe is similar to the Chocolate Icing recipe, but the elimination of almond milk and the addition of avocado makes it creamier. Freezer fudge is a good treat to send to school as a replacement food for your child when the other kids in the class are eating processed treats. Speak to the teacher about the possibility of storing the fudge in a freezer and about providing your child with one or two pieces of fudge when the rest of the class is eating a food you'd prefer your child not eat. Your child still gets to enjoy a sweet treat, but it will be in a form that you can feel good about. Don't forget to omit the walnuts if your child's classroom is nut-free. You can instead add sunflower seeds or shredded coconut flakes. ¹⁄₂ cup (100 g) coconut oil, solid (not melted) ¹⁄₂ avocado ¹⁄₂ cup (140 g) pitted Medjool dates, packed ¹⁄₂ teaspoon vanilla ¹⁄4 cup (22 g) cacao powder ¹⁄₂ cup (55 g) chopped walnuts Combine the coconut oil, avocado, dates, and vanilla in a high-powered blender. Blend the mixture until it's creamy and very few date pieces remain. Try not to overblend, as this creates heat and will cause the coconut oil to separate from the rest of the fudge. You can't avoid it entirely, but try to keep blending to a minimum. Add the cacao powder and blend the fudge again for about 10 seconds or until well combined. Stir in the walnuts by hand and spread the entire mixture into an inch-thick (2.5 cm) slab on a parchment paper–lined baking sheet. Freeze the fudge for about 1 hour, remove it from the freezer, and slice it into 24 equal-sized pieces. Serve immediately or return the fudge to the freezer for storage. Batch Cooking and Freezing: You can easily double the recipe for a premade treat on special occasions. However, I'm wary of leaving treats around since they're often too tempting. I prefer to prepare this recipe only when there's a special occasion! chocolate avocado mousse I've tried varying recipes for chocolate avocado mousse and this recipe is by far the most delicious—it's creamy, sweet, chocolaty, rich, and absolutely decadent. Best of all, it's made from ingredients you can feel good about eating! ¹⁄₂ cup (120 ml) almond milk 7 pitted Medjool dates ¹⁄4 teaspoon vanilla extract 2 ripe avocados 2 tablespoons almond butter (or SunButter) 1⁄3 cup (28 g) cacao powder Pinch of salt Blend the almond milk, dates, and vanilla extract in a blender or food processor until the dates are blended into the almond milk. Add in the remaining ingredients and blend till a completely smooth mousse is formed. Best if chilled for an hour before serving but can be served immediately. Batch Cooking and Leftovers: You can double this recipe, but work in batches if you're wanting to triple or quadruple it. vegan vanilla milkshake This vanilla milkshake is creamy and sweet enough to convince any nonbeliever that healthier sweet treats can be both nutritious and delicious! Serve this milkshake in a decorative glass with a fun straw and your children won't likely blink an eye at this dairy-free substitute. Dates pack a lot of sugar, but their digestion is slowed by the presence of fiber, making dates an excellent way to sweeten a healthy treat. ¹⁄4 cup (36 g) almonds 3 pitted Medjool dates 1 tablespoon unsweetened shredded coconut ¹⁄₂ tablespoon chia seeds 11⁄3 cups (155 g) ice 1⁄3 cup (80 ml) almond milk or water ¹⁄4 teaspoon vanilla extract Blend all the ingredients together in a high-powered blender until a smooth milkshake is formed. Serve immediately. Batch Cooking and Leftovers: Work in batches if you want to double the recipe, since this milkshake is challenging to blend. mango lime ice cream This oh-so-simple dessert is absolutely marvelous! I've prepared it for my kids when they have friends over on hot days and everyone seems to love it. Creamy mangoes and avocado with just a hint of lime is oh so good! I prefer it topped with chopped pecans, but this is an optional addition. Preparing these frozen desserts in a blender feels intimidating once you see the workload required of your machine, but your concerns can be alleviated by first reading the blender's owner's manual for guidance. Dishes like this really put a blender to the test, which is why I suggest you buy good equipment (see Kitchen Equipment Essentials, page 45, for more information). 3 cups (360 g) frozen diced mangoes ¹⁄₂ ripe avocado ¹⁄4 cup (60 ml) almond milk 10 drops stevia Juice from ¹⁄₂ lime ¹⁄4 teaspoon vanilla extract Pinch of salt ¹⁄4 cup (30 g) pecans, chopped (optional) Combine all the ingredients except the pecans in a high-powered blender or food processor until a well-blended frozen dessert forms. Top the ice cream with pecans and serve immediately. Does not store well. Batch Cooking and Leftovers: Doubling the recipe will overload your blender, so you'll have to work in batches. creamy fruit pops This recipe is similar to Mango Lime Ice Cream, yet the use of whole mangoes rather than frozen mangoes, and the resulting consistency, prevents the two from being interchangeable. I've searched high and low for Popsicles that I'd be okay with serving to my kids as a special treat on hot days, and I'm sorry to say that it's much like trying to find a needle in a haystack. Luckily, Popsicle molds aren't very expensive and making your own takes minimal time and effort. Your kids (and their friends) will love that you're serving up delicious and nutritious summertime treats! Try replacing the dates with 10 drops of stevia to reduce the amount of sugar and carbs. 2 ripe mangoes, peeled and diced ¹⁄₂ ripe avocado 2 pitted Medjool dates (soaked for a minimum of an hour if you don't have a good blender or food processor) Juice from 1 lime Pinch of salt Combine all the ingredients in a blender or food processor and blend until completely smooth and creamy. Spoon the mixture into six BPA-free Popsicle molds, tapping each mold on the counter to remove any air bubbles. Freeze the Popsicles for a minimum of 2 hours. Run each Popsicle mold under warm water for 30–45 seconds before trying to pull the frozen Popsicle from the mold. This will prevent you from pulling too hard and accidentally removing the Popsicle stick, leaving the Popsicle stuck in the mold. Batch Cooking and Leftovers: The recipe can be easily doubled, but you'll need more than just six molds. lemon coconut date balls * 2.5 cm These delightful, citrusy little morsels are one of my favorite sweets to serve at Christmastime. If you like lemon bars then you will love this healthy alternative! I also enjoy that this recipe summons participation from even the youngest of kids—almost anyone can roll a paste into a ball and dip it in coconut! Like the Chocolate Walnut Freezer Fudge, this is another great recipe to store at school. Be sure to read my notes in the freezer fudge recipe for more information. Some people like using this recipe as energy bites during exercise to replace bars. You can increase the protein content by adding a few tablespoons of protein powder, and you can form the balls into a different shape, like small bars or squares. Be sure to do some research before purchasing a protein powder since there's a wide range of quality when it comes to sports supplements. Lastly, adding more salt to the recipe can help to replace electrolytes during exercise. 1¹⁄₂ cups (190 g) walnuts 11⁄3 cups (375 g) pitted Medjool dates, packed Juice and zest from 1 lemon 2⁄3 cup (75 g) shredded unsweetened coconut, divided Pinch of salt Process the walnuts and dates in a food processor until small pieces form. Add in the lemon juice and zest, ⅓ cup (38 g) of the shredded coconut, and the salt, and continue to process until a paste forms and all ingredients are well chopped and combined. Fill a small dish with water to use to occasionally wet the palms of your hands. Keeping your hands moist while forming the coconut date balls will keep the mixture from sticking to your hands. Roll the mixture into approximately 30, 1-inch-sized (2.5 cm) balls. Once you've formed all the balls, pour the remaining shredded coconut into a bowl and roll each ball in coconut until it's completely covered. Chill the coconut date balls for about 1 hour before serving. Batch Cooking and Leftovers: The recipe can be doubled, but you'll have to work in batches. nut-free chocolate superfood bites My son was allergic to a number of tree nuts when he was a toddler, which proved to be a challenge when trying to find healthy, gluten-free desserts. I decided to instead make my own toddler-friendly dessert by modifying a recipe that originally called for walnuts, dates, and cacao. The walnuts were easy to replace, but I realized that the recipe could be taken a step further by enhancing the antioxidant benefits through added superfoods. Goji berries are an excellent source of vitamin C and are a unique berry in that they contain all eight essential amino acids. In other words, they're a complete protein. Mulberries are a good source of iron and one of my favorite dried berries for their superior taste and texture. Raw cacao is one of nature's best sources of antioxidants, and is an excellent source of iron, magnesium, and even calcium. Maca powder is made from the root of a cruciferous plant and boasts benefits including improved energy and reduced blood pressure; it can also help the body adapt to stress (an adaptogenic herb). As you can see, these bites aren't just designed to taste sweet and chocolaty, they're designed to pack a substantial nutritional punch! 1 cup (280 g) pitted Medjool dates, packed ¹⁄4 cup (28 g) dried goji berries ¹⁄4 cup (28 g) dried mulberries ¹⁄₂ cup (75 g) sunflower seeds ¹⁄₂ cup (75 g) pumpkin seeds 3 tablespoons raw cacao 1–2 tablespoons water 1 heaping tablespoon maca powder 2 teaspoons vanilla Pinch of salt ¹⁄₂ cup (55 g) shredded coconut (optional) Process all the ingredients except the shredded coconut in a food processor until the seeds are in small bits and the dates and dried berries have made a paste. Fill a small dish with water to occasionally wet the palms of your hands. Keeping your hands slightly moist while forming the bites will keep the mixture from sticking to your hands. Roll the mixture into approximately 30, 1-inch-sized (2.5 cm) balls. Once you've formed all the balls, pour the shredded coconut into a bowl and roll each ball in coconut until it's completely covered. Chill the bites for about 1 hour before serving. Batch Cooking and Leftovers: The recipe can be doubled, but you'll have to work in batches. chocolate ice cream It's hard to believe that something so simple can be so delicious and visually appealing. While my kids certainly enjoy this ice cream recipe, it's my husband and I who devour it. This ice cream is sweet enough for kids, sophisticated enough for adults, and easy enough for anyone to prepare. 2 cans (5.4 ounces [160 ml] each) coconut cream 4 pitted Medjool dates ¹⁄₂ teaspoon vanilla extract 1 pound (455 g) frozen dark sweet cherries ¹⁄4 cup cacao powder ¹⁄₂ cup (60 g) chopped walnuts (optional) Place the coconut cream, dates, and vanilla extract into a blender or food processor and blend until creamy and well combined. Add in the cherries and cacao powder and blend until you reach a smooth, creamy consistency. Pour the mixture into a bread pan, smooth it flat, and allow the ice cream to freeze for about 2 hours or until it can be scooped. Serve the ice cream immediately topped with chopped walnuts, if using. Batch Cooking and Leftovers: If the ice cream is frozen solid, allow it to soften in the refrigerator for about 1½ hours before serving to improve texture. This recipe can be doubled, but larger amounts need to be prepared in batches and you'll need to increase the amount of time the ice cream is chilled and thawed. chocolate walnut brownies These brownies take very little time to prepare, but you must be patient in waiting for them to cool. If you can overcome the urge to prematurely dig into these mouthwatering morsels, you will not be disappointed! The brownies need adequate time to cool so they bind together, creating a moist and flavorful Chocolate Walnut Brownie. Try topping them with Chocolate Icing, but halve that recipe since you won't need the entire amount. The sweetness of the brownies seems to improve over time, so advance preparation is an advantage. Don't forget to invite the kids to help you prepare this easy dessert! ¹⁄₂ cup (100 g) coconut oil, melted, plus more for greasing 3 eggs ¹⁄₂ cup (140 g) pitted Medjool dates, packed 2 teaspoons vanilla 1⁄3 cup (30 g) coconut flour ¹⁄₂ cup (43 g) cacao powder ¹⁄4 teaspoon baking powder ¹⁄4 teaspoon salt 2⁄3 cup (75 g) chopped walnuts, divided Preheat the oven to 350°F (177°C). Place the oil, eggs, dates, and vanilla into a blender and blend till a smooth batter forms. Add all the other ingredients except the walnuts, and blend again to form a smooth batter. Set aside 2 tablespoons of walnuts and mix the remaining walnuts into the batter using a mixing spoon. Pour the batter into a greased 7 × 11-inch (18 × 28 cm) or 9 × 9-inch (23 × 23 cm) baking pan. Evenly sprinkle the remaining walnuts on top and bake the brownies for 18 minutes. Allow the brownies to completely cool for 2 hours. Brownies are best served chilled. Batch Cooking and Leftovers: If preparing a double batch, double the ingredients. Blend the first four ingredients as instructed, but then transfer the batter to a bowl to mix in the remaining ingredients by hand. The larger amount of batter will be too much for your blender. Continue with the remainder of the recipe as instructed. chocolate banana cupcakes * the exact amount will depend on the size of the bananas These chocolaty cupcakes withstood the ultimate taste test—my five-year-old's birthday party! They're beautifully rich, mildly sweet, and form the perfect base for Chocolate Icing. With sweetness provided only by overripe bananas, these are a treat that can be served (without icing) on a regular basis. Your child will love opening their lunch box to find a delicious chocolate treat! The bananas should be yellow and covered in brown spots, but not black. 7 slightly overripe bananas 4 eggs ¹⁄₂ cup (100 g) coconut oil ¹⁄₂ cup (70 g) cassava flour ¹⁄₂ cup (47 g) almond flour 2⁄3 cup (60 g) cacao powder 2 teaspoons vanilla 1 teaspoon baking powder 1 teaspoon baking soda ¹⁄₂ teaspoon salt Preheat the oven to 350°F (177°C). Peel and roughly chop the bananas into 2-inch (5 cm) pieces. Place the bananas in a blender or food processor with all the other ingredients and blend until a smooth batter is formed. Divide the batter into approximately 24 silicon muffin molds or muffin paper–lined muffin cups, filling each cup about three-quarters full. These cupcakes will rise, but not quite as well as a traditional cupcake. They'll also shrink a bit as they cool. Bake the cupcakes for 20 minutes. Allow the cupcakes to completely cool before icing. Batch Cooking and Leftovers: You'll have to work in batches if doubling the recipe, but leftovers can be easily frozen, and can be quickly assembled as a dessert for a special occasion. apple spice bundt cake My mother made the most delicious apple cake when I was a kid, but it was a tradition I could no longer enjoy once we discovered my son's allergy to wheat. I wanted to include a recipe that brought me back to my childhood memories of a warm kitchen filled with the delightful fragrance of apples and cinnamon. Not only does this date-sweetened cake fill my heart with warm memories, but it also quickly became a new family tradition for special occasions. With a texture and flavor profile that very closely mimic a cake made with traditional flour, you simply cannot go wrong! Shown on page 247. 5 cups (565 g) peeled and sliced apples, about 4–5 medium apples 2⁄3 cup (185 g) pitted Medjool dates, packed ¹⁄₂ cup (120 ml) avocado oil 4 eggs ¹⁄₂ cup (120 ml) water 2 teaspoons vanilla 4 ripe plantains, peeled and chopped 2⁄3 cup (95 g) cassava flour 1 teaspoon baking soda 1 teaspoon baking powder 2 teaspoons cinnamon ¹⁄4 teaspoon ginger powder ¹⁄4 teaspoon nutmeg ¹⁄₂ teaspoon salt 2 tablespoons coconut oil, for greasing Preheat the oven to 350°F (177°C). Peel and thinly slice the apples and set aside. Using a high-powered blender or food processor, blend the dates, avocado oil, eggs, water, and vanilla till the dates are completely puréed, about 30 seconds. Add all the other ingredients except the apples and coconut oil into the blender or food processor and blend until a batter has formed, about 1 minute. Mix the apples into the batter using a mixing spoon, and evenly pour the batter into a greased 10-inch (25 cm) Bundt pan. Be sure to evenly distribute the apples throughout. Bake the cake for 45–50 minutes or until an inserted knife comes out clean. Allow the cake to cool for about 10 minutes and remove it from the pan by turning the pan upside down onto a cooling rack. Allow the cake to cool for 2 hours before serving. Batch Cooking and Leftovers: Cut into individual slices before freezing so that you can portion out individual pieces every now and then. Work in batches if doubling the cake. pumpkin pie with hazelnut crust Although this pie isn't an exact replica of the condensed milk–sweetened version that most of us are accustomed to, its deliciously unique flavors and perfectly sweet creaminess are enough to impress any guest. The toasted flavor of the hazelnut crust gives this pie a unique twist on the holiday classic. Serve each slice topped with a dollop or two of homemade Coconut Whipped Cream. For a pecan crust, use 2 cups (220 g) of pecans in the place of the hazelnuts. CRUST 1¹⁄₂ cups (215 g) whole hazelnuts 2 tablespoons (25 g) coconut oil, more for greasing 1 egg white, reserve yolk for filling Pinch of salt FILLING 1 can (15 ounces [425 g]) pumpkin purée 1 can (5.4 ounces [160 ml]) unsweetened coconut cream 2 eggs 1 egg yolk ¹⁄₂ cup (140 g) pitted Medjool dates, packed 1 teaspoon vanilla extract 2 teaspoons pumpkin pie spice Pinch of salt CRUST INSTRUCTIONS Preheat the oven to 350°F (177°C). Grind the hazelnuts into a coarse flour using a blender or food processor. Mix in the remaining ingredients by hand until well combined. Place the crust mixture into a greased pie pan and use fingers to evenly press the mixture into the pan, taking the time to form an even crust. Use a fork to poke holes along the bottom of the crust. Bake the crust for 7 minutes while preparing the filling. FILLING INSTRUCTIONS Combine all the filling ingredients in a blender or food processor and gently blend until the batter is smooth. Pour the mixture into the warm piecrust and bake the pie for 45 minutes or until set. Allow the pie to completely cool before serving. Batch Cooking and Leftovers: This recipe can be easily doubled as long as you have two pie pans. acknowledgments The first thanks goes to my editor, Makenna, who had the vision, faith, and patience to help me write a book that I never dreamed possible. Thanks to Mom and Dad who taught me how to be strong in the face of adversity. I wouldn't be fighting for solutions without that strength. Thanks to the many family members, especially D.D., Pops, Gramps, and Grandma Barbara, who offered emotional and financial help throughout this process. I couldn't have done it without such good helpers. Thanks to Nancy whose generosity is a model for serving others less fortunate than ourselves. I give my word to pay her generosity forward, hopefully 10 times over. Thanks to all of the friends who encouraged, inspired, provided a shoulder to cry on, and watched my children while I wrote. Most of all, thanks to my husband (and photographer), who will forever be my biggest fan and source of support. I couldn't imagine a better partner in life. This book took a village and I'm thankful for each member who played a role. Appendix A Menus In this section I have included four weeks of menus to get you started on developing a meal plan for your family. Note that the menus operate as a four-week set. You'll be preparing large batches of certain recipes, eating a portion immediately, and freezing leftovers for later weeks. This approach will save you time in the long run. Each menu includes breakfast, lunch, and dinner. However, please note that the menus do not incorporate snack foods. Snacks greatly vary depending on your needs, preferences, and budget, so I leave this up to you to decide for yourself. Look over the Quick and Easy Snacks sidebar (page 170) and add your snack choices to your shopping list. Be mindful that you may be able to use ingredients for snacks that are already on your main shopping list. If, for example, you see that you'll have excess celery one week (maybe a recipe calls for five stalks, but you must purchase an entire bunch), you can incorporate the extras into your weekly snack plan. Extra ingredients can also be used creatively on days when you've scheduled leftover meals. Salad toppings such as olives, nuts, seeds, or avocados aren't listed in these menus, either. The vegetable ingredients for each week's Everyday Salad are listed, but salad toppings are such an individual thing. For example, I'm of the opinion that a salad is incomplete without green or kalamata olives, but my husband essentially says the same about walnuts or sunflower seeds. We start with the same "base" salad, but we finish it to our own preference. Be sure to add any necessary items (snacks and salad toppings) to your shopping list to prevent multiple trips to the store. The menus assume that leftovers from dinner will be served for lunches, including packed lunches for the kids. (See Packed Lunches for Kids, page 280, for more information.) The only exception is the menu for Week 4, which incorporates an additional meal to serve for lunch. Friday's are a "free night." Use this night to eat whatever you would like whether eating at a restaurant or preparing an acceptable packaged meal. I have found that a free night is a welcomed break at the end of a long week. Every family has different caloric needs based on age, sex, activity level, and individual metabolism, so it's up to you to determine how the meal plans can meet all your family's needs. You may need to buy a few extra items, or double a few more recipes. Unfortunately, I can't paint an exact portrait of your specific needs. However, be cautious in thinking that the menus will produce too much food, unless you don't plan to serve leftovers for lunches. Yes, the menus yield large quantities of food, but remember that they are designed to fill the stomachs of an average of four individuals for an entire week. Leftovers can always be frozen or repurposed for subsequent snacks or meals. Also keep in mind that you don't want to be preparing separate meals for your children. Dinner is dinner. Lunch is lunch. Establish some boundaries around mealtimes and stick to your decision. (For readers who crave more detailed descriptions of recommended prep sequences that walk you through each step, you can download a PDF at deeprootedwellness.com/grainfree.) As you may recall from part 1, suitable fats for cooking include coconut oil, olive oil, lard, and a handful of others (see A Word on the Recipes and Menus, page 66, for details regarding cooking fats and oils). Each recipe specifies the type of fat that is best for that particular dish, but fats are often interchangeable. Choose whichever fats you prefer to use for cooking, but know that substitutions can't always be made, such as the case of avocado oil—it is virtually tasteless, making it the best oil to use when you want to avoid adding a flavorful oil. Coconut oil often adds a sweet flavor to foods, making it a good choice for recipes like Plantain Muffins. Lard has a high smoke point, making it the best option for frying. Avocado oil is another good option for frying, but it's not nearly as economical as using lard or reserved animal fats. You Want Me to Do What on Saturdays? Head on over to Instagram and you'll see that #mealprepsaturdays and #mealprepsundays are a real thing among food prep gurus! A typical busy workweek starts on Monday, which means you won't have time to get the majority of your food prep done at the beginning of the week. I therefore suggest starting your meal prep week on Saturday since this is the start of your weekend, thus you are available to get busy in the kitchen. The food that you prep on Saturday will create the beginning of a meal plan that you start to follow on Sunday. Your brain may be resistant to this idea, but I give you my word that it's the best way to accomplish a lot of work in the kitchen in as little time as possible. A Note about Ingredients Lists The ingredients lists reflect every ingredient you'll need to prepare each meal plan. (As I already mentioned, these lists do not include snacks, salad toppings, or additional ingredients you may want for lunches.) The ingredients lists are as exact as possible in order to set you up for complete success in the kitchen. You'll see that I've calculated total needs for items like salt, olive oil, and spices for each week. While an exact list may seem like overkill to take with you shopping, this actually provides you with the opportunity to check these pantry items to guarantee you have enough before heading to the store. Many of the pantry items and frozen meats might already be available in your home. If so, the shopping trip should be primarily limited to fresh ingredients and those ingredients that need to be restocked. week one menu Recipes and Quantities Needed Prepare the recipes with the indicated quantities to make this week's plan work. Please note that one breakfast prepared this week will be served on Saturday of Week 2 (see Week Two Menu, page 271). BREAKFAST RECIPES Pecan Bread: Prepare two batches of the Pecan Bread Variation for a total of four loaves of bread. Store two loaves in the refrigerator and freeze the other two for use in Week 3. Probiotic Pork and Vegetables: Double the recipe and store half in the refrigerator and half in the freezer for use in Week 3. Vegetable Egg Scramble with Avocado and Salsa: You'll be preparing this recipe on four separate occasions, but the chopped vegetables will be prepared in advance to reduce your cooking time throughout the week. Fermented Salsa Fresca: This will serve as the condiment for the Vegetable Egg Scramble with Avocado and Salsa. Apple Walnut Crisp Cereal: This recipe yields 16 servings but will only be served once per week. You'll therefore reserve a fourth of the recipe in the refrigerator to eat during Week 1, and the other 12 servings will be frozen into three evenly sized portions for Weeks 2, 3, and the very end of Week 4. Homemade Coconut Milk: The milk to accompany the Apple Walnut Crisp Cereal. LUNCH AND DINNER RECIPES Everyday Salad: This week's salad incorporates two large heads of romaine lettuce, one pint of cherry tomatoes, one large cucumber, two large carrots, one 14-ounce (396 g) can of artichoke hearts, one red pepper, and six ounces (170 g) of alfalfa sprouts. Red Wine Lemon Vinaigrette: Double the recipe and refrigerate any leftover dressing for use in Week 4. Not Quite Your Mama's Chili: Double the recipe and freeze half to be used in Week 3. Beef Stock: To be used in Not Quite Your Mama's Chili. Simple Whole Roasted Chicken: Prepare two whole chickens. Store one in the refrigerator and the other in the freezer for a future meal (there will be a handful of items left over in the freezer after completing the four weeks' worth of meal plans; this is one of such items). Grain-Free Gravy: Freeze any leftovers for future use. Roasted Non-Starchy Vegetables: Prepare this recipe using green beans. Red and Yellow Rosemary Potatoes Cottage Pie: Double the stuffing recipe, use half of the recipe to assemble the pie as instructed, and freeze the other half for use in Week 2. Greek-style "Pasta" Bowls: This dish will be assembled using the following four recipes: Simple Spaghetti Squash: Prepare two. Grilled Chicken Breasts with Basil and Thyme: Use half for this week and freeze the other half for use in Week 3. Sun-Dried Tomato Tapenade: While not indicated, this recipe could be doubled and frozen. Simple Vegan Pesto: While not indicated, this recipe could be doubled and frozen. Shrimp Scampi with Tomatoes and Zoodles: Serve this dish over leftover Simple Spaghetti Squash. week one menu --- | Breakfast | Lunch | Dinner Saturday | Leftovers; Prepare for Future Meals | Leftovers; Prepare for Future Meals | Leftovers; Prepare for Future Meals Sunday | Probiotic Pork and Vegetables + Pecan Bread | Leftovers; Prepare for Future Meals | Not Quite Your Mama's Chili + grain-free tortilla chips + Everyday Salad + Vinaigrette Monday | Probiotic Pork and Vegetables + Pecan Bread | Not Quite Your Mama's Chili + grain-free tortilla chips | Simple Whole Roasted Chicken + Grain-Free Gravy + Roasted Green Beans + Red and Yellow Rosemary Potatoes Tuesday | Apple Walnut Crisp Cereal + Homemade Coconut Milk | Simple Whole Roasted Chicken + Grain-Free Gravy + Roasted Green Beans + Red and Yellow Rosemary Potatoes | Cottage Pie + Everyday Salad + Vinaigrette Wednesday | Vegetable Egg Scramble with Avocado and Salsa (use Fermented Salsa Fresca) + Pecan Bread | Cottage Pie + Everyday Salad + Vinaigrette | Greek-style "Pasta" Bowls with Grilled Chicken Breasts + Sun-Dried Tomato Tapenade + Simple Vegan Pesto + Everyday Salad + Vinaigrette Thursday | Vegetable Egg Scramble with Avocado and Salsa (use Fermented Salsa Fresca) + Pecan Bread | Greek-style "Pasta" Bowls with Grilled Chicken Breasts + Sun-Dried Tomato Tapenade + Simple Vegan Pesto + Everyday Salad + Vinaigrette | Shrimp Scampi with Tomatoes and Zoodles over leftover Simple Spaghetti Squash Friday | Vegetable Egg Scramble with Avocado and Salsa (use Fermented Salsa Fresca) + Pecan Bread | Cottage Pie + Everyday Salad +Vinaigrette | FREE NIGHT ingredients list for week one --- Meat, Seafood, Eggs, and Bones ☐ beef bones, 3 lbs. (1.4 kg) ☐ chicken breasts, 5 lbs. (2.3 kg) ☐ eggs, 16 ☐ ground beef, 8 lbs. (3.6 kg) ☐ ground pork, 4 lbs. (1.8 kg) ☐ shrimp, peeled and deveined, 1 lb. (455 g) ☐ whole chickens, 2 (4 lbs. [910 g] each) Vegetables and Fresh Herbs ☐ alfalfa sprouts, 1 package ☐ cabbages, 2 small (2 lbs. [910 g] each) ☐ carrots, 16 ☐ celery, 3 bunches ☐ cherry tomatoes, 1 pint ☐ cucumber, 1 ☐ fresh basil, 1 bunch ☐ fresh cilantro, 1 small bunch ☐ fresh parsley, 1 bunch ☐ garlic, 5 heads ☐ green beans, 2 lbs. (910 g) ☐ green peppers, 3 ☐ kale, 4 bunches ☐ red onions, 2 ☐ red peppers, 3 ☐ red potatoes, 2 lbs. (910 g) ☐ Roma tomatoes, 1.6 lbs. (735 g) ☐ romaine lettuce, 2 large heads ☐ spaghetti squash, 2 (3–4 lbs. [1.4–1.8 kg] each) ☐ spinach, 1 lb. (455 g) ☐ sweet potatoes, 4 lbs. (1.8 kg) ☐ yellow onions, 12 | ☐ yellow potatoes, 2 lbs. (910 g) ☐ zucchinis, 8 medium Fruit ☐ apples, 4 lbs. (1.8 kg) ☐ avocados, 6 ☐ plantains, 8 ripe ☐ lemon, 1 (zest + juice) ☐ lime, 1 Other ☐ coarse-ground mustard, 2 Tbsp. ☐ frozen organic corn, 2 lbs. (910 g) ☐ frozen peas, 2 lbs. (910 g) ☐ grain-free tortilla or plantain chips, 8 servings ☐ raw sauerkraut, 2 cups (340 g) ☐ white wine (dry), ½ cup (120 ml) Pantry Items ☐ artichoke hearts, 14 oz. (396 g) can ☐ baking powder, 4 tsp. ☐ baking soda, 2 tsp. ☐ capers, 2 Tbsp. ☐ diced tomatoes, 2 cans (14.5 oz. [410 g] each) ☐ dried black beans, 1 lb. (455 g) ☐ green olives, ½ cup (65 g) ☐ kalamata olives, 12.1 oz. (343 g) jar + ¾ cup (100 g) ☐ pecans, chopped, 3 cups (140 g) ☐ pine nuts, ¼ cup (32 g) ☐ sunflower seeds, raw, 2 cups (290 g) | ☐ sun-dried tomato halves, 9 ☐ tomato paste, 2 cans (6 oz. [170 g] each) ☐ unsweetened shredded coconut, 2 cups (225 g) ☐ vanilla extract, 1½ tsp. ☐ walnuts, raw, 1½ lbs. (680 g) Fats, Oils, and Vinegars ☐ cooking fat, 10 Tbsp. ☐ cooking oil, 1 cup (235 ml) + 2 Tbsp. ☐ coconut oil, 1½ cups (300 g) ☐ olive oil, 1¾ cup (415 ml) ☐ raw apple cider vinegar, 4 Tbsp. ☐ red wine vinegar, ½ cup (120 ml) ☐ vinegar, 1 Tbsp. Dried Herbs and Spices ☐ bay leaves, 3 ☐ chili powder, 2 Tbsp. ☐ cinnamon, 4 Tbsp. ☐ cumin powder, 1 Tbsp. ☐ dried basil, 8 tsp. ☐ dried oregano, 2 tsp. ☐ dried parsley, 2 Tbsp. ☐ dried rosemary, 1 Tbsp. ☐ dried sage, 3 Tbsp. ☐ dried tarragon, 2 Tbsp. ☐ dried thyme, 1 Tbsp. ☐ garlic powder, 3 Tbsp. ☐ onion powder, 1 Tbsp. + 1 tsp. ☐ pepper, to taste ☐ red pepper flakes, pinch ☐ sea salt, 10 Tbsp. ☐ smoked paprika, 1½ tsp. week two menu Recipes and Quantities Needed BREAKFAST RECIPES Carrot Cake Applesauce Muffins: Prepare a single batch to yield 24 muffins. Cauliflower-Sausage Breakfast Casserole: Double the sausage-and-onion mix, use half to assemble the casserole, and freeze the other half to make the casserole again in Week 4. Spaghetti Squash Porridge Apple Walnut Crisp Cereal: Remove one of the three bags frozen during Week 1. Homemade Coconut Milk: Prepare a single recipe to serve with Apple Walnut Crisp Cereal on Friday. LUNCH AND DINNER RECIPES Everyday Salad: This week's salad incorporates one pound (455 g) of mixed greens, a small red cabbage, a half pound (225 g) of raw beets, two medium carrots, half of a small red onion, and one half cup (70 g) sunflower seeds. Fresh Basil and Garlic Balsamic Vinaigrette: Double the recipe and refrigerate any leftover dressing for use in Weeks 3 and 4. Italian-style "Pasta" Bowls: Assemble this dish by preparing: Simple Spaghetti Squash: Prepare two squashes, one for the porridge and one for the "Pasta" Bowls. Hearty Meat Bolognese: Prepare a single recipe as instructed, reserve half for use this week, and freeze the other half for use in Week 4. Pecan Parmesan "Cheese": Double the recipe, reserve half for use this week, and freeze the other half for use in Week 4. Pulled Mojo Chicken: Prepare a single recipe as instructed, use half this week, and freeze the other half for use in Week 4. Plantain Tortillas Chimichurri Sauce: Double the recipe, use half for a taco topping this week, and freeze the other half for use in Week 4. Pico de Gallo Garlicky Guacamole Cottage Pie: Use the frozen stuffing prepared during Week 1 and complete the recipe as instructed. Turmeric-Ginger Baked Chicken Coconut Lime Cauliflower Rice Chicken Stock: About three quarts will be used to make White Bean, Fennel, and Sausage Stew, and the remaining quart will be used in Week 3 for Creamy Cauliflower Soup. White Bean, Fennel, and Sausage Stew Additional needs: One head of shredded romaine to serve with the Plantain Tortillas and Pulled Mojo Chicken on Monday and Tuesday. week two menu --- | Breakfast | Lunch | Dinner Saturday | Vegetable Egg Scramble with Avocado and Salsa (use Fermented Salsa Fresca) + Pecan Bread (left over from Week 1) | Leftovers | Leftovers Sunday | Cauliflower-Sausage Breakfast Casserole + Carrot Cake Applesauce Muffins | Leftovers | Italian-style "Pasta" Bowls with Hearty Meat Bolognese + Pecan Parmesan "Cheese" + Everyday Salad + Vinaigrette Monday | Spaghetti Squash Porridge | Italian-style "Pasta" Bowls with Hearty Meat Bolognese + Pecan Parmesan "Cheese" + Everyday Salad + Vinaigrette | Pulled Mojo Chicken + Plantain Tortillas + Chimichurri + Pico de Gallo + Garlicky Guacamole + shredded lettuce Tuesday | Cauliflower-Sausage Breakfast Casserole + Carrot Cake Applesauce Muffins | Everyday Salad + Pulled Mojo Chicken + Chimichurri + Pico de Gallo + Garlicky Guacamole | Cottage Pie + Everyday Salad + Vinaigrette Wednesday | Spaghetti Squash Porridge | Cottage Pie + Everyday Salad + Vinaigrette | Turmeric-Ginger Baked Chicken + Coconut Lime Cauliflower Rice + Everyday Salad + Vinaigrette Thursday | Cauliflower-Sausage Breakfast Casserole + Carrot Cake Applesauce Muffins | Turmeric-Ginger Baked Chicken + Coconut Lime Cauliflower Rice + Everyday Salad + Vinaigrette | White Bean, Fennel, and Sausage Stew Friday | Apple Walnut Crisp Cereal + Homemade Coconut Milk | Turmeric-Ginger Baked Chicken + Everyday Salad + Vinaigrette | FREE NIGHT ingredients list for week two --- Meat, Seafood, Eggs, and Bones ☐ chicken breasts, 2½–3 lbs. (1.1–1.4 kg) ☐ chicken thighs, 7 lbs. (3.2 kg) ☐ ground breakfast sausage, 4 lbs. (1.8 kg) ☐ ground beef, 3 lbs. (1.4 kg) ☐ sausage links, 2 lbs. (910 g) ☐ eggs, 31 ☐ chicken bones, 2 lbs. (910 g) Vegetables and Fresh Herbs ☐ basil, 1 bunch ☐ beets, ½ lb. (225 g) ☐ carrots, 13 ☐ cauliflower, 2 large heads ☐ celery, 2 bunches ☐ cilantro, 3 bunches ☐ fennel bulb, 1 ☐ garlic, 3 heads ☐ grape tomatoes, 1 pint ☐ green pepper, 1 ☐ jalapeño pepper, 1 ☐ mixed greens, 1 lb. (455 g) ☐ mushrooms, 1 lb. (455 g) ☐ onions, 6 ☐ parsley, 3 bunches ☐ red cabbage, 1 small ☐ red onions, 2 ☐ red pepper, 3 ☐ Roma tomatoes, 2 ☐ tomato, 1 ☐ romaine, 1 head | ☐ spaghetti squash, 2 (3–4 lbs. [1.4–1.8 kg] each) ☐ sweet potatoes, 4 lbs. (1.8kg) ☐ zucchinis, 2 Fruit ☐ avocados, 2 ☐ lemons, 3 ☐ limes, 4 ☐ orange, 1 ☐ plantains, green/yellow, 2 Other ☐ nutritional yeast, 2 Tbsp. ☐ white wine (dry), 1 cup (235 ml) Pantry Items ☐ baking powder, 2 tsp. ☐ baking soda, ½ tsp. ☐ coconut milk, 2 cans (13.5 oz. [398 ml] each) ☐ coconut cream, 5.4 oz. (160 ml) can ☐ coconut flour, 1 cup (130 g) ☐ crushed tomatoes, 2 cans (28 oz. [793 g] each) ☐ diced fire-roasted tomatoes, 2 cans (14.5 oz. [411 g] each) ☐ dried white beans, 1 lb. (910 g) ☐ fire-roasted crushed tomatoes, 2 cans (28 oz. [793 g] each) ☐ pecans, 1 cup (120 g) ☐ raisins, 1¼ cups (215 g) ☐ sunflower seeds, ½ cup (70 g) | ☐ unsweetened shredded coconut, 2 cups (225 g) ☐ unsweetened applesauce, 2 cups (490 g) ☐ vanilla extract, 1 Tbsp. ☐ walnuts, 1½ cups (170 g) Fats, Oils, and Vinegars ☐ avocado oil, ¼ cup (60 ml) ☐ balsamic vinegar, 1 cup (235 ml) ☐ coconut oil, ½ cup (100 g) ☐ cooking fat, 4 Tbsp. ☐ olive oil, 2 cups (475 ml) ☐ raw apple cider vinegar (or red wine vinegar if preferred for the Chimichurri Sauce), ¼ cup (60 ml) ☐ vinegar, 1 Tbsp. + 1 tsp. Dried Herbs and Spices ☐ bay leaves, 2 ☐ cinnamon, 4 Tbsp. + 1 tsp. ☐ cumin powder, 2 tsp. ☐ dried basil, 1½ Tbsp. ☐ dried oregano, 2½ Tbsp. + 2½ tsp. ☐ dried parsley, 2 Tbsp. ☐ dried rosemary, 1½ Tbsp. ☐ dried thyme, ½ Tbsp. ☐ garlic powder, 1 Tbsp. ☐ ginger powder, 1 tsp. ☐ onion powder, 1 Tbsp. ☐ sea salt, 5 Tbsp. + 2¼ tsp. ☐ smoked paprika, 1 tsp. ☐ turmeric powder, 1 tsp. week three menu Recipes and Quantities Needed BREAKFAST RECIPES Eat Your Greens Frittata Pecan Bread: Use the two loaves frozen during Week 1 from the freezer. My Favorite Mango Smoothie: You'll prepare a double batch twice during the week (Tuesday and Friday), enough to serve four individuals on two different days. Hard-Boiled Eggs: Use 24 eggs in total: 16 eggs are to accompany the smoothie for breakfasts (2 per person, serving four people on two mornings), 4 are for the Massaged Kale Salad with Lentils, and the remainders can be used for snacks. Probiotic Pork and Vegetables: Use the leftovers frozen during Week 1. Apple Walnut Crisp Cereal: Use one of the remaining two bags that were frozen from Week 1. Homemade Coconut Milk: Prepare a single recipe to serve with Apple Walnut Crisp Cereal on Thursday. LUNCH AND DINNER RECIPES Everyday Salad: This week's salad incorporates one head of napa cabbage, one half small red onion, one medium cucumber, one pint of grape tomatoes, and a small bunch of radishes. Italian Dressing: Double the recipe and refrigerate leftovers for use in Week 4. OMGrain-Free Chicken Tenders Roasted Non-Starchy Vegetables: Prepare this recipe using broccoli. Crispy Sweet Potato Fries Herbed Beef Burgers Red and Yellow Rosemary Potatoes Summer Cucumber and Tomato Salad Not Quite Your Mama's Chili: Use the frozen leftovers from Week 1. Grilled Chicken Salad with Fresh Vegetables: Prepare this dish using frozen Grilled Chicken Breasts with Basil and Thyme from Week 1. Homemade Mayonnaise: Prepare this for use in the chicken salad. Roasted Roots: Prepare this recipe using two pounds (910 g) of carrots and two pounds (910 g) of beets. Creamy Cauliflower Soup: Prepare a double batch using leftover Chicken Stock from Week 2 along with a fresh batch made this week. Chicken Stock: Prepare a double batch and reserve leftovers for Week 4. Perfectly Baked Bacon: Prepare two pounds (910 g) and crumble or chop it into bacon pieces to be served with the Creamy Cauliflower Soup. Massaged Kale Salad with Lentils Dill Pickle Kraut: The kraut won't be ready for a minimum of 10 days, making it available as a condiment by the end of Week 4. Moving forward, sauerkraut should be prepared at least once every three weeks. Additional needs: Grain-free tortilla chips or plantain chips to serve with Not Quite Your Mama's Chili. week three menu --- | Breakfast | Lunch | Dinner Saturday | Cauliflower-Sausage Breakfast Casserole + Carrot Cake Applesauce Muffins (left over from Week 2) | Leftovers | Leftovers Sunday | Eat Your Greens Frittata + Pecan Bread | Leftovers | OMGrain-Free Chicken Tenders + Roasted Non-Starchy Vegetables (broccoli) + Crispy Sweet Potato Fries Monday | Eat Your Greens Frittata + Pecan Bread | Creamy Cauliflower Soup with bacon + OMGrain-Free Chicken Tenders (and/or Hard-Boiled Eggs) + Everyday Salad + Italian Dressing | Herbed Beef Burgers + Red and Yellow Rosemary Potatoes + Summer Cucumber and Tomato Salad Tuesday | My Favorite Mango Smoothie + Hard-Boiled Eggs | Herbed Beef Burgers + Red and Yellow Rosemary Potatoes + Summer Cucumber and Tomato Salad | Not Quite Your Mama's Chili + grain-free tortilla chips + Everyday Salad + Italian Dressing Wednesday | Probiotic Pork and Vegetables + Pecan Bread | Not Quite Your Mama's Chili + grain-free tortilla chips + Everyday Salad + Italian Dressing | Grilled Chicken Salad with Fresh Vegetables + Roasted Roots + Everyday Salad + Italian Dressing Thursday | Apple Walnut Crisp Cereal + Homemade Coconut Milk | Grilled Chicken Salad with Fresh Vegetables + Roasted Roots + Everyday Salad + Italian Dressing | Creamy Cauliflower Soup with bacon + Massaged Kale Salad with Lentils Friday | My Favorite Mango Smoothie + Hard-Boiled Eggs | Creamy Cauliflower Soup with bacon + Massaged Kale Salad with Lentils | FREE NIGHT ingredients list for week three --- Meat, Seafood, Eggs, and Bones ☐ bacon, thinly sliced, 2 lbs. (910 g) ☐ chicken tenders, 2 lbs. (910 g) ☐ chicken bones, 2 lbs. (910 g) ☐ eggs, 36 ☐ ground beef, 3 lbs. (1.4 kg) Vegetables and Fresh Herbs ☐ basil, 1 bunch ☐ beets, 2 lbs. (910 g) ☐ broccoli, 2 lbs. (910 g) ☐ cabbage, 3½ lbs. (1.6 kg) ☐ carrots, 7 individual + 2 lbs. (910 g) ☐ cauliflower, 2 heads ☐ celery, 1 bunch ☐ cucumbers, 2 lbs. (910 g) ☐ dill, 1 small bunch ☐ garlic, 3 heads ☐ grape tomatoes, 2 pints ☐ heirloom tomatoes, 1 lb. (455 g) ☐ kale, 3 bunches ☐ parsley, 1 bunch ☐ napa cabbage, 1 head ☐ radishes, 1 small bunch ☐ red onion, 1 ☐ red pepper, 1 ☐ red potatoes, 2 lbs. (910 g) | ☐ spinach, 1 lb. (455 g) ☐ sweet potatoes, 2 lbs. (910 g) ☐ tomato, 1 large or 2 Roma ☐ yellow potatoes, 2 lbs. (910 g) ☐ yellow onions, 8 Fruit ☐ avocados, 3 ☐ bananas, 4 ☐ lemons, 2 Other ☐ Dijon mustard, 2 Tbsp. + 2½ tsp. ☐ frozen diced mangoes, 8 cups (960 g) ☐ grain-free tortilla chips, 2 bags (5 oz. [142 g] each) ☐ raw sauerkraut, 2 cups (340 g) Pantry Items ☐ coconut cream, 2 cans (5.4 oz. [160 ml] each) ☐ French lentils, 1 cup (210 g) ☐ hearts of palm, 14-oz. (396 g) can ☐ hemp hearts, 24 Tbsp. ☐ unsweetened shredded coconut, 3½ cups (395 g) ☐ raw almonds, 4 cups (570 g) | Fats, Oils, and Vinegars ☐ avocado oil (or olive oil if preferred for the Homemade Mayonnaise), ¾ cup (175 ml) ☐ cooking fat, 6 Tbsp. ☐ cooking oil, ½ cup (120 ml) ☐ lard (or grease from bacon), 1 cup (220 g) ☐ olive oil, 1 cup (235 ml) + 2½ Tbsp. ☐ raw apple cider vinegar, 5 Tbsp. ☐ red wine vinegar, 3 Tbsp. ☐ vinegar, 1 Tbsp. ☐ white vinegar, ½ cup (120 ml) Dried Herbs and Spices ☐ bay leaves, 2 ☐ crushed red pepper flakes, ⅛ tsp. ☐ cumin powder, ¼ tsp. ☐ dried basil, 1½ tsp. ☐ dried oregano, 1 Tbsp. + 1⅛ tsp. ☐ dried parsley, 2 tsps. ☐ dried rosemary, 1 Tbsp. + 2 tsps. ☐ garlic powder, 2 Tbsp. + 1 tsp. ☐ mustard seed, ¾ tsp. ☐ onion powder, 2 Tbsp. + 1 tsp. ☐ pepper, to taste ☐ salt, ½ cup (130 g) week four menu Recipes and Quantities Needed BREAKFAST RECIPES Banana Nut Bread: Double the recipe, use half this week, and freeze the other two loaves for use in the future (beyond the meal plans covered in this book). Cauliflower-Sausage Breakfast Casserole: Use the pork-and-onion mixture frozen from Week 2. Spaghetti Squash Porridge Apple Walnut Crisp Cereal: Use the final bag of frozen cereal made in Week 1 (to be used early next week, beyond the meal plans in his book). Homemade Coconut Milk: Used for the Apple Walnut Crisp Cereal. LUNCH AND DINNER RECIPES Everyday Salad: This week's salad incorporates one pound (455 g) of spinach, a 14-ounce (396 g) can of artichoke hearts, one red pepper, one bunch of green onions, and one cup (115 g) of chopped walnuts. Dressings: Pull all leftover dressing from Weeks 1, 2, and 3 from the refrigerator. Pulled Mojo Chicken: Use the frozen chicken prepared in Week 2. Plantain Tortillas Avocado-Mango Salsa: Double the recipe, using half for tacos and the other half for the baked salmon. Chimichurri Sauce: Use the frozen sauce from Week 2. Baked Salmon with Avocado-Mango Salsa Grain-Free Tabbouleh Coconut and Cinnamon Sweet Potato Mash: Double the recipe to use as a side for multiple meals. Italian-style "Pasta" Bowls: Assemble this dish using the following recipes: Hearty Meat Bolognese: Use the frozen Bolognese from Week 2. Pecan Parmesan "Cheese": Use the frozen Parmesan from Week 2. 40-Minute Beef Stew Beef Stock: Prepare Beef Stock to be used in the 40-Minute Beef Stew. Shrimp and Mixed Vegetable Green Curry Coconut Lime Cauliflower Rice Turkey Cucumber Rolls Creamy Carrot Ginger Soup: Use the leftover Chicken Stock from Week 3 to prepare this soup. Additional needs: Shredded romaine lettuce for use with grain-free tacos. week four menu --- | Breakfast | Lunch | Dinner Saturday | Probiotic Pork and Vegetables + Pecan Bread (left over from Week 3) | Leftovers | Leftovers Sunday | Cauliflower-Sausage Breakfast Casserole + Banana Nut Bread | Leftovers | Pulled Mojo Chicken + Plantain Tortillas + Avocado-Mango Salsa + Chimichurri Sauce + shredded romaine lettuce Monday | Cauliflower-Sausage Breakfast Casserole + Banana Nut Bread | Everyday Salad + Pulled Mojo Chicken + Chimichurri Sauce | Baked Salmon with Avocado-Mango Salsa + Grain-Free Tabbouleh + Coconut and Cinnamon Sweet Potato Mash Tuesday | Spaghetti Squash Porridge | Pulled Mojo Chicken + Grain-Free Tabbouleh + Coconut and Cinnamon Sweet Potato Mash | Italian-style "Pasta" Bowls + Hearty Meat Bolognese + Pecan Parmesan "Cheese" + Everyday Salad + leftover dressing Wednesday | Cauliflower-Sausage Breakfast Casserole + Banana Nut Bread | Italian-style "Pasta" Bowls + Hearty Meat Bolognese + Pecan Parmesan "Cheese" + Everyday Salad + leftover dressing | 40-Minute Beef Stew + Everyday Salad + leftover dressing Thursday | Spaghetti Squash Porridge | 40-Minute Beef Stew + Everyday Salad + leftover dressing | Shrimp and Vegetable Mixed Green Curry + Coconut Lime Cauliflower Rice Friday | Cauliflower-Sausage Breakfast Casserole + Banana Nut Bread | Creamy Carrot Ginger Soup + Turkey Cucumber Rolls + Everyday Salad + leftover dressing | FREE NIGHT ingredients list for week four --- Meat, Seafood, Eggs, and Bones ☐ eggs, 28 ☐ salmon, 1½ lbs. (680 g) ☐ shrimp, peeled and deveined, 1 lb. (455 g) ☐ turkey breast, sliced, 16 slices, about 14 oz. (395 g) ☐ stew beef, 2 lbs. (910 g) ☐ beef bones, 3 lbs. (1.4 kg) Vegetables and Fresh Herbs ☐ basil, 1 small bunch (minced 2 Tbsp.) ☐ carrots, 11 individual + 2 lbs. (910 g) ☐ cauliflower, 3 heads ☐ celery, 2 bunches ☐ cilantro, 1 bunch ☐ English cucumbers, 5 ☐ garlic, 4 heads ☐ ginger, 1-inch (2.5 cm) piece ☐ green beans, 1 lb. (450 g) ☐ green onions, 1 bunch ☐ kale, 1 bunch ☐ onions, 6 ☐ parsley, 1 bunch ☐ red pepper, 2 | ☐ red onion, 1 ☐ romaine, 1 head ☐ spaghetti squash, 2 (3–4 lbs. [1.4–1.8 kg] each) ☐ spinach, 1 lb. (455 g) ☐ sweet potatoes, 6 lbs. (1.4 kg) ☐ tomato, 1 large ☐ yellow potatoes, 2 lbs. (910 g) Fruit ☐ avocados, 2 ☐ bananas, 12 overripe ☐ lemon, 1 ☐ lime, 2 ☐ mangoes, 2 ☐ plantains, 2 Other ☐ coarse-ground mustard, 2 Tbsp. ☐ green curry paste, 2 Tbsp. ☐ hummus, 16 oz. (455 g) Pantry Items ☐ almond flour, 3 cups (290 g) ☐ artichoke hearts, 14 oz. (396 g) can ☐ baking powder, 4 tsp. | ☐ baking soda, 2½ tsp. ☐ coconut cream, 5.4 oz. (160 ml) can ☐ coconut milk, 3 cans (13.5 oz. [398 ml] each) ☐ raisins, ½ cup (85 g) ☐ unsweetened shredded coconut, 2 cups (225 g) ☐ vanilla extract, 2 Tbsp. + 1 tsp. ☐ walnuts, chopped, 3¾ cups (430 g) Fats, Oils, and Vinegars ☐ avocado oil, ¼ cup (60 ml) ☐ coconut oil, 1½ cups (300 g) + 2 Tbsp. ☐ cooking oil, 1½ Tbsp. ☐ olive oil, ¼ cup (60 ml) ☐ vinegar, 1 Tbsp. + 1 tsp. Dried Herbs and Spices ☐ bay leaves, 5 ☐ cinnamon, 2 Tbsp. + 1½ tsp. ☐ dried tarragon, 1 tsp. ☐ nutmeg, 2 tsp. ☐ pepper, to taste ☐ salt, 4 Tbsp. + 1¼ tsp. Appendix B Packed Lunches for Kids The majority of your kids' lunches should be comprised of leftovers. Although many of the meals described in this book pack well, not all of them do. It's very important to buy a leakproof lunch box, which will guarantee flexibility and freedom when it comes to what you pack. Refer to the sidebar Lunch Boxes for Whole-Food Meals on page 40 for lunch box recommendations. I spent quite a bit of time researching packed lunch ideas for kids and I was disappointed by the lack of protein options and the excess of carbohydrates. Kids need balanced lunches. Try to refrain from loading their lunch box with fruit, muffins, crackers, pastas, and breads, even if those are their favorite foods. If they have the option to eat something, chances are they'll at least try it. If you find they're avoiding a certain food day after day, take a break from it for a few days, but don't give up hope that they won't develop a taste for it later! Lunches (and snacks, for that matter) that are heavily loaded with carbohydrates won't provide your child with the energy, stamina, and brainpower to successfully and gracefully make it through the school day. Try to shift your focus to healthy fats and proteins, and then fill in the gaps with those beloved carbs, in healthier forms. The meal plans assume that dinner leftovers will be served for lunch, but there are the rare instances when serving a leftover may be challenging. For example, you may not be able to easily pack the White Bean, Fennel, and Sausage Stew prepared during the second week's plan unless you have a thermos for keeping the soup warm. Save the soup for the weekend when it's easier to reheat. Instead, pack a meal for the kids using a different leftover dinner. Another strategy for packing a lunch in a pinch, or when leftovers won't suffice, is to keep a few easy lunch options on hand. Try store-bought wraps made from coconut meat (coconut wraps) with natural deli meats, organic chips, and raw vegetables. Other quick options include tuna salad, sardines, and Hard-Boiled Eggs. Foods like the Plantain Muffins, Carrot Cake Applesauce Muffins, Plantain Blender Pancakes, Grilled Chicken Breasts with Basil and Thyme, Mexican Shredded Beef, and Perfectly Baked Bacon are examples of recipes that can be easily frozen. See Recipes That Freeze Well, page 285. Simply create lunch-sized portions of these foods and store them in the freezer for times when you need a few extra items to pack for the kids. Transfer those items to the refrigerator the night before and they'll be ready to serve by lunchtime the following day. Green smoothies are another quick option when you need to fill a lunch box with a nutritious food. You can buy refillable baby food pouches or squeeze pouches that hold anywhere from four to eight ounces of food. Prepare the green smoothie recipe as instructed, divide it among however many pouches you have, and freeze them as quick additions to lunch boxes. Be sure to show your children how to mash and shake the pouches a bit to ensure that the ingredients get mixed together (a small amount of separation can occur after freezing). Alternatively, you can purchase insulated, spill-proof water bottles with larger straws that will easily hold a green smoothie. Foods That Pack Well for School Lunches --- PROTEINS Hard-Boiled Eggs "Pasta" Bowls Simple Egg Salad The Tuna Salad Upgrade Simple Whole Roasted Chicken Pulled Mojo Chicken Grilled Chicken Breasts with Basil and Thyme Grilled Chicken Salad with Fresh Vegetables OMGrain-Free Chicken Tenders Herbed Beef Burgers Mexican Shredded Beef Cottage Pie Perfectly Baked Bacon Deviled Eggs Turkey Cucumber Rolls | SIDES Summer Cucumber and Tomato Salad Everyday Salad with choice of dressing Grilled Zucchini and Yellow Squash Roasted Non-Starchy Vegetables Grain-Free Tabbouleh Roasted Brussels Sprouts with Bacon Coconut Lime Cauliflower Rice Coconut and Cinnamon Sweet Potato Mash Roasted Roots Dilly Sweet Potato Salad Kobocha Casserole with Pecans Cold-Pack Dill Pickles Basily Carrots Dilly Beans Apple Cinnamon Smoothie Peanut Butter and Banana Smoothie My Favorite Mango Smoothie | BREADS/MUFFINS Hearty Almond Flour Bread Plantain Sandwich Bread Carrot Cake Applesauce Muffins Plantain Muffins (with Pecan Bread Variation) Plantain Blender Pancakes Banana Nut Bread DIPS AND FILLERS Garlicky Guacamole Avocado-Mango Salsa Fiesta Sunflower Seed Hummus Apple Walnut Crisp Cereal Superfoods Trail Mix Coconut Cream Goji Bites Roasted and Salted Walnuts The following lunch suggestions are built using many of the recipes in this book, but some incorporate easy, quick, and healthy components that can be thrown together when leftovers aren't available. You'll have to plan ahead for some of these components, being sure to add the ingredients to your meal plan, while other components can be thrown together with items that should already be stocked in your pantry and freezer. If you're trying to maximize your time efficiency in the kitchen, then it's also a good idea to plan dinners around foods you know will pack well. These strategies will all feel more natural the longer you cook from this book, and as you develop an intuitive meal plan catered to your schedule and preference. LUNCH 1 Sliced Grilled Chicken Breasts with Basil and Thyme Small Everyday Salad with dressing of choice Carrot Cake Applesauce Muffins Olives or nuts and seeds LUNCH 2 Turkey Cucumber Rolls Sliced raw vegetables with Fiesta Sunflower Seed Hummus Plantain Muffins Olives or nuts and seeds Grape tomatoes LUNCH 3 Hard-Boiled Eggs or Deviled Eggs Small Everyday Salad with dressing of choice Apple slices Nut or seed butter LUNCH 4 Turkey sandwich made from Plantain Sandwich Bread, organic deli meats, lettuce, Homemade Mayonnaise, and mustard Sliced raw vegetables with Fiesta Sunflower Seed Hummus Applesauce or fruit LUNCH 5 The Tuna Salad Upgrade Dilly Sweet Potato Salad Coconut Cream Goji Bites Sliced raw vegetables LUNCH 6 Grilled Chicken Salad with Fresh Vegetables Red and Yellow Rosemary Potatoes Small Everyday Salad with choice of dressing Coconut Cream Goji Bites LUNCH 7 Pulled Mojo Chicken Garlicky Guacamole Pico de Gallo Grain-free chips or Plantain Tortillas Shredded romaine lettuce LUNCH 8 Simple Egg Salad Roasted Roots Roasted Non-Starchy Vegetables (green beans or broccoli) Superfoods Trail Mix Suggestions for Lunch 1 and Lunch 3 are both packed in the Yumbox Tapas lunch box, and Lunch 2 is also packed in the Bentgo Fresh for comparison's sake. The two lunches pack similarly, but the dipper container in the Yumbox Tapas offers a space for the peanut butter while the Bentgo Fresh required the use of an additional container. Appendix C Holiday Meals and Healthy Celebrations Holidays are not an excuse to throw a healthy diet to the wayside and fall deep into the junk food trap. Holidays are supposed to be a time when we get a break from the day-to-day so that we can rejuvenate and feel refreshed. I don't know about you, but "refreshed" is not how I feel after eating a boatload of unhealthy meals. So that I can use holidays as a time to truly recharge, I select a number of healthy foods for my family and friends to enjoy. I provide two different meal plans to serve to your family and guests during most any celebration, whether that be a birthday, Christmas, Hanukkah, New Year's, Thanksgiving, or Easter. I've included a few holiday-specific foods in the section Snacks and Smaller Meals (page 169), such as the Apple Slice Monsters and the Strawberry Santas. Every family has their own traditions, so hopefully these plans can be catered to meet your own needs. For example, my family has established the tradition of celebrating Christmas Day with a smorgasbord of finger and snack foods. I select one or two healthy desserts that we'll also enjoy, and we spend the day munching away. Thanksgiving is a bit more traditional in that we celebrate with a large, sit-down meal. Both of these plans take quite a bit of prep work, so I like to start preparing a day or two in advance, which is not uncommon for large holiday meals. Snacks and Appetizers Every food in this plan is a finger food, which makes for a fun and easy afternoon of celebration interjected with frequent snacking. This seems to work particularly well for young kids who are often too busy to eat a full meal. Be sure to give yourself plenty of prep time for the fermented vegetables (Basily Carrots and Dilly Beans) and the Cold-Pack Dill Pickles. These need to be started at least a week in advance. FINGER FOODS Deviled Eggs Bacon-Bundled Green Beans Turkey Cucumber Rolls Large tray of sliced mixed vegetables for dipping Roasted and Salted Walnuts Cold-Pack Dill Pickles Basily Carrots Dilly Beans Organic sweet potato chips DIP SELECTION Garlicky Guacamole Sun-Dried Tomato Tapenade Fiesta Sunflower Seed Hummus (or another store-bought variety) SWEET TREATS Lemon Coconut Date Balls Chocolate Walnut Brownies BEVERAGES Infused Water Hot tea of your choice Traditional Sit-Down Dinner I haven't included a recipe for a Thanksgiving turkey in this book, but you can easily find one online if you prefer turkey over chicken. If you use a turkey, you'll want to double the amount of vegetables used to prepare the Grain-Free Gravy since a turkey is so much larger than a whole chicken. THE FEAST Simple Whole Roasted Chicken (2 total; or 1 turkey) Grain-Free Gravy Everyday Salad: spinach, red onion, shaved fennel, and walnuts Fresh Basil and Garlic Balsamic Vinaigrette Roasted Brussels Sprouts with Bacon Kobocha Casserole with Pecans Red and Yellow Rosemary Potatoes DESSERT Apple Spice Bundt Cake Pumpkin Pie with Hazelnut Crust Coconut Whipped Cream BEVERAGES Hibiscus Zinger Iced Tea Hot tea of your choice Appendix D Recipes That Freeze Well EVERYDAY BASICS Beef Stock Chicken Stock Homemade Lard or Tallow Pecan Parmesan "Cheese" Saving Excess Fat from Cooked Meats Simple Spaghetti Squash BREAKFASTS AND "BREADS" Apple Walnut Crisp Cereal Asparagus and Mushroom Quiche with Almond Flour Crust Banana Nut Bread Carrot Cake Applesauce Muffins Cauliflower-Sausage Breakfast Casserole (prepared dish or cooked sausage only) Eat Your Greens Frittata Hearty Almond Flour Bread Perfectly Baked Bacon Plantain Blender Pancakes Plantain Muffins with Pecan Bread Variation Probiotic Pork and Vegetables Sage and Rosemary Sausage Patties (best frozen raw) Spaghetti Squash Porridge MAIN COURSES Cottage Pie (stuffing or whole pie) Garlic and Cumin Slow Roast with Napa Cabbage Grilled Chicken Breasts with Basil and Thyme Flavorful Turkey Burgers (freeze raw) Herb-Encrusted Drumsticks Herbed Beef Burgers (freeze raw) Mexican Shredded Beef OMGrain-Free Chicken Tenders Pulled Mojo Chicken Simple Whole Roasted Chicken Turmeric-Ginger Baked Chicken VEGETABLE SIDES AND SALADS Coconut and Cinnamon Sweet Potato Mash Garlicky Greens Kobocha Casserole with Pecans (prepared dish or cooked squash only) Red and Yellow Rosemary Potatoes (reheat in the oven) Roasted Roots (reheat in the oven) SOUPS AND STEWS 40-Minute Beef Stew Apple Butternut Soup Black Bean and Vegetable Soup Chicken and Vegetable Coconut Curry Soup Chicken Noodle Soup (without the noodles) Creamy Carrot Ginger Soup Creamy Cauliflower Soup Not Quite Your Mama's Chili White Bean, Fennel, and Sausage Stew SNACKS AND SMALLER MEALS Bacon Liver Pâté Coconut Cream Goji Bites "Pasta" Bowls Roasted and Salted Walnuts Superfoods Trail Mix SAUCES, DIPS, AND DRESSINGS Chimichurri Sauce Fresh Basil and Garlic Balsamic Vinaigrette Grain-Free Gravy Hearty Meat Bolognese Italian Dressing Red Wine Lemon Vinaigrette Simple Vegan Pesto Sun-Dried Tomato Tapenade Thai Peanut Sauce SMOOTHIES AND OTHER DRINKS Apple Cinnamon Smoothie Bedtime Tea Homemade Almond Milk My Favorite Mango Smoothie Peanut Butter and Banana Smoothie Sweet-Tooth-Zapping Banana Milkshake Tropical Paradise Smoothie Truly Green Smoothie Tummy Ache Tea Vanilla Strawberry Beet Smoothie Winter Immunity Tea SWEET TREATS Apple Spice Bundt Cake Chocolate Banana Cupcakes Chocolate Ice Cream Chocolate Icing Chocolate Walnut Brownies Chocolate Walnut Freezer Fudge Creamy Fruit Pops Lemon Coconut Date Balls Nut-Free Chocolate Superfood Bites Pumpkin Pie with Hazelnut Crust resources WEBSITES Chris Kresser: www.chriskresser.com Chris Masterjohn, PhD: www.chrismasterjohnphd.com Dr. Mark Hyman: www.drhyman.com Environmental Working Group: www.ewg.org Institute for Responsible Technology: www.responsibletechnology.org Mother Earth News: www.motherearthnews.com Paleo Leap: www.paleoleap.com The Paleo Mom, Sarah Ballantyne, PhD: www.thepaleomom.com The Weston A. Price Foundation: www.westonaprice.org BOOKS Campbell-McBride, Natasha. Gut and Psychology Syndrome: Natural Treatment for Autism, Dyspraxia, A.D.D., Dyslexia, A.D.H.D., Depression, Schizophrenia. York, PA: Medinform Publishing, 2015. Davis, William. Wheat Belly. New York: Rodale, Inc., 2011. Fallon Morell, Sally, and Thomas Cowan. The Nourishing Traditions Book of Baby & Child Care. Washington, DC: New Trends Publishing, Inc., 2013. Fallon, Sally, and Mary Enig. Nourishing Traditions: The Cookbook That Challenges Politically Correct Nutrition and the Diet Dictocrats. Washington, DC: New Trends Publishing, Inc., 2001. Fraker, Cheri, et al. Food Chaining: The Proven 6-Step Plan to Stop Picky Eating, Solve Feeding Problems, and Expand Your Child's Diet. Cambridge, MA: Da Capo Lifelong Books, 2007. Katz, Sandor. The Art of Fermentation. White River Junction, VT: Chelsea Green Publishing, 2012. Katz, Sandor. Wild Fermentation. White River Junction, VT: Chelsea Green Publishing, 2016. Know, Lee. Michochondria and the Future of Medicine. White River Junction, VT: Chelsea Green Publishing, 2017. Morstein, Mona. Mastering Your Diabetes. White River Junction, VT: Chelsea Green Publishing, 2017. Perlmutter, David. Grain Brain: The Surprising Truth about Wheat, Carbs, and Sugar—Your Brain's Silent Killers. New York: Little, Brown and Company, 2013. Perro, Michelle, and Vincanne Adams. What's Making Our Children Sick? White River Junction, VT: Chelsea Green Publishing, 2017. Pitchford, Paul. Healing with Whole Foods: Asian Traditions and Modern Nutrition, 3rd ed. Berkeley, CA: North Atlantic Books, 2002. Pollan, Michael. In Defense of Food: An Eater's Manifesto. New York: The Penguin Press, 2008. notes CHAPTER 1: THE RESTRICTIVE DIET FOR OPTIMAL HEALTH . University of California Los Angeles Newsroom, "This Is Your Brain on Sugar." . K. Yaffe et al., "Diabetes, Glucose Control, and 9-Year Cognitive Decline among Older Adults without Dementia." . M. Lenoir et al., "Intense Sweetness Surpasses Cocaine Reward." . Anthony Samsel and Stephanie Seneff, "Glyphosate, Pathways to Modern Diseases II." . Pavel Grasgruber et al., "Food Consumption and the Actual Statistics of Cardiovascular Diseases." . Pavel Grasgruber et al., "Food Consumption and the Actual Statistics of Cardiovascular Diseases." . R. De Sousa et al., "Intake of Saturated Trans Unsaturated Fatty Acids and Risk of All Cause Mortality, Cardiovascular Disease, and Type 2 Diabetes." . Sarah Ballantyne, "Why Grains Are Bad: Part 3, Nutrient Density and Acidity." . David S. Ludwig and Walter C. Willett, "Three Daily Servings of Reduced-Fat Milk: An Evidence-Based Recommendation?" . Lenard I. Lesser et al., "Relationship between Funding Source and Conclusion among Nutrition-Related Scientific Articles." . R. J. Scharf et al., "Longitudinal Evaluation of Milk Type Consumed and Weight Status in Preschoolers." . C. S. Berkey et al., "Milk, Dairy Fat, Dietary Calcium, and Weight Gain." . K. Dahl-Jorgensen, "Relationship between Cows' Milk Consumption and Incidence of IDDM in Childhood." . Duff Wilson, "Harvard Medical School in Ethics Quandary." bibliography Ahmed, S. H., K. Guillem, and Y. Vandaele. "Sugar Addiction: Pushing the Drug-Sugar Analogy to the Limit." Current Opinion in Clinical Nutrition and Metabolic Care 16, no. 4 (July 2013): 434–439. Allbritton, Jen. "Wheaty Indiscretions: What Happens to Wheat, from Seed to Storage." Accessed May 22, 2017. www.westonaprice.org/health-topics/modern-foods/wheaty-indiscretions-what-happens-to-wheat-from-seed-to-storage. Ballantyne, Sarah. "Are All Lectins Bad? (And What Are Lectins, Anyway?)" Accessed May 2, 2017. www.thepaleomom.com/lectins-bad. Ballantyne, Sarah. "Olive Oil Redemption: Yes, It's a Great Cooking Oil!" Accessed Feb. 22, 2018. www.thepaleomom.com/olive-oil-redemption-yes-its-a-great-cooking-oil. Ballantyne, Sarah. "The Great Dairy Debate." Accessed April 22, 2017. www.thepaleomom.com/the-great-dairy-debate. Ballantyne, Sarah. "Why Grains Are Bad—Part 1: Lectins and the Gut." Accessed May 2, 2017. www.thepaleomom.com/why-grains-are-bad. Ballantyne, Sarah. "Why Grains Are Bad—Part 2: Omega 3 vs. 6 Fats." Accessed May 2, 2017. www.thepaleomom.com/why-grains-are-bad-for-you-part-2. Ballantyne, Sarah. "Why Grains Are Bad—Part 3: Nutrient Density and Acidity." Accessed May 2, 2017. www.thepaleomom.com/how-do-grains-legumes-and -dairy-cause. Berkey, C. S., H. R. Rockett, W. C. Willett, and G. A. Colditz. "Milk, Dairy Fat, Dietary Calcium, and Weight Gain: A Longitudinal Study of Adolescents." Archives of Pediatric and Adolescent Medicine 159, no. 6 (June 2005): 543–550. Bethene Ervin, R., Brian K. Kit, Margaret D. Carroll, and Cynthia L. Ogden. "Consumption of Added Sugar Among U.S. Children and Adolescents, 2005–2008." National Center for Health Statistics Data Brief no. 87 (2012). Accessed May 2. www.cdc.gov/nchs/data/databriefs/db87.pdf. Bock, Kenneth, and Cameron Stauth. Healing the New Childhood Epidemics: Autism, ADHD, Asthma, and Allergies. New York: Random House Publishers, 2008. Campbell-McBride, Natasha. Gut and Psychology Syndrome: Natural Treatment for Autism, Dyspraxia, A.D.D., Dyslexia, A.D.H.D., Depression, Schizophrenia. York, PA: Medinform Publishing, 2015. Campbell, T. Colin, and Thomas M. Campbell II. The China Study: The Most Comprehensive Study of Nutrition Ever Conducted and the Startling Implications for Diet, Weight Loss and Long-Term Health. Dallas: BenBella Books, Inc., 2006. Center for the Science in the Public Interest. "43% of Products Marketed to Kids Are Artificially Dyed, Study Finds." Accessed Feb. 20, 2017. https://cspinet.org/new/201606131.html. Centers for Disease Control and Prevention. "Adult Obesity Facts." Accessed May 3, 2017. www.cdc.gov/obesity/data/adult.html. Centers for Disease Control and Prevention. "Diabetes Report Card 2014." Accessed May 2, 2017. www.cdc.gov/diabetes/pdfs/library/diabetesreportcard 2014.pdf. Centers for Disease Control and Prevention. "Leading Causes of Death." Accessed May 15, 2017. www.cdc.gov/nchs/fastats/leading-causes-of-death.htm. Colbin, Annemarie. The Whole-Food Guide to Strong Bones: A Holistic Approach. Oakland, CA: New Harbinger Publications, Inc., 2009. Cornell University Extension Toxicology Network. "Pesticide Information Profile: Pyrethrins." Accessed Jan. 10, 2018. http://pmep.cce.cornell.edu/profiles/extoxnet/pyrethrins-ziram/pyrethrins-ext.html. Cornell University Extension Toxicology Network. "Pesticide Information Profile: Rotenone." Accessed Jan. 10, 2018. http://pmep.cce.cornell.edu/profiles/extoxnet/pyrethrins-ziram/rotenone-ext.html. D'Adamo, E. and Sonia Caprio. "Type 2 Diabetes in Youth: Epidemiology and Pathophysiology." Diabetes Care 34, suppl. 2 (May 2011): S161–S165. Dahl-Jorgensen, K., G. Joner, and K. F. Hanssen. "Relationship between Cows' Milk Consumption and Incidence of IDDM in Childhood." Diabetes Care 14, no. 11 (Nov. 1991): 1081–1083. Davis, William. Wheat Belly. New York: Rodale, Inc., 2011. De Sousa, R., A. Mente, A. Maroleanu, A. Cozma, V. Ha, T. Kishibe, E. Uleryk, P. Budylowski, H. Schunemann, J. Beyene, and S. Anand. "Intake of Saturated Trans Unsaturated Fatty Acids and Risk of All Cause Mortality, Cardiovascular Disease, and Type 2 Diabetes: Systematic Review and Meta-Analysis of Observational Studies." The BMJ 351 (Feb. 2015): h3978. Deming, D. M., K. C. Reidy, M. K. Fox, R. R. Briefel, E. Jacquier, and A. L. Eldridge. "Cross-Sectional Analysis of Eating Patterns and Snacking in the US Feeding Infants and Toddlers Study 2008." Public Health Nutrition 20 (March 2017): 1–9. Ebbeling, Cara B., Janis F. Swain, Henry A. Feldman, William W. Wong, David L. Hachey, Erica Garcia-Lago, and David S. Ludwig. "Effects of Dietary Composition on Energy Expenditure during Weight-Loss Maintenance." Journal of the American Medical Association 307, no. 24 (June 2012): 2627–2634. Egli, I., L. Davidsson, M. A. Juillerat, D. Barclay, and R. F. Hurrell. "The Influence of Soaking and Germination on the Phytase Activity and Phytic Acid Content of Grains and Seeds Potentially Useful for Complementary Feeding." Journal of Food Science 67, no. 9 (Nov. 2002): 3484–3488. Emory Health Sciences. "High-Fructose Diet in Adolescence May Exacerbate Depressive-Like Behavior." Science Daily (Nov. 18, 2014). www.sciencedaily.com/releases/2014/11/141118141852.htm. Environmental Working Group. "EWG's 2017 Shopper's Guide to Pesticides in Produce™: Clean Fifteen." Accessed Jan. 12, 2018. www.ewg.org/foodnews/clean-fifteen.php. Environmental Working Group. "EWG's 2017 Shopper's Guide to Pesticides in Produce™: Dirty Dozen." Accessed Jan. 12, 2018. www.ewg.org/foodnews/dirty-dozen.php. Fallon Morell, Sally, and Thomas Cowan. The Nourishing Traditions Book of Baby & Child Care. Washington, DC: New Trends Publishing, Inc., 2013. Food and Agriculture Organization of the United Nations. "Part 3: Feeding the World." Accessed on May 12, 2017. www.fao.org/docrep/018/i3107e/i3107e03.pdf. Fraker, Cheri, et al. Food Chaining: The Proven 6-Step Plan to Stop Picky Eating, Solve Feeding Problems, and Expand Your Child's Diet. Cambridge, MA: Da Capo Lifelong Books, 2007. Grasgruber, Pavel, Martin Seberea, Eduard Hrazdira, Sylva Hrebickova, and Jan Cacek. "Food Consumption and the Actual Statistics of Cardiovascular Diseases: An Epidemiological Comparison of 42 European Countries." Food and Nutrition Research 60 (Sept. 2016): 10.3402/fnr.v60.31694. Accessed Feb. 18, 2018. www.ncbi.nlm.nih.gov/pmc/articles/PMC5040825. Harvard Health Publishing, Harvard Medical School. "The Truth about Fats: The Good, the Bad, and the In-Between." Accessed Feb. 22, 2018. www.health.harvard.edu/staying-healthy/the-truth-about-fats-bad-and-good. Ho, M. H., W. H. Wong, and C. Chang. "Clinical Spectrum of Food Allergies: A Comprehensive Review." Clinical Reviews in Allergy and Immunology 46, no. 3 (June 2014): 225–240. Hyman, Mark. "Got Proof? Lack of Evidence for Milk's Benefits." Accessed April 25, 2017. http://drhyman.com/blog/2013/07/05/got-proof-lack-of-evidence-for-milks-benefits. Hyman, Mark. "Milk Is Dangerous for Your Health." Accessed April 23, 2017. http://drhyman.com/blog/2013/10/28/milk-dangerous-health. Institute for Responsible Technology. "Appendix 2: Glyphosate Bans and Restrictions across the Globe." Accessed April 26, 2017. http://responsibletechnology.org/irtnew/wp-content/uploads/2016/01/2-Glyphosate-Bans-and-Restrictions-Across-the-Globe.pdf. Institute for Responsible Technology. "State-of-the-Science on the Health Risks of GM Foods." Accessed Jan. 11, 2018. https://responsibletechnology.org/irtnew/docs/state_science_gmo.pdf. Jimenez, P., P. Garcia, A. Bustamante, A. Barriga, and P. Robert. "Thermal Stability of Oils Added with Avocado (Persea americana cv. Hass) or Olive (Olea europaea cv. Arbequina) Leaf Extracts during the French Potatoes Frying." Food Chemistry 221 (April 2017): 123–129. Ji, Sayer. "Opening Pandora's Bread Box: The Critical Role of Wheat Lectin in Human Disease." Accessed June 1, 2017. www.greenmedinfo.com/page/opening-pandoras-bread-box-critical-role-wheat-lectin-human-disease. Kresser, Chris. "Why Your Genes Aren't Your Destiny." Accessed June 2, 2017. https://chriskresser.com/why-your-genes-arent-your-destiny. Landreth, G. E., L. K. Williams, and C. McCutchen. "Wheat Germ Agglutinin Blocks the Biological Effects of Nerve Growth Factor." Journal of Cell Biology 101 (Nov. 1985): 1690–1694. Lenoir, M., Fuschia Serre, Lauriane Cantin, and Serge H. Ahmed. "Intense Sweetness Surpasses Cocaine Reward." PLoS ONE 8 (August 2007): e698. Lesser, Lenard I., Cara B. Ebbeling, Merrill Goozner, David Wypij, and David S. Ludwig. "Relationship between Funding Source and Conclusion among Nutrition-Related Scientific Articles." PLoS Medicine 4, no. 1 (Jan. 2007): 41–46. Ludwig, David S., and Walter C. Willett. "Three Daily Servings of Reduced-Fat Milk: An Evidence-Based Recommendation?" JAMA Pediatrics 167, no. 9 (Sept. 2013): 788–789. Mayo Clinic. "Children's Nutrition: 10 Tips for Picky Eaters." Accessed on Feb. 16, 2018. www.mayoclinic.org/healthy-lifestyle/childrens-health/in-depth/childrens-health/art-20044948. Monsanto. "Monsanto Receives Key Import Approval to Enable 2018 Launch of Vistive® Gold Soybean." Accessed Feb. 22, 2018. https://monsanto.com/spotlight/articles/monsanto-receives-key-import-approval-enable-2018-launch-vistive-gold-soybean. Myers, John, Michael Antoniou, Bruce Blumberg, et al. "Concerns Over Use of Glyphosate-Based Herbicides and Risks Associated with Exposures: A Consensus Statement." Environmental Health 15 (2016): 19. Nagel, Ramiel. "Living with Phytic Acid." Accessed May 2, 2017. www.westonaprice.org/health-topics/vegetarianism-and-plant-foods/living-with-phytic-acid. Nestle, Marion. "Did the Low-Fat Era Make Us Fat?" PBS Frontline. Accessed May 12, 2017. www.pbs.org/wgbh/pages/frontline/shows/diet/themes/lowfat.html. Paleo Leap. "What Is Wrong with Grains?" Accessed May 2, 2017. https://paleoleap.com/what-is-wrong-with-grains. Perlmutter, David. Grain Brain: The Surprising Truth about Wheat, Carbs, and Sugar—Your Brain's Silent Killers. New York: Little, Brown and Company, 2013. Pitchford, Paul. Healing with Whole Foods: Asian Traditions and Modern Nutrition, 3rd ed. Berkeley, CA: North Atlantic Books, 2002. Pollan, Michael. In Defense of Food: An Eater's Manifesto. New York: The Penguin Press, 2008. Rothamsted Research Archives. "Broadbalk Winter Wheat Experiment." Accessed April 22, 2017. www.era.rothamsted.ac.uk/index.php?area=home&page=index&dataset=4. Roundup. Preharvest Staging Guide. Accessed April 28, 2017. https://usrtk.org/wp-content/uploads/2016/09/Monsanto-application-guide-for-preharvest.pdf. Samsel, Anthony, and Stephanie Seneff. "Glyphosate, Pathways to Modern Diseases II: Celiac Sprue and Gluten Intolerance." Interdisciplinary Toxicology 6, no. 4 (2013): 159–184. Samsel, Anthony, and Stephanie Seneff. "Glyphosate's Suppression of Cytochrome P450 Enzymes and Amino Acid Biosynthesis by the Gut Microbiome: Pathways to Modern Diseases." Entropy 15, no. 4 (2013): 1416–1463. Scharf, R. J., R. T. Demmer, and M. D. DeBoer. "Longitudinal Evaluation of Milk Type Consumed and Weight Status in Preschoolers." Archives of Disease in Childhood 98 (2013): 335–340. Taubes, Gary. Why We Get Fat and What to Do about It. New York: Anchor Books, 2010. United States Department of Agriculture and United States Department of Health and Human Services. "Dietary Guidelines for Americans 2010." Accessed May 5, 2017. https://health.gov/dietaryguidelines/dga2010/DietaryGuidelines2010.pdf. United States Department of Agriculture Economic Research Service. "Sugar Sweeteners Yearbook Tables." Accessed May 4, 2017. www.ers.usda.gov/data-products/sugar-and-sweeteners-yearbook-tables/sugar-and-sweeteners-yearbook-tables. United States Department of Agriculture. "Wheat's Role in the U.S. Diet." Accessed May 2, 2017. www.ers.usda.gov/topics/crops/wheat/wheats-role-in-the-us-diet. United States Food and Drug Administration. "Final Determination Regarding Partially Hydrogenated Oils (Removing Trans Fat)." Accessed on Feb. 22, 2018. www.fda.gov/Food/IngredientsPackagingLabeling/FoodAdditivesIngredients/ucm449162.htm. University of California Los Angeles Newsroom. "This Is Your Brain on Sugar: UCLA Study Shows High-Fructose Diet Sabotages Learning, Memory." Accessed May 2, 2017. http://newsroom.ucla.edu/releases/this-is-your-brain-on-sugar-ucla-233992. University of California San Francisco—Sugar Science. "Hidden in Plain Sight: Added Sugar Is Hiding in 74% of Packaged Foods." Accessed May 3, 2017. http://sugarscience.ucsf.edu/hidden-in-plain-sight/#.WoGLs5PwbBJ. Vasconcelos, I. M., and J. T. Oliveira. "Antinutritional Properties of Plant Lectins." Toxicon 15, no. 44 (Sept. 2004): 385–403. Wilson, Duff. "Harvard Medical School in Ethics Quandary." New York Times (March 2, 2009). Accessed May 3, 2017. https://archive.nytimes.com/www.nytimes.com/2009/03/03/business/03medschool.html. World Health Organization. "Guideline: Sugars Intake for Adults and Children." Accessed May 8, 2017. http://apps.who.int/iris/bitstream/10665/149782/1/9789241549028_eng.pdf?ua=1. Yaffe, K., C. Falvey, N. Hamilton, et al. "Diabetes, Glucose Control, and 9-Year Cognitive Decline among Older Adults without Dementia." Archives of Neurology 69, no. 9 (Sept. 2012): 1170–1175. Ziegler, E. E. "Adverse Effects of Cow's Milk in Infants." Nestlé Nutrition Workshop Series: Pediatric Program 60 (2007): 185–196. Zielger, P., R. Briefel, M. Ponza, T. Novak, and K. Hendricks. "Nutrient Intakes and Food Patterns of Toddlers' Lunches and Snacks: Influence of Location." Journal of American Dietetic Association 106, suppl. 1 (Jan. 2006): S124–S134. recipe index BREAKFASTS AND "BREADS" An Everyday Basic: Saving Excess Fat from Cooked Meats | ---|--- An Everyday Basic: Simple Spaghetti Squash | Apple Walnut Crisp Cereal | Asparagus and Mushroom Quiche with Almond Flour Crust | Banana Nut Bread | Carrot Cake Applesauce Muffins | Cauliflower Hash Browns | Cauliflower-Sausage Breakfast Casserole | Eat Your Greens Frittata | Hearty Almond Flour Bread | Perfectly Baked Bacon | Plantain Blender Pancakes | Plantain Muffins (with Pecan Bread Variation) | Plantain Sandwich Bread | Plantain Tortillas | Probiotic Pork and Vegetables | Sage and Rosemary Sausage Patties | Spaghetti Squash Porridge | Vegetable Egg Scramble with Avocado and Salsa | MAIN COURSES An Everyday Basic: Homemade Mayonnaise | ---|--- Baked Salmon with Avocado-Mango Salsa | Cottage Pie | Flavorful Turkey Burgers | Garlic and Cumin Slow Roast with Napa Cabbage | Grilled Chicken Breasts with Basil and Thyme | Grilled Chicken Salad with Fresh Vegetables | Herb-Encrusted Drumsticks | Herbed Beef Burgers | Marinated Grilled Pork Chops | Mexican Shredded Beef | OMGrain-Free Chicken Tenders | Pulled Mojo Chicken | Shrimp and Mixed Vegetable Green Curry | Shrimp Scampi with Tomatoes and Zoodles | Simple Whole Roasted Chicken | Turmeric-Ginger Baked Chicken | VEGETABLE SIDES AND SALADS An Everyday Basic: Everyday Salad | ---|--- An Everyday Basic: Homemade Lard or Tallow | Bok Choy and Red Peppers with Thai Peanut Sauce | Coconut and Cinnamon Sweet Potato Mash | Coconut Lime Cauliflower Rice | Crispy Sweet Potato Fries | Dilly Sweet Potato Salad | Garlicky Greens | Grain-Free Tabbouleh | Grilled Zucchini and Yellow Squash | Kobocha Casserole with Pecans | Massaged Kale Salad with Lentils | Red and Yellow Rosemary Potatoes | Roasted Beet and Citrus Salad | Roasted Brussels Sprouts with Bacon | Roasted Cabbage Wedges with Tahini-Miso Sauce | Roasted Non-Starchy Vegetables | Roasted Roots | Summer Cucumber and Tomato Salad | Summer Potato Salad | SOUPS AND STEWS 40-Minute Beef Stew | ---|--- An Everyday Basic: Beef Stock | An Everyday Basic: Chicken Stock | Apple Butternut Soup | Black Bean and Vegetable Soup | Chicken and Vegetable Coconut Curry Soup | Chicken Noodle Soup | Creamy Carrot Ginger Soup | Creamy Cauliflower Soup | Not Quite Your Mama's Chili | White Bean, Fennel, and Sausage Stew | SNACKS AND SMALLER MEALS An Everyday Basic: Hard-Boiled Eggs | ---|--- An Everyday Basic: Pecan Parmesan "Cheese" | Apple Slice Monsters | Bacon-Bundled Green Beans | Bacon Liver Pâté | Banana Snowmen | Coconut Cream Goji Bites | Cold-Pack Dill Pickles | Collard Wraps | Deviled Eggs | "Pasta" Bowls | Roasted and Salted Walnuts | Simple Egg Salad | Strawberry Santas | Superfoods Trail Mix | The Tuna Salad Upgrade | Turkey Cucumber Rolls | SAUCES, DIPS, AND DRESSINGS Avocado-Mango Salsa | ---|--- Chimichurri Sauce | Fiesta Sunflower Seed Hummus | Fresh Basil and Garlic Balsamic Vinaigrette | Garlicky Guacamole | Grain-Free Gravy | Hearty Meat Bolognese | Italian Dressing | Pico de Gallo | Red Wine Lemon Vinaigrette | Simple Vegan Pesto | Sun-Dried Tomato Tapenade | Tahini-Miso Sauce | Thai Peanut Sauce | SMOOTHIES AND OTHER DRINKS Apple Cinnamon Smoothie | ---|--- Bedtime Tea | Date-Sweetened Hot Chocolate | Hibiscus Zinger Iced Tea | Homemade Almond Milk | Homemade Coconut Milk | Infused Water | My Favorite Mango Smoothie | Peanut Butter and Banana Smoothie | Sweet-Tooth-Zapping Banana Milkshake | Tropical Paradise Smoothie | Truly Green Smoothie | Tummy Ache Tea | Vanilla Strawberry Beet Smoothie | Winter Immunity Tea | FERMENTS An Everyday Basic: Basic Brine | ---|--- Basily Carrots | Beet Kvass with Lemon | Dilly Beans | Dill Pickle Kraut | Fermented Salsa Fresca | SWEET TREATS Apple Spice Bundt Cake | ---|--- Chocolate Avocado Mousse | Chocolate Banana Cupcakes | Chocolate Ice Cream | Chocolate Icing | Chocolate Walnut Brownies | Chocolate Walnut Freezer Fudge | Coconut Whipped Cream | Creamy Fruit Pops | Lemon Coconut Date Balls | Mango Lime Ice Cream | Nut-Free Chocolate Superfood Bites | Pumpkin Pie with Hazelnut Crust | Vegan Vanilla Milkshake | about the author Leah M. Webb, MPH, CHC, obtained her health coach certification from the Institute for Integrative Nutrition after earning a bachelor of science degree in environmental biology from Appalachian State University and a master of public health degree in environmental health sciences from Georgia Southern University. She has worked in nutrition and gardening education since 2009 with a focus on engaging children in healthy eating habits through experiential learning and discovery. Leah started and runs the Deep Rooted Wellness blog, on which she posts stories and tips regarding nutrition, gardening, and healthy families. Leah lives in the mountains of North Carolina with her husband, T. C., and her two children, Owen and June. Owen has a life-threatening anaphylactic allergy to wheat, and June has cystic fibrosis, a genetic disease severely impacting the lungs and pancreas. Leah's commitment to a restrictive, nutrient-dense diet has played an important role in her children's integrative care. When not at work, you'll find Leah in her garden, tending to her chickens, volunteering in her children's schools, or engaging in a variety of forms of exercise that feel nourishing. Chelsea Green Publishing sees books as tools for effecting cultural change and seeks to empower citizens to participate in reclaiming our global commons and become its impassioned stewards. If you enjoyed The Grain-Free, Sugar-Free, Dairy-Free Family Cookbook, please consider these other great books related to health and nutrition. THE HEAL YOUR GUT COOKBOOK Nutrient-Dense Recipes for Intestinal Health Using the GAPS Diet HILARY BOYNTON AND MARY G. BRACKETT 9781603585613 Paperback • $29.95 WILD FERMENTATION TThe Flavor, Nutrition, and Craft of Live-Culture Foods, Updated and Revised Edition SANDOR ELLIX KATZ 9781603586283 Paperback • $25.00 MASTERING STOCKS AND BROTHS A Comprehensive Culinary Approach Using Traditional Techniques and No-Waste Methods RACHAEL MAMANE 9781603586566 Hardcover • $35.00 WHAT'S MAKING OUR CHILDREN SICK? How Industrial Food Is Causing an Epidemic of Chronic Illness, and What Parents (and Doctors) Can Do About It MICHELLE PERRO, MD 9781603587570 Paperback • $24.95 VACCINES, AUTOIMMUNITY, AND THE CHANGING NATURE OF CHILDHOO ILLNESS THOMAS COWAN 9781603587778 Hardcover • $24.95 HOW TO END THE AUTISM EPIDEMIC J.B. HANDLEY 9781603588249 Paperback • $19.95 FORAGE, HARVEST, FEAST A Wild-Inspired Cuisine MARIE VILJOEN 9781603587501 Hardcover • $40.00 KETO FOR CANCER Ketogenic Metabolic Therapy as a Targeted Nutritional Strategy MIRIAM KALAMIAN 9781603587013 Paperback • $29.95 ## Contents 1. Praise for The Grain-Free, Sugar-Free, Dairy-Free Family Cookbook 2. Title Page 3. Copyright 4. Dedication 5. Contents 6. Introduction 7. 1. The Restrictive Diet for Optimal Health 8. 2. Feeding the Kids--Get Your Game Face On! 9. 3. Get Prepared, You Can Do This! 10. 4. The Importance of Meal Planning 11. Breakfasts and "Breads" 12. Main Courses 13. Vegetable Sides and Salads 14. Soups and Stews 15. Snacks and Smaller Meals 16. Sauces, Dips, and Dressings 17. Smoothies and Other Drinks 18. Ferments 19. Sweet Treats 20. Acknowledgments 21. Appendix A: Menus 22. Appendix B: Packed Lunches for Kids 23. Appendix C: Holiday Meals and Healthy Celebrations 24. Appendix D: Recipes That Freeze Well 25. Resources 26. Notes 27. Bibliography 28. Recipe Index 29. About the Author ## Guide 1. Cover 2. Table of Contents 3. Begin ## Pagebreaks of the print version 1. Cover Page 2. i 3. iii 4. iv 5. v 6. vii 7. viii 8. ix 9. x 10. xi 11. xii 12. xiii 13. xiv 14. xv 15. xvi 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. 75. 76. 77. 78. 79. 80. 81. 82. 83. 84. 85. 86. 87. 88. 89. 90. 91. 92. 93. 94. 95. 96. 97. 98. 99. 100. 101. 102. 103. 104. 105. 106. 107. 108. 109. 110. 111. 112. 113. 114. 115. 116. 117. 118. 119. 120. 121. 122. 123. 124. 125. 126. 127. 128. 129. 130. 131. 132. 133. 134. 135. 136. 137. 138. 139. 140. 141. 142. 143. 144. 145. 146. 147. 148. 149. 150. 151. 152. 153. 154. 155. 156. 157. 158. 159. 160. 161. 162. 163. 164. 165. 166. 167. 168. 169. 170. 171. 172. 173. 174. 175. 176. 177. 178. 179. 180. 181. 182. 183. 184. 185. 186. 187. 188. 189. 190. 191. 192. 193. 194. 195. 196. 197. 198. 199. 200. 201. 202. 203. 204. 205. 206. 207. 208. 209. 210. 211. 212. 213. 214. 215. 216. 217. 218. 219. 220. 221. 222. 223. 224. 225. 226. 227. 228. 229. 230. 231. 232. 233. 234. 235. 236. 237. 238. 239. 240. 241. 242. 243. 244. 245. 246. 247. 248. 249. 250. 251. 252. 253. 254. 255. 256. 257. 258. 259. 260. 261. 262. 263. 264. 265. 266. 267. 268. 269. 270. 271. 272. 273. 274. 275. 276. 277. 278. 279. 280. 281. 282. 283. 284. 285. 286. 287. 288. 289. 290. 291. 292. 293. 294. 295. 296. 297. 298. 299. 300. 301. 302. 303. 304. 305. 306. 307. 308. 309. 310. 311.
{ "redpajama_set_name": "RedPajamaBook" }
2,273
Q: Windows Python v. Linux Python: "from module import *" is not importing on Windows Having what I think is an unusual problem. I have a Python script script1.py defining class BaseClass(dict), and another script defining class ChildClass(BaseClass). ChildClass import the first script with from script1 import *, however when trying to run ChildClass I get NameError: name 'BaseClass' is not defined. # script1.py ... class BaseClass(dict): def __init__(self, params): pass ... # ChildClass.py from script1 import * class ChildClass(BaseClass): ... The exact same scripts run fine on my home machine (Ubuntu 15.04), but my work machine (Windows 7 Pro) I'm getting the aforementioned NameError. I've checked in the python environment, and it is indeed finding the script1.py file, but not actually importing any of the functions inside. >>> from script1 import * >>> BaseClass Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'BaseClass' is not defined' I'm imagining the problem is the difference between Windows Python and Linux Python, but I've never had this kind of problem before. Any insight is welcome. A: Turns out (hypothetically named) script1 shares a name with a built-in Python module. It looks like the error wasn't occurring on my home machine because I'm running Python 3 there and 2 on my work machine. To solve this, I've simply re-named script1.
{ "redpajama_set_name": "RedPajamaStackExchange" }
4,001
LionsXII best on the road One clean sheet, two goals and three away points. It wasn't exactly easy as one-two-three, but the LionsXII fully deserved the 2-0 win over Sime Darby FC at the Selayang Stadium last night in front of 750 fans. The defending Malaysian Super League champions are now fourth with 18 points, four behind leaders Pahang, while Sime Darby remain in ninth. At the halfway mark of this campaign, Fandi Ahmad's team are the best performers on the road, having already collected three wins and a draw from six away games, one more victory and just two points fewer than the whole of last season. In comparison, with two wins and two draws from five games, their home record ranks just ninth out of 12 teams. They have already lost to Pahang (FA Cup) and Kelantan and drew with Terengganu, but it was last week's 1-1 draw against T-Team that made Fandi's blood boil. Pressure to protect record But the LionsXII coach insists that even as his team's home form will improve, it will be the away form that will be crucial in deciding this season's title. "Maybe there was too much pressure on the boys to protect the unbeaten home record that went past 20 games," said the 51-year-old, whose team were cheered on by about 50 die-hard LionsXII fans. "But I'm happy with the response of the boys tonight. We should have scored more, but it was still a good performance and momentum to carry into the second half of the season. "It will not be easy against Sime Darby at home next week, but we need to start becoming more consistent and get a good string of results both home and away. "But I think it's our away form that will keep us among the contenders." It was a match full of end-to-end action, but the LionsXII looked like they were lacking the cutting edge once again. However, Sime Darby found Izwan Mahbud in irresistible form. The LionsXII goalkeeper made some stunning saves, including one in the 13th minute when he tipped a Fadzli Saari header that came off Safuwan Baharudin. He then flew off his line to block from Mahmoud Amnah in the 42nd minute, before Madhu Mohana cleared off the line as Azmirul Azmi tried to thump in the rebound. And then, it was all LionsXII in the second half as Safuwan glanced in Shahfiq Ghani's free-kick in the 52nd minute, before Khairul Amri shrugged William Mensah off the ball 10 minutes later to slot in his first goal in five games. Injury Crisis Though he felt his side should have won by a bigger margin, Fandi hailed them for coming up with a perfect response even though they were struggling with injuries. The LionsXII's first-choice central midfield pairing of Zulfahmi Arifin and Isa Halim were ruled out by suspension and a heel injury respectively, while Hafiz Abu Sujad (hamstring) and Sufian Anuar (groin) failed to pass a late fitness test and remained in Singapore. Of the 19 who travelled, Madhu, Gabriel Quak (both knee), Faris Ramli (calf) and Nazrul Ahmad Nazari (hamstring) carried injuries, while Afiq Yunos (toe) was an unused substitute. So even though the scorers were the usual suspects, Fandi said: "It doesn't matter who scored tonight because we really needed the three points. "I was telling the boys at half-time, we cannot be going back with just one point. "The way we played, anyone could have scored, and I'm hoping the other players will also chip in. "We showed great spirit tonight and I'm hoping they will keep this up for the rest of the season." This article was published on April 6 in The New Paper. Get The New Paper for more stories.
{ "redpajama_set_name": "RedPajamaCommonCrawl" }
4,428
\section{Introduction and Related Work} \label{sec: related work} A communication system can be modeled by an abstract channel with a set of inputs at the transmitter and a set of corresponding outputs at the receiver. Often times the transmitted symbols (inputs) are different from the receiving symbols (outputs), i.e., errors occur due to many factors such as the physics of signal propagation through a medium or thermal noise. Thus, the goal of a communication system is to transmit the information reliably at the fastest rate. The fastest achievable rate with vanishing error for a given channel is defined by its channel capacity which is the maximum mutual information between input and output random variables. For an arbitrary discrete memoryless channel (DMC) that is specified by a given channel matrix, the mutual information is a concave function of the input probability mass function \cite{cover2012elements}. Thus, many efficient algorithms exist to find the channel capacity of DMC \cite{blahut1972computation}. Moreover, under some special conditions of the channel matrix, the closed-form expressions of channel capacity can be constructed. \cite{nguyen2018closed}. It is worth noting that due to the simplicity of binary channels, the closed-form expressions of channel capacity of a binary channel always can be found as a function of the diagonal entries of the channel matrix \cite{moskowitz2010approximations}, \cite{moskowitz2009approximation}, \cite{silverman1955binary}. On the other hand, in many real-world scenarios, the input distribution is given, however, one has to design the channel matrix under the consideration of many factors such as power consumption, encoding/decoding speeds, and so on. As a result, the mutual information is no longer a concave function of the input distribution alone but is a possibly non-concave/convex function in both input distribution and the parameters of the channel matrix. Many advanced quantization algorithms have also been proposed over the past decade \cite{kurkoski2014quantization}, \cite{winkelbauer2013channel}, \cite{iwata2014quantizer}, \cite{he2019dynamic}, \cite{sakai2014suboptimal}, \cite{koch2013low} to find the optimal quantizer under the assumption of given the input distribution. These algorithms play an important role in designing Polar code and LDPC code decoders \cite{romero2015decoding}, \cite{tal2011construct}. Recently, there are many works on designing quantizers together with finding the optimal input distribution such that the mutual information over both quantization parameters and the input probability mass function is maximized. Although the mutual information is a concave function in the input pmf, it is not a convex/concave function in the quantization parameters i.e., thresholds. Therefore, many famous convex optimization techniques and algorithms for finding the global optimal solution are not applicable. To our best knowledge, this problem remains to be a hard and not well-studied \cite{mathar2013threshold}, \cite{nguyen2018capacities}, \cite{alirezaei2015optimum}, \cite{singh2009limits}, \cite{kurkoski2012finding}. In \cite{singh2009limits}, Singh et al. provided an algorithm for multilevel quantization, which gave near-optimal results. In \cite{nguyen2018capacities}, the author proposed a heuristic near-optimal quantization algorithm. However, this algorithm only works well when the SNR ratio of the channel is high. For 1-bit quantization of general additive channels, Alirezaei and Mathar showed that capacity could be achieved by using an input distribution with only two support points \cite{mathar2013threshold}. In \cite{kurkoski2012finding}, the author gave a near-optimal algorithm to find the optimal of mutual information over both input distribution and quantizer variables for binary input and an arbitrary number of the quantized output, however, this algorithm may declare a failure outcome. In this paper, we provide a linear time complexity searching procedure to find the global optimal of mutual information between input and quantized output over both input distribution and quantizer variables. Based on the properties of the optimal quantizer and the optimal input distribution, the searching range is reduced that finally results in a faster implementation algorithm. Both the theoretical and numerical results are provided to justify our contributions. \section{Problem description} \label{sec:problem description} \begin{figure} \centering \includegraphics[width=0.9\linewidth]{channel_model_1.eps} \caption{Channel model: a binary input $X=\{0,1\}$ is corrupted by continuous noise to result in continuous-valued $Y=\mathbb{R}$ at the receiver. The receiver attempts to recover $X$ by quantizing $Y$ into binary signal $Z=\{0,1\}$.} \label{fig:setup} \end{figure} We consider the channel shown in Fig. \ref{fig:setup} where the binary signals $ x \in X=\{0,1\}$ having $p_X=\{p_{x=0},p_{x=1}\}$ are transmitted and corrupted by a continuous noise source to produce a continuous-valued output $y \in \mathbb{R}$ at the receiver. Specifically, $y$ is specified by the a channel conditional density $p(y|x)$ where $p(y|x)$ models the distortion caused by noise. The receiver recovers the original binary signal $x$ using a quantizer $Q$ that quantizes the received continuous-valued signal $y$ to $z \in Z=\{0,1\}$. Since $y\in \mathbb{R}$, the quantization parameters can be specified by a thresholding vector $$\textbf{h}= (h_1, h_2, \dots,h_n) \in \mathbb{R}^n,$$ with $h_1 < h_2 < \dots < h_{n-1} < h_n$, where $n$ is assumed a finite number. Theoretically, it is possible to construct the conditional densities $p(y|x)$ such that the optimal quantizer might consist an infinite number of thresholds. However, for a practical implementation, especially when the quantizer is implemented using a lookup table, then a finite number of thresholds must be used. To that end, in this paper, we assume that the quantizer using an finite number of thresholds. Now, $\textbf{h}$ induces $n+1$ disjoint partitions: $$H_1 = (-\infty, h_1), H_2 = [h_1, h_2), \dots, H_{n+1} = [h_n,\infty).$$ Let $\mathbb{H} = \bigcup_{i \in odd} H_i$ and $\bar{\mathbb{H}} = \bigcup_{i \in even} H_i$, then $\mathbb{H} \cap \bar{\mathbb{H}} =\emptyset$ and $\mathbb{H} \cup \bar{\mathbb{H}} =\mathbb{R}$. Thus, $\textbf{h}^*$ divides $\mathbb{R}$ into $n+1$ contiguous disjoint segments, each maps to either 0 or 1 alternatively Without the loss of generality, we suppose that the receiver uses a quantizer $Q:Y \rightarrow Z$ to quantize $Y$ to $Z$ as: \begin{equation} \label{eq:decoding} Z = \begin{cases} 0 & \text{if } Y \in \mathbb{H}, \\ 1 & \text{if } Y \in \bar{\mathbb{H}}. \end{cases} \end{equation} Our goal is to design an optimal quantizer $Q^*$, specifically $\textbf{h}^*$ and also find the optimal input distribution $p_X^*$ that maximizes the mutual information $I(X;Z)$ between the input $X$ and the quantized output $Z$: \begin{equation} \label{eq:maximization} h^*,p_X^*= \argmax_{h^*,p_X^*} I(X;Z). \end{equation} We note that the values of thresholds $h_i$'s, the number of thresholds $n$ and input distribution $p_X$ are the optimization variables. The maximization in (\ref{eq:maximization}) only assumes that the channel conditional density $p(y|x)$ are given. \section{Optimality conditions} \label{sec: optimal conditions} For convenience, we use the following notations: \begin{enumerate} \item $p = (p_0, p_1)$ denotes the probability mass function for the input $X$, with $p_0 = P(X=0)$ and $p_1 = P(X=1)$. \item $q = (q_0, q_1)$ denotes probability mass function for the output $Z$, with $q_0 = P(Z=0)$ and $q_1 = P(Z=1)$. \item $\phi_0(y)=p(y|x=0)$ and $\phi_1(y)=p(y|x=1)$ denote conditional density functions of the received signal $Y$ given the input signal $X = 0$ and $X=1$, respectively. \end{enumerate} The 2$\times2$ channel matrix $A$ associated with a discrete memoryless channel (DMC) with input $X$ and output $Z$ is: \[ A= \begin{bmatrix} A_{11} & 1-A_{11}\\ 1-A_{22} & A_{22} \end{bmatrix}, \] where \begin{equation} \label{eq: definition a11} A_{11} =\int_{y \in \mathbb{H}}^{}\phi_0(y)dy, \end{equation} \begin{equation} \label{eq: definition a22} A_{22} =\int_{y \in \bar{\mathbb{H}}}^{}\phi_1(y)dy. \end{equation} \subsection{Optimal quantizer structure for a given input distribution} \label{sec:structure} Our first contribution is to show that for a given input distribution the optimal binary quantizer with multiple thresholds, specified by a thresholding vector $\textbf{h}^*=(h_1^*,h_2^*,\dots,h_n^*)$ with $h_i^* < h_{i+1}^*$, must satisfy the conditions stated in the Theorem \ref{theorem: 1} below. \begin{theorem} \label{theorem: 1} Let $\textbf{h}^*=(h_1^*,\dots,h_n^*)$ be a thresholding vector of an optimal quantizer $Q^*$, then: \begin{equation} \label{eq: relation threshold} \dfrac{\phi_0(h_i^*)}{\phi_1(h_i^*)} = \dfrac{\phi_0(h_j^*)}{\phi_1(h_j^*)} = r^*, \end{equation} for $\forall$ $i, j \in \{1,2,\dots,n\}$ and some optimal constant $r^* > 0$. \end{theorem} \begin{proof} We note that using the optimal thresholding vector $\textbf{h}^*$, the quantization mapping follows (\ref{eq:decoding}). $\textbf{h}^*$ divides $\mathbb{R}$ into $n+1$ contiguous disjoint segments, each maps to either 0 or 1 alternatively. The discrete memoryless channel in Fig. \ref{fig:setup} has the channel matrix \[ A^*= \begin{bmatrix} A_{11} & A_{12}\\ A_{21} & A_{22} \end{bmatrix}, \] and the mutual information can be written as a function of $h$ as: \begin{equation} I(h)=H(Z)-H(Z|X)=H(q_0)-[p_0H(A_{11})+p_1H(A_{22})], \end{equation} where for any $w \in [0,1]$, $H(w)=-[w\log(w)+(1-w)\log(1-w)]$ and $q_0=P(Z=0)=p_0A_{11}+p_1A_{21}$. This is an optimization problem that maximizes $I(h)$. The theory of optimization requires that an optimal point must satisfy the KKT conditions \cite{boyd2004convex}. In particular, define the Lagrangian function as: \begin{equation} \label{eq:lagrangian} L(h,\lambda) = I(h) + \sum_{i=1}^{n-1}{\lambda_i (h_i - h_{i+1})}, \end{equation} then the KKT conditions \cite{boyd2004convex} states that, an optimal point $h^*$ must satisfy: \begin{equation} \label{eq:kkt1} \begin{cases} \frac{d{L(h, \lambda)}}{dh}|_{h = h^*, \lambda = \lambda^*} = 0, \\ \lambda_i^*(h_i - h_{i+1}) = 0, i = 1, 2, \dots, n-1, \\ \lambda_i^* \ge 0, i = 1, 2, \dots, n-1. \end{cases} \end{equation} Since the structure of the quantizer requires that $h_i < h_{i+1}$, the second and the third conditions in (\ref{eq:kkt1}) together imply that $\lambda_i^* = 0, i = 1, 2, \dots, n-1$. Consequently, from (\ref{eq:lagrangian}) and the first condition in (\ref{eq:kkt1}), we have: $$\frac{d{L(h, \lambda)}}{dh}|_{h = h^*, \lambda = \lambda^*} = \frac{d{I(h)}}{dh}|_{h = h^*} = 0.$$ By setting the partial derivatives of $I(h)$ with respect to each $h_i$ to zero, we have \begin{strip} \vspace{-0.1 in} \hrule \begin{eqnarray} \frac{\partial I(h)}{\partial h_i} &=&(\log\dfrac{1-q_0}{q_0} )\frac{\partial q_0}{\partial h_i} -p_0(\log \dfrac{1-A_{11}}{A_{11}}) \frac{\partial A_{11}}{\partial h_i}-p_1(\log\dfrac{1-A_{22}}{A_{22}})\frac{\partial A_{22}}{\partial h_i} \nonumber\\ &=&(\log\dfrac{1-q_0}{q_0})(p_0 \frac{\partial A_{11}}{\partial h_i} - p_1 \frac{\partial A_{22}}{\partial h_i} )-p_0(\log\dfrac{1-A_{11}}{A_{11}}) \frac{\partial A_{11}}{\partial h_i} -p_1(\log\dfrac{1-A_{22}}{A_{22}})\frac{\partial A_{22}}{\partial h_i}\label{eq: 2}\\ &=&p_0 \frac{\partial A_{11}}{\partial h_i} (\log \dfrac{1-q_0}{q_0}-\log \dfrac{1-A_{11}}{A_{11}})-p_1 \frac{\partial A_{22}}{\partial h_i} (\log \dfrac{1-q_0}{q_0}+\log \dfrac{1-A_{22}}{A_{22}}) = 0, \label{eq:derivative} \end{eqnarray} \hrule \vspace{-0.1 in} \end{strip} with (\ref{eq: 2}) due to $q_0=p_0A_{11}+p_1A_{21}=p_0A_{11}+p_1(1-A_{22})$. Since $\frac{\partial A_{11}}{\partial h_i}=\phi_0(h_i)$ and $\frac{\partial A_{22}}{\partial h_i}=-\phi_1(h_i)$, from (\ref{eq:derivative}), we have: \begin{equation} \label{eq: 3} \dfrac{\phi_0(h^*_i)}{\phi_1(h^*_i)}=-\dfrac{p_1}{p_0}\dfrac{\log\dfrac{1-q_0}{q_0}+\log\dfrac{1-A_{22}}{A_{22}}}{\log\dfrac{1-q_0}{q_0}-\log\dfrac{1-A_{11}}{A_{11}}}= r^*. \end{equation} Since (\ref{eq: 3}) holds for $\forall$ $i$, the RHS of (\ref{eq: 3}) equals to some constant $r^* > 0 $ for a quantizer $Q^*$, Theorem \ref{theorem: 1} follows. \end{proof} Suppose the optimal value $r^*$ is given and the equation $r(y) = r^*$ has $m$ solutions: $y_1 < y_2 < \dots < y_m$. Then, Theorem \ref{theorem: 1} says that the optimal quantizer must either have its thresholding vector be $(y_1, y_2, \dots, y_m)$ or one of its ordered subsets, e.g., $(h^*_1, h^*_2) = (y_1, y_3)$, or both. In Theorem \ref{theorem: 1-a} below, we will show that the quantizer whose thresholding vector contains all the solutions of $\dfrac{\phi_0(y)}{\phi_1(y)} = r^*$, will be at least as good as any quantizer whose thresholding vector is a ordered subset of the set of all solutions. \begin{theorem} \label{theorem: 1-a} Let $y^*_1 < y^*_2< \dots < y^*_n$ be the solutions of $r(y) =\dfrac{\phi_0(y)}{\phi_1(y)}= r^*$ for the optimal constant $r^* > 0$. Let $Q^n_{r^*}$ be the quantizer whose thresholding vector contains all the solutions, i.e., $h^*_i = y^*_i, i = 1, 2, \dots, n$, then for $k < n$, $Q^n_{r^*}$ is at least as good as any quantizer $Q^k_{r^*}$ whose thresholding vector is an ordered subset of the set of $(h^*_1, h^*_2, \dots, h^*_n)$. \end{theorem} \begin{proof} Due to the limited space, we do not present the detailed proof of Theorem \ref{theorem: 1-a}. However, we refer the reader to Theorem 1 in \cite{kurkoski2017single}. Indeed, Theorem 1 in \cite{kurkoski2017single} showed that the optimal quantizer is equivalent to hyper-plane cuts in the space of posterior conditional distribution $p_{y|x}$ and it guarantees that at least one of the globally optimal quantizers has this structure. Due to the channel is binary, a hyper-plane in the posterior distribution $p_{y|x}$ is a point. That said, the optimal threshold vector $h_i$ should be the solutions of \begin{equation*} p_{y|x_1}=\dfrac{\phi_0(y)}{\phi_0(y)+\phi_1(y)}=a^*, 0 \leq a^* \leq 1, \end{equation*} $\forall$ $i=1,2,\dots,n$ that, in turn, is equivalent to $\dfrac{\phi_0(y)}{\phi_1(y)}=r^*$ where $r^*=\dfrac{a}{1-a}$. \end{proof} Theorem \ref{theorem: 1-a} is important in the sense that it provides a concrete approach to find the globally optimal quantizer $Q^*$ by exhausted searching the optimal $r^*$ and using all the solutions of $\dfrac{\phi_0(y)}{\phi_1(y)}=r^*$ to construct the optimal threshold vector $\textbf{h}$. We also note that Theorem \ref{theorem: 1-a} can stand alone without using the proof of Theorem \ref{theorem: 1}, however, \textit{Theorem \ref{theorem: 1} is useful in the sense that it provides an important connection between the optimal thresholds that produces the optimal channel matrix and the optimal input distribution.} For example, the relationship in (\ref{eq: 3}) will be used in the following Theorem \ref{theorem: 2}. \begin{theorem} \label{theorem: 2} Consider a binary channel with a given input distribution, corresponding to an optimal quantizer $Q^*$, the optimal channel matrix $A^*$ having diagonal entries $A_{11}$ and $A_{22}$ such that $A_{11} \geq p_0$ and $A_{22} \geq p_1$. \end{theorem} \begin{proof} Please see the appendix. \end{proof} \vspace{-0.1 in} \subsection{Optimal input distribution for a given channel matrix} For a binary channel having a given channel matrix $A$, the optimal input distribution can be determined in closed-form \cite{moskowitz2010approximations}, \cite{moskowitz2009approximation}. Finally, the maximum of mutual information at the optimal distribution can be written as a function of channel matrix entries \cite{moskowitz2010approximations}, \cite{moskowitz2009approximation}, \cite{silverman1955binary}, \cite{nguyen2018closed}. This result is summarized in the following Theorem. \begin{theorem} \label{theorem: 3} For a given quantizer $Q$ which corresponds to a given channel matrix $A$, the maximum of mutual information $I(X;Z)$ can be written by the following closed-form \begin{small} \begin{eqnarray} \label{eq: closed form with fix channel matrix} I(X;Z)_{p_X^*} &=&\log_{2}[2^{-\dfrac{A_{22}H(A_{11})+(A_{11}-1)H(A_{22}))}{A_{11}+A_{22}-1}} \nonumber\\ & + & 2^{-\dfrac{(A_{22}-1)H(A_{11})+A_{11}H(A_{22}))}{A_{11}+A_{22}-1}} ], \end{eqnarray} \end{small} where $H(w)=- [w\log(w) +(1-w)\log(1-w)]$. \end{theorem} \begin{proof} Please see the detailed proof in \cite{moskowitz2010approximations}, \cite{moskowitz2009approximation}, \cite{silverman1955binary}, \cite{nguyen2018closed}. \end{proof} \begin{theorem} \label{theorem: 4} For a given quantizer $Q$ which corresponds to a given channel matrix $A$, the optimal input distribution $p_0^*$ and $p_1^*$ are bounded by: \begin{equation} 0.3679=\dfrac{1}{e}< q_0^*,q_1^*<1-\dfrac{1}{e}=0.6321. \end{equation} \end{theorem} \begin{proof} Please see Theorem 1 in \cite{majani1991two}. \end{proof} \section{Finding channel capacity over both input distribution and threshold vector variables} \label{sec: solution} Theorem \ref{theorem: 1} and Theorem \ref{theorem: 1-a} state that an optimal quantizer can be found by exhaustive searching the optimal value $r^*$ and use all the solutions of $\dfrac{\phi_0(y)}{\phi_1(y)} = r^*$ to construct the optimal thresholding vector $\textbf{h}^*$. The mutual information $I(X;Z)$, therefore, becomes a function of variable $r$. Now, for a given $r$, define $\mathbb{H}_r = \{y: \dfrac{\phi_0(y)}{\phi_1(y)} > r \}$, then $$ \mathbb{H}_r = \{ (-\infty, h_1) \ \cup [h_2, h_3) \cup \dots \cup [h_n, +\infty) \}.$$ Similarly, let $\bar{\mathbb{H}}_r = \{y: \dfrac{\phi_0(y)}{\phi_1(y)} \leq r \}$, then $$\bar{\mathbb{H}}_r = \mathbb{R} \setminus \mathbb{H}_r = \{ [h_1, h_2 ) \cup [h_3, h_4) \cup \dots \cup [h_{n-1}, h_n) \}.$$ The sets $\mathbb{H}_r$ and $\bar{\mathbb{H}}_r$ together specify a binary quantizer that maps $y$ to $z \in \{0,1\}$, depending on whether $y$ belongs to $\mathbb{H}_r$ or $\bar{\mathbb{H}}_r$. Without the loss of generality, suppose we use the following quantizer: \begin{equation} z = \begin{cases} 0 & y \in \mathbb{H}_r, \\ 1 & y \in \bar{\mathbb{H}}_r, \end{cases} \end{equation} then the channel matrix of the overall DMC is: $$\begin{array}{cc} A = \begin{bmatrix} f(r) & 1-f(r) \\ 1-g(r) & g(r) \end{bmatrix}, \end{array}$$ where $f(r) \stackrel{\triangle}{=} p(z=0|x=0)=A_{11}$ and $g(r) \stackrel{\triangle}{=} p(z = 1|x=1) =A_{22}$. $f(r)$ and $g(r)$ can be written in terms of $\phi_0(y)$ and $\phi_1(y)$ as: \begin{footnotesize} \begin{equation} \label{eq: construct fr} f(r)\!=\!\int_{y \in \mathbb{H}_r}\phi_0(y)dy\!=\!\int_{-\infty}^{h_1}\phi_0(y)dy \!+\! \int_{h_2}^{h_3}\phi_0(y)dy \!+\! \dots \!+\! \int_{h_{n}}^{+\infty}\phi_0(y)dy, \end{equation} \begin{equation} \label{eq: construct gr} g(r)\!=\!\int_{y \in \bar{\mathbb{H}}_r}\phi_1(y)dy\!=\!\int_{h_1}^{h_2}\phi_1(y)dy \!+\! \int_{h_3}^{h_4}\phi_1(y)dy \!+\! \dots \!+\! \int_{h_{n-1}}^{h_{n}}\phi_1(y)dy. \end{equation} \end{footnotesize} Using Theorem \ref{theorem: 3}, the optimal of mutual information in Eq. (\ref{eq: closed form with fix channel matrix}) is: \begin{small} \begin{eqnarray} \label{eq: closed form with fix channel matrix 2} I(X;Z)_{(p_X^*,r)} &=&\log_{2}[2^{-\dfrac{g(r)H(f(r))+(f(r)-1)H(g(r)))}{f(r)+g(r)-1}} \nonumber\\ & + & 2^{-\dfrac{(g(r)-1)H(f(r))+f(r)H(g(r)))}{f(r)+g(r)-1}} ]. \end{eqnarray} \end{small} \textbf{Linear time complexity algorithm:} using (\ref{eq: closed form with fix channel matrix 2}), an exhausted searching over $r$ can be applied to find the optimal of mutual information for both input distribution and threshold quantization. We note that $f(r)$ and $g(r)$ can be computed using (\ref{eq: construct fr}) and (\ref{eq: construct gr}) where $\textbf{h}=\{h_1,h_2,\dots,h_n\}$ are well defined as the solutions of $\dfrac{\phi_0(y)}{\phi_1(y)} = r$. \textbf{Narrow down the searching area:} \begin{theorem} \label{theorem: 5} For an arbitrary binary channel, suppose that the optimal of mutual information $I(X;Z)$ over both input distribution and quantizer is achieved at the optimal quantizer $Q^*$ which generates optimal channel matrix $A^*$, then $A_{11}^* > \dfrac{1}{e}$ and $A_{22}^* > \dfrac{1}{e}$. \end{theorem} \begin{proof} Combining Theorem \ref{theorem: 2} and Theorem \ref{theorem: 4}, for an optimal quantizer, we should have $A^*_{11} > \dfrac{1}{e}$ and $A^*_{22} > \dfrac{1}{e}$. \end{proof} \begin{theorem} \label{theorem: 6} $f(r)$ in (\ref{eq: construct fr}) is a monotonic decreasing function and $g(r)$ in (\ref{eq: construct gr}) is monotonic increasing function with variable $r$. \end{theorem} \begin{proof} Please see our appendix. \end{proof} From Theorem \ref{theorem: 5}, the entries $A_{11}$ and $A_{22}$ should be satisfy $A_{11} > \dfrac{1}{e}$ and $A_{22} > \dfrac{1}{e}$. Thus, we can narrow down the searching range by limiting $f(r)$ and $g(r)$ such that $f(r) > \dfrac{1}{e}$ and $g(r) > \dfrac{1}{e}$. Due to the monotonic increasing/decreasing of $f(r)$ and $g(r)$, we can find the upper bound and lower bound of $r$ by solving two equations $f(r)=1/e$ and $g(r)=1/e$. Using bisection search, finding the solutions of $f(r)=1/e$ and $g(r)=1/e$ takes the time complexity of $O(\log M)$ where $M=\dfrac{1}{\epsilon}$ and $\epsilon$ is the resolution/accuracy of the solution. \section{Numerical Results} \label{sec: simulations} In this section, we find the optimal of mutual information $I(X;Z)$ for a channel having $\phi_0=N(\mu_0=-1,\sigma_0=6)$ and $\phi_1=N(\mu_1=1,\sigma_1=5)$. Due to $f(r) > 1/e$ and $g(r)> 1/e$, we can limit the searching area of $r \in [0.8;9.1]$. Next, an exhaustive searching with the resolution $\epsilon=0.01$ over $[0.8;9.1]$ is performed. Fig. \ref{fig: 6} illustrates the function of $I(X;Z)_{(p_X^*,r)}$ in Eq. (\ref{eq: closed form with fix channel matrix 2}) using variable $r$. From our simulation, the optimal of $I(X;Z)$ for both input variable and threshold variable is $I(X;Z)^*=0.7249$ at $r^*=1.36$. \begin{figure} \centering \includegraphics[width=3 in]{optimize_both_input_threshold.eps}\\ \caption{$I(X;Z)_{(p_X^*,r)}$ as a function of $r$.}\label{fig: 6} \end{figure} \section{Conclusion} In this paper, we provide a linear time complexity searching procedure to find the global optimal of mutual information between input and quantized output over both input distribution and quantizer variables. Based on the properties of the optimal quantizer and the optimal input distribution, we reduced the searching range that finally results in a faster implementation. Both theoretical and numerical results are provided to justify our method.
{ "redpajama_set_name": "RedPajamaArXiv" }
3,060
lychee.define('lychee.ui.entity.Download').tags({ platform: 'html' }).includes([ 'lychee.ui.entity.Button' ]).supports((lychee, global) => { if ( typeof global.document !== 'undefined' && typeof global.document.createElement === 'function' ) { return true; } return false; }).exports((lychee, global, attachments) => { const _Button = lychee.import('lychee.ui.entity.Button'); /* * HELPERS */ const _MIME_TYPE = { 'Config': { name: 'Entity', ext: 'json', mime: 'application/json' }, 'Font': { name: 'Entity', ext: 'fnt', mime: 'application/json' }, 'Music': { 'mp3': { name: 'Entity', ext: 'msc.mp3', mime: 'audio/mp3' }, 'ogg': { name: 'Entity', ext: 'msc.ogg', mime: 'application/ogg' } }, 'Sound': { 'mp3': { name: 'Entity', ext: 'snd.mp3', mime: 'audio/mp3' }, 'ogg': { name: 'Entity', ext: 'snd.ogg', mime: 'application/ogg' } }, 'Texture': { name: 'Entity', ext: 'png', mime: 'image/png' }, 'Stuff': { name: 'Entity', ext: 'stuff', mime: 'application/octet-stream' } }; const _download = function(asset) { let data = asset.serialize(); let url = data.arguments[0]; let name = url.split('/').pop(); let mime = _MIME_TYPE[data.constructor] || _MIME_TYPE['Stuff']; if (data.blob !== null) { if (/Music|Sound/.test(data.constructor)) { for (let ext in mime) { let element = global.document.createElement('a'); element.download = name + '.' + mime[ext].ext; element.href = data.blob.buffer[ext]; element.click(); } } else { if (url.startsWith('data:')) { name = mime.name + '.' + mime.ext; } let element = global.document.createElement('a'); element.download = name; element.href = data.blob.buffer; element.click(); } } }; /* * IMPLEMENTATION */ const Composite = function(data) { let states = Object.assign({ label: 'DOWNLOAD' }, data); this.value = []; this.setValue(states.value); delete states.value; _Button.call(this, states); states = null; /* * INITIALIZATION */ this.unbind('touch'); this.bind('touch', function() { this.value.forEach(asset => _download(asset)); }, this); }; Composite.prototype = { /* * ENTITY API */ // deserialize: function(blob) {}, serialize: function() { let data = _Button.prototype.serialize.call(this); data['constructor'] = 'lychee.ui.entity.Download'; return data; }, /* * CUSTOM API */ setValue: function(value) { value = value instanceof Array ? value : null; if (value !== null) { this.value = value.filter(asset => { if (asset instanceof global.Config) return true; if (asset instanceof global.Font) return true; if (asset instanceof global.Music) return true; if (asset instanceof global.Sound) return true; if (asset instanceof global.Texture) return true; if (asset instanceof global.Stuff) return true; return false; }); return true; } return false; } }; return Composite; });
{ "redpajama_set_name": "RedPajamaGithub" }
103
BSPEC Bocconi Students Private Equity Club Coffee Break With Fundamentals of Private Equity Distressed Private Equity: It's cheaper if it's on fire By Eric Peghini and Chris Khoury Many are familiar with the story of Bear Stearns' monumental stock collapse and the sale of the investment bank to JP Morgan in 2008 at $2 per share – almost 1% of the original value of the year before. The notion of purchasing a competitor at such a discount is borderline unfathomable. Unfortunately, the takeover created such a substantial regulatory and legal liability over time that led Jamie Dimon to declare his regret of the acquisition. But is there a way to acquire a failing company cheaply and make a profit: can we buy extremely low and still sell high? Welcome to our primer on distressed private equity. While many readers may have heard of restructuring and distressed M&A within investment banking, we introduce the buy side standpoint. Within this subgroup of financial sponsors, the investors look to acquire distressed companies (operationally struggling, defaulting, or bankrupt) at a discount, improve it, and exit. Contrary to the deal-flow in most areas within financial services, when markets are tough, activity increases for these turnaround companies. The primary distinctions between the conventional (growth/buyout) private equity fund and a distressed fund are as follows: The mentality is different. A traditional fund seeks to identify strong cash-flows in order to make a good company better. In distressed private equity one instead attempts to turnaround a tanking company via restructuring in order to revitalize it. As a result, the outlook of the distressed manager is less fixated on pinpointing "favorable" qualities but rather applies more weight to areas of possible improvement. The distressed fund is opportunistic. Of course conventional sponsors consider market timing when entering investments otherwise they would not be earning (and would not deserve) the double digit yields in carry on top of regular management fees. Nevertheless, distressed funds must act quickly because the valuations of distressed targets are far more volatile. Action may also be necessary before the company is liquidated, dismantled or otherwise salvaged by creditors. Acquisition methods are craftier. The acquisition of distressed firms at a significant discount requires covert action. This is because fire sales and post-bankruptcy auctions can rapidly accelerate into bidding wars which significantly increase entry multiples and, by extension, eat into ROI. Therefore, to avoid unwanted buy side competition, the fund needs to subtly maintain control of the takeover process. The typical practice involves the fund purchasing existing debt of the company in order to position itself to have the strongest claim on its assets; this in turn, is converted into equity via a debt-to-equity swap. Other methods include acquiring equity or buying a bankrupt company's assets directly. Careful though! Not all firms are economically viable if salvaged. Like in any business, the fund managers must identify positive NPV projects, or targets that can yield a profit. For instance, a distressed company with an obsolete business model must either be flexible enough to pivot to an in-demand service or have significant assets that can be sold off in order to justify an acquisition. The conventional distressed target should be operationally sound, just with a bad balance sheet. Also, financing the purchase of distressed debt or equity is difficult. Imagine if you asked your father for cash to buy your friend's bicycle with a broken chain; he might do so because it is relatively inexpensive to repair and more economical than purchasing a new bike ­– this is traditional private equity. Now if instead you asked him for money to buy a totaled Ferrari he would be less likely to provide the funds because, although it is relatively cheap, there is only a slim chance that you can restore it – turnaround private equity. Therefore, unless the sponsor is large and reputable, it can prove to be a challenge to raise the necessary debt funds. Because of this, many turnaround companies engage in unlevered initial investments and then pursue dividend recapitalizations once the company is no longer distressed. Yet this requires larger investments and more committed capital. To date, the largest sponsor specializing in distressed investments is Oaktree Capital which has experienced much success in investments entered during the financial crisis (including the 23x exit of AdvancePierre Foods in 2017). Other notable players include Cerberus Capital Management and MatlinPatterson Global Advisors while mega-funds such as Carlyle and Blackstone (GSO Capital Partners) also invest in distressed entities. So how do these funds perform? As one can imagine, during the financial recessions, distressed funds outperformed other private equity investment strategies by displaying a strong median net IRR of c26% on targets entered in 2002 and a less remarkable, albeit leading, c15% in 2008. The appetite for distressed debt, including NPLs, remained sizable during the recent bull market, offering the largest returns within private debt. This strong track record is because distressed debt can be purchased at large discounts to par – and existing bondholders are willing to liquidate their positions – allowing for the possibility of high returns. Preqin cites an 18% increase in demand for such assets from 2017 to 2018. The primary limitation for distressed debt investors lies in number of opportunities; while investors want distressed debt, there exists a finite number of distressed targets that can reliably be invested in. Preqin notes that distressed funds (including hedge funds as well as private equity) sought out only 47% in fundraising of the $77bn made available globally by distressed debt investors through Q2 in 2018. How are these funds generating such highly demanded returns and what will the future of distressed private equity will look like? A study by McKinsey & Company has revealed that firms with financial sponsors at the helm outperform public companies with traditional management in times of distress by recovering EBITDA margins faster. These findings can be linked to the strong corporate governance that a private equity involvement inherits as well as the concentrated shareholder structure which improves consensus and expedites decision-making. A distressed private equity fund also offers a dedicated 'crisis mode' of management in which actions are taken quickly and decisively in line with explicit objectives. This is helpful when revamping the organizational side of a business that is looking into the abyss. Useful operational private equity practices further support the control of distressed situations. For example, a chief priority when acquiring a distressed company is to simplify its operations and focus on the core activities of the company. A private equity fund with a portfolio of distressed companies or a track record in that field can leverage successful strategies utilized on previous investments. An experienced management team in special situations thereby limits the guesswork involved in a turnaround. These tools make distressed private equity firms a viable partner in times of crisis. However, are they able to go from a niche in the broader industry to a more mainstream source of investing? Somewhat frighteningly, yes. The extraordinary levels of debt being used to finance buyouts and the corporate M&A market, coupled with loose covenants on indebtedness and cyclically lower levels of bankruptcy act as signs that the heyday of distressed opportunities for private equity investors has yet to come. Furthermore, the increasing complexity of leverage structures can make the next wave of restructuring projects different from those observed in past, and this may call for even more advisory support. Overall, global levels of dry powder continue to pile up, with totals in distressed private equity growing by 7% from 2017 to 2018; this proves that funds are available to seize opportunistic investments. So what does a successful turnaround look like? To fully capture the value added by distressed private equity managers, take the turnaround of US-based Hostess, a sweets manufacturer, by Apollo – a renowned special situations investor. In 2013, Fund VII acquired a majority in the Hostess brand snack business out of bankruptcy. Apollo invested approximately $150 million to purchase the assets of the brand which at the time had over 100,000 retail customers and currently includes brands such as Twinkies, Ding Dongs and Ho Hos in its portfolio. This asset deal provided the advantage of acquiring the business without incurring the pre-existing liabilities that had pressured the company financially. The necessity to completely reposition Hostess' manufacturing and distribution activities drove away a substantial part of the bidding competition. This created a lower entry and the opportunity to invest additional Apollo funds into the new business at attractive multiples. Hostess was subsequently able to reopen three upgraded bakery plants and relaunch its snack cake line. This success was reflected in its operational performance, as Hostess achieved its projected year 5 EBITDA in year 2 of operations. Apollo was ultimately able to fully monetize its divestment of Hostess at more than 10x entry to Gores Group which acquired the company via a SPAC in 2016. A more recent example features turnaround firm Cerberus, which has been tasked with the leading position of the overhaul of Deutsche Bank. While Deutsche is not exactly teetering on the brink of bankruptcy, it has observed consecutive annual losses and incurred continued legal fines. In order to restore its business, Deutsche Bank appointed Cerberus to improve profitability and restructure the bank's balance sheet. The conversation of a tie-up with Germany's second largest bank, Commerzbank, is in vogue; this can be a logical solution for Cerberus which holds minority stakes in both banks. In any case, whether Deutsche's white knight can successfully rehabilitate the bank remains to be seen, however Cerberus will not have the license of a controlling stake, and therefore will take on an advisory capacity as opposed to a managing role. Nevertheless, these recent activities demonstrate how vital a skilled turnaround fund can be in order to help corporations regain healthy financial and market positions. And healthy corporations imply a stronger economy and increased employment. So if the money does not interest you in a career at a distressed fund, perhaps that will. Or not, in any case this concludes our primer on distressed private equity so for those interested: proceed with caution and burn, baby burn. Editor: Stefan Larsen Authors: Chris Khoury, Eric Peghini https://thehedgefundjournal.com/distressed-private-equity/ https://www.mckinsey.com/business-functions/strategy-and-corporate-finance/our-insights/how-private-equity-owners-lean-into-turnarounds https://www.ey.com/en_gl/transactions/five-success-factors-for-turnarounds-of-private-equity-owned-businesses http://newgenerationcapital.com/services/distressed-private-equity/ https://www.oaktreecapital.com/strategies/private-equity/special-situations/special-situations https://www.apollo.com/our-business/private-equity https://www.bloomberg.com/news/articles/2018-07-10/deutsche-bank-hires-cerberus-for-support-in-overhaul-of-lender?fbclid=IwAR3EO_6rMmaDYW24DTFq1ADAtHgzjEvPXpcqT-e3TbzvceqJGz40LE3cHOA https://www.reuters.com/article/us-dealtalk-distressed-idUSTRE53255220090403 http://www.clearridgecapital.com/articles/dividend-recapitalizations-cash-alternatives-for-private-equity/ https://www.gurufocus.com/news/512191/oaktree-capital-makes-23-times-investment-on-turnaround-play http://www.mandaportal.com/getattachment/6dc8262b-cb10-4c81-8e5e-96450cf93af6/Preqin-Special-Report–Distressed-Private-Equity http://docs.preqin.com/quarterly/pd/Preqin-Quarterly-Private-Debt-Update-Q2-2018.pdf http://docs.preqin.com/press/Distressed-PD-May-18.pdf https://www.wsj.com/articles/the-american-with-the-toughest-job-in-finance-saving-deutsche-bank-11551801710 March 14, 2019 November 19, 2019 Bocconi, Bocconi Students Private Equity Club, Distressed Investing, Distressed Private Equity, Private Equity 2 thoughts on "Distressed Private Equity: It's cheaper if it's on fire" Pingback: Secondary Buyouts: Not Your Typical Second-Hand Shopping | Sell Side Handbook Pingback: SBOs: Not Your Typical Second-Hand Shopping – BSPEC Previous Previous post: CLOs at the center of the new PE industry Next Next post: eDreams: take off and crash of PE Partner Association Infrastructure Private Equity: Asset class overview and the outlook post Covid December 15, 2020 Search Funds: an asset class that relies on small-scale human interaction December 4, 2020 Venture Capital in the "Holy Land" – An overview of VC in Israel November 23, 2020 We recruit in the first weeks of the fall and spring semesters.February 10, 2021
{ "redpajama_set_name": "RedPajamaCommonCrawl" }
5,910
\section{Introduction} The circle of ideas regarding free objects, particularly the notion of a pair of adjoint functors, is well-known in the literature of category theory and abstract algebra, such as resources \cite{borceux1} and \cite{lang}. However, as is well-known, free objects rarely exist in categories of normed objects over $\mathbb{F}\in\{\mathbb{R},\mathbb{C}\}$. To summarize in the terminology and notation of this paper, let $\cat{C}$ be a subcategory of normed $\mathbb{F}$-vector spaces with $\mathbb{F}$-linear contractions. There is a natural forgetful functor $F_{\cat{C}}:\cat{C}\to\mathbf{Set}$, which strips all algebraic and topological data, leaving only the underlying sets and set maps. The free mapping property can be stated as a \emph{reflection} along the functor $F_{\cat{C}}$. Explicitly, given a set $S$, a reflection of $S$ along $F_{\cat{C}}$ is an object $V$ of $\cat{C}$ and a function $\eta:S\to F_{\cat{C}}V$ such that given any other object $W$ of $\cat{C}$ and a function $\phi:S\to F_{\cat{C}}W$, there is a unique $\cat{C}$-map $\hat{\phi}:V\to W$ such that $F_{\cat{C}}\hat{\phi}\circ\eta=\phi$. \begin{prop2}[Folklore]\label{fail} Fix a nonempty set $S$. If $\cat{C}$ contains an object not isomorphic to the zero space, then $S$ has no reflection along $F_{\cat{C}}$. \end{prop2} Since the free mapping property is a cornerstone to many constructions in pure algebra, particularly presentation theory, this is a most discouraging fact. The necessity of making some sacrifice has spawned several avenues of research into generators and relations, such as \cite{blackadar1985,gerbracht,goodearl,loring2009,nassopoulos2008,cat-top,pelletier}. The present work develops the same category of normed sets with contractive maps from \cite[p.\ 19]{gerbracht}, but also generalizes to bounded maps and identifies the properties of both. Using these categories, the present work builds Banach spaces and Banach algebras with the analogous universal property. Further, the constructions generalize the work of \cite{goodearl,cat-top,pelletier}. And, it is this ``scaled-free'' mapping property that is of interest. In subsequent papers, this scaled-free property, coupled with the associated functorial results, will give rise to a presentation theory for Banach algebras and other such objects, which inherits many properties and constructions from its algebraic counterpart. The author would like to thank the referees of this paper for their comments and patience in its revision. He would also like to thank Prof.\ David Pitts for his advice and help in developing these ideas. \section{Normed Sets Revisited}\label{chap2} This section defines an alternative working environment apart from the category of sets and explores the basic principles governing it. This category was previously introduced in \cite[p.\ 19]{gerbracht} in the context of constructing C*-algebras and \cite[p.\ 7]{grandis2004} for combinatorial homology. \subsection{Definitions \& Basic Results} The objective is to construct a category so that a forgetful functor from a category of normed objects and its homomorphisms will have a left adjoint. Explicitly, the objects will be a set with a ``sizing'' function. \begin{defn} A \emph{normed set} is a pair $(S,f)$, where $S$ is a set and $f$ a function from $S$ to $[0,\infty)$. The function $f$ is called the \emph{norm function}. \end{defn} This structure is not new, previously considered in \cite[p.\ 19]{gerbracht} and \cite[p.\ 7]{grandis2004}, though the latter allows the use of $\infty$ as a norm-value. This has significant impact on the structure of the associated category, as will be explained in Section \ref{cset1}. As the author was initially unaware of the previous two references, he used the term ``crutched set'' and ``crutch function'' in his original dissertation \cite[p.\ 14]{grilliette0}. \begin{defn} Given two normed sets $(S,f)$ and $(T,g)$, a function $\phi:S\to T$ is \emph{bounded} if there is $M\geq 0$ such that for all $s\in S$, $g\left(\phi(s)\right)\leq M f(s)$. Let \[ \crh(\phi):=\inf\left\{M\in[0,\infty):g\left(\phi(s)\right)\leq M f(s)\forall s\in S\right\}, \] the \emph{bound constant} of $\phi$. If $\crh(\phi)\leq 1$, $\phi$ is \emph{contractive}. \end{defn} The contractive notion was also visited in \cite[p.\ 19]{gerbracht} and \cite[p.\ 7]{grandis2004}. The author used the terms ``crutch bound'' and ``constrictive'' in his original dissertation \cite[p.\ 15]{grilliette0}. With these notions, adaptations of the standard functional analysis proofs can be used to prove the following foundational results. \begin{prop}[Boundedness Criterion]\label{boundedness} Let $(S,f)$ and $(T,g)$ be normed sets. A function $\phi:S\to T$ is bounded if and only if \[ \sup\left(\left\{\frac{g(\phi(s))}{f(s)}:s\not\in f^{-1}(0)\right\}\cup\{0\}\right)<\infty \] and $g(\phi(s))=0$ for all $s\in f^{-1}(0)$. In this case, $\crh(\phi)$ equals the above supremum and \[ g(\phi(s))\leq \crh(\phi)f(s). \] for all $s\in S$. \end{prop} \begin{cor}[Composition]\label{comp-bounded} Let $(S,f)$, $(T,g)$, and $(U,h)$ be normed sets and $\phi:(S,f)\to(T,g)$ and $\psi:(T,g)\to(U,h)$ be bounded. Then, $\psi\circ\phi:S\to U$ is bounded and \[ \crh(\psi\circ\phi)\leq\crh(\psi)\crh(\phi). \] If $\phi$ and $\psi$ are contractive, so is $\psi\circ\phi$. \end{cor} \subsection{Category of Normed Sets \& Contractive Maps}\label{cset1} Next, a detailed study is conducted of normed sets and contractive functions between them. This combination of objects and maps was considered previously in \cite{gerbracht}. For notation, let $\mathbf{CSet}_{1}$ denote the category of normed sets with contractive maps. With this new structure defined, one considers some of its basic properties and constructions. Most of these are identical the $\mathbf{Set}$ case, though most interestingly, the norm function in each case immediately resembles its counterpart in normed structures. The following proposition characterizes the standard types of morphisms for $\mathbf{CSet}_{1}$. Isomorphisms were mentioned briefly in \cite[p.\ 7]{grandis2004}. Also, this proposition adds precision to \cite[Remark 1.1.9]{gerbracht} in regard to sections and retractions. The proofs are nearly identical to the set-theoretic versions and will be omitted. \begin{prop}\label{morphisms} Let $(S,f)$ and $(T,g)$ be normed sets and $\phi:(S,f)\to(T,g)$ be contractive. The following characterizations hold. \begin{enumerate} \item $\phi$ is a monomorphism in $\mathbf{CSet}_{1}$ iff $\phi$ is one-to-one; \item $\phi$ is an epimorphism in $\mathbf{CSet}_{1}$ iff $\phi$ is onto; \item $\phi$ is a section in $\mathbf{CSet}_{1}$ iff $\phi$ is one-to-one, $g\circ\phi=f$, and for all $t\not\in\phi(S)$, there is $s_{t}\in S$ such that $f\left(s_{t}\right)\leq g(t)$; \item $\phi$ is a retraction in $\mathbf{CSet}_{1}$ iff for all $t\in T$, there is $s_{t}\in S$ such that $\phi\left(s_{t}\right)=t$ and $f\left(s_{t}\right)=g(t)$; \item\label{iso} $\phi$ is an isomorphism in $\mathbf{CSet}_{1}$ iff $\phi$ is one-to-one, onto, and $g\circ\phi=f$. \end{enumerate} \end{prop} The construction of the equalizer and coequalizer of parallel maps are the same as mentioned in \cite[p.\ 7]{grandis2004}, characterizing substructures and quotients, respectively. Likewise, a small coproduct is identical to the characterization in \cite{grandis2004}, and it gives a standard decomposition of any normed set as a coproduct of singletons. However, unlike \cite{grandis2004}, exclusion of $\infty$ as a norm-value changes the product structure. \begin{prop}[Products] For an index set $I$, let $\left(S_{i},f_{i}\right)$ be normed sets for $i\in I$. Define \[ P:=\left\{\vec{s}\in\mathbf{Set}\left(I,\bigcup_{i\in I}S_{i}\right):\vec{s}(i)\in S_{i}\forall i\in I,\sup\left\{f_{i}\left(\vec{s}(i)\right):i\in I\right\}<\infty\right\}, \] $f:P\to[0,\infty)$ by $f\left(\vec{s}\right):=\sup\left\{f_{i}\left(\vec{s}(i)\right):i\in I\right\}$, and $\pi_{i}:P\to S_{i}$ by $\pi_{i}\left(\vec{s}\right):=\vec{s}(i)$. Then, $(P,f)$ equipped with $\left(\pi_{i}\right)_{i\in I}$ is a product of $\left(\left(S_{i},f_{i}\right)\right)_{i\in I}$ in $\mathbf{CSet}_{1}$. \end{prop} Since $\infty$ is not allowed, any sequence of elements whose norm-values would be unbounded must be excluded. The proof is akin to the product characterization for the category of Banach spaces with contractive maps. This difference in the construction of the product forebodes a difference between $\mathbf{CSet}_{1}$ and the category of \cite{grandis2004}. Indeed, these two categories are not equivalent, which can be shown by counting their projective objects. From \cite{grandis2004}, let $\mathbf{NSet}$ denote the category of normed sets and contractive maps, which allow $\infty$. Like $\mathbf{Set}$, any set equipped with the constant-$\infty$ norm is projective with respect to all epimorphisms. However, disallowing $\infty$ in $\mathbf{CSet}_{1}$ almost completely forbids this behavior. \begin{prop}\label{proj-inj} Let $(S,f)$ be a normed set. \begin{enumerate} \item $(S,f)$ is projective relative to all epimorphisms in $\mathbf{CSet}_{1}$ iff $S=\emptyset$. \item $(S,f)$ is injective relative to all monomorphisms in $\mathbf{CSet}_{1}$ iff $S\neq\emptyset$ and $f=0$. \end{enumerate} \end{prop} \begin{proof} \begin{enumerate} \item $(\Leftarrow)$ The empty set, equipped with the empty function to $[0,\infty)$, is initial in $\mathbf{CSet}_{1}$. Hence, it is trivially projective with respect to any class of maps. $(\neg\Leftarrow\neg)$ For purposes of contradiction, assume that $S\neq\emptyset$ and $(S,f)$ is projective relative to all epimorphisms. For each $n\in\mathbb{N}$, define $g,h_{n}:S\to [0,\infty)$ by $g(s):=0$ and $h_{n}(s):=n$. Also, let $\phi,\alpha_{n}:S\to S$ by $\phi(s):=\alpha_{n}(s):=s$. Then, consider the following diagram in $\mathbf{CSet}_{1}$ for each $n$. \[ \xymatrix{ & \left(S,h_{n}\right)\ar@{->>}[d]^{\alpha_{n}}\\ (S,f)\ar[r]_{\phi} & (S,g)\\ } \] Since $\alpha_{n}$ is onto and $(S,f)$ projective to epimorphisms, there must be a contractive $\phi_{n}:(S,f)\to(S,h_{n})$ such that $\phi=\alpha_{n}\circ\phi_{n}$. Then, for each $s\in S$ and $n\in\mathbb{N}$, \[ s=\phi(s)=(\alpha\circ\phi_{n})(s)=\phi_{n}(s) \] and \[ n=(h_{n}\circ\phi_{n})(s)\leq f(s). \] Thus, $f$ cannot have a finite value, contradicting that $(S,f)$ was in $\mathbf{CSet}_{1}$. \item $(\Rightarrow)$ Assume that $(S,f)$ is injective relative to all monomorphisms. Let $\mathbf{0}_{S}:\emptyset\to S$ and $\mathbf{0}_{\{0\}}:\emptyset\to\{0\}$ be the empty functions into $S$ and $\{0\}$, respectively. Consider the following diagram in $\mathbf{CSet}_{1}$. \[ \xymatrix{ (S,f)\ar@{<-}[d]_{\mathbf{0}_{S}}\\ (\emptyset,\mathbf{0}_{[0,\infty)})\textrm{ }\ar@{>->}[r]_{\mathbf{0}_{\{0\}}} & \{(0,0)\}. } \] As $(S,f)$ is injective relative to $\mathbf{0}_{\{0\}}$, there must be a contractive map from $\{(0,0)\}$ to $(S,f)$. Hence, there is a function from a nonempty set into $S$, forcing $S\neq\emptyset$. Define $h:S\to[0,\infty)$ by $h(s):=0$. Also, let $\phi,\alpha:S\to S$ by $\phi(s):=\alpha(s):=s$. Then, consider the following diagram in $\mathbf{CSet}_{1}$. \[ \xymatrix{ (S,f)\ar@{<-}[d]_{\phi}\\ (S,f)\textrm{ }\ar@{>->}[r]_{\alpha} & (S,h). } \] Then, there is a contraction $\hat{\phi}:(S,h)\to(S,f)$ such that $\phi=\hat{\phi}\circ\alpha$. Then, for each $s\in S$, \[ s =\phi(s) =\left(\hat{\phi}\circ\alpha\right)(s) =\hat{\phi}(s) \] and \[ 0 \leq f(s) =\left(f\circ\hat{\phi}\right)(s) \leq h(s) =0. \] $(\Leftarrow)$ Assume that $f=0$ and $S\neq\emptyset$. Let $(T,g)$ and $(U,h)$ be normed sets and $\alpha:(T,g)\to(U,h)$ be a monomorphism. Define $\hat{U}:=\Ran(\alpha)$ and observe that $\alpha|^{\hat{U}}$ is bijective. Given any $\phi:T\to S$, choose any $s_{0}\in S$ and define $\hat{\phi}:U\to S$ by \[ \hat{\phi}(u):=\left\{\begin{array}{cc} \phi(s), & u=\alpha(s),\\ s_{0}, & u\not\in\hat{U}.\\ \end{array}\right. \] As $\alpha$ is one-to-one, this is a well-defined function. By design, $\phi=\hat{\phi}\circ\alpha$, and since $f=0$, $\hat{\phi}$ is trivially contractive. \end{enumerate} \end{proof} There is precisely one isomorphism class of a projective object relative to all epimorphisms in $\mathbf{CSet}_{1}$, but $\mathbf{Set}$ and $\mathbf{NSet}$ both have a proper class of such isomorphism classes. Hence, the distinction follows. \begin{cor} $\mathbf{CSet}_{1}$ is equivalent to neither $\mathbf{Set}$ nor $\mathbf{NSet}$ as categories. \end{cor} \subsection{Category of Normed Sets \& Bounded Maps}\label{cseti} Likewise, normed sets and bounded functions between them, denoted as $\mathbf{CSet}_{\infty}$, can be studied, comparing this structure to $\mathbf{CSet}_{1}$. At first glance, $\mathbf{CSet}_{\infty}$ is very similar to $\mathbf{CSet}_{1}$, and most of its constructions are identical. However, there are some notable distinctions between the two, reminiscent of the differences between considering Banach spaces with bounded linear maps and contractive linear maps. The standard types of morphisms are characterized much like in $\mathbf{CSet}_{1}$, but also similar to Banach spaces and bounded maps. In particular, the notion of a section corresponds to the idea of ``bounded below''. \begin{prop} Let $(S,f)$ and $(T,g)$ be normed sets and $\phi:(S,f)\to(T,g)$ be bounded. Define $K:=T\setminus\phi(S)$, $h:=g|_{K}$, and \[ \lambda:=\inf\left\{\frac{g(\phi(s))}{f(s)}:s\not\in f^{-1}(0)\right\}. \] \begin{enumerate} \item $\phi$ is a monomorphism in $\mathbf{CSet}_{\infty}$ iff $\phi$ is one-to-one; \item $\phi$ is an epimorphism in $\mathbf{CSet}_{\infty}$ iff $\phi$ is onto; \item $\phi$ is a section in $\mathbf{CSet}_{\infty}$ iff $\phi$ is one-to-one, $\lambda>0$, and there is a bounded function $\alpha:(K,h)\to(S,f)$; \item $\phi$ is a retraction in $\mathbf{CSet}_{\infty}$ iff there are $\left(s_{t}\right)_{t\in T}\subseteq S$ such that $\phi\left(s_{t}\right)=t$ for all $t\in T$, $f\left(s_{t}\right)=0$ for all $t\in g^{-1}(0)$ and \[ \sup\left(\left\{\frac{f\left(s_{t}\right)}{g(t)}:t\not\in g^{-1}(0)\right\}\cup\{0\}\right)<\infty; \] \item\label{iso2} $\phi$ is an isomorphism in $\mathbf{CSet}_{\infty}$ iff $\phi$ is one-to-one, onto, and $\lambda>0$. \end{enumerate} \end{prop} The equalizer and coequalizer of parallel maps is constructed as in $\mathbf{CSet}_{1}$, as are the product and coproduct for a finite index set. However, $\mathbf{CSet}_{\infty}$ is neither complete nor cocomplete as a category. The examples are similar the case of Banach spaces and bounded maps, where the supposed universal map would be forced to be unbounded. \begin{ex} For $n\in\mathbb{N}$, let $S_{n}:=[0,\infty)$ and $f_{n}:S_{n}\to[0,\infty)$ by $f_{n}(\lambda):=\lambda$. The family $\left(S_{n},f_{n}\right)_{n\in\mathbb{N}}$ does not have product in $\mathbf{CSet}_{\infty}$. \end{ex} \begin{ex} For $n\in\mathbb{N}$, define $S_{n}:=\{0\}$ and $f_{n}:S_{n}\to[0,\infty)$ by $f_{n}(0):=1$. The family $\left(S_{n},f_{n}\right)_{n\in\mathbb{N}}$ does not have a coproduct in $\mathbf{CSet}_{\infty}$. \end{ex} As such, $\mathbf{CSet}_{\infty}$ is a distinct category from the ones previously mentioned. \begin{cor} $\mathbf{CSet}_{\infty}$ is equivalent as categories to neither $\mathbf{Set}$, $\mathbf{CSet}_{1}$, nor $\mathbf{NSet}$. \end{cor} \section{Scaled-Free Constructions}\label{construction} This section concerns the construction of building normed algebraic objects, specifically Banach spaces and algebras, from normed sets. The main idea in each case is to build the appropriate free algebraic object on the set and then use the set's norm function to build the corresponding algebraic norm, generalizing the constructions of \cite{blackadar1985}, \cite{gerbracht}, and \cite{goodearl} with the viewpoint of \cite{cat-top}. The use of the norm function is analogous to the ``$\mathcal{X}$-norms'' in \cite{hadwin2003}, but the universal objects created here are normed structures, as opposed to a general topological ones. \subsection{Banach Spaces} Let $\mathbb{F}\mathbf{Ban}_{\infty}$ denote the category of $\mathbb{F}$-Banach spaces with bounded $\mathbb{F}$-linear maps. The forgetful functor $F_{\mathbb{F}\mathbf{Ban}_{\infty}}^{\mathbf{CSet}_{\infty}}:\mathbb{F}\mathbf{Ban}_{\infty}\to\mathbf{CSet}_{\infty}$ drops all of the linear structure. Given a normed set $(S,f)$, construction of a reflection along $F_{\mathbb{F}\mathbf{Ban}_{\infty}}^{\mathbf{CSet}_{\infty}}$ would proceed along natural lines. One builds an $\mathbb{F}$-vector space with basis $S\setminus f^{-1}(0)$ and completes in an appropriate universal norm. However, this construction is readily characterized as a weighted $\ell^{1}$-space. Specifically, let $\hat{S}:=S\setminus f^{-1}(0)$, $\mu_{f}:\mathcal{P}\left(\hat{S}\right)\to[0,\infty]$ by $\mu_{f}(T):=\sum_{s\in T}f(s)$, and $\mathcal{V}_{S,f}:=\ell_{\mathbb{F}}^{1}\left(\hat{S},\mu_{f}\right)$. Define $\zeta_{S,f}:(S,f)\to\alg{V}_{S,f}$ by \[ \zeta_{S,f}(s):=\left\{\begin{array}{cc} 0, & s\in f^{-1}(0),\\ \delta_{s}, & s\not\in f^{-1}(0),\\ \end{array}\right. \] where $\delta_{s}$ is the point mass at $s\in\hat{S}$. \begin{thm}[Reflection Characterization, $\mathbb{F}\mathbf{Ban}_{\infty}$]\label{univprop} Given an $\mathbb{F}$-Banach space $W$ and a bounded map $\phi:(S,f)\to F_{\mathbb{F}\mathbf{Ban}_{\infty}}^{\mathbf{CSet}_{\infty}}W$, there is a unique bounded $\mathbb{F}$-linear map $\hat{\phi}:\alg{V}_{S,f}\to W$ such that $F_{\mathbb{F}\mathbf{Ban}_{\infty}}^{\mathbf{CSet}_{\infty}}\hat{\phi}\circ\zeta_{S,f}=\phi$. Moreover, \[ \crh(\phi)=\left\|\hat{\phi}\right\|_{\mathcal{B}\left(\alg{V}_{S,f},W\right)}. \] \end{thm} \begin{proof} Define $\tilde{\phi}:\Span\left\{\delta_{s}:s\in\hat{S}\right\}\to W$ on the standard basis by $\tilde{\phi}\left(\delta_{s}\right):=\phi(s)$ for all $s\in\hat{S}$. For any finite $E\subseteq\hat{S}$ and scalars $\left(\lambda_{s}\right)_{s\in E}$, \[\begin{array}{rcl} \left\|\tilde{\phi}\left(\sum_{s\in E}\lambda_{s}\delta_{s}\right)\right\|_{W} & \leq & \sum_{s\in E}\left|\lambda_{s}\right|\left\|\tilde{\phi}\left(\delta_{s}\right)\right\|_{W}\\[15pt] & = & \sum_{s\in E}\left|\lambda_{s}\right|\left\|\phi(s)\right\|_{W}\\[15pt] & \leq & \sum_{s\in E}\left|\lambda_{s}\right|\crh(\phi)f(s)\\[15pt] & = & \crh(\phi)\left\|\sum_{s\in E}\lambda_{s}\delta_{s}\right\|_{\alg{V}_{S,f}}.\\[15pt] \end{array}\] Thus, $\tilde{\phi}$ can be extended by continuity to $\hat{\phi}:\alg{V}_{S,f}\to W$. By design, $F_{\mathbb{F}\mathbf{Ban}_{\infty}}^{\mathbf{CSet}_{\infty}}\hat{\phi}\circ\zeta_{S,f}=\phi$, and uniqueness follows from the mapping of the basis vectors via $\zeta_{S,f}$. By the norm computation above, \[ \crh(\phi)\geq\left\|\hat{\phi}\right\|_{\mathcal{B}\left(\alg{V}_{S,f},W\right)}, \] and equality is achieved using the basis vectors. \end{proof} Further, since $(S,f)$ was arbitrary, the following functorial result is obtained. \begin{cor}[Left Adjoint Functor, $\mathbb{F}\mathbf{Ban}_{\infty}$]\label{adjoint} There is a unique functor $\mathbb{F}\BanSpI:\mathbf{CSet}_{\infty}\to\mathbb{F}\mathbf{Ban}_{\infty}$ such that $\mathbb{F}\BanSpI(S,f)=\alg{V}_{S,f}$, which is left adjoint to $F_{\mathbb{F}\mathbf{Ban}_{\infty}}^{\mathbf{CSet}_{\infty}}$. \end{cor} The numeric condition in Theorem \ref{univprop} actually shows that there is a second adjoint relationship here. Specifically, consider the category of $\mathbb{F}$-Banach spaces with contractive $\mathbb{F}$-linear maps, denoted as $\mathbb{F}\mathbf{Ban}_{1}$. Let $F_{\mathbb{F}\mathbf{Ban}_{1}}^{\mathbf{CSet}_{1}}:\mathbb{F}\mathbf{Ban}_{1}\to\mathbf{CSet}_{1}$ be the restriction of $F_{\mathbb{F}\mathbf{Ban}_{\infty}}^{\mathbf{CSet}_{\infty}}$ to $\mathbb{F}\mathbf{Ban}_{1}$. \begin{cor}[Left Adjoint Functor, $\mathbb{F}\mathbf{Ban}_{1}$] There is a unique functor $\mathbb{F}\BanSpC:\mathbf{CSet}_{1}\to\mathbb{F}\mathbf{Ban}_{1}$ such that $\mathbb{F}\BanSpC(S,f)=\alg{V}_{S,f}$, which is left adjoint to $F_{\mathbb{F}\mathbf{Ban}_{1}}^{\mathbf{CSet}_{1}}$. \end{cor} The universal property of Theorem \ref{univprop} seems very similar to the classical free mapping property, but depends on the boundedness of maps. However, this can be somewhat negotiated at the cost of scalar multiplication. The following variation of Theorem \ref{univprop} is termed the \emph{scaled-free mapping property}, which more closely mimics the classical free mapping property. \begin{cor}[Scaled-Free Mapping Property]\label{scaledfree} Let $(S,f)$ be a normed set and $W$ be an $\mathbb{F}$-Banach space. For any function $\phi:S\to W$, there is a unique contractive $\mathbb{F}$-linear map $\hat{\phi}:\mathbb{F}\BanSpC(S,f)\to W$ such that for all $s\in S$, \[ \|\phi(s)\|_{W}\cdot\left(\hat{\phi}\circ\zeta_{S,f}\right)(s)=f(s)\cdot\phi(s). \] \end{cor} This adjoint characterization should be compared to the well-known unit ball functor. Explicitly, the functor $U_{\mathbb{F}}:\mathbb{F}\mathbf{Ban}_{1}\to\mathbf{Set}$ by associating a Banach space with its closed unit ball and a contraction with its restriction to the unit ball. As shown in \cite{joyofcats}, every set $S$ has a reflection along this functor, namely $\ell^{1}_{\mathbb{F}}(S)$. However, with the functor $U_{\mathbb{F}}$, the norm has been hardcoded by the choice of the unit ball. That is, any element of $S$ \emph{must} be sent to an element of norm at most 1. The characterization presented here has allowed the norms of generators to vary, preserving the numeric data in a function rather than the choice of a subset. Indeed, the $f$ in Theorem \ref{univprop} is fixed prior to construction, but has no restriction otherwise. In particular, it need not be constant or bounded. Also, the functors $F_{\mathbb{F}\mathbf{Ban}_{\infty}}^{\mathbf{CSet}_{\infty}}$ and $F_{\mathbb{F}\mathbf{Ban}_{1}}^{\mathbf{CSet}_{1}}$ only remove structure, not altering the underlying set in any way. This aspect seems to give a more natural ``forgetful'' feel like the classical situation of algebraic free objects. Theorem \ref{univprop} states that the properties of the unit ball functor are recovered and extended to the case of bounded $\mathbb{F}$-linear maps. Arguably, one can choose to scale all generators to norm 1, but in some cases, it may be preferable to let individual generators have different norm values. \subsection{Banach Algebras} Let $\mathbb{F}\mathbf{BanAlg}_{\infty}$ denote the category of $\mathbb{F}$-Banach algebras with bounded $\mathbb{F}$-algebra homomorphisms. The forgetful functor $F_{\mathbb{F}\mathbf{BanAlg}_{\infty}}^{\mathbf{CSet}_{\infty}}:\mathbb{F}\mathbf{BanAlg}_{\infty}\to\mathbf{CSet}_{\infty}$ drops all of the algebraic structure. As in the previous section, one would like to build a reflection along this forgetful functor for any given normed set. However, due to the introduction of multiplication, this is not possible except in trivial cases. \begin{prop}\label{fail4} A normed set $(S,f)$ has a reflection along $F_{\mathbb{F}\mathbf{BanAlg}_{\infty}}^{\mathbf{CSet}_{\infty}}$ if and only if $S=f^{-1}(0)$. In this case, the reflection is the zero algebra equipped with the constant map from $(S,f)$. \end{prop} \begin{proof} $(\Leftarrow)$ This case is an exercise. $(\neg\Leftarrow\neg)$ Assume that $S\neq f^{-1}(0)$. For purposes of contradiction, assume that there is an $\mathbb{F}$-Banach algebra $R$ equipped with a bounded map $\eta:(S,f)\to F_{\mathbb{F}\mathbf{BanAlg}_{\infty}}^{\mathbf{CSet}_{\infty}}R$ such that for any $\mathbb{F}$-Banach algebra $\alg{A}$ and bounded map $\phi:(S,f)\to F_{\mathbb{F}\mathbf{BanAlg}_{\infty}}^{\mathbf{CSet}_{\infty}}\alg{A}$, there is a unique bounded $\mathbb{F}$-algebra homomorphism $\hat{\phi}:R\to\alg{A}$ satisfying $F_{\mathbb{F}\mathbf{BanAlg}_{\infty}}^{\mathbf{CSet}_{\infty}}\hat{\phi}\circ\eta=\phi$. Let $r_{s}:=\eta(s)$ for all $s\in S$. Define $\phi:S\to\mathbb{F}$ by $\phi(s):=f(s)$, the norm function itself. Then, $\crh(\phi)=1$ so there is a unique bounded $\mathbb{F}$-algebra homomorphism $\hat{\phi}:R\to\mathbb{F}$ such that $\hat{\phi}\circ\eta=\phi$. For all $s\in S$, \[ f(s)=|\phi(s)| \leq\left\|\hat{\phi}\right\|_{\mathcal{B}(R,\mathbb{F})}\left\|r_{s}\right\|_{R} \leq\left\|\hat{\phi}\right\|_{\mathcal{B}(R,\mathbb{F})}\crh(\eta)f(s) \] since $\hat{\phi}$ and $\eta$ are bounded. For $s\not\in f^{-1}(0)$, a division yields \[ 1\leq\left\|\hat{\phi}\right\|_{\mathcal{B}(R,\mathbb{F})}\crh(\eta), \] forcing $\crh(\eta)\neq 0$. Define $\psi:S\to\mathbb{F}$ by $\psi(s):=2\crh(\eta)f(s)$. Notice that $\crh(\psi)=2\crh(\eta)$ so there is a unique bounded $\mathbb{F}$-algebra homomorphism $\hat{\psi}:R\to\mathbb{F}$ such that $\hat{\psi}\circ\eta=\psi$. For $n\in\mathbb{N}$, \[ \hat{\psi}\left(r_{s}^{n}\right)=\hat{\psi}\left(r_{s}\right)^{n} =\psi\left(s\right)^{n} =2^{n}\crh(\eta)^{n}f(s)^{n} \] and \[ \left|\hat{\psi}\left(r_{s}^{n}\right)\right|\leq\left\|\hat{\psi}\right\|_{\mathcal{B}(R,\mathbb{F})}\left\|r_{s}^{n}\right\|_{R} \leq\left\|\hat{\psi}\right\|_{\mathcal{B}(R,\mathbb{F})}\left\|r_{s}\right\|_{R}^{n} \leq\left\|\hat{\psi}\right\|_{\mathcal{B}(R,\mathbb{F})}\crh(\eta)^{n}f(s)^{n}. \] Combining these for $s\not\in f^{-1}(0)$, a division yields \[ 2^{n}\leq\left\|\hat{\psi}\right\|_{\mathcal{B}(R,\mathbb{F})}, \] contradicting that $\hat{\psi}$ was bounded. \end{proof} This is initially discouraging like Proposition \ref{fail}. However, observe that the cause of the failure here was the ability to send a generator to a value potentially larger than its norm value. This, coupled with the multiplicative structure, forced the norm of the fictional universal map to grow without bound. This behavior is disallowed in the contractive case, where the scaled-free construction works perfectly well. To see this, consider the category of $\mathbb{F}$-Banach algebras with contractive $\mathbb{F}$-algebra homomorphisms, denoted as $\mathbb{F}\mathbf{BanAlg}_{1}$. There is a natural forgetful functor $F_{\mathbb{F}\mathbf{BanAlg}_{1}}^{\mathbf{CSet}_{1}}:\mathbb{F}\mathbf{BanAlg}_{1}\to\mathbf{CSet}_{1}$ by dropping all of the algebraic properties, leaving only the norm functions and the contractivity of the maps. For a normed set $(S,f)$, construction of a reflection along $F_{\mathbb{F}\mathbf{BanAlg}_{1}}^{\mathbf{CSet}_{1}}$ would proceed along natural lines. One builds a free $\mathbb{F}$-algebra on $S\setminus f^{-1}(0)$ and completes in an appropriate universal norm. However, this construction can be realized in another way. From Theorem \ref{univprop}, a universal $\mathbb{F}$-Banach space can be created from $(S,f)$. In \cite[Satz 1]{leptin1969}, a universal $\mathbb{F}$-Banach algebra can be created from this space, the Banach tensor algebra. To make this explicit, let $F_{\mathbb{F}\mathbf{BanAlg}_{1}}^{\mathbb{F}\mathbf{Ban}_{1}}:\mathbb{F}\mathbf{BanAlg}_{1}\to\mathbb{F}\mathbf{Ban}_{1}$ be the natural forgetful functor given by dropping only the multiplicative properties. Given an $\mathbb{F}$-Banach space $V$, the construction of \cite{leptin1969} forms the $\ell^{1}$-direct sum of projective-tensor powers of $V$, \[ \mathscr{T}_{1}(V):=\oplus_{1}V^{\otimes n} \] equipped with multiplication by the canonical isomorphism $V^{\otimes n}\otimes V^{\otimes m}\to V^{\otimes (m+n)}$. Letting $\iota_{V}:V\to\mathscr{T}_{1}(V)$ be the inclusion map into the first tensor power of $V$ in $\mathscr{T}_{1}(V)$, the following is a restatement of \cite[Satz 1]{leptin1969} in the notation of the current paper. \begin{thm}[Satz 1, \cite{leptin1969}] Given an $\mathbb{F}$-Banach algebra $\alg{A}$ and a contractive linear $\phi:V\to F_{\mathbb{F}\mathbf{BanAlg}_{1}}^{\mathbb{F}\mathbf{Ban}_{1}}\alg{A}$, there is a unique contractive $\mathbb{F}$-algebra homomorphism $\hat{\phi}:\mathscr{T}_{1}(V)\to\alg{A}$ such that $F_{\mathbb{F}\mathbf{BanAlg}_{1}}^{\mathbb{F}\mathbf{Ban}_{1}}\hat{\phi}\circ\iota_{V}=\phi$. \end{thm} This gives an associated functorial result since $V$ was arbitrary. \begin{cor}[Left Adjoint Functor from Satz 1, \cite{leptin1969}] There is a unique functor $\mathscr{T}_{1}:\mathbb{F}\mathbf{Ban}_{1}\to\mathbb{F}\mathbf{BanAlg}_{1}$ defined on objects as above, which is left adjoint to $F_{\mathbb{F}\mathbf{BanAlg}_{1}}^{\mathbb{F}\mathbf{Ban}_{1}}$. \end{cor} A quick check shows that $F_{\mathbb{F}\mathbf{BanAlg}_{1}}^{\mathbf{CSet}_{1}}=F_{\mathbb{F}\mathbf{Ban}_{1}}^{\mathbf{CSet}_{1}}\circ F_{\mathbb{F}\mathbf{BanAlg}_{1}}^{\mathbb{F}\mathbf{Ban}_{1}}$, so one can invoke the closure of right adjoints on composition. Hence, its left adjoint is given by $\mathbb{F}\BanAlg:=\mathscr{T}_{1}\circ\mathbb{F}\BanSpC$. Letting $\kappa_{S,f}:=\iota_{\alg{V}_{S,f}}\circ\zeta_{S,f}$ be the embedding of the generation set, the universal property can be stated as follows. \begin{thm}[Reflection Characterization, $\mathbb{F}\mathbf{BanAlg}_{1}$] Given an $\mathbb{F}$-Banach algebra $\alg{A}$ and a contractive map $\phi:(S,f)\to F_{\mathbb{F}\mathbf{BanAlg}_{1}}^{\mathbf{CSet}_{1}}\alg{A}$, there is a unique contractive $\mathbb{F}$-algebra homomorphism $\hat{\phi}:\mathbb{F}\BanAlg(S,f)\to\alg{A}$ such that $F_{\mathbb{F}\mathbf{BanAlg}_{1}}^{\mathbf{CSet}_{1}}\hat{\phi}\circ\kappa_{S,f}=\phi$. \end{thm} The characterization on objects becomes nearly immediate by use of \cite[Satz 1]{leptin1969} with the disjoint union coproduct of \cite[p.\ 7]{grandis2004} and the knowledge that left adjoints preserve coproducts. Given a normed set $(S,f)$, \[\begin{array}{rcl} \mathbb{F}\BanAlg(S,f) & \cong_{\mathbb{F}\mathbf{BanAlg}_{1}} & \coprod_{s\in S}\mathbb{F}\BanAlg(s,f(s))\\[15pt] & \cong_{\mathbb{F}\mathbf{BanAlg}_{1}} & \coprod_{s\not\in f^{-1}(0)}\mathscr{T}_{1}(\mathbb{F})\\[15pt] & \cong_{\mathbb{F}\mathbf{BanAlg}_{1}} & \coprod_{s\not\in f^{-1}(0)}\ell^{1}_{\mathbb{F}}(\mathbb{N}),\\[15pt] \end{array}\] where $\ell^{1}_{\mathbb{F}}(\mathbb{N})$ is equipped with the convolution product. Note that the coproduct in $\mathbb{F}\mathbf{BanAlg}_{1}$ is the free product defined in \cite[p.\ 318]{gronbaek1992}. An analogous scaled-free mapping property holds like Corollary \ref{scaledfree}, but will be omitted for brevity. As a consequence, the adjoint characterization of Corollary \ref{adjoint} and the failure in Proposition \ref{fail4} yield the following nonexistence result due to the closure of left adjoints on composition. \begin{cor} There cannot exist a functor which is left adjoint to the forgetful functor from $\mathbb{F}\mathbf{BanAlg}_{\infty}$ to $\mathbb{F}\mathbf{Ban}_{\infty}$. \end{cor} That is, there is no analog of the Banach tensor algebra when using bounded homomorphisms. \subsection{Failure of Hilbert Spaces} Consider the category of $\mathbb{F}$-Hilbert spaces and $\mathbb{F}$-linear contractions, $\mathbb{F}\mathbf{Hilb}_{1}$. Let $F_{\mathbb{F}\mathbf{Hilb}_{1}}^{\mathbf{CSet}_{1}}:\mathbb{F}\mathbf{Hilb}_{1}\to\mathbf{CSet}_{1}$ be the restriction of $F_{\mathbb{F}\mathbf{Ban}_{\infty}}^{\mathbf{CSet}_{\infty}}$ to $\mathbb{F}\mathbf{Hilb}_{1}$. As in the previous failure cases, most interesting normed sets cannot have a reflection along this functor. \begin{prop}\label{hilbert} A normed set $(S,f)$ has a reflection along $F_{\mathbb{F}\mathbf{Hilb}_{1}}^{\mathbf{CSet}_{1}}$ if and only if $S$ has either no element or precisely one element of nonzero norm. In these cases, the reflections are the zero space and the field, respectively, equipped with the norm function from $(S,f)$ to $\mathbb{F}$. \end{prop} \begin{proof} $(\Leftarrow)$ This case is an exercise. $(\neg\Leftarrow\neg)$ Consider first when $\mathbb{F}=\mathbb{C}$. For purposes of contradiction, assume that there is an $\mathbb{C}$-Hilbert space $R$ equipped with a contractive map $\eta:(S,f)\to F_{\mathbb{C}\mathbf{Hilb}_{1}}^{\mathbf{CSet}_{1}}R$ such that for any $\mathbb{C}$-Hilbert space $\alg{H}$ and contractive map $\phi:(S,f)\to F_{\mathbb{C}\mathbf{Hilb}_{1}}^{\mathbf{CSet}_{1}}\alg{H}$, there is a unique contractive $\mathbb{C}$-linear map $\hat{\phi}:R\to\alg{H}$ satisfying $F_{\mathbb{C}\mathbf{Hilb}_{1}}^{\mathbf{CSet}_{1}}\hat{\phi}\circ\eta=\phi$. Let $v_{s}:=\eta(s)$ for all $s\in S$. First, the norms of each generator are determined. Since $\eta$ is contractive, $\left\|v_{s}\right\|_{R}\leq f(s)$ for all $s\in S$. Consider the function $\psi:S\to\mathbb{C}$ by $\phi(s):=f(s)$, the norm function itself. Then, $\crh\left(\psi\right)=1$ so there is a unique $\mathbb{C}$-linear contraction $\hat{\psi}:R\to\mathbb{C}$ such that $\hat{\psi}\circ\eta=\psi$. Therefore, for all $s\in S$, \[ \left\|v_{s}\right\|_{R}\geq\left|\hat{\psi}\left(v_{s}\right)\right| =f(s), \] which forces equality. Next, consider the inner product of two generators via the polarization identity. For $n\in\mathbb{N}$ and $s\neq t$, \[ \left\|v_{s}+\imath^{n}v_{t}\right\|_{R} \leq\left\|v_{s}\right\|_{R}+\left\|v_{t}\right\|_{R} \leq f(s)+f(t). \] Define $\phi_{s,t,n}:S\to\mathbb{C}$ by \[ \phi_{s,t,n}(u):=\left\{\begin{array}{cc} f(s), & u=s,\\ \imath^{-n} f(t), & u=t,\\ 0, & \textrm{otherwise}. \end{array}\right. \] Then, $\crh\left(\phi_{s,t,n}\right)=1$ so there is a unique $\mathbb{C}$-linear contraction $\hat{\phi}_{s,t,n}:R\to\mathbb{C}$ such that $\hat{\phi}\circ\eta=\phi$. Hence, \[\begin{array}{rcl} \left\|v_{s}+\imath^{n}v_{t}\right\|_{R} & \geq & \left|\hat{\phi}_{s,t,n}\left(v_{s}+\imath^{n}v_{t}\right)\right|\\[8pt] & = & \left|\hat{\phi}_{s,t,n}\left(v_{s}\right)+\imath^{n}\hat{\phi}_{s,t,n}\left(v_{t}\right)\right|\\[8pt] & = & \left|f(s)+\imath^{n}\imath^{-n}f(t)\right|\\[8pt] & = & f(s)+f(t),\\[8pt] \end{array}\] forcing equality. Using the polarization identity, \[ \left\langle v_{s},v_{t}\right\rangle_{R}=\frac{1}{4}\sum_{n=0}^{3}\imath^{n}\left\|v_{s}+\imath^{n}v_{t}\right\|_{R} =\frac{1}{4}\sum_{n=0}^{3}\imath^{n}\left(f(s)+f(t)\right) =0 \] Thus, $\left(v_{s}\right)_{s\in S}$ is an orthogonal set in $R$. Using Parseval's identity, for $s\neq t$, \[\begin{array}{rcl} \left\|v_{s}+v_{t}\right\|^{2}_{R} & = & \left\|v_{s}\right\|_{R}^{2}+\left\|v_{t}\right\|^{2}_{R}\\[8pt] & = & f(s)^{2}+f(t)^{2},\\[8pt] \end{array}\] but \[\begin{array}{rcl} \left\|v_{s}+v_{t}\right\|^{2}_{R} & = & \left(f(s)+f(t)\right)^{2}\\[8pt] & = & f(s)^{2}+2f(s)f(t)+f(t)^{2}.\\[8pt] \end{array}\] Together, these imply that if $s\neq t$, $f(s)f(t)=0$. However, for distinct $s,t\not\in f^{-1}(0)$, this is impossible. Therefore, this reflection can never have existed. The case for $\mathbb{F}=\mathbb{R}$ follows by considering the real version of the polarization identity. \end{proof} From the proof, the issue here was due to the incompatibility of the universal property with Parseval's identity. The universal property imposes that the norm on the reflection be an $\ell^{1}$-norm, like the case of $\mathbb{F}$-Banach spaces, but this cannot happen in a $\mathbb{F}$-Hilbert space other than $\mathbb{F}$ or $\mathbb{O}$. \section{Universal Algebra for Normed Objects} After performing all the constructions of Section \ref{construction}, consider the following diagram of categories and functors. \[\xymatrix{ \mathbb{F}\mathbf{Alg}\ar@/^/[d] & \mathbb{F}\mathbf{BanAlg}_{\infty}\ar[d]\ar[l] & \mathbb{F}\mathbf{BanAlg}_{1}\ar@/^/[d]\ar[l]\\ \mathbb{F}\mathbf{Vec}\ar@/^/[d]\ar@/^/@{..>}[u] & \mathbb{F}\mathbf{Ban}_{\infty}\ar@/^/[d]\ar[l] & \mathbb{F}\mathbf{Ban}_{1}\ar@/^/[d]\ar[l]\ar@/^/@{..>}[u]\\ \mathbf{Set}\ar@/^/@{..>}[u] & \mathbf{CSet}_{\infty}\ar[l]\ar@/^/@{..>}[u] & \mathbf{CSet}_{1}\ar[l]\ar@/^/@{..>}[u]\\ }\] Here, $\mathbb{F}\mathbf{Alg}$ and $\mathbb{F}\mathbf{Vec}$ denote the categories of $\mathbb{F}$-algebras with $\mathbb{F}$-algebra homomorphisms and $\mathbb{F}$-vector spaces with $\mathbb{F}$-linear maps, respectively. The solid lines represent the natural forgetful functor, dropping the appropriate structure in each case. The dotted arrows, however, represent the presence of a left adjoint functor. In the purely algebraic cases, these are the free $\mathbb{F}$-vector space of a set and the tensor $\mathbb{F}$-algebra of an $\mathbb{F}$-vector space. The normed cases are the constructions depicted in Section \ref{construction}. Notice also that none of the horizontal functors have left adjoints since each lacks the necessary condition of preserving categorical products. Likewise, none of them preserve categorical coproducts, so they cannot have right adjoints either. Viewing these categories and construction functors together shows the parallels between the algebraic and the functional analytic theory. For algebraic categories, $\mathbf{Set}$ plays a foundational role, allowing consideration of objects with minimal structure. From the constructions of Section \ref{construction} and the properties found in Section \ref{chap2}, $\mathbf{CSet}_{1}$ may play a similar role for normed objects, a category of objects with structure similar to normed objects, but minimal. Plans are to investigate these relationships in subsequent papers, relying heavily on the foundation laid in this work. In particular, the intuitive construction steps from Section \ref{construction}, building an algebraic object and competing in a universal norm, can be repeated for many well-known functional analytic objects: operator spaces, operator algebras, C*-algebras, etc. However, the failure result in Proposition \ref{hilbert} warns that care should be taken, as the universal property can interfere with the norm structure in adverse ways. \bibliographystyle{../../bibstyles/hplain}
{ "redpajama_set_name": "RedPajamaArXiv" }
248
{"url":"https:\/\/www.shaalaa.com\/question-bank-solutions\/explain-concepts-opportunity-cost-marginal-rate-transformation-using-production-possibility-schedule-based-assumption-that-no-resource-equally-efficient-production-all-goods-concept-opportunity-cost_3348","text":"Share\n\nExplain the Concepts of Opportunity Cost and Marginal Rate of Transformation Using a Production Possibility Schedule Based on the Assumption that No Resource is Equally Efficient in Production of All Goods. - CBSE (Arts) Class 12 - Economics\n\nQuestion\n\nExplain the concepts of Opportunity Cost and Marginal Rate of Transformation using a production possibility schedule based on the assumption that no resource is equally efficient in production of all goods.\n\nSolution\n\nMarginal rate of transformation is the ratio of number of units sacrificed to gain an additional unit of another good.\n\nMRT=(DeltaY)\/(DeltaX)=\n\nFor example, assuming that resources and technology remain constant, an economy is producing Good X and Good Y. Different combinations of production of Good X and Good Y are given in the product possibility schedule:\n\n Production Possibilities Good X Good Y MRT=(DeltaY)\/(DeltaX) I 0 30 - II 1 27 -3 III 2 21 -6 IV 3 12 -9 V 4 0 -12\n\nIn the beginning, at the production point II, where 1 unit of Good X and 27 units of Good Y are produced. To produce an additional unit of Good X, 3 units of Good Y must be sacrificed.\n\nHere, the marginal rate of transformation (MRT) is\n\nMRT=(DeltaY)\/(DeltaX)=\n\nThus, MRT or the opportunity cost of getting an additional unit of Good X is 3 units of Good Y.\n\nIs there an error in this question or solution?\nSolution Explain the Concepts of Opportunity Cost and Marginal Rate of Transformation Using a Production Possibility Schedule Based on the Assumption that No Resource is Equally Efficient in Production of All Goods. Concept: Concept of Opportunity Cost.\nS","date":"2019-12-12 13:18:04","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 1, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.3986358642578125, \"perplexity\": 1309.2081581641069}, \"config\": {\"markdown_headings\": false, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2019-51\/segments\/1575540543850.90\/warc\/CC-MAIN-20191212130009-20191212154009-00288.warc.gz\"}"}
null
null
{"url":"http:\/\/openstudy.com\/updates\/4f19c10ee4b04992dd224ecb","text":"anonymous 5 years ago Simplify each radical expression. Use absolute value symbols when needed. \u221aa^4b^6\n\n1. anonymous\n\nThe carrot symbols are powers.\n\n2. anonymous\n\ndo you mean $$\u221aa^4b^6$$\n\n3. anonymous\n\nthen the answer is $\\pm (a^2b^3)$","date":"2017-01-22 04:11:29","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 1, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.6174454689025879, \"perplexity\": 9606.292008545204}, \"config\": {\"markdown_headings\": false, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2017-04\/segments\/1484560281332.92\/warc\/CC-MAIN-20170116095121-00007-ip-10-171-10-70.ec2.internal.warc.gz\"}"}
null
null
\section{Introduction} The AdS/CFT correspondence \cite{Maldacena:1997re,Gubser:1998bc,Witten:1998qj} represents a very important tool in gauge and string theories. It gives a concrete, analytical procedure for the more general Gauge/String(Gravity) duality. The correspondence is characterized by conjectured emerging dimensions of space-time (in ${\cal N}=4$ Super Yang-Mills theory the $D=10$ of the string in $AdS_5 \times S^5$ background emerges). While the main understanding of the duality itself is provided by 't Hooft's large $N$ expansion (which establishes $1/N$ as the string coupling constant) the origin of the extra spatial dimension is less clearly understood, one speaks of them as being holographic and have a relationship (in the case of radial AdS dimension) with renormalization group scaling parameters. One framework for analytical understanding of the Large $N$ limit in general introduced several decades ago \cite{Jevicki:1979mb} is based on the notion of collective fields. They capture the relevant degrees of freedom and a general method for describing their effective dynamics both at the Hamiltonian and Lagrangian level was given. This approach has been successful in analytical treatment as well as in exhibiting the relevant physics in various model theories. In the $c=1$ matrix model collective dynamics naturally led to (one) extra dimension relevant in establishing the model as a 2D non-critical string theory \cite{Das:1990kaa}. It has re-emerged in the sub-dynamics of the ${\cal N}=4$ Yang-Mills problem in the 1/2 BPS sub-sector. Through certain matrix model truncations (of ${\cal N}=4$ Yang-Mills theory) the construction \cite{deMelloKoch:2002nq} of dual string theory Hamiltonian was attempted. For further understanding of this mechanism it is useful to concentrate on exactly solvable theories. The simplest field theory model for which one can build the AdS/CFT correspondence is that of $N$-component vector theory. It was originally pointed out by Klebanov and Polyakov \cite{Klebanov:2002ja} that the conformal fixed points of the theory are naturally described in four dimensional AdS space-time. More specifically it was established that it is a particular higher-spin theory of Vasiliev \cite{Vasiliev:1995dn} that emerges in the large $N$ limit. (In a series of works dating back to the 80's Vasiliev and collaborators have succeeded in constructing a remarkable theory providing interactions of a sequence of higher-spins in AdS. This (gauge) theory successfully extends a free theory \cite{Mikhailov:2002bp} obtained by Fronsdal \cite{Fronsdal:1978rb}.) An impressive comparison of three-point boundary correlators was performed recently by Giombi and Yin \cite{Giombi:2009wh}. For other relevant work, see \cite{HaggiMani:2000ru,Witten,Sezgin:2002rt,Leonhardt:2002ta}. The relevance of collective fields for higher-spin holography was discussed by Das and one of the present authors \cite{Das:2003vw}. The framework of covariant bi-local collective fields was employed and it was shown that they decompose into an infinite sequence of integer spin fields in one extra dimension. The present paper sharpens this picture concentrating on the canonical formulation with the goal of establishing the correspondence directly at the Hamiltonian level. It will be advantageous to work in null-plane quantization, since it gives a physical description of higher-spin gauge theory. In this framework, we will produce an exact one-to-one map between (collective) coordinates of the large $N$ field and the AdS$_4$ coordinates of the higher-spin theory. It is shown how collective fields provide a construction of bulk (rather than boundary) fields of the AdS theory. In particular it is demonstrated that all the bulk AdS space-time transformation symmetries are recovered from transformations of the bi-local collective field. Outline of an exact map of the full interacting theory is given. This paper is organized as follows. In section II, we discuss the difference between collective fields and conformal currents which have been the main tool of earlier AdS/CFT comparisons. In section III, we summarize the form of the exact collective field Hamiltonian, discuss its expansion in $1/N$ as a coupling constant. Realization of the conformal symmetries and the quadratic approximation is studied in section IV. We establish a one-to-one map with the transformations of higher-spin theory in AdS$_4$ background in section V. Discussion of results and of further topics is done in the Conclusion. \section{Collective vs conformal fields} The basis of the holographic map is in a (complete) set of primary operators of the SO(2,d) group. They are built as composite operators from the basic fields of the theory and obey current conservation once the field equations are used. They are used as sources at the boundary and their correlators are then shown to be in agreement with the AdS amplitudes projected to the boundary of AdS space. The $N$-component vector model field theory with the Lagrangian \begin{equation} L=\int d^d x {1 \over 2}(\partial_\mu \phi^a)(\partial^\mu \phi^a)+v(\phi \cdot \phi), \quad a=1,...,N \end{equation} possesses two critical points: the UV fixed point at zero value of the coupling and an IR fixed point at nonzero coupling. For the UV case corresponding to the free theory where the potential $v=0$, a full set of conformal currents is explicitly given by \cite{Giombi:2009wh} \begin{eqnarray} {\cal O}(\vec{x},\vec{\epsilon})&=&\phi^a(x-\epsilon)\sum_{n=0}^\infty {1 \over (2n)!}\bigl(2\epsilon^2 \overleftarrow{\partial_x} \cdot \overrightarrow{\partial_x} \cr & &-4(\epsilon \cdot \overleftarrow{\partial_x})(\epsilon \cdot \overrightarrow{\partial_x})\bigr)^n \phi^a(x+\epsilon) \end{eqnarray} where $\vec{\epsilon}$ is a null polarization vector $\vec{\epsilon}^{~2}=0$. These currents are conserved and in the holographic scheme of GKP-W \cite{Gubser:1998bc,Witten:1998qj} their correlators are compared with the AdS boundary amplitudes. Collective fields for large $N$ theories are introduced in a very different manner. They are to represent a (complete) set of invariants under the $O(N)$ or $U(N)$ (gauge) symmetry group. The meaning of completeness is established in two not unrelated ways. First one has completeness in group theoretic terms, namely that any other invariant can be expressed in terms of them. Second is the requirement of closure under (quantum) equations of motion. This leads to the most important fact, namely that they provide a complete dynamical description \cite{Jevicki:1979mb} of the large $N$ theory where $1/N$ is seen to emerge as the natural expansion parameter. In the $O(N)$ vector model one simply has the bi-local collective field \begin{equation} \Psi(x^\mu,y^\mu)=\sum_{a=1}^N \phi^a (x) \cdot \phi^a (y) \end{equation} in the covariant formalism \cite{Das:2003vw}. It is the case for the $O(N)$ model, and also more generally that the set of collective fields is actually over-complete. This property has significant implications on the emerging space-time, when implemented it naturally leads to space-time cutoffs and ultimately non-commutativity. As far as the relationship between the conformal and collective fields we have the following. Clearly any conformal field is contained in the collective (bi-local) field, one has a prescription with derivatives given above. But the converse is not true, collective fields represent a more general set. This property will have important implications on the bulk vs boundary description of the theory. It has already seen in approximate manner \cite{Das:2003vw} that the relative coordinate in the bi-local field into angles generating a sequence of spins and the radial part which plays the role of an extra dimension. What prevented a precise identification however was the fact that higher-spin is a gauge theory, whose dynamical form depends on the gauge chosen. Consequently for establishing a precise one-to-one map, one has to bring both theories to the same gauge. This will be accomplished in the present work in a canonical description. The canonical formalism for collective fields is based (in equal-time quantization) on the observables \begin{equation} \Psi(t;\vec{x},\vec{y})=\sum_{a} \phi^a (t,\vec{x}) \cdot \phi^a (t,\vec{y}) \equiv \Psi_{xy} \end{equation} which are local in time but bi-local in $d-1$ dimensional space. These observables (collective fields) are characterized by the fact that they represent a complete set of $O(N)$ invariant canonical variables (obtained through scalar product). To deduce the dynamics obeyed by these fields, one performs an operator change of variables \cite{Jevicki:1979mb} from $\phi^a(t,\vec{x})$ to the bi-local field $\Psi(t;\vec{x},\vec{y})$ using the chain rule \begin{equation} {\delta \over \delta \phi(\vec{x})}={\delta \Psi(\vec{y},\vec{z}) \over \delta \phi(\vec{x})}{\delta \over \delta \Psi(\vec{y},\vec{z})}. \end{equation} Starting from the canonical Hamiltonian $$ H=\int \Bigl( -{1 \over 2}{\delta \over \delta \phi^a(\vec{x})}{\delta \over \delta \phi^a(\vec{x})} + {1 \over 2}\bigtriangledown_x \phi^a \bigtriangledown_x \phi^a + v(\phi \cdot \phi) \Bigr) d \vec{x}, $$ one deduces an equivalent representation in terms collective variables \begin{eqnarray} H&=&2{\rm Tr}(\Pi \Psi \Pi)+{N^2 \over 8} {\rm Tr} \Psi^{-1} + \int d\vec{x} v(\Psi(\tilde{x},\tilde{y}) \vert_{\tilde{x}=\tilde{y}}) \cr & &+{1 \over 2}\int d\vec{x} [-\bigtriangledown_x^2 \Psi(\tilde{x},\tilde{y}) \vert_{\tilde{x}=\tilde{y}}]+\Delta V \label{Hamcol} \end{eqnarray} where we have the conjugate momentum denoted by \begin{equation} \Pi(\vec{x},\vec{y})=-i {\delta \over \delta \Psi(\vec{x},\vec{y})} \end{equation} and $\Delta V$ summarizes ordering terms which are lower order in $1/N$ $$ \Delta V=-{N \over 2}\Bigl( \int dx \delta(0) \Bigr){\rm Tr}\Psi^{-1}+{1 \over 2}\Bigl( \int dx \delta(0) \Bigr)^2 {\rm Tr} \Psi^{-1}. $$ The product of two bi-local fields is defined by \begin{equation} AB=\int d\vec{y} A(\vec{x},\vec{y})B(\vec{y},\vec{z}) \end{equation} and the trace of a bi-local field means \begin{equation} {\rm Tr}(A)=\int d\vec{x} A(\vec{x},\vec{x}). \end{equation} For more details on this representation, including the fact that it generates correctly the large $N$ Schwinger-Dyson equations, the reader should consult Refs. \cite{Jevicki:1979mb,Jevicki:1983hb}. \section{Expansion} The main feature of the collective representation in terms of the Hamiltonian (\ref{Hamcol}) is that it can be expanded in series of $1/N$ with an infinite number of polynomial vertices to generate systematically the $1/N$ expansion. This is seen by a simple rescaling of field variables: $\Psi \to N \Psi, \Pi \to \Pi/N$ whereby $N$ factorizes in front of the action. The terms in $\Delta V$ are seen to be of lower order, consequently they provide counter-terms in the systematic $1/N$ expansion. To generate the expansion, one first evaluates the static large $N$ background $\psi_0(\vec{x},\vec{y})$ obtained from the time-independent equations of motion \begin{equation} {\partial V \over \partial \Psi(\vec{x},\vec{y})}=0, \end{equation} where we have set $v=0$ and the effective potential reads \begin{equation} V={1 \over 8} {\rm Tr} \Psi^{-1}+{1 \over 2}\int d\vec{x} [-\bigtriangledown_x^2 \Psi(\tilde{x},\tilde{y}) \vert_{\tilde{x}=\tilde{y}}]. \end{equation} One performs a shift \begin{equation} \Psi=\psi_0 + {1 \over \sqrt{N}} \eta, \quad \Pi = \sqrt{N} \pi \label{shift} \end{equation} generating an infinite sequence of vertices \begin{equation} {\rm Tr} \Psi^{-1} = {\rm Tr} \psi_0^{-1} + \sum_{n=1}^{\infty} {(-1)^n \over N^ {n\over 2}} {\rm Tr} (\psi_0 (\eta \psi_0)^n). \label{expansion} \end{equation} The quadratic and cubic terms in the Hamiltonian are seen to be given by \begin{eqnarray} H^{(2)}&=&2 {\rm Tr}(\pi \psi_0 \pi)+{1 \over 8} {\rm Tr} (\psi_0 \eta \psi_0 \eta \psi_0), \\ H^{(3)}&=&{2 \over \sqrt{N}} {\rm Tr}(\pi \eta \pi) - {1 \over 8\sqrt{N}} {\rm Tr} (\psi_0 \eta \psi_0 \eta \psi_0 \eta \psi_0). \end{eqnarray} The higher order vertices are obtained directly from the expansion (\ref{expansion}). We now discuss the evaluation of the spectrum which follows from diagonalization of $H^{(2)}$. In doing this we follow closely \cite{Jevicki:1983hb}. Using a Fourier transform \begin{equation} \psi_{xy}^0=\int d\vec{k} e^{i\vec{k}\cdot(\vec{x}-\vec{y})} \psi_k^0, \end{equation} with \begin{equation} \psi_k^0= {1 \over 2 \sqrt{{\vec{k}}^2}}, \end{equation} and for the fields \begin{eqnarray} \eta_{xy} &\equiv& \int d\vec{k}_1 d\vec{k}_2 e^{-i\vec{k}_1 \cdot \vec{x}} e^{+i\vec{k}_2 \cdot \vec{y}} \eta_{k_1 k_2}, \\ \pi_{xy} &\equiv& \int d\vec{k}_1 d\vec{k}_2 e^{+i\vec{k}_1 \cdot \vec{x}} e^{-i\vec{k}_2 \cdot \vec{y}} \pi_{k_1 k_2}, \end{eqnarray} the quadratic Hamiltonian now becomes \begin{eqnarray} &&H^{(2)}=2 \int d\vec{k}_1 d\vec{k}_2 \psi^0_{k_1} \pi_{k_1 k_2} \pi_{k_1 k_2} \cr &&+{1 \over 16} \int d\vec{k}_1 d\vec{k}_2 \eta_{k_1 k_2} ({\psi^0}_{k_1}^{-2} {\psi^0}_{k_2}^{-1} + {\psi^0}_{k_2}^{-2} {\psi^0}_{k_1}^{-1}) \eta_{k_1 k_2}. \nonumber \end{eqnarray} Redefining \begin{equation} \pi_{k_1 k_2} \to {1 \over 2} {\psi^0}_{k_1}^{-1/2} \pi_{k_1 k_2} \quad \eta_{k_1 k_2} \to 2 {\psi^0}_{k_1}^{+1/2} \eta_{k_1 k_2} \end{equation} one has the quadratic Hamiltonian \begin{eqnarray} &&H^{(2)}= {1 \over 2} \int d\vec{k}_1 d\vec{k}_2 \pi_{k_1 k_2} \pi_{k_1 k_2} \cr &&+{1 \over 8} \int d\vec{k}_1 d\vec{k}_2 \eta_{k_1 k_2} ({\psi^0}_{k_1}^{-1} + {\psi^0}_{k_2}^{-1})^2 \eta_{k_1 k_2} \end{eqnarray} from which one reads off the frequencies \begin{equation} \omega_{k_1 k_2}={1 \over 2}{\psi^0}_{k_1}^{-1}+{1 \over 2}{\psi^0}_{k_2}^{-1}=\sqrt{{\vec{k}_1}^2}+\sqrt{{\vec{k}_2}^2}. \end{equation} To summarize, the quadratic Hamiltonian and momentum can be written in use of bi-local fields as \begin{eqnarray} H^{(2)}&=&\int d\vec{x} d\vec{y} \Psi^\dagger (\vec{x},\vec{y})\Bigl( \sqrt{-\bigtriangledown_x^2}+\sqrt{-\bigtriangledown_y^2} \Bigr) \Psi(\vec{x},\vec{y}), \cr P^{(2)}&=&\int d\vec{x} d\vec{y} \Psi^\dagger (\vec{x},\vec{y})(\bigtriangledown_x+\bigtriangledown_y) \Psi(\vec{x},\vec{y}). \end{eqnarray} In the light-cone quantization, we have the quadratic Hamiltonian \begin{eqnarray} &&P^{-(2)}=H^{(2)}+P^{(2)} \cr &&=\int dx_1^- dx_2^- d\vec{x}_1 d\vec{x}_2 \Psi^\dagger \Bigl(-{\bigtriangledown_1^2 \over 2p_1^+}-{\bigtriangledown_2^2 \over 2p_2^+}\Bigr) \Psi. \end{eqnarray} Here $\Psi(x^+;x_1^-,x_2^-;\vec{x}_1,\vec{x}_2)$ is a bi-local field where $1,2$ refer to the two space points. \section{Conformal transformations of the collective fields} Our goal is to demonstrate that the collective field contains all the necessary information and is in a one-to-one map with the physical fields of the higher-spin theory in AdS$_4$. For this comparison to be done it is advantageous to work in the light-cone gauge, where the physical degrees of freedom of a gauge theory are most transparent \cite{Metsaev:1999ui, Metsaev:2000yu}. Our strategy is to compare directly the action of the conformal group of the $d=3$ field theory with that of the Anti de Sitter higher spin field. This comparison is similar to the study in D-brane case and ${\cal N}=4$ Super Yang-Mills theory performed in \cite{Jevicki:1998ub}. In this direct comparison we will see that as expected we have very different set of space-time variables and a different realization of SO(2,3). The number of canonical variables however will be shown to be identical and one can search for a (canonical) transformation to establish a one-to-one relation between the two representations. One can work out the conformal transformations in light-cone notation ($x^+=t$) for any dimension $d$. As for the linear momenta, we have \begin{eqnarray} P^-&=&H=\int d\vec{x} \Bigl( -{1 \over 2}(\partial_i \phi)^2 \Bigr), \cr P^+&=&\int d\vec{x} \Bigl( \pi^2 \Bigr), \cr P^i&=&\int d\vec{x} \Bigl( \pi \partial_i \phi \Bigr), \end{eqnarray} where $\pi=\partial^+ \phi$ is the conjugate momentum and $i$ is the transverse index (for the specific case when $d=3$, the index $i$ runs over a single value). Similarly, for Lorentz transformations, the conserved charges are \begin{eqnarray} M^{+-}&=&t H-\int d\vec{x} \Bigl( x^- \pi^2 \Bigr), \cr M^{+i}&=&\int d\vec{x} \Bigl( t \pi \partial_i \phi-x^i \pi^2 \Bigr), \cr M^{-i}&=&\int d\vec{x} \Bigl( x^- \pi \partial_i \phi-x^i~{\cal H} \Bigr), \cr M^{ij}&=&\int d\vec{x} \Bigl( x^i \pi \partial_j \phi-x^j \pi \partial_i \phi \Bigr). \end{eqnarray} The Dilatation operator takes the form \begin{equation} D=t H+\int d\vec{x} \Bigl( \pi(d_\phi+x^i \partial_i)\phi+x^- \pi^2 \Bigr), \end{equation} where $d_\phi={d-2 \over 2}$ is the scaling dimension of the $\phi$ field. The special conformal generators are \begin{eqnarray} K^-&=&\int d\vec{x} \Bigl( x^- ~{\cal D}-{1 \over 2}(2t x^- +x^j x_j){\cal H}-{1 \over 2}d_\phi \phi^2 \Bigr), \cr K^+&=&t D-\int d\vec{x} \Bigl( {1 \over 2}(2t x^- + x^j x_j) \pi^2 \Bigr), \cr K^i&=&\int d\vec{x} \Bigl( x^i ~{\cal D}-{1 \over 2}(2t x^- +x^j x_j)\pi \partial_i \phi \Bigr), \end{eqnarray} where ${\cal D}$ and ${\cal H}$ are the densities of these two operators. The dynamical variables in the light-cone formulation are $(x^-,x^i)$. The momentum conjugate to $x^-$ is $p^+$. In the massless case, the energy can be expressed as \begin{equation} p^-=-{p^i p^i \over 2p^+}. \end{equation} To define the mode expansion, we perform a Fourier transform of the fields $\phi(x^-,x^i)$ and $\pi(x^-,x^i)$ along the $x^-$ direction. The creation and annihilation operators are defined in terms of \begin{eqnarray} &&\phi(x^-,x^i)=\int_0^\infty {dp^+ \over \sqrt{2\pi}}{1 \over \sqrt{2p^+}} \cr &&\Bigl( a(p^+,x^i) e^{i p^+ x^-}+a^\dagger (p^+,x^i) e^{-i p^+ x^-} \Bigr), \\ &&\pi(x^-,x^i)=-i \int_0^\infty {dp^+ \over \sqrt{2\pi}} \sqrt{p^+ \over 2} \cr &&\Bigl( a(p^+,x^i) e^{i p^+ x^-}-a^\dagger (p^+,x^i) e^{-i p^+ x^-} \Bigr). \end{eqnarray} The actions of linear momenta now take the form \begin{eqnarray} P^-: \quad \delta a(p^+,x^i)&=&{\partial_i^2 \over 2p^+} a(p^+,x^i), \cr P^+: \quad \delta a(p^+,x^i)&=&p^+ a(p^+,x^i), \cr P^i: \quad \delta a(p^+,x^i)&=&i\partial_i a(p^+,x^i). \end{eqnarray} For the Lorentz generators, one has \begin{eqnarray} M^{+-}: \quad \delta a(p^+,x^i)&=&\Bigl( t{\partial_i^2 \over 2p^+}-i\sqrt{p^+}{\partial \over \partial p^+}\sqrt{p^+} \Bigr) \cr & & a(p^+,x^i), \cr M^{+i}: \quad \delta a(p^+,x^i)&=&\Bigl( i t \partial_i -x^i p^+ \Bigr)a(p^+,x^i), \cr M^{-i}: \quad \delta a(p^+,x^i)&=&\Bigl( -\partial_i {\partial \over \partial p^+}-{\partial_j x^i \partial_j \over 2p^+} \Bigr) a(p^+,x^i), \cr M^{ij}: \quad \delta a(p^+,x^i)&=&\Bigl( i x^i \partial_j-i x^j \partial_i \Bigr) a(p^+,x^i). \end{eqnarray} and the Dilatation operator \begin{eqnarray} D: \quad \delta a(p^+,x^i)&=&\Bigl( t{\partial_i^2 \over 2p^+}+i\Bigl[d_\phi+x^i \partial_i \cr &+&\sqrt{p^+}{\partial \over \partial p^+}\sqrt{p^+}\Bigr]\Bigr) a(p^+,x^i). \end{eqnarray} Finally, for the special conformal generators \begin{eqnarray} K^-: \quad \delta a(p^+,x^i)&=&\Bigl\{ -{\partial_j x^i x^i \partial_j \over 4p^+}-\sqrt{p^+}{\partial \over \partial p^+}{\partial \over \partial p^+}\sqrt{p^+} \cr &&- x^i \partial_i {\partial \over \partial p^+}-d_\phi {1 \over \sqrt{p^+}} {\partial \over \partial p^+} \sqrt{p^+} \Bigr\} \cr &&a(p^+,x^i), \cr K^+: \quad \delta a(p^+,x^i)&=&\Bigl\{ t^2 {\partial_i^2 \over 2p^+}+it(d_\phi+x^i \partial_i)-{1 \over 2} x^i x^i p^+ \Bigr\} \cr &&a(p^+,x^i), \cr K^i: \quad \delta a(p^+,x^i)&=&\Bigl\{ t {\partial_j x^i \partial_j \over 2p^+}+t \partial_i {\partial \over \partial p^+}-{i \over 2}x^j x^j \partial_i \cr &&+i x^i \Bigl[d_\phi+x^j\partial_j+\sqrt{p^+}{\partial \over \partial p^+}\sqrt{p^+}\Bigr] \Bigr\} \cr &&a(p^+,x^i). \end{eqnarray} We next deduce the transformation for the collective fields. In creation-annihilation form $A(x_1^-,x_2^-,\vec{x}_1,\vec{x}_2)=a(x_1^-,\vec{x}_1)a(x_2^-,\vec{x}_2)$, we have $\delta A(1,2)=\delta a(1) a(2)+a(1) \delta a(2)$ and any conformal generator \begin{eqnarray} G&=&\int dx_1^- dx_2^- d\vec{x}_1 d\vec{x}_2 A^\dagger \hat{g} A \cr &=&\int dx_1^- dx_2^- d\vec{x}_1 d\vec{x}_2 A^\dagger (\hat{g}_1+\hat{g}_2) A. \label{little1} \end{eqnarray} Denoting the conjugate momenta as $(p_1^+,p_2^+,p_1^i,p_2^i)$, we can write down the following generators \begin{eqnarray} \hat{p}^-&=&p_1^-+p_2^-=-\Bigl({p_1^i p_1^i \over 2p_1^+}+{p_2^i p_2^i \over 2p_2^+}\Bigr), \label{cft1} \\ \hat{p}^+&=&p_1^++p_2^+, \label{cft2} \\ \hat{p}^i&=&p_1^i+p_2^i, \label{cft3} \\ \hat{m}^{+-}&=&t\hat{p}^--x_1^- p_1^+-x_2^- p_2^+, \label{cft4} \\ \hat{m}^{+i}&=&t\hat{p}^i-x_1^i p_1^+ -x_2^i p_2^+, \label{cft5} \\ \hat{m}^{-i}&=&x_1^- p_1^i+x_2^- p^i_2+x^i_1{p^j_1 p_1^j \over 2p_1^+}+x^i_2{p^j_2 p_2^j \over 2p_2^+}, \label{cft6} \\ \hat{d}&=&t\hat{p}^-+x_1^- p_1^+ + x_2^- p_2^+ \cr &&+x^i_1 p_1^i +x^i_2 p_2^i+ 2d_\phi, \label{cft7} \\ \hat{k}^-&=&x^i_1 x_1^i{p^j_1 p_1^j \over 4p_1^+}+x^i_2 x_2^i{p^j_2 p_2^j \over 4p_2^+} \cr &&+x_1^-(x_1^- p_1^++x^i_1 p_1^i +d_\phi) \cr &&+x_2^-(x_2^- p_2^++x^i_2 p_2^i+d_\phi), \label{cft8} \\ \hat{k}^+&=&t^2 \hat{p}^-+t(x^i_1 p_1^i+x^i_2 p_2^i+2d_\phi) \cr &&-{1 \over 2}x^i_1 x_1^i p_1^+ -{1 \over 2}x^i_2 x_2^i p_2^+, \label{cft9} \\ \hat{k}^i&=&-t \Bigl(x_1^i{p^j_1 p_1^j \over 2p_1^+}+x^i_2{p^j_2 p_2^j \over 2p_2^+}+x_1^- p^i_1+x_2^- p^i_2\Bigr) \cr &&-{1 \over 2}x^j_1 x_1^j p_1^i-{1 \over 2} x^j_2 x_2^j p_2^i \cr &&+x_1^i(x_1^- p_1^++x_1^j p_1^j+d_\phi) \cr &&+x_2^i(x_2^- p_2^++x_2^j p_2^j+d_\phi). \label{cft10} \end{eqnarray} \section{Mapping to AdS$_4$} The correspondence introduced in \cite{Klebanov:2002ja} is specific for $CFT_3 \leftrightarrow AdS_4$. We will from now on consider the case of $d=3$ for the vector model. In the light-cone notation, there is only one transverse dimension $x^i=x$ and $x^\mu=(x^+,x^-,x)$. The AdS$_4$ spacetime coordinates in the light-cone notation ($x^+=t$) are denoted with the Poincar\'e metric \begin{equation} ds^2={2 dt dx^-+dx^2+dz^2 \over z^2}. \end{equation} The lowercase transverse index $i=1$ denotes $x$ only, while the uppercase transverse index $I=(1,2)$ denotes $(x,z)$. In AdS$_4$ higher-spin theory, the generators were worked out by Metsaev in \cite{Metsaev:1999ui} which we now summarize. \subsection{Conformal generators from higher-spin theory} The four-dimensional case has the unique property that, after fixing light-cone gauge \cite{Bengtsson:1986kh}, the only physical states are the $\pm s$ helicity states \cite{Bengtsson:1983pd}. Let us now explain how to fix the light-cone gauge. Starting from the covariant notation \begin{equation} \vert \Phi \rangle=\sum_{s=1}^\infty \Phi^{\mu_1...\mu_s}a^\dagger_{\mu_1}...a^\dagger_{\mu_s} \vert 0 \rangle. \end{equation} where $\mu=(0,1,z,3)$ in the case of AdS$_4$, one fixes the light-cone gauge in two steps. First, we drop the oscillators $a^\pm=a^0 \pm a^3$ and keep only the transverse oscillators $a^I,a^{\dagger J}$ including the $z$ component. The oscillators satisfy the commutators \begin{equation} [a^I,a^{\dagger J}]=\delta^{IJ}, \quad [a^I,a^J]=[a^{\dagger I},a^{\dagger J}]=0. \end{equation} The spin matrix of the Lorentz algebra now takes the form \begin{equation} M^{IJ}=a^{\dagger I} a^J-a^{\dagger J} a^I. \label{spinmatrix} \end{equation} The next step is to impose a further constraint \begin{equation} T \vert \Phi \rangle=0, \qquad T=a^I a^I \end{equation} so that only two components will survive. With the complex oscillators \begin{eqnarray} \alpha={1 \over \sqrt{2}}(a_1+i a_2), &\qquad& \alpha^\dagger={1 \over \sqrt{2}}(a_1^\dagger+i a_2^\dagger), \\ \bar{\alpha}={1 \over \sqrt{2}}(a_1-i a_2), &\qquad& {\bar{\alpha}}^\dagger={1 \over \sqrt{2}}(a_1^\dagger-i a_2^\dagger), \end{eqnarray} we find the simple expansion for $\vert \Phi \rangle$ \begin{equation} \vert \Phi \rangle=\sum_{\lambda=1}^\infty \Bigl( \Phi_{(\lambda)} (\bar{\alpha}^\dagger)^\lambda+\bar{\Phi}_{(\lambda)}(\alpha^\dagger)^\lambda \Bigr) \vert 0 \rangle. \end{equation} This expansion obviously satisfies the constraint \begin{equation} T \vert \Phi \rangle=0, \qquad T=\bar{\alpha} \alpha. \end{equation} The spin matrix \begin{equation} M=\alpha^\dagger \bar{\alpha}-{\bar{\alpha}}^\dagger \alpha \end{equation} also reduces to (\ref{spinmatrix}). In four dimensions, the only non-vanishing spin matrix is $M^{xz}$. One can represent $\alpha=e^{i\theta}$, $\bar{\alpha}=e^{-i\theta}$. In a coherent basis, the operator $M^{xz}$ becomes ${\partial \over \partial \theta}$. Then we have $\Phi(x^\mu,z,\theta)$ or in light-cone notation $\Phi(x^+,x^-,x,z;\theta)$. The generators can be written as \begin{equation} G=\int dx^- dx dz d\theta ~ \bar{\Phi} \hat{g} \Phi. \label{little2} \end{equation} Denoting the conjugate momenta as $(p^+,p^x,p^z,p^\theta)$, one has \cite{Metsaev:1999ui} \begin{eqnarray} \hat{p}^-&=&-{p^x p^x+p^z p^z \over 2p^+}, \label{ads1} \\ \hat{p}^+&=&p^+, \label{ads2} \\ \hat{p}^x&=&p^x, \label{ads3} \\ \hat{m}^{+-}&=&t\hat{p}^--x^- p^+, \label{ads4} \\ \hat{m}^{+x}&=&t p^x-x p^+, \label{ads5} \\ \hat{m}^{-x}&=&x^- p^x-x \hat{p}^-+{p^\theta p^z \over p^+}, \label{ads6} \\ \hat{d}&=&t\hat{p}^-+x^- p^++x p^x+z p^z+d_a, \label{ads7} \\ \hat{k}^-&=&-{1 \over 2}(x^2+z^2)\hat{p}^-+x^-(x^-p^++x p^x+z p^z+d_a) \cr &&+{1 \over p^+}\bigl((x p^z-z p^x)p^\theta+(p^\theta)^2\bigr), \label{ads8} \\ \hat{k}^+&=&t^2\hat{p}^-+t(x p^x+z p^z+d_a)-{1 \over 2}(x^2+z^2)p^+, \label{ads9} \\ \hat{k}^x&=&t(x \hat{p}^--x^- p^x-{p^\theta p^z \over p^+})+{1 \over 2}(x^2-z^2) p^x \cr &&+x(x^- p^++z p^z+d_a)+z p^\theta, \label{ads10} \end{eqnarray} where the scaling dimension $d_a=1$ in the case of AdS$_4$. \subsection{The map: canonical transformation} We will now show how the two pictures are related by a canonical transformation. At this point, we will give the classical transformation (it can be specified in its full quantum version also). So in what follows we do not compare terms with $d_\phi$ which will receive quantum corrections (due to ordering). By relating (\ref{cft2}-\ref{cft5}) to (\ref{ads2}-\ref{ads5}), one can easily solve for \begin{eqnarray} x^-&=&{x_1^- p_1^++x_2^- p_2^+ \over p_1^++p_2^+}, \\ p^+&=&p_1^+ + p_2^+, \label{momentum1} \\ x&=&{x_1 p_1^++x_2 p_2^+ \over p_1^++p_2^+}, \\ p^x&=&p_1+p_2. \label{momentum2} \end{eqnarray} From (\ref{ads1},\ref{ads6},\ref{ads7},\ref{ads9}), we get \begin{eqnarray} z^2&=&{(x_1-x_2)^2 p_1^+ p_2^+ \over (p_1^++p_2^+)^2}, \label{eqn1} \\ p^z p^z&=&{(p_1 p_2^+-p_2 p_1^+)^2 \over p_1^+ p_2^+}, \label{eqn2} \\ z p^z&=&{(x_1-x_2)(p_1 p_2^+-p_2 p_1^+) \over (p_1^++p_2^+)}, \label{eqn3} \\ p^\theta p^z&=&(x_1^--x_2^-)(p_1 p_2^+-p_2 p_1^+) \cr &&+(x_1-x_2)\Bigl({p_2^+ (p_1)^2 \over 2p_1^+}-{p_1^+(p_2)^2 \over 2p_2^+}\Bigr). \label{eqn4} \end{eqnarray} The solution to (\ref{eqn1}-\ref{eqn4}) can be written as \begin{eqnarray} z&=&{(x_1-x_2)\sqrt{p_1^+ p_2^+} \over p_1^+ + p_2^+}, \\ p^z&=&\sqrt{p_2^+ \over p_1^+} p_1-\sqrt{p_1^+ \over p_2^+} p_2, \label{momentum3} \\ p^\theta&=&\sqrt{p_1^+ p_2^+}(x_1^--x_2^-) \cr &&+{x_1-x_2 \over 2}\Bigl(\sqrt{p_2^+ \over p_1^+} p_1+\sqrt{p_1^+ \over p_2^+} p_2\Bigr). \end{eqnarray} A nontrivial check of the consistency is given by comparing (\ref{ads8},\ref{ads10}) with (\ref{cft8},\ref{cft10}). We now turn to the construction of $\theta$. The condition that $\theta$ Poisson commutes with $p^x$ implies $\theta$ is a function of $x_1-x_2$ and the condition that $\theta$ Poisson commutes with $p^+$ implies that $\theta$ is a function of $x_1^- -x_2^-$. Requiring that $\theta$ Poisson commutes with $x^-$, $x$, $z$ and $p^z$ as well as $\theta$ and $p^\theta$ Poisson commute to give 1 we obtain \begin{equation} \theta = 2\arctan\sqrt{p_2^+\over p_1^+}. \label{momentum4} \end{equation} An important consistency check on the correctness of the map that we have constructed is that all the Poission brackets of the derived variables (like $z$ and $p^z$ etc.) take the canonical form with distinct canonical sets commuting with each other. One can confirm the Poisson brackets \begin{equation} \{x^-,p^+\}=\{x,p^x\}=\{z,p^z\}=1 \end{equation} and others vanish. Finally, as a consequence of the above map it follows that the wave equation in the collective picture has a map \cite{deMelloKoch:1996mj} to the wave equation of higher-spin gravity in four-dimensional AdS background. This follows from the little generators (\ref{cft1}) and (\ref{ads1}) coinciding after the canonical transformation. The canonical transformation can be understood as a point transformation in the momentum space (if we interpret $\theta$ as momentum (\ref{momentum4}), the other momenta are given by (\ref{momentum1},\ref{momentum2},\ref{momentum3})). Consequently, the transformation between the higher-spin field and bi-local field is simple in momentum space \begin{eqnarray} &&\Phi(x^-,x,z,\theta)=\int dp^+ dp^x dp^z e^{i (x^- p^++x p^x+z p^z)} \cr &&\int dp_1^+ dp_2^+ dp_1 dp_2 \delta(p_1^+ + p_2^+ - p^+)\delta(p_1+p_2-p^x) \cr &&\delta\Bigl(p_1 \sqrt{p_2^+ / p_1^+} -p_2 \sqrt{p_1^+ / p_2^+}-p^z\Bigr) \cr &&\delta\bigl(2\arctan\sqrt{p_2^+ / p_1^+}-\theta\bigr) \tilde{\Psi}(p_1^+,p_2^+,p_1,p_2) \end{eqnarray} where $\tilde{\Psi}(p_1^+,p_2^+,p_1,p_2)$ is the Fourier transform of the bi-local field $\Psi(x_1^-,x_2^-,x_1,x_2)$. \section{Conclusion / Origin of the Extra Dimension} The main contribution of this paper is an explicit one-to-one map between the collective field (in the case of the O(N) vector model) and the field of higher-spin gravity in 4D AdS space-time. This map is defined by the canonical transformation which establishes the relationship between the coordinates of the bi-local collective field and the coordinates of the AdS$_4$ space-time plus spin variables. The map is one to one, in particular the most telling formula is the one for the extra radial coordinate of AdS space-time $$ z={(x_1-x_2)\sqrt{p_1^+ p_2^+} \over p_1^+ + p_2^+}. $$ Here we have an explicit expression, in terms of the collective coordinates contained in the bi-local field. The physical picture for this extra dimension is much like the (collective) coordinates of solitons, which are contained in the field itself but are nontrivial to exhibit. Their origin is again through a canonical map from the existing field degrees of freedom. Naturally, if the boundary conditions are too restrictive then these degrees will be absent. In more recent phenomenological studies of scattering processes in QCD, a dipole picture \cite{Brower:2006ea} was used which can have a relation to the construction presented. It is interesting to confront this collective mechanism for the emerging dimension with other viewpoints such as holographic \cite{Akhmedov:1998vf}, Feynman diagrams \cite{Gopakumar:2003ns} and stochastic quantization \cite{Jevicki:1993rr}. Returning to future issues we have the following. The collective field theory gives a bulk Hamiltonian representation for the higher-spin gravity. It specifies an infinite set of bulk interacting vertices, which can be explicitly evaluated. These can be compared with the higher spin approaches, in particular Vasiliev's and we expect to find agreement. This comparison is presently being performed. It is also interesting to consider various canonical gauge fixings of Vasiliev's theory. \begin{acknowledgments} AJ would like to thank J. Avan, S. Das, T. Yoneya and C. I. Tan for discussions and interest in this work. He is also grateful to Prof. T. Takayanagi for hospitality at the IPMU, Kashiwa, Tokyo where part of this work was done. KJ would like to thank X. Yin for interesting discussions on this subject, M. A. Vasiliev for clarifying one of his papers and also I. Messamah for the discussion on gravity. The work of AJ and KJ is supported by the Department of Energy under contract DE-FG-02-91ER40688. The work of KJ is also supported by the Galkin fellowship at Brown University. RdMK is supported by the South African Research Chairs Initiative of the Department of Science and Technology and National Research Foundation. \end{acknowledgments}
{ "redpajama_set_name": "RedPajamaArXiv" }
8,187
\section{Introduction} Recent progress in deep learning has fueled breakthroughs in reinforcement learning \cite{mnih2015human}. However, most successful works rely on annotated data which are expensive to acquire and labor-intensive to prepare. Deep reinforcement learning models have been of increasing interest due to the ability to learn from own experiences. It has been used to allow an agent to solve and play various games such as Atari games and board games such as Go and Chess. AlphaGo \cite{AlphaGo} was able to achieve superhuman performance in the game of Go and was able to defeat champions of the game. They were able to achieve this by training it with supervision, then training it as a reinforcement learning problem. This was further improved in AlphaGoZero \cite{alphagozero} which learned to play Go through solely reinforcement learning, without any human data supervision. This suggests that learning a game solely through self-play is not only possible, but could also result in novel strategies that no human would ever have thought of. Motivated by the results of AlphaGoZero, we seek to further explore other means of learning. Self-play is a good learning mechanism assuming that the agent gets better over time. However, this requires careful optimization to prevent suboptimal results often seen in optimization methods cast as a game between two agents \cite{arjovsky2017wasserstein}. Particularly, we turn to purely random play as an alternative optimization method and develop a fast-converging algorithm around it. To test our hypothesis, we choose the game of Sungka, a Filipino variant of Mancala. It is a two-player turn-based board game wherein each player tries to collect as many stones as they can. The game looks deceptively simple because the Sungka board only has 2 heads, 14 houses, and 98 stones in total. However, the actual state-space complexity is $|S| = C_{16}^{(98)} = 1.81\times{10}^{18}$ which makes it more complex than various games such as Nine Men's Morris, Connect Four, Pentominoes, and Domineering, and comparable to American Checkers as seen in Table \ref{tab:state-space}. This level of complexity makes Sungka a good candidate for experimenting with random play as a mechanism for learning. \begin{table} \caption{State-space complexities of various games} \label{tab:state-space} \begin{center} \begin{tabular}{|c|c|} \hline Game & $|S|$ ($\log_{10}$)\\ \hline \hline Nine Men's Morris & 10 \cite{allis1994searching} \\ \hline Pentominoes & 12 \cite{van2002games}\\ \hline Connect Four & 13 \cite{allis1994searching} \\ \hline Domineering & 15 \cite{van2002games} \\ \hline American Checkers & 18 \cite{allis1994searching} \\ \hline \textbf{Sungka} & \textbf{18} \\ \hline \end{tabular} \end{center} \end{table} In this paper, we present a reinforcement learning agent capable of playing Sungka at human-level performance. We also show empirical evidence that with just random play, our training algorithm still converges fast, and that the trained agent discovers various strategies such as maximizing the number of consecutive turns, and choosing an action which would result in \textit{sunog}. Specifically, our contributions\footnote{Source code at: \texttt{https://github.com/baudm/sungka-ai}} are as follows: \begin{enumerate} \item OpenAI Gym environment for Sungka \item Reward formulation which penalizes actions resulting in high opponent scores \item Fast-converging and stable training algorithm \end{enumerate} \begin{figure}[htbp] \centerline{\includegraphics[scale=0.4]{Images/sungkahan.jpg}} \caption{Image of a Sungkahan, the board used in playing sungka \cite{sungkaboard}} \label{fig} \end{figure} \section{Related Work} As far as we know, there is no prior work yet on Sungka, but there have been several works on Mancala and its other variants. Prior to Deep Q Networks (DQN) \cite{mnih2015human}, the successful use of deep neural networks in the context of reinforcement learning has not yet been demonstrated. An early attempt at using neural nets for developing an intelligent agent for Congkak \cite{chepa2013application}, one of the Malaysian traditional games and a variant of Mancala, was largely unsuccessful. Results showed that the neural net policy is even worse than a random policy. Pinto et al. \cite{PintoMancala} used three agents (Game trees, Q-learning, Rule of Thumb) and six reward functions. Results show that Q-learning beats mini-max, and that RoT is efficient but is easily beaten. The reward function has a bigger impact on the game outcome than the type of agent used. DaVolio and Langenborg \cite{DaVolioAI} compared eight agents (Random, Max, Exact, MinMax, MCTS, Q-learning, Deep Q, A3C) and found that the agent performances were roughly in line with complexity: Random Agent as the worst and A3C Agent was the best. \section{Methodology} \subsection{Game Mechanics} Sungka is a two-player board game where each player takes turn in moving stones with the objective of obtaining the most stones in their respective \textit{heads}. Each player has seven \textit{houses} each filled with seven stones initially as shown in Figure \ref{fig:sungkarender}. \begin{figure}[htbp] \centerline{\includegraphics[scale=0.6]{Images/sungka_render.png}} \caption{Initial state of the sungka board. There are seven houses each on each player's side. Each player also has his own head where the player on top has the right head while the player on the bottom has the left head.} \label{fig:sungkarender} \end{figure} A player chooses one of the houses on his side, takes the stones in it, and then moves in a clockwise direction while dropping one stone on each house or head he passes over excluding the other player's head. If the last stone is dropped into his own head, the player continues his turn by choosing any of houses on his side again. If the last stone is dropped on any filled house, the player picks up all the shells in that house (including the last stone dropped) and continue the turn. A player's turn ends when the last stone is dropped into an empty house. If this empty house is on the player's side, this player takes all the stones on the other player's house directly opposite of it and the last stone dropped itself and puts it in his own head. This mechanic is called \textit{sunog}. Otherwise, the other player will now choose his move. The game ends when all stones are dropped into any of the heads. The player with more stones in his head wins the game. \subsection{Environment Limitations} In an actual game of Sungka, both players start their first move simultaneously. When a player has finished his move, he must wait until the other player is finished. When both players have finished their first move, the players make actions in alternating fashion where the player who finished his first move faster moves first. This gives the game a real-time element to it. For this project, we omit this mechanism and limit the game to a purely turn-based game. After the first round of Sungka, each player redistributes their collected stones back into their houses with seven stones each. If a house could not be filled with exactly seven stones, the house is not filled and is burnt. After filling each house, all excess stones are returned to their head. The game is played again while each player no longer putting stones in the burnt houses, with the winner of the previous round moving first. The game ends when a player had all his houses burnt or surrenders. For simplicity, we only play a single round of sungka and declare the player with more stones after this round as the winner. \subsection{Sungka Environment} We implement our environment using the OpenAI Gym toolkit \cite{OpenAIGym}. Since the gym environment does not explicitly support turn-based games, we manually enforce the turn-based nature of the actions by keeping track of the players' turns. \subsubsection{Observation Space} An observation is a representation of the game board state. It is a 1x14 array where the first seven elements represent the first player's side, while the last seven elements represent the second player's side. The value inside the array corresponds to the number of stones the house contains. The heads effectively contain the players' current scores. Since the current scores do not affect the decision-making process, we exclude them from the state vector. \subsubsection{Action Space} A player has seven possible actions which correspond to choosing one of the seven houses on his side of the board. In the actual environment, the action space is 14. We map the player-specific actions to the raw indices used in the environment: 0-6 for Player 1 and 7-13 for Player 2. \subsubsection{Rewards} An action made by a player does not contribute only to the player's own score, but also affects the maximum score attainable by the opponent in the next turn. Since the player with the most number of stones wins, the agent should not only maximize its own score, but should also minimize the opponent's score. We define a timestep such that each one consists of two turns: the agent's and the opponent's. We denote $r_t$ as the reward for timestep $t$, and $r_{t,agent}$ and $r_{t,opponent}$ as the scores obtained by the agent and the opponent at timestep $t$, respectively. Thus we formulate the reward for each timestep as shown in \eqref{eqn:reward}. \begin{equation} \label{eqn:reward} r_{t} = r_{t,agent} - r_{t,opponent} \end{equation} \subsection{Deep Q-Learning}\label{subsec:deep-q} The game board consists of 2 heads, 14 houses, and 98 stones in total. We can model the board configuration as a combination with replacement problem. As such, the number of theoretically possible game states is $|S| = C_{16}^{(98)} = 1.81\times{10}^{18}$. With this large number of states, using a Q-table to store the values for all state-action pairs becomes impractical, if not impossible. Thus, we instead base our approach on DQN and use a neural network to learn the optimal Q function. \subsection{Baselines} We test our trained DQN agent against several policies: \begin{enumerate} \item \textit{Random Policy:} The random policy agent simply chooses a random action from a uniform distribution. \item \textit{Max Policy:} The max policy agent always chooses the house with the most number of stones. \item \textit{Exact Policy:} The exact policy agent chooses the nearest house to the head where the number of stones is equal to its distance to the head. This allows the agent to get another turn. If there are more than one houses which satisfy the condition, the nearer house to the head is chosen first. If no house satisfies the condition, max policy is used. \item \textit{DQN Agent:} The trained DQN agent plays against itself. \end{enumerate} \section{Experiments} We generate training episodes by making the DQN Agent play against the Random Agent. We train the DQN every step of an episode, for a total of 10,000 episodes. We employ Experience Replay with a buffer size of 2,000, and sample a random mini-batch of size 128 every training iteration. Algorithm \ref{alg:training} describes the training procedure. \begin{algorithm} \caption{Turn-based DQN Training Procedure} \begin{algorithmic}[1] \label{alg:training} \REQUIRE $N$ (number of episodes) $\epsilon$, $\gamma$ (discount factor) \ENSURE Trained DQN model \STATE Initialize $\theta$ parameters of model \FOR{$episode=0$ \TO $N$} \STATE Initialize $S$ \REPEAT \STATE Choose $A$ from $S$ using $\epsilon$-greedy DQN policy \STATE Take action $A$, observe $R$, $S'$, $P$ \WHILE{$P$ = Opponent} \STATE Opponent chooses $A_{opp}$ from $S'$ \STATE Take action $A_{opp}$, observe $R_{opp}$, $S'$, $P$ \STATE $R \xleftarrow{} R - R_{opp}$ \ENDWHILE \STATE Store $S$, $A$, $R$, $S'$ in Experience Buffer \STATE $S \xleftarrow{} S'$ \STATE \COMMENT{In a subroutine:} \STATE Sample $S$, $A$, $R$, $S'$ batch from Experience Buffer \IF{$episode\bmod{100} = 0$} \STATE $\theta_{target} \xleftarrow{} \theta$ \ENDIF \STATE $V \xleftarrow{} Q(S, A; \theta)$ \STATE $V_{target} \xleftarrow{} R + \gamma \max_{a} Q(S', a; \theta_{target})$ \STATE $L \xleftarrow{} MSE(V, V_{target})$ \STATE Update $\theta$ via gradient descent \UNTIL{episode ends} \ENDFOR \end{algorithmic} \end{algorithm} We explored various training setups, but we highlight our experiences in two scenarios: \subsubsection{Annealed $\epsilon$} This is the typical approach used in most reinforcement learning work because it ensures that in the early phases of training, the DQN gets trained on a very varied set of states. However, we found that for Sungka, starting with $\epsilon = 0.9$ and annealing it to $\epsilon = 0.05$ resulted in relatively \textit{unstable} training. \subsubsection{Fixed $\epsilon$} Using a fixed $\epsilon = 0.05$ resulted in the fastest convergence and most stable training. While it seems counterintuitive, note that the practical state space is smaller than the theoretical maximum, and that the stochastic behavior of the Random Agent opponent already provides ample \textit{exploration}. Regardless of the two approaches, the DQN Agent always achieves human-level performance at the end of training. At test time, we initially used full exploitation mode by setting epsilon to zero. However, when the model is still not trained well enough, the agent gets stuck on choosing an action which does not have any stones in it. To prevent this, we use a very small epsilon instead of using zero during test time. \section{Results} \begin{figure}[htbp] \centerline{\includegraphics[scale=0.6]{Images/p1-test-rewards.png}} \caption{Mean score versus various opponent agents averaged for 100 test episodes. Each mean score data point is calculated after every 100 training episodes.} \label{fig:rewards-progress} \end{figure} \begin{figure}[htbp] \centerline{\includegraphics[scale=0.6]{Images/p1-test-rewards-p1-score-only.png}} \caption{Effect of reward formulation. Mean score versus various opponent agents averaged for 100 test episodes. Each data point is calculated after every 100 training episodes.} \label{fig:score-progress-p1-score-only} \end{figure} \begin{figure}[htbp] \centerline{\includegraphics[scale=0.6]{Images/p1-win-rates.png}} \caption{Win rate versus various opponent agents averaged for 100 test episodes. Each data point is calculated after every 100 training episodes.} \label{fig:win-rate-progress} \end{figure} \begin{table}[htbp] \caption{Performance of Trained DQN Agent versus Other Policies over 1000 Test Episodes with $\epsilon=0.01$} \begin{subtable}[h]{0.45\textwidth} \centering \begin{tabular}{|c||c|c|} \hline Policy & Average Reward & Win Percentage\\ [0.5ex] \hline \hline vs. Random Policy & 77.621 & 99.4\% \\ \hline vs. Max Policy & 74.122 & 99.5\% \\ \hline vs. Exact Policy & 70.943 & 97.9\% \\ \hline vs. Self & 68.541 & 98.6\% \\ \hline \end{tabular} \caption{As First Turn} \label{tab:perfp1} \end{subtable} \begin{subtable}[h]{0.45\textwidth} \centering \begin{tabular}{|c||c|c|} \hline Policy & Average Reward & Win Percentage\\ [0.5ex] \hline \hline vs. Random Policy & 55.927 & 73.5\% \\ \hline vs. Max Policy & 37 & 0.0\% \\ \hline vs. Exact Policy & 29.995 & 0.0\% \\ \hline vs. Self & 29.459 & 1.1\% \\ \hline \end{tabular} \caption{As Second Turn} \label{tab:perfp2} \end{subtable} \end{table} \subsection{Effects of Reward Formulation} Results show that training our DQN agent versus a random agent allows it to learn how to play sungka such that it maximizes the number of stones it can place in its own head. Figure \ref{fig:rewards-progress} shows that the agent is able to increase the average reward as training progresses. Moreover, the effect of the reward formulation in \eqref{eqn:reward} is apparent in Figure \ref{fig:score-progress-p1-score-only}. With everything held constant, the agent trained using the naive reward formulation, $r_t = r_{t,agent}$, is consistently outscored by the \textit{Exact} policy, and has an inconsistent performance against the \textit{Max} policy. \subsection{Performance of First Turn Player vs. Second Turn Player} During training, our DQN agent gets a high win percentage against any of the four policies tested after a few hundred episodes as shown in Figure \ref{fig:win-rate-progress}. Among the four policies, our agent had the hardest time against exact policy as our agent had the lowest win rate and the second lowest average reward when playing against it as shown in Table \ref{tab:perfp1}. This can be accounted by the ability of exact policy to maximize its number of turns which the other policies do not have. Table \ref{tab:perfp1} shows the performance of the final DQN agent aginst other policies over 1000 test episodes with $\epsilon = 0.01$. It can be seen that the trained agent performs very well against any policy when it has the first turn. When it plays as the second turn, it still wins against random policy at a good rate. However, it could not win against max policy and exact policy. It also only wins 11 games out of 1000 versus itself. This shows that the game of sungka is biased towards the player that gets the first turn. \begin{table} \caption{Performance of Trained Player2DQN Agent versus Other Policies over 1000 Test Episodes with $\epsilon=0.01$} \begin{subtable}[h]{0.45\textwidth} \centering \begin{tabular}{|c||c|c|} \hline Policy & Average Reward & Win Percentage\\ [0.5ex] \hline \hline vs. Random Policy & 65.271 & 94.5\% \\ \hline vs. Max Policy & 40.871 & 0.2\% \\ \hline vs. Exact Policy & 30.986 & 0.0\% \\ \hline vs. Self & 38.216 & 4.3\% \\ \hline \end{tabular} \caption{As Second Turn} \label{tab:perfp2trainedp2} \end{subtable} \begin{subtable}[h]{0.45\textwidth} \centering \begin{tabular}{|c||c|c|} \hline Policy & Average Reward & Win Percentage\\ [0.5ex] \hline \hline vs. Random Policy & 60.314 & 86.7\% \\ \hline vs. Max Policy & 49.237 & 5.6\% \\ \hline vs. Exact Policy & 51.838 & 96.3\% \\ \hline vs. Self & 59.784 & 95.5\% \\ \hline \end{tabular} \caption{As First Turn} \label{tab:perfp1trainedp2} \end{subtable} \end{table} Looking into this further, we trained another DQN agent which plays second (Player2DQN). Table \ref{tab:perfp2trainedp2} shows the performance of that agent when playing second. The average rewards received by Player2DQN are higher when playing against any of the policies than when Player1DQN plays as second turn. Win percentage against random policy and self is also higher than when it was not trained to play second. We also look into the performance of Player2DQN as the first player in Table \ref{tab:perfp1trainedp2}. It shows that the average reward increased against max policy, exact policy, and self. Its win percentage against exact policy and self also drastically increased. Results from these experiments show that when playing against max policy and exact policy, having the first turn leads to more rewards and a higher win percentage. Player2DQN performed well against random, exact, and self when playing first even though it was trained as second. On the other hand, performance against random policy is dependent on how the agent was trained. We also tested our Player1DQN agent against Player2DQN agent. Table \ref{tab:perfpvp} shows that the first player always has the advantage. \begin{table} \caption{Performance of Trained Player1DQN Agent versus Player2DQN Agent} \label{tab:perfpvp} \begin{center} \begin{tabular}{|c||c|c|} \hline & Average Reward & Win Percentage\\ [0.5ex] \hline \hline Player1DQN as 1st turn& 71.991 & 98.1\% \\ \hline Player2DQN as 2nd turn& 26.009 & 1.8\% \\ \hline Draw & & 0.1\% \\ \hline \hline Player2DQN as 1st turn& 68.189 & 98.0\% \\ \hline Player1DQN as 2nd turn& 29.811 & 1.8\% \\ \hline Draw & & 0.2\% \\ \hline \end{tabular} \end{center} \end{table} \begin{figure}[htbp] \centerline{\includegraphics[scale=0.45]{Images/sunog.png}} \caption{Agent learns to maximize reward by choosing a move where the last stone ends on an empty house on his side which allows the agent to get the stones on the opponent's side.} \label{fig:sunog} \end{figure} \begin{figure}[htbp] \centerline{\includegraphics[scale=0.45]{Images/maximizeturn.png}} \caption{Agent is able to maximize its move by choosing a move where the last stone ends on his own head. This allows the agent to choose another move which can further maximize the reward.} \label{fig:maximize-turn} \end{figure} \subsection{Learned Actions based on Game Mechanics} Figures \ref{fig:sunog} and \ref{fig:maximize-turn} shows the agent's ability to exploit some of the game mechanics. In Figure \ref{fig:sunog} showed that the agent has learned to choose a move that will put the last stone on an empty house on his side of the board. This move allows him to get more stones since he also gets the stones on the opponent's side. In Figure \ref{fig:maximize-turn} exploits the fact that putting the last stone on his head allows him to make another move. This allows the agent to get one point, and gets to take another action without the board state changing unpredictably (due to an opponent's action). \section{Conclusion and Recommendation} We have trained a network that is capable of playing and winning in Sungka. The trained agent is able to choose actions that maximizes its reward to increase its probability of winning the game. We showed that the reward formulation which uses both the score accumulated by the other player and the agent's score for that turn result to more stable training and better performance. In this paper, we only trained a DQN agent. We recommend looking into the performance of other reinforcement learning methods such as cross entropy, trust region policy optimization, proximal policy optimization, and A3C. It would also be interesting to see the performance of agents trained using different reinforcement learning methods against each other. \renewcommand*{\UrlFont}{\ttfamily} \printbibliography \end{document}
{ "redpajama_set_name": "RedPajamaArXiv" }
624
package org.gradle.api.internal.artifacts.repositories.layout; import org.gradle.api.artifacts.repositories.RepositoryLayout; import org.gradle.api.internal.artifacts.repositories.resolver.PatternBasedResolver; import java.net.URI; import java.util.Set; /** * Represents the directory structure for a repository. */ public abstract class AbstractRepositoryLayout implements RepositoryLayout { /** * Given the base URI, apply the patterns and other configuration for this layout to the supplied resolver. * * @param baseUri The base URI for the repository. * @param resolver The ivy resolver that will be used to resolve this layout. */ public abstract void apply(URI baseUri, PatternBasedResolver resolver); /** * Add any schemes registered as patterns in this layout, given the supplied base URI. * These are used to determine which repository implementation can be used (local file, http, etc). * * @param baseUri The baseUri of the repository. * @param schemes The set of schemes to add to. */ public void addSchemes(URI baseUri, Set<String> schemes) { if (baseUri != null) { schemes.add(baseUri.getScheme()); } } }
{ "redpajama_set_name": "RedPajamaGithub" }
9,142
Insurance Payment - Find the Best AUTO INSURANCE now and SAVE Big! It also bears all the police do not stray from the ashes. Always remember that it provides the coverage aspects involved. Similarly, if you do find the internet you can relax, knowing that you'll never. Financial exits can take up a better rate if they were being targeted for a standard insurance plan, you might know that what the law states that anyone that wants to buy a new insurance policy. When you have a cheaper price. Usually, I dismiss these coupons because to me the most valuable classic cars, as the second of the vehicle in safer areas, purchasing a domestic sedan instead. Always consider the minimum coverage required, what it is now a required by law to purchase models that are most likely to find online versus what you're going to be reinstated and results in people the precautionary and safe way to gain you additionally would like a new vehicle is concerned and want to bring the cost of the person that utilizes your vehicle caused by burglary. There are other ways that retailers have addressed this is important that they don't understand the policies cover. Premises liability cases involve the general motoring public also. The accident has caused problems for some concessions, which we usually. Basically you were at fault you need - it when suddenly it's the law. Collision insurance is the gas prices are causing people to compare the insurance will give you a massive increase in their mortgage payments. Modern times have seen countless commercials where either a luxury. You take out a defensive driving classes to increase and enhance their communication abilities. With the use of the states have enacted special statutes applicable. Go shopping for car insurance payment in lieu policy will never know when one has a reputation of the best titan auto insurance payment coverage s offered and the make, the list of NO FUN BUDGET ITEMS. January is a significant cost of insuring your Motorhome - it's really not too good. To do is pay for the quotes you need to find cheap insurance because these days for a long period of time and military personnel. Take a field trip to one third off their cost of their rate determination. You simply put in the event of a motorcycle. After all, it is a shame to come up with all of the breadwinner? Policy holders can call them for compensation in the other person's bodily injury Liability. Schools for example, a renter will need a policy holder with a vehicle for when the risk of dealing with the insurance agent and take a look at the very least, you will get lower insurance premium. Just fill in some cases your lawyer is one is in the car has been a 2.5% increase in companies with those who are incidentally or overtly rude to someone working in the moment. Notice that these results are unbiased and their reputation within the prescribed time limit. It is best to canvass for more progressive car insurance payment address coverage will provide you with a loan, the bank will require a complete waste of money, wouldn't you? Whatever country you come across to make sure they are making $85,000 per year from each to compare.
{ "redpajama_set_name": "RedPajamaC4" }
4,246
Q: Codeigniter MY_Model by Jamie This is driving me nuts.. I have a fresh installation of CI 2.1.3. Copied MY_Model from here: https://github.com/jamierumbelow/codeigniter-base-model to application/core. Autoloaded database library in autoload.php Configured the database.php inside config folder properly. Extended the MY_Model class like below: class User_m extends MY_Model{ public $_table = 'user'; public $primary_key = 'user_id'; } And in the default controller: $this->load->model('user_m', 'user'); $row = $this->user->get(1); echo $row->email; This is the simplest implementation to see how the CRUD lib works but I get the following error: Fatal error: Call to a member function where() on a non-object in MY_Model.php on line 135 Line 135 of MY_Model.php: $row = $this->_database->where($this->primary_key, $primary_value) ->get($this->_table) ->{$this->_return_type()}(); A: if (!$this->_db) { $this->_database = $this->load->database(); } No database object will be returned from $this->load->database(); From CI docs: /** * Database Loader * * @param mixed $params Database configuration options * @param bool $return Whether to return the database object * @param bool $query_builder Whether to enable Query Builder * (overrides the configuration setting) * * @return void|object|bool Database object if $return is set to TRUE, * FALSE on failure, void in any other case */ public function database($params = '', $return = FALSE, $query_builder = NULL) Try: if ( $this->db ) { $this->_database = $this->db; } else { $this->_database = $this->load->database('default', true, true); } Later edit: I found a fixed version of that model. Replace your core model with this one
{ "redpajama_set_name": "RedPajamaStackExchange" }
9,332
Q: Element.className returning undefined? [Question was changed after an alternate debugging method was pointed out to me and I found the real cause of the problem - thanks to Pointy and user2864740] I'm trying to emulate (before taking a peek at the source code of) bootstrap's dropdown menu. I attach an onclick listener to every a.dropdown-toggle. The listener grabs the node's parent, uses the node's parent to find the actual dropdown menu and adds or removes the open class. After getting the dropdown menu node (a ul element) I use element.className but it returns undefined. This is especially strange because jquery's .attr('class') returns the expected result. I'm using jquery 1.10.2. HTML: <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Account <b class="caret"></b></a> <ul class="dropdown-menu open"> <li><a href="#">Profile</a></li> <li><a href="#">Settings</a></li> <li><a href="#">Privacy</a></li> <li class="divider"></li> <li><a href="#">Logout</a></li> </ul> </li> CSS: li.divider { border-top: solid 1px grey; padding: 0px 0px; } .dropdown-menu { position: absolute; display: none; border: 1px solid grey; list-style-type: none; } .dropdown a:link, .dropdown a:visited { text-decoration: none; color: black; } .dropdown-menu.open{ display: block; } Javascript: $( document ).ready(function(){ $('a.dropdown-toggle').click(function(e){ e.preventDefault(); dropDownMenu = $(this.parentNode).find('.dropdown-menu'); // does not return dropdown menu console.log( "According to jquery, class name is: " + dropDownMenu.attr('class') ); // prints dropdown-menu console.log( "According to .className, class name is: " + dropDownMenu.className ); //prints undefined if ( dropDownMenu.attr('class').indexOf('open') > -1 ) { // previously dropDownMenu.className.indexOf('open') > -1 alert('removing class'); }else{ alert('adding class'); } }); }); A: dropDownMenu.attr('class'); dropDownMenu is a jquery object now- not a DOM object.
{ "redpajama_set_name": "RedPajamaStackExchange" }
251
The topics listed above are just indicative and not exhaustive. Therefore, you can select a topic of your own choice under the following broad themes: Economics, Education, Governance, Healthcare, Information Technology, International Relations, Law, Public Policy, Management, and Strategy. 7. A soft copy of the research paper must be uploaded at www.samvaad.co/research.html by 31st December, 2016. 1. This Call for Papers notice aims to invite research papers and case studies for the pre-event book of Samvaad 2017. 4. No Participation Certificate will be issued. 5. There is no Participation or Publication Fee for consideration and/or publication of your submission. 6. A separate Call for Papers notice for Samvaad 2017 Souvenir Book will be released on 1st January, 2017. Model Governance Foundation is a non-partisan, non-profit and non-political organization working for national integration, communal harmony and inclusive development.Our key areas of intervention are administrative reforms, education, environment, healthcare, legal reforms, skill development and women empowerment. Samvaad 2017 is a 3-day National Youth Conference organized by the Model Governance Foundation in New Delhi from 30th June – 2nd July, 2017. In its Second edition, the conference will include various events like Interactive Lectures, Paper Presentations, Guest Presentations, Debating Sessions, Group Discussions, Life Mapping Exercise, Leadership Development Conversation, and Social and Cultural Night. GNLU Centre for Law and Society is the focal point for socio-legal research at Gujarat National Law University that facilitates interdisciplinary and multi-disciplinary research, study and teaching of law and society, and law and legal institutions. The Centre encourages multidisciplinary perspectives to inform analysis and debate on socio-legal issues, thereby providing the richest and most comprehensive approach to research and policy-making. Findings originating at the Centre will be disseminated through conferences and symposia, journals, in- house student vignettes, and policy white papers. Next articleShould We Continue With The Collegium System?
{ "redpajama_set_name": "RedPajamaC4" }
3,859
package com.demo; import android.app.Activity; import android.os.Bundle; import android.util.Log; import com.antcloud.network.AntCloud; import com.antcloud.network.AntError; import com.antcloud.network.AntSchedulers; import com.antcloud.network.AntSubscriber; import com.google.gson.Gson; import java.util.List; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ApiService apiService = AntCloud.getInstance().init(this, "https://api.douban.com/v2/movie/").createService(ApiService.class); OtherService other = AntCloud.getInstance().init(this, "https://api.douban.com/v2/movie/").createService(OtherService.class); apiService.getTopMovie(0, 10).compose(AntSchedulers.<HttpResult<List<Subject>>>defaultSchedulers()) .subscribe(new AntSubscriber<HttpResult<List<Subject>>>(this, true) { @Override public void call(HttpResult<List<Subject>> listHttpResult) { } @Override public void error(AntError error) { Log.e("error", new Gson().toJson(error)); } }); AntCloud.getInstance().getSubcription().addSubscription(other.getTopMovie(0, 5).compose(AntSchedulers.<HttpResult<List<Subject>>>defaultSchedulers()) .subscribe(new AntSubscriber<HttpResult<List<Subject>>>(this, true) { @Override public void call(HttpResult<List<Subject>> listHttpResult) { } @Override public void error(AntError error) { Log.e("error", new Gson().toJson(error)); } })); } @Override protected void onDestroy() { super.onDestroy(); AntCloud.getInstance().getSubcription().unSubscribe(); } }
{ "redpajama_set_name": "RedPajamaGithub" }
4,535
<li class="list-row" data-bind="if: $data, event: { mouseover: $root.showQueueActions, mouseleave: $root.hideQueueActions }"> <!--Only render if it's not the playing track.--> <ul class="list"> <li class="list-column"> <div data-bind="if: Track.TrackArtworkUrl"> <img data-bind="attr: { src: Track.TrackArtworkUrl }" class="artwork artwork-small img-queued" /> </div> <div data-bind="ifnot: Track.TrackArtworkUrl"> <img data-bind="attr: { src: Track.Album.ArtworkUrlSmall }" class="artwork artwork-small img-queued" /> </div> </li> <li class="list-column track-info"> <ul class="list"> <li> <span data-bind="truncated: Track.Name, truncatedLength: 60"></span> <span data-bind="formattedDateTime: { source: Track.DurationMilliseconds, format: '({mm}:{ss})' }"></span> <!--<span class="label" data-bind="visible: $root.nowPlayingViewModel.nowPlaying() && Id() == $root.nowPlayingViewModel.nowPlaying().Id()"><a href="#now-playing" >Playing right now</a></span> --> </li> <li> <ul class="comma-separated" data-bind="foreach: Track.Artists"> <!-- ko compose: {view: 'partials/track-artist'}--><!--/ko--> </ul> </li> <!-- ko if: $data.Track.Album --> <li> <a data-bind="attr: { href: '#albums/' + Track.Album.MusicProvider.Identifier() + '/' + Track.Album.Link() }, truncated: Track.Album.Name, truncatedLength: 85"></a> </li> <!-- /ko --> <li class="small-text"> Queued by <span data-bind="text: User"></span><span style="font-style:italic" data-bind="visible: Reason(), text: ' ' + Reason()"></span><span data-bind="visible: $data.StartedPlayingDateTime">, </span> <span data-bind="if: $data.StartedPlayingDateTime"> played at <span data-bind=" timeAndDate: StartedPlayingDateTime"></span></span> </li> </li> <li class="small-text" data-bind="if: $data.StartedPlayingDateTime"> Likes/Vetoes: <span class="badge badge-like" data-bind="text: $data.LikeCount, popover: { template: 'likesPopover', visible: Likes().length, title: 'Liked by' }"></span> / <span data-bind="text: $data.VetoCount, popover: { template: 'vetoesPopover', visible: Vetoes().length, title: 'Vetoed by' }" class="badge badge-veto"></span> </li> </ul> </li> <!-- Interesting tip - If it's possible that the property you want to bind to doesn't exist, prefix it with $data (not sure why but this works) Also, need to set the data context to Track using the containerless syntax --> <li class="pull-right"> <div data-bind="if: $data.StartedPlayingDateTime"> <!-- ko compose: {model: $data.Track, view:'views/partials/queue-button', preserveContext:true}--><!--/ko--> </div> <div data-bind="ifnot: $data.StartedPlayingDateTime"> <!-- ko compose: {view:'partials/queued-actions'}--><!--/ko--> </div> </li> </ul> </li>
{ "redpajama_set_name": "RedPajamaGithub" }
5,493
<!DOCTYPE html> <!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]--> <!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]--> <!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]--> <!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]--> <head> <!-- Basic Page Needs ================================================== --> <meta charset="utf-8"> <title>UWCL</title> <meta name="description" content=""> <meta name="author" content=""> <style> #results{ min-height: 100%!important; overflow: auto; } </style> <!-- Mobile Specific Metas ================================================== --> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <!-- CSS ================================================== --> <link rel="stylesheet" type="text/css" href="css/bootstrap.css"> <link rel="stylesheet" type="text/css" href="css/style.css"> <!--[if lt IE 9]> <script src="https://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <!-- Fonts ================================================== --> <link href='https://fonts.googleapis.com/css?family=Lato:300,400,700' rel='stylesheet' type='text/css'> <link href='https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:700,400,300,200' rel='stylesheet' type='text/css'> <!-- Javascript ================================================== --> <script type="text/javascript" src="js/modernizr.custom.79639.js"></script> <!-- Favicons ================================================== --> <link rel="shortcut icon" href="../img/favicon.ico"> <link rel="apple-touch-icon" href="../img/apple-touch-icon.png"> <link rel="apple-touch-icon" sizes="57x57" href="../img/apple-touch-icon-57x57.png"> <link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png"> <link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png"> <link rel="apple-touch-icon" sizes="144x144" href="../img/apple-touch-icon-144x144.png"> </head> <body> <!--Collapsing NavBar --> <nav class="navbar"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="../index.html"><img src="../img/UWCL_logo_white.png" alt="UW Cartography Lab" style="width:80px;height:auto;"></a> </div> <div class="collapse navbar-collapse navbar-right" id="myNavbar"> <ul class="nav navbar-nav navText"> <li><a href="../production/index.html" id="navText">Production</a></li> <li><a href="../research/index.html" id="navText">Research</a></li> <li><a href="index.html" id="navText">Education</a></li> <!-- <li><a href="mapChat.html" id="navText">Map Chat</a></li> --> <li><a href="../people/index.html" id="navText">People</a></li> <!-- <li><a href="search.html" id="navText">Search</a></li> --> </ul> </div> </div> </nav> <!--end of header --> <div class='container'> <h2 class='page-header'>404 Error</h2> <p> Sorry, that resource does not exist. Please try again. </p> </div> <footer class="footer navbar-fixed-bottom"> <!-- <div class="row darkbackground"> <div class="row-fluid"> <div class="span3" style="padding-left:5%;"> <h6>Site Directory</h6> <ul class="footer-list"> <li> <a href="#">Innovation</a> <ul> <li> <a href="#">History</a> </li> <li> <a href="#">Research</a> </li> </ul> </li> <li> <a href="#">Design</a> </li> <li> <a href="#">Contact</a> </li> </ul> </div> </div> </div> --> <div class="container"> <div class="row"> <div class="align-center"> <br> <img src="actual_images/footerLogo.jpg"> <p>Copyright 2015&copy; All Rights Reserved.</p> </div> </div> </div> </footer> <script src="https://code.jquery.com/jquery-3.1.1.js" integrity="sha256-16cdPddA6VdVInumRGo6IbivbERE8p7CQR3HzTBuELA=" crossorigin="anonymous"></script> <!-- Latest compiled and minified JavaScript --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> <script src="js/jquery.cookie.js" type="text/javascript"> </script> <script src="js/jquery.ba-cond.min.js" type="text/javascript"> </script> <script src="js/jquery.slitslider.js" type="text/javascript"> </script> <script src="js/jquery.prettyPhoto.js" type="text/javascript"> </script> <script src="js/custom.js" type="text/javascript"> </script> <script src="js/main.js" type="text/javascript"> </script> <link href="//cdn.datatables.net/1.10.12/css/jquery.dataTables.css" rel="stylesheet" type="text/css"> <script charset="utf8" src= "//cdn.datatables.net/1.10.12/js/jquery.dataTables.js" type= "text/javascript"> </script> </body> </html>
{ "redpajama_set_name": "RedPajamaGithub" }
2,029
Culture shapes the evolution of cognition Bill Thompson, Simon Kirby, and Kenny Smith PNAS April 19, 2016 113 (16) 4530-4535; first published April 4, 2016 https://doi.org/10.1073/pnas.1523631113 Bill Thompson aArtificial Intelligence Laboratory, Vrije Universiteit Brussel, B-1050 Brussels, Belgium;bSchool of Philosophy, Psychology & Language Sciences, University of Edinburgh, Edinburgh EH8 9YL, United Kingdom For correspondence: bill@ai.vub.ac.be Simon Kirby bSchool of Philosophy, Psychology & Language Sciences, University of Edinburgh, Edinburgh EH8 9YL, United Kingdom Edited by James L. McClelland, Stanford University, Stanford, CA, and approved March 1, 2016 (received for review December 2, 2015) A central debate in cognitive science concerns the nativist hypothesis: the proposal that universal human behaviors are underpinned by strong, domain-specific, innate constraints on cognition. We use a general model of the processes that shape human behavior—learning, culture, and biological evolution—to test the evolutionary plausibility of this hypothesis. A series of analyses shows that culture radically alters the relationship between natural selection and cognition. Culture facilitates rapid biological adaptation yet rules out nativism: Behavioral universals arise that are underpinned by weak biases rather than strong innate constraints. We therefore expect culture to have dramatically shaped the evolution of the human mind, giving us innate predispositions that only weakly constrain our behavior. A central debate in cognitive science concerns the nativist hypothesis, the proposal that universal features of behavior reflect a biologically determined cognitive substrate: For example, linguistic nativism proposes a domain-specific faculty of language that strongly constrains which languages can be learned. An evolutionary stance appears to provide support for linguistic nativism, because coordinated constraints on variation may facilitate communication and therefore be adaptive. However, language, like many other human behaviors, is underpinned by social learning and cultural transmission alongside biological evolution. We set out two models of these interactions, which show how culture can facilitate rapid biological adaptation yet rule out strong nativization. The amplifying effects of culture can allow weak cognitive biases to have significant population-level consequences, radically increasing the evolvability of weak, defeasible inductive biases; however, the emergence of a strong cultural universal does not imply, nor lead to, nor require, strong innate constraints. From this we must conclude, on evolutionary grounds, that the strong nativist hypothesis for language is false. More generally, because such reciprocal interactions between cultural and biological evolution are not limited to language, nativist explanations for many behaviors should be reconsidered: Evolutionary reasoning shows how we can have cognitively driven behavioral universals and yet extreme plasticity at the level of the individual—if, and only if, we account for the human capacity to transmit knowledge culturally. Wherever culture is involved, weak cognitive biases rather than strong innate constraints should be the default assumption. ↵1To whom correspondence should be addressed. Email: bill{at}ai.vub.ac.be. Author contributions: B.T., S.K., and K.S. designed research; B.T. performed research; B.T. analyzed data; and B.T., S.K., and K.S. wrote the paper. This article is a PNAS Direct Submission. This article contains supporting information online at www.pnas.org/lookup/suppl/doi:10.1073/pnas.1523631113/-/DCSupplemental. Freely available online through the PNAS open access option. Bill Thompsona,b,1, Simon Kirbyb, and Kenny Smithb aArtificial Intelligence Laboratory, Vrije Universiteit Brussel, B-1050 Brussels, Belgium; You are going to email the following Culture shapes the evolution of cognition Bill Thompson, Simon Kirby, Kenny Smith Proceedings of the National Academy of Sciences Apr 2016, 113 (16) 4530-4535; DOI: 10.1073/pnas.1523631113 Article Classifications Evolutionary Perspectives on Linguistic Nativism Variations on Model 1
{ "redpajama_set_name": "RedPajamaCommonCrawl" }
5,970
{"url":"http:\/\/www.emathzone.com\/tutorials\/math-results-and-formulas\/trigonometry-math-results-and-formulas\/","text":"# Trigonometry\n\n\u2022 ### Formulas of Inverse Trigonometric Functions\n\n1) 2) 3) 4) 5) 6) 7)\n\n\u2022 ### Formulas of Trigonometric and Logarithmic Functions\n\n1) 2) 3) 4) 5) 6) 7) 8)\n\n\u2022 ### Change of Hyperbolic Functions\n\n1) 2) 3) 4) 5) 6)\n\n\u2022 ### Circles Connected with a Triangle\n\n1) If denotes in-radius, then \u00a0 2) Circum radius is given by \u00a0 3) If denotes radii, then \u00a0 4) \u00a0 5) In an equilateral triangle\n\n\u2022 ### Results and Formulas of Plane Triangles\n\nConsider the triangle, having the angles and sides as shown in the figure. \u00a0 1) Law of Sine is \u00a0 2) Laws of Cosine are or \u00a0 or \u00a0 or 3) Laws of Tangent are \u00a0 HALF ANGLE FORMULAS Consider that and are sides and angles of , as shown above, also if (i) (ii) [\u2026]\n\n\u2022 ### Results of Trigonometric Ratios of Allied Angles\n\n1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. Period of and is, whereas period of and is . If is any integer, then 23. 24. 25. 26. 27. 28.\n\n\u2022 ### Fundamental Trigonometric Ratios\n\n1) 2) \u00a0\u00a0\u00a0 3) 4) 5) 6) 7) Signs of trigonometric Ratios \u00a0\u00a0\u00a0 I QUADRANT: , means all trigonometric ratios are positive. \u00a0\u00a0 II QUADRANT: , means and are positive all others are negative. \u00a0 III QUADRANT: , means and are positive all others are negative. \u00a0\u00a0IV QUADRANT: , means and are positive all others [\u2026]","date":"2017-01-23 12:38:04","metadata":"{\"extraction_info\": {\"found_math\": false, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.9627977609634399, \"perplexity\": 4520.881852384957}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2017-04\/segments\/1484560282926.64\/warc\/CC-MAIN-20170116095122-00017-ip-10-171-10-70.ec2.internal.warc.gz\"}"}
null
null
require_relative '../../../models/layer/presenter' require_relative '../../../models/visualization/member' require_relative '../../../models/visualization/collection' class Api::Json::LayersController < Api::ApplicationController ssl_required :index, :show, :create, :update, :destroy before_filter :load_parent before_filter :validate_read_write_permission, only: [:update, :destroy] def index @layers = @parent.layers layers = @layers.map { |layer| CartoDB::Layer::Presenter.new(layer, {:viewer_user => current_user}).to_poro } render_jsonp layers: layers, total_entries: @layers.size end def show @layer = @parent.layers_dataset.where(layer_id: params[:id]).first render_jsonp @layer.to_json end def create @layer = ::Layer.new(params.slice(:kind, :options, :infowindow, :tooltip, :order)) if @parent.is_a?(::Map) unless @parent.admits_layer?(@layer) return(render status: 400, text: "Can't add more layers of this type") end unless @parent.can_add_layer(current_user) return(render_jsonp({:description => 'You cannot add a layer in this visualization'}, 403)) end if ::Layer::DATA_LAYER_KINDS.include?(@layer.kind) table_visualization = ::Table.get_by_id_or_name(@layer.options['table_name'], current_user).table_visualization unless table_visualization.has_permission?(current_user, CartoDB::Visualization::Member::PERMISSION_READONLY) return(render_jsonp({:description => 'You do not have permission in the layer you are trying to add'}, 400)) end end end if @layer.save @parent.add_layer(@layer) @layer.register_table_dependencies if @parent.is_a?(::Map) @parent.process_privacy_in(@layer) if @parent.is_a?(::Map) render_jsonp CartoDB::Layer::Presenter.new(@layer, {:viewer_user => current_user}).to_poro else CartoDB::Logger.info "Error on layers#create", @layer.errors.full_messages render_jsonp( { :description => @layer.errors.full_messages, :stack => @layer.errors.full_messages }, 400) end end def update @layer = ::Layer[params[:id]] @layer.raise_on_save_failure = true # don't allow to override table_name and user_name # https://cartodb.atlassian.net/browse/CDB-3350 params[:options]['table_name'] = @layer.options['table_name'] if params.include?(:options) && params[:options].include?('table_name') params[:options]['user_name'] = @layer.options['user_name'] if params.include?(:options) && params[:options].include?('user_name') @layer.update(params.slice(:options, :kind, :infowindow, :tooltip, :order)) render_jsonp CartoDB::Layer::Presenter.new(@layer, {:viewer_user => current_user}).to_poro rescue Sequel::ValidationFailed, RuntimeError => e render_jsonp({ description: e.message }, 400) end def destroy @parent.layers_dataset.where(layer_id: params[:id]).destroy head :no_content end protected def load_parent @parent = user_from(params) || map_from(params) raise RecordNotFound if @parent.nil? end #load_parent def user_from(params={}) current_user if params[:user_id] end #user_from def map_from(params={}) return unless params[:map_id] # User must be owner or have permissions for the map's visualization vis = CartoDB::Visualization::Collection.new.fetch( user_id: current_user.id, map_id: params[:map_id] ) raise RecordNotFound if vis.nil? ::Map.filter(id: params[:map_id]).first end #map_from def validate_read_write_permission layer = ::Layer[params[:id]] layer.maps.each { |map| map.visualizations.each { |vis| return head(403) unless vis.is_owner?(current_user) || vis.has_permission?(current_user, CartoDB::Visualization::Member::PERMISSION_READWRITE) } } true rescue => e render_jsonp({ description: e.message }, 400) end end
{ "redpajama_set_name": "RedPajamaGithub" }
7,786
Guests of the Democratic National Convention media party got a Philadelphia welcome Saturday at Citizens Bank Park. PHILADELPHIA (WPVI) -- Guests of the Democratic National Convention media party got a Philadelphia welcome Saturday at Citizens Bank Park. Philly legend lookalikes and mascots greeted journalists and crew members from across the country. Inside, some walked the bases. Dozens of local businesses served up specialties, including a new spin on a Philadelphia tradition. "They're like salmon cheesesteaks, and when they take it they're like mmmm," said Haneef Ali, Chef Haneef Ali's Kitchen. Besides media, thousands of delegates, party officials and others are expected to descend on Philadelphia this week for the official nomination of Hillary Clinton. A convention former Pennsylvania Gov. Ed Rendell expects to be different than the Republicans. "I think it will be a message that will hope to bring the country together, rather than divide it," said Rendell. The convention brings its share of inconveniences, including a parking ban along the center median on South Broad Street. Police will begin towing cars at 8 a.m. Sunday. As security officials ensure the venue is ready for the Democratic National Convention, city officials are making sure the city is also ready, and that includes towing and road closures. "The inconvenience will not be anywhere near what the pope was so this is like four Eagles games in a row," said Mayor Jim Kenney. "It's about the same amount of people we're dealing with." But some in South Philadelphia are more concerned about the row of state flags recently hung on South Broad Street. Some are calling on city leaders to remove Mississippi's flag, which includes the stars and bars seen on the confederate flag. "They could hang a United States flag there. They could hang a Pennsylvania state flag there," said Patrice Jeppson of South Philadelphia. "It would be a statement of the city to Mississippi."
{ "redpajama_set_name": "RedPajamaC4" }
3,898
Guido Pella came back from the brink of defeat Monday in his first-round match at Brazil Open 2014. The 23 years old player saved a match point to defeat his countryman Leonardo Mayer (59°), 7-6 (4), 6-7 (3), 7-6 (4) in two and a half hours. After two sets without breaks, Pella fell behind in third set before fighting back in the seventh game. The Bahía Blanca native then trailed 30/40 down on serve at 4-5, but saved the match points before clinching victory in the deciding tie-break. This victory allowed Pella to defend 2R reached in 2013, when he defeated italian Fabio Fognini. Also,he increased to 2-1 the h2h against Mayer, finalist this year in Viña del Mar (Chile). Guido will next challenge Argentinian Horacio Zeballos (116°), who beats Uruguayan Pablo Cuevas (197°), 7-6 (4), 3-6, 6-3.
{ "redpajama_set_name": "RedPajamaCommonCrawl" }
2,771
{"url":"https:\/\/tex.stackexchange.com\/questions\/339137\/longtable-and-threeparttablex-in-classicthesis","text":"# Longtable and threeparttablex in Classicthesis\n\nI am using classicthesis to typeset my thesis, and I use the default library template.\n\nI am using longtable to create a big table, and threeparttableto create footnotes in table. But, the table created is not distributed in two pages.\n\nThe code I used:\n\n\\begin{threeparttable}\n\n{\\footnotesize\n\\centering\n\\begin{spacing}{0.65}\n\\begin{longtable}{p{0.06\\linewidth}\np{0.18\\linewidth}\np{0.05\\linewidth}\np{0.17\\linewidth}\np{0.14\\linewidth}\np{0.07\\linewidth}\np{0.06\\linewidth}}\n\n\\caption{Esta de arte en Sistemas BCI para comunicaci\u00f3n alternativa en sujetos sanos.}\\\\\n\\hline\n\\bfseries Fuente &\n\\bfseries Paradigma & \\bfseries SOA\\tnote{a} & \\bfseries Caracter\u00edstica & \\bfseries Clasificador & \\bfseries Acc.\\tnote{b} & \\bfseries ITR\\tnote{c} \\\\\n\\hline\n\n%\n% Table contents\n%\n\n\\end{longtable}\n\\end{spacing}\n\n\\begin{tablenotes}\n\\item[a] .\n\\item[b] .\n\\item[c]\n\\end{tablenotes}\n\n}\n\\end{threeparttable}\n\n\nThe compiler result:\n\nI think that longtable divides the table, but can not move to the next page. How can I solve that?\n\n\u2022 Welcome to TeX.SX! Remove the brace before \\footnotesize and the correponding closing brace. Also remove the spacing environment. \u2013\u00a0egreg Nov 14 '16 at 17:55\n\u2022 @egreg Thanks for the welcome. I made the changes you suggested, but the problem persists. \u2013\u00a0Surya Nov 14 '16 at 18:01\n\u2022 You also need \\begin{ThreePartTable} and \\end{ThreePartTable}, not threepartable. \u2013\u00a0egreg Nov 14 '16 at 18:16\n\u2022 @egreg The problem was solved. Thank you very much for your help! \u2013\u00a0Surya Nov 14 '16 at 18:20\n\u2022 @egreg Do you want to make that an answer? \u2013\u00a0Johannes_B Dec 4 '16 at 10:22\n\nYou seem to be using the threeparttablex package. Remove the brace before \\footnotesize and the corresponding closing brace; also the spacing environment should be removed: if you need it, use the declaration form.\nMost importantly, the outer environment should be ThreePartTable`. Note the special capitalization.","date":"2020-02-27 15:42:22","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 1, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.7323216199874878, \"perplexity\": 6052.365818739811}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 20, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2020-10\/segments\/1581875146714.29\/warc\/CC-MAIN-20200227125512-20200227155512-00146.warc.gz\"}"}
null
null
Q: What is the difference between the NGEN and NGEN Critical scheduled tasks? I have a situation where a client is needing to manually run the .NET Framework NGEN v4.0.30319 Critical scheduled task to prevent a System.StackOverflowException from occurring in PresentationFramework.dll. The application in question is a 32-bit native image built in Borland Delphi 6 which acts as a host for the .NET assembly via some sort of magic trickery. (i.e. I don't remember exactly how it does it...maybe via COM???) Up until a few months ago this application was working fine. After the scheduled tasks runs, the application works fine as it did before UNTIL the next Windows Update whereupon our client will need to manually run the scheduled task again. (the Windows Updates are pushed out by their IT department) The .NET assembly is also part of another .NET application which runs fine without the error, indicating it is something do with the way the .NET dll is hosted in the native application. This is occurring on all the machines in one particular office, which are all running Windows 10. We have other clients running the same software who have not reported the issue, so it's a bit bewildering.
{ "redpajama_set_name": "RedPajamaStackExchange" }
7,966
The Mountains Between Us (German: Zwischen uns die Berge) is a 1956 Swiss romantic drama film directed by Franz Schnyder and starring Hannes Schmidhauser, Nelly Borgeaud and Peter Arens. Made in Eastmancolor, it was part of the post-war boom in heimatfilm which reached its peak around this period. However the film was a commercial failure and received a poor critical reception. It was shot at the Rosenhof Studios in Zurich and on location around Riederalp and Kippel in Valais and in the Italian captail Rome. The film's sets were designed by the art director Max Röthlisberger . Cast Hannes Schmidhauser as Beat Matter Nelly Borgeaud as Jacqueline Escher Peter Arens as Dominik Escher Heinrich Gretler as Posthalter Fred Tanner as Korporal Rémy Heinz Woester as Vater Escher Max Haufler as Federico Alfred Schlageter as Kommandant der Garde Johannes Steiner as Gardekaplan Erwin Kohlund as Arzt Willy Frey as Wirt Rita Liechti as Wirtin Peter Markus as Gardist References Bibliography Bock, Hans-Michael & Bergfelder, Tim. The Concise Cinegraph: Encyclopaedia of German Cinema. Berghahn Books, 2009. Kähler, Ursula. Franz Schnyder: Regisseur der Nation. Hier und Jetzt, 2020. External links 1956 films 1956 romantic drama films Swiss romantic drama films Swiss German-language films Films directed by Franz Schnyder Swiss black-and-white films
{ "redpajama_set_name": "RedPajamaWikipedia" }
9,598
\subsubsection{Identifying Concerns Across Time} First, in the RNN models, the weights are shared across timesteps (in RNN notations, each point in time is called a \textit{timestep}). As a result, different nodes may activate at distinct timesteps. Therefore, in our approach, we propose two CI variants. In particular, the \textit{rolled}, which does not take the timesteps of a node into account, and the \textit{unrolled}, which is timestep-sensitive. \input{algoOne.tex} \textbf{Rolled:} In this variant, we identify the concern and remove the unrelated nodes and edges. Instead of keeping multiple copies of the updated edges and nodes (one for each timestep), we keep a single copy of the modified edges and nodes. All timesteps share the same weights obtained after removing edges and nodes. \textbf{Unrolled:} In traditional SE, to understand the impact of each loop iteration, prior works have proposed approaches~\cite{dongarra1979unrolling, weiss1987study, davidson1995improving} to unroll the loops. Inspired by such works, the unrolled variant follows a two-step concern identification process. In particular, it first unrolls the RNN model loop while transforming it into an equivalent sequence of operations. Then, it identifies the nodes and edges responsible for each concern at each timestep. \input{algoMany.tex} \subsubsection{Support logistic activation} \label{subsec:suplog} Unlike \textit{ReLU}\xspace, logistic activations squash the given input within a certain range~\cite{salehinejad2017recent}. For example, Tanh squashes input in range $[-1,+1]$, and Sigmoid in range $[0,1]$~\cite{salehinejad2017recent}. In that regard, Lipton~\cite{lipton2015critical} {\em et al.}\xspace reported that the hidden layers of a model using logistic activation are rarely sparse, unlike \textit{ReLU}\xspace-based layers. This is because a node value is rarely exactly zero for logistic activation-based layers, unlike \textit{ReLU}\xspace-based ones~\cite{lipton2015critical}. As a result, prior \textit{ReLU}\xspace-based decomposition techniques, which leverages the notion of ``on'' or ``off'' (``off'', if node value is 0, otherwise, ``on'') to identify concerned nodes, do not apply to the logistic activation functions. \input{algoCommon} To address this issue, our intuition is that a logistic activation value can be regarded as the excitation level of a node. A higher activation value indicates to what extent it lets information through that node. For instance, an activation value 1 for \textit{Sigmoid} allows maximum information through that node, while 0.0 is the lowest. Leveraging this insight, we compare the central activation tendency of a neuron in positive and negative examples and identify concerns (Algorithm - ~\ref{algo:citanh}). To that end, first, we sample a set of positive (inputs with target output label) and negative examples (inputs with other output labels). Then, we monitor the activation of nodes for both sets while comparing their central activation tendency. The method $central\_tendency$ measures the central activation tendency of a neuron. First, it retrieves the distribution of activation values for the observed examples (Line~\ref{algoct:3} of Algorithm~\ref{algo:citanh}) for a neuron, $node$. Note that the absolute value of observed activations is taken (Line~\ref{algoct:abs} of Algorithm~\ref{algo:citanh}) as \textit{Tanh}-activated values could lie in the range [-1,+1] and -1 allows as much information as +1, but in the opposite direction. Then, it computes the mean as a measure of central activation tendency for that neuron after discarding outlier observations (Line~\ref{algoct:9} of Algorithm~\ref{algo:citanh}). In method $CI\_logistic$, a node is considered more relevant to the dominant output label if its central tendency is higher in positive examples than in negative ones (Line ~\ref{algocitanhp1:7} of Algorithm~\ref{algo:citanh}). Because it tends to allow more information to pass through for the dominant class than for other classes, we keep this node and edges going in/out of it for the dominant class. The method stops removal if the graph becomes too sparse. To that end, taking the 10\% removal threshold used by Pan {\em et al.}\xspace~\cite{pan2020decomposing} as a starting point, we evaluate the decomposition quality at a 5\% interval (i.e., 10\%, 15\%, 20\%, etc.). For RNN models, we found that beyond 20\%, the graph starts to become too sparse, affecting decomposition adversely, and we selected this as the threshold in our experiments. \subsubsection{Support gated layer} To support the decomposition of gated layer architecture, we propose two approaches: i) decompose each gate based on its own activation, and ii) decompose all gates based on LSTM/GRU final hidden state. Note that hidden states or values refer to the output of the model's intermediate or hidden layers (between input and output layers). In the first approach, we identify dominant nodes in each gate based on their own activation values, while, in the latter, we remove a node from all gates if its corresponding hidden state value is found to be less significant in positive samples. The hidden state at a particular timestep dictates the output at that step. As a result, a node's hidden value indicates its relevance to the output produced at that step. Therefore, in the second approach, we compare a node's central hidden state tendency for positive and negative examples. We remove it from each gate if found to be more relevant to non-dominant classes or negative examples (Line~\ref{algocitanhp1:7}-\ref{algocitanhp1:13} in Algorithm~\ref{algo:citanh}). \input{algoCiLSTM} \subsubsection{Support Multiple I/O Architectures} \label{subsec:multiarch} To support the CI in models with multiple input and output classes (i.e.,~\textit{1:N}, and \textit{M:N}), we propose two approaches for two different output modes, one and many. Algorithm~\ref{algo:one} and ~\ref{algo:many} show the details as described next. \textbf{\{One, Many\}-to-One.} Like any traditional network, \text{RNN}\xspace can take a single input and produce a single output. However, \text{RNN}\xspace can also take many inputs (i.e., sequential data). Algorithm~\ref{algo:one} shows our approach for concern identification in the presence of an input loop and models that produce a single output. Algorithm~\ref{algo:one} receives a trained model, activation type, modularization mode (i.e., \textit{rolled}\xspace or \textit{unrolled}\xspace), \textit{timesteps}\xspace (1 for \textit{one}\xspace, $>1$ for \textit{many}\xspace at input end), and input examples. Next, it iterates through every output label ($OL$) to create a module for each output label. To identify the concern for $OL$, first, our approach selects the examples labeled as the dominant output class in the training dataset (Line~\ref{algoone:3} of Algorithm~\ref{algo:one}), which we call a positive sample. Also, it selects negative samples proportionally from each negative class (Line~\ref{algoone:4} of Algorithm~\ref{algo:one}). Then, in line~\ref{algoone:init} of algorithm~\ref{algo:one}, \textit{initConcern} method initializes the modular weights. In particular, it initializes the modular weights \textit{W}, \textit{U}, and \textit{B} with the trained model ones. These nodes and edges from the weights are removed and updated as the algorithm proceeds to identify a concern. In the \textit{unrolled} mode, for \textit{recurrent} layers, \textit{initConcern} creates \textit{timestep}\xspace copies of \textit{W}, \textit{U} and \textit{B} to allow individual timestep-specific weight pruning (Line~\ref{algoinit:8}-\ref{algoinit:9}) in Algorithm~\ref{algo:commonalgo}). In the next step, each neuron activation is monitored for both positive and negative samples (Line~\ref{algoone:6}-\ref{algoone:7} of Algorithm~\ref{algo:commonalgo}) by feeding them to the trained model. $monitor$ method of the Algorithm~\ref{algo:commonalgo} shows how the nodes are observed. In particular, each example is propagated through the trained model while recording the node hidden values for each example across all timesteps. The method handles different types of trainable layers found in a recurrent model. For recurrent layers, the method handles the presence of a loop by implementing a feedback loop (Line~\ref{algoma:lstmloop} of Algorithm~\ref{algo:commonalgo}). For example, for LSTM layers, LSTM cell, $lstm\_op$, is repeatedly fed with an input, $x_t$, at a particular \textit{timestep}\xspace, \textit{t}, previous hidden and cell state (Line~\ref{algoma:lstmop} of Algorithm~\ref{algo:commonalgo}). The cell performs a stateful input transformation, $x_t$, by using the contextual information from the previous cell and recording hidden values at each timestep (Line~\ref{algoma:lstmrecord} of Algorithm~\ref{algo:commonalgo}). \input{algoTI.tex} \textit{Rolled}-variant of the algorithm identifies concern for the dominant class in a timestep-insensitive manner. Instead of identifying concerns in each timestep separately, all timesteps share the same identified nodes and edges for an output class. To that end, method $flatten\_obs$ is called to flatten observations/hidden values from all timesteps (Line~\ref{algoone:9} of Algorithm~\ref{algo:one}). This method essentially treats observed activation values of nodes at each timestep as a distinct observation of its own. For example, consider a model with timestep, 10, and 100 input samples to observe. In this case, each neuron will have $100*10$ observations after invoking $monitor$. In particular, it will observe a neuron, X, 100 times in each timestep. However, \textit{rolled}-variant will treat hidden values from different timesteps for a neuron as a separate observation as if there were $100*10$ input samples. Hence, in this mode, each neuron will have 1000 observations. Then, the concern is updated based on the 1000 observations in the $update\_concern$ method (Line~\ref{algoone:11} of Algorithm~\ref{algo:one}). For logistic activations, in $update\_concern$, it first computes the central activation tendency for these 1000 observations (Line~\ref{algooc:2}-\ref{algooc:3} of Algorithm~\ref{algo:commonalgo}). Then, it identifies relevant nodes and edges for the current concern, $OL$. Similarly, for \textit{ReLU}\xspace, it computes the active percent of a node given these observations and identifies relevant nodes accordingly (Line ~\ref{algooc:6}-\ref{algooc:9} of Algorithm~\ref{algo:commonalgo}). In particular, we keep nodes that are observed to be always \textit{active} (for Relu-based models) or comparatively more intensely activated (for logistic-based models); otherwise, removed as shown in Algorithm \ref{algo:citanh} and \ref{algo:cirelu}. However, in \textit{unrolled} mode, the algorithm is timestep-sensitive as it goes to identify dominant nodes at each timestep separately (Line ~\ref{algoone:12}-\ref{algoone:15} of Algorithm~\ref{algo:one}). It iterates through each timestep and retrieves observations at that timestep (Line ~\ref{algoone:13},\ref{algoone:14} of Algorithm~\ref{algo:one}). Then, it creates a temporary object, $con\_ts$, to represent concern at this particular timestep. Finally, it merges the identified relevant nodes at this timestep to the concern under analysis, $conern\_o$, by adding them at that timestep (line~\ref{algoone:15} of Algorithm~\ref{algo:one}). \textbf{\{One, Many\}-to-Many.} Unlike \textit{\{One, Many\}-to-One}, an input example can be associated with multiple output classes in \textit{\{One, Many\}-to-Many} models. For instance, the POS-tagging example shown in Figure~\ref{fig:overviewMany} has many outputs. In this example, every individual word in a given sentence is associated with a POS tag in the output. This kind of many-output problem poses unique challenges to the decomposition technique proposed for DNNs in the past~\cite{pan2020decomposing,pan2022decomposing}. The one-output-based technique can uniquely monitor a single input sample for one particular output label, as shown in Algorithm~\ref{algo:one}. However, it is not possible for many-output models as multiple concerns may be present simultaneously in a single input. Therefore, to decompose such models, our insight is to monitor each output timestep at a time, as shown in Algorithm~\ref{algo:many}. The Algorithm~\ref{algo:many} starts by receiving the same parameters as Algorithm~\ref{algo:one}. Then, to build one module for each output class, it identifies dominant nodes in each timestep separately (Line~\ref{algomany:6} of Algorithm~\ref{algo:many}). For each output timestep, it similarly samples positive and negative examples to Algorithm~\ref{algo:one}. However, the sampling procedure is timestep-sensitive (Line ~\ref{algomany:7} of Algorithm~\ref{algo:many}). For example, consider an output label 'V' and timestep 2. Then, input with the label 'V' at the second timestep will be treated as positive if 'V' is present at timestep 2 and negative otherwise, regardless of other labels in other timesteps. After sampling, the algorithm monitors the neurons (Line~\ref{algomany:9} of Algorithm~\ref{algo:many}). Next, it retrieves only observations at the current timestep, as other observations at other timesteps are irrelevant as they can be associated with other output labels. Next, in \textit{rolled}\xspace mode, all observations at the currently monitored timestep are concatenated with previous observations at other timesteps as a distinct observation (Line ~\ref{algomany:14} of Algorithm~\ref{algo:many}). For example, for a model with 10 timesteps and 100 examples at each timestep, there will be 1000 observations per neuron in \textit{rolled}\xspace mode (Line ~\ref{algomany:18} of Algorithm~\ref{algo:many}). However, unlike Algorithm~\ref{algo:one}, it takes 100 observations from timestep 0 when CI is done for timestep 0, ignoring other (9*100) observations. Then, the next 100 observations are taken from timestep 1 when CI is done for timestep 1, ignoring the other 900 observations and so on. Finally, it uses all 1000 observations to identify the concerns (Line ~\ref{algomany:18} of Algorithm~\ref{algo:many}). As such, in many-output models, \textit{rolled}-variant is unaware of the association between an output label and timestep, i.e., contextual information on what labels appear at what step usually. However, in \textit{unrolled} mode, dominant nodes are identified only based on current observations (Line ~\ref{algomany:inittemp} of Algorithm~\ref{algo:many}), and therefore, this variant is capable of identifying concerns in a timestep-wise output-sensitive manner. \section{Conclusion and future directions} \label{sec:conclusion} Modularization and decomposition have been shown to enable many benefits in traditional software, such as reuse, replacement, hiding changes, and increased comprehensibility of the modules~\cite{parnas1972criteria,dijkstra1970notes}. Recent works have demonstrated that DL systems can also benefit from such a decomposition and demonstrate these advantages for FCNN and CNN networks~\cite{pan2020decomposing,pan2022decomposing}. This paper further advances our knowledge of modularity in the context of DL systems by extending it to RNNs, an important class of DNNs. It shows that different RNN models can be effectively decomposed and reused in different scenarios. Practitioners can use modules to compose new models. Also, they can leverage modules to replace faulty parts of existing models. The approach has been evaluated extensively on a benchmark of 60 models in different setups, i.e., different input/output types, RNN variants, and assuming both non-linear and logistic activation functions, etc. We found that decomposition has a small cost in terms of performance (accuracy and BLEU score). While this work limits its focus on the reuse and replace dimension of the modularity, we envision this decomposition can also enable/facilitate other benefits such as: \textit{Hiding Changes:} One of the key benefits of modularization is its ability to isolate and hide changes to a smaller number of components. This notion could be extended to deep learning software, making maintenance of large models, particularly in NLP, more manageable. Given the significance of change hiding in these scenarios, it is worth exploring the potential of the proposed modularization to streamline the maintenance process. \textit{Increase Comprehensibility:} Modularization has been shown to enhance our understanding of program logic, as noted by Dijkstra~\cite{dijkstra1970notes}. In the context of deep learning models, modularization could help reveal the internal logic more efficiently by breaking down a monolithic black-box model into distinct, functional units. \section{Introduction} \label{sec:intro} Recurrent neural networks (RNNs), like fully-connected neural networks (FCNN) and convolutional neural networks (CNN), are a class of deep learning (DL) algorithms that are critical for important problems such as text classification. Depending on their architecture, they are further classified into vanilla RNN, LSTM (Long Short Term Memory), or GRU (Gated Recurrent Unit). To build such models, the most common way is by training from scratch. Otherwise, developers can also use transfer learning~\cite{pratt1991direct, zhang2020adapnet} to reuse a model by retraining its last few layers. Such types of model reuse are coarse-grained, relying on the original model's entire structure. In contrast, we propose to decompose a trained \text{RNN}\xspace model to enable fine-grained reuse without needing to retrain. \input{tbcompare.tex} The term `{\em modules}' has also appeared in the AI/ML community; however, it serves a different purpose~\cite{andreas2016neural, hu2017learning, hinton2000learning, sabour2017dynamic, ghazi2019recursive}. They aim to add external memory capability to the DL models~\cite{ghazi2019recursive}. To illustrate, Ghazi~{\em et al.}\xspace presents an example of a room and objects within~\cite{ghazi2019recursive}. A DL model is excellent in answering immediate questions such as "Is there a cat in the room"? However, suppose a person often visits a room over many years and later ponders an indirect question, "How often was there a cat?". In that case, a DL model is incapable of answering it. As a remedy, this line of work proposes to build a deep modular network consisting of many independent neural networks~\cite{sabour2017dynamic,ghazi2019recursive,andreas2016neural}. Essentially, they view a module as a function created in advance. Once a problem is given, they dynamically instantiate a composition of the modules to answer such questions. In all these cases, the end result is still akin to a monolithic model tasked with solving a particular problem. On the contrary, we aim to decompose a trained \text{RNN}\xspace model to enable the benefit of software decomposition. Along this line, recent work has proposed an approach to decompose FCNN and CNN models into modules and enable their reuse~\cite{pan2020decomposing, pan2022decomposing}. \begin{figure*}[] \centering \includegraphics[width=1.0\linewidth,trim=0cm 0cm 0cm 0cm]{figures/MotivatingExample.pdf} \vspace{-20pt} \caption{Motivating Examples. De: German, En: English, Et: Estonian, Fr: French, It: Italian, Ua: Ukrainian Language.} \label{fig:motivation} \end{figure*} However, those approaches cannot be applied to RNNs due to the challenges listed in Table~\ref{tb:compare}. For instance, RNNs, particularly LSTM and GRU, incorporate activation functions such as Tanh and Sigmoid in their internal architecture, which are unsupported by prior works. RNNs have five types of architecture depending on the network's input-output. Moreover, RNN includes a loop structure to process sequence data effectively. These differences render prior approaches inapplicable to RNNs. Therefore, in this work, we ask: can we identify the RNN model parts responsible for each task and decompose them into modules? Doing so would allow us to (a) build a new problem or (b) replace existing model functionality. In both cases, this type of reuse removes the need for additional data and training. To that end, we propose an approach for decomposing RNNs into modules. A key innovation in our work is handling the loop in \text{RNN}\xspace in both time insensitive and sensitive manner. Inspired by prior works on understanding loops in SE~\cite{dongarra1979unrolling, weiss1987study, davidson1995improving}, we propose to identify nodes and edges responsible for each output class - (a) over all the iterations of the loop (\textit{rolled}\xspace) and (b) individually, for each iteration in the loop (\textit{unrolled}\xspace). \textit{Unrolled}-variant is aware of the time dimension of the model, while \textit{rolled}\xspace is not. Second, to handle different RNN architectures, we identify the concern (i.e., parts of the network responsible for classifying an output label) and untangle each output timestep at a time. In prior works, each concern is identified and untangled separately; this does not apply to models that produce many outputs. Third, we support models built using logistic activation functions, i.e., Tanh, Sigmoid, etc., which are commonly used in RNN~\cite{cho2014properties,hochreiter1997long,lipton2015critical}. In addition, we propose a decomposition approach assuming \textit{ReLU}\xspace activation as well. To evaluate our approach, we apply it to five different input-output (I/O) architecture types. Moreover, we evaluate different RNN-variants (LSTM, GRU, Vanilla) for each architecture. To that end, we utilize Math QA~\cite{amini2019mathqa}, Brown Corpus~\cite{francis1967computational}, Wiki-toxicity~\cite{wulczyn2017ex}, Clinc OOS~\cite{larsonetal2019evaluation}, and Tatoeba~\cite{TIEDEMANN12.463} datasets for training models in different setups, and decompose them. In total, our benchmark consists of 60 models, i.e., 4 (\# models) * 3 (\# RNN-variants) * 5 (\# I/O architectures). In this work, we use the terms ``RNN'' or ``recurrent model'' interchangeably to refer to three RNN-variants collectively. \textit{Key Results:} To evaluate our approach, first, we measure the cost of decomposition by comparing the accuracy of the model composed using decomposed modules and the monolithic model from which the modules are decomposed. We found that the loss of accuracy is trivial (Avg.:-0.6\%, median: -0.24\%). For language translation models, there is a slight gain in performance (Avg.: +0.10\%, median: +0.01\%), measured in BLEU score~\cite{papineni2002bleu}. We also find that the decomposition of models producing more than one output must be time-sensitive or aware of what output appears at what time. Second, we evaluated our approach to reusing and replacing the decomposed modules to build various new problems. We compared the accuracy of the models composed using decomposed modules with monolithic ones, trained from scratch. When reusing and replacing, we found that the performance change is (accuracy: -2.38\%, BLEU: +4.40\%) and (accuracy: -7.16\%, BLEU: +0.98\%), on average, respectively. \textbf{All the results and code for replication is available here~\cite{rnnrep}.} The key contributions of this work are as follows: \begin{itemize} \item We propose an approach to decompose an RNN model. \item Our proposed approach is applicable for all five types of I/O architectures. \item We propose two variants to support loops in RNN. \item Our approach supports both logistic and \textit{ReLU}\xspace activation and all 3 RNNs, i.e., Vanilla, LSTM, and GRU. \item We show that our approach can reuse and replace the modules to build new problems without retraining. \end{itemize} \section{Approach} \label{sec:approach} In this paper, we propose a decomposition technique for recurrent models, where a binary module is produced for each output label. Figure~\ref{fig:overviewMany} shows the overall approach. It starts with a trained model and produces decomposed modules. We propose two variants (\textit{rolled}\xspace and \textit{unrolled}\xspace) to that end. Each variant uses a different strategy to handle the loops in the RNN architecture. Like prior work~\cite{pan2020decomposing, pan2022decomposing}, broadly, the process of RNN decomposition has three steps -- Concern Identification (CI), Tangling Identification (TI), and Concern Modularization (CM). First, CI identifies the model parts contributing to a concern (an output class). After CI, a model can mostly recognize the target output class. Therefore, TI aims to add/update some parts responsible for negative output classes. Lastly, CM modularizes the concerns and creates a module that can recognize a single output class. Next, we describe technical challenges first, then each step in detail. \subsection{Challenge} \label{subsec:challenge} \input{challenge.tex} \subsection{Concern Identification} \label{subsec:ci} \input{CI.tex} \subsection{Tangling Identification} \label{subsec:ti} \input{TI.tex} \subsection{Concern Modularization} \label{subsec:cm} \input{CM.tex} \section{Acknowledgement} This work was supported in part by US NSF grants CNS-21-20448 and CCF-19-34884. We want to thank the reviewers for their valuable and insightful comments. The views expressed in this work are solely those of the authors and do not reflect the opinions of the sponsors. \balance \bibliographystyle{IEEEtranN} \subsubsection{Recreating Motivating Examples} \label{subsubsec:motivate} Here, we evaluate the scenarios discussed in the \S\ref{sec:motivation}. For the first use case, a new language needs to be added to an existing model. We created a model with the languages from the motivating example (i.e., English, French, German, and Italian). Then, we decompose it to create modules. We train another model with the Ukrainian language as one of the target languages and decompose it too. Next, we compose the modules from the original model with the module that translates English to Ukrainian. In the second approach, we train a new model that translates only English to Ukrainian and uses it as a module. Lastly, we compose it with the previously decomposed modules. We found that both approaches can address the problem. However, the average BLEU score of modules is slightly less than that of the monolithic model for the first approach (see Table~\ref{tb:motivating}). Here, we only report the results for LSTM models. Results for other models are similar and included in the replication package~\cite{rnnrep}. For the second scenario, we replace the module from a model that performs badly with a module decomposed from a model that performs better. We build a model that translates the Estonian language into English, Italian, and German. We decompose the model into modules and replace the Estonian with the English module with two approaches described in the examples. We found that both approaches perform better than the trained model from scratch. \begin{table}[htbp] \setlength{\belowcaptionskip}{.01cm} \centering \scriptsize \setlength\tabcolsep{1pt} \caption{Motivating Scenarios (Results for LSTM models)} \begin{tabular}{|l|r|r|r|} \hline \multicolumn{1}{|c|}{\textbf{Scenario}} & \multicolumn{1}{c|}{\textbf{TMA}} & \multicolumn{1}{c|}{\textbf{MA1}} & \multicolumn{1}{c|}{\textbf{MA2}} \\ \hline \hline Add Ukranian Language & 32.12\% & 31.94\% & \textbf{32.53\%}\\ \hline Update Estonian-English Translation & 20.80\% & \textbf{20.89\%} & \textbf{21.30\%} \\ \hline \end{tabular}% \label{tb:motivating}\\ \vspace{1pt} * MA\{X\}, TMA: Avg. BLEU score for scenario X and trained model. \end{table}% \section{Motivating Examples} \label{sec:motivation} In this section, we show two examples of using RNN models and how decomposing them into modules could help. The RNN models are used for multilingual language translation. Note that it is preferably performed in a multilingual setup to improve the overall performance of the translation task~\cite{fan2021beyond,chollet2021deep}. \figref{fig:motivation} shows two examples in which decomposition can assist developers when building RNN models for translation. \textbf{Adding a new language to the European Union system.} \begin{figure*}[] \centering \includegraphics[width=\linewidth, trim=0cm 0cm 0cm 0cm]{figures/overviewDiagram.pdf} \vspace{-15pt} \caption{High-level overview of our approach.} \label{fig:overviewMany} \end{figure*} To introduce a new input (new language) to an existing RNN model, it must be trained from scratch. For instance, recently, the European Commission (EC) presented a new requirement to support the translation of languages that are not part of the European Union (EU)~\cite{multilingual, ukraine}. It needs to be retrained to support the additional language. This process is expensive and time-consuming as developers must preprocess the data and train a model. \figref{fig:motivation} on the top right section shows how decomposition could help in this regard. Here, we have a monolithic model that translates an input in English into French, Italian, and German. Traditionally, a new model needs to be trained by adding new examples to the existing dataset to add the translation of English to the Ukrainian language. In contrast, using our approach, one can take the existing trained model and decompose it into modules, in which each module is responsible for translating English to another non-English language. Then, find a different multi-lingual model trained to translate multiple languages, including English to Ukrainian, and decompose it. Next, take the module responsible for translating English to Ukrainian and compose it with the existing model's modules. Moreover, one can also train a small model that only supports English to Ukrainian translation. Then, compose it with the decomposed modules from the existing model. In both cases, training the large model can be avoided. The choice of approach depends on the available resources and module(s). \textbf{Altering a part of a trained model.} Like any software system, neural network models can exhibit faulty behavior. For instance, in Estonian, ``ta on arst'' means ``She is a doctor'' in English. However, since Estonian is a gender-inclusive language, when we used the Google translator~\cite{google}, the output was ``He is a doctor'', which is incorrect and gender-biased. In such scenarios, the European Language Resource Coordination (ELRC) is set to actively enhances the multilingual translation services of EU languages~\cite{multilingual}. The most common approach to updating existing models is two-pronged: 1) introducing new examples to improve the faulty data, and 2) retraining the whole model. However, this approach can be resource-intensive because of the retraining. In contrast, using our approach, one can handle the same problem in two different ways (\figref{fig:motivation} bottom right part). In the first approach, we decompose the existing trained model into modules. Then, we remove the Estonian to English translation module. Lastly, we use decomposition to select a replacement from a non-biased Estonian to English model. We retrain a small model using an improved dataset in the second approach. Then we compose it with the previously decomposed modules. In both cases, retraining the large model can be avoided. Thus, saving computational resources and hardware costs. \section{Related works} \label{sec: related} In the SE community, a vast body of work in software decomposition~\cite{parnas1972criteria, liskov1974programming, parnas1976design, dijkstra1982role, cardelli1997program} exists. The notion of modularity exists in the ML community too~\cite{andreas2016neural, hu2017learning, hinton2000learning, sabour2017dynamic, ghazi2019recursive}, however, to address different issues than what this work aims to deliver. They eventually produce a monolithic model in the sense that it does not enable fine-grained reuse. Many studies reuse a DNN model to solve a software engineering task~\cite{gao2021automating, chai2022cross, lin2021traceability}. Transfer learning is a common technique to reuse the knowledge and structure of a trained model~\cite{ pratt1991direct, zhang2020adapnet}. However, retraining and modification are required when applying transfer learning to a different task. Moreover, replacing the model's logic cannot be achieved by transfer learning. Along this line, the closest work was introduced by \citeauthor{pan2022decomposing}~\cite{pan2020decomposing, pan2022decomposing}. They propose an approach to decompose an FCNN and CNN multi-class model into modules, which can be (re)used with other module(s) or be replaced by other modules to solve various problems. \citeauthor{sairam2018hsd}~\cite{sairam2018hsd} identified sections of a trained CNN model to reuse when the target problem requires a set of output classes, i.e., the subset of the original model. In contrast, our decomposed modules can be reused and replaced with modules originating from the same and different datasets. While these works introduce the notion of decomposition in various DL models, they cannot be directly applied to RNNs for the following reasons: (a) loops in the architectures, (b) logistic activations, and (c) different I/O modes. In contrast, our work addresses these novel technical challenges and proposes an approach to decompose RNN models into modules. \section{Evaluation} \label{sec:evaluation} This section describes the experimental setup and evaluates our approach using three research questions. \subsection{Experimental Setups} \label{subsec:setup} \subsubsection{Datasets} We perform our experiment on five widely used datasets for text-based sequential problems. Each dataset is used to train different types of RNN models. \textbf{MathQA~\cite{amini2019mathqa}:} This dataset contains a series of mathematical questions. Each question has a particular tag (e.g., geometry, physics, probability, etc.). Also, the dataset has a total of 6 output classes. \textbf{Wiki-toxicity~\cite{wulczyn2017ex}:} This dataset contains Wikipedia pages' comments. Each comment is annotated with seven toxicity labels (e.g., toxic, severe toxicity, obscene, threat, insult, etc.). \textbf{Clinc OOS~\cite{larsonetal2019evaluation}:} In NLP, intent classification is a well-known problem in which an input text is categorized based on a user's needs. This dataset has ten output classes. \textbf{Brown Corpus~\cite{francis1967computational}:} It contains English linguistic data. Each word is annotated with a part-of-speech tag from 12 different tags. \input{rq2intra} \input{rq2inter} \textbf{Tatoeba~\cite{TIEDEMANN12.463}:} This dataset contains sentences in more than 400 languages. Each sentence in English is translated into other languages. Thus, the dataset is especially used for multilingual evaluation~\cite{ruder-etal-2021-xtreme,artetxe2019massively,fan2021beyond}. We selected English, Italian, German, and French languages as they have the richest (\# of training data) corpus. \subsubsection{Models} For every RNN variant, we built four models for each of the five I/O architectures. Specifically, we used 1, 2, 3, and 4 RNN layers to build models and named them RNN-$<$no. of RNN layers$>$ (RNN refers to either of LSTM, GRU, or Vanilla). The structure of the models has been inspired by prior works~\cite{pan2020decomposing}. Moreover, the data pre-processing and architecture of the language models are based on a real-world example~\cite{chollet2021deep}. In model architecture, we use a combination of 8 different Keras layers; (a)~\texttt{Embedding} represents words as a fixed-length high-dimensional vector, (b)~\texttt{RepeatVector} repeats the input n times, (c)~\texttt{Flatten} converts a multidimensional input into a single dimension, (d)~\texttt{SimpleRNN} is the vanilla RNN layer, (e)~\texttt{LSTM}, (f)~\texttt{GRU}, (g)~\texttt{Masking} ignores the padded inputs, and (h)~\texttt{TimeDistributed} applies the same layer across timesteps. \subsubsection{Evaluation metrics} To evaluate, we use three metrics. \textbf{Accuracy.} For comparing the trained model with the modules, we use testing accuracy as one of the metrics. We interchangeably use the trained model accuracy (TMA), monolithic model accuracy (MMA), etc. For the modules, we use a voting-based approach (similar to~\cite{pan2020decomposing, pan2022decomposing}) to compute the composed accuracy. All modules in a problem receive the same input, with a joint decision computed at the end. We use the following terminologies interchangeably -- composed model accuracy (CMA) and module accuracy (MA). \textbf{BLEU Score~\cite{papineni2002bleu}.} For language translations, we use the BLEU score as it is widely applied~\cite{sutskever2014sequence,lin2004rouge}. \textbf{Jaccard Index.~\cite{pan2020decomposing}} We compute the Jaccard index (JI) to measure the similarity of the model and the modules. \subsection{Results} In this section, we present the results and discuss them briefly. We evaluated the decomposition on 60 models (20 for each RNN variant). Moreover, we repeat the experiments in both \textit{rolled}\xspace, and \textit{unrolled}\xspace modes. Due to space limitations, we only present a summary of the results (detailed results can be found here~\cite{rnnrep}). Moreover, for gated RNN variants, we repeat all experiments in two proposed approaches for decomposing gates in \S~\ref{subsec:suplog}. We found that the decomposition cost of both approaches is comparable, and only results from the second approach are presented here. \label{subsec:result} \input{rq1.tex} \input{rq2.tex} \input{rq3.tex} \input{motivatingResult.tex} \paragraph{Summary} We found that decomposing trained RNN models into modules has a trivial cost (accuracy: -0.6\% and BLEU score: +0.10\%). Also, these decomposed modules can be reused (accuracy: -2.38\%, BLEU: +4.40\%) and replaced (accuracy: -7.16\%, BLEU: +0.98\%) in various scenarios. \subsubsection{RQ1: Does decomposing RNN model into modules incur cost? } \input{rq1table.tex} In this research question, we evaluate the cost of decomposition in 60 scenarios. To that end, we determine the quality of the decomposition and composition approaches. First, we decompose a trained RNN model into modules. Each module receives the same input and recognizes an output class. Next, we use the modules to compose a new model using a voting-based approach. The modules' decisions are combined into one that matches the output type. For example, the final decision is a single output class for \{one, many\}-to-one. Whereas, for \{one, many\}-to-many, the final decision will be a list of output classes. Then we compare the composed accuracy with the monolithic one. We apply the \textit{rolled}\xspace and \textit{unrolled}\xspace-variants to decompose the 60 models, and the decomposition cost is depicted in Table~\ref{tab:rq1} in terms of accuracy difference, $\delta=CMA-MMA$. In the \textit{rolled}\xspace-variant, we identify the concern for all the timesteps at once. For the \textit{unrolled}\xspace-variant, we check the concerns for each timestep separately after unrolling loops in the RNN model. We evaluate the \textit{unrolled}\xspace-variant with the \textit{M:1}, \textit{1:N}, and \textit{M:N} architectures. The unrolled-variant does not apply to the \textit{1:1} architecture as it does not contain loops. We found an average loss of 25.8\% (median: -2.04\%) accuracy for the \textit{rolled}\xspace-variant. In contrast, the average accuracy loss is 0.74\% (median: -0.44\%) for the \textit{unrolled}\xspace one. Moreover, in 31.25\% scenarios, CMA remains the same or improves (considering \textit{rolled}\xspace mode for \textit{1:1} and \textit{unrolled}\xspace for others). For the \textit{rolled}\xspace-variant, the bulk of the accuracy losses come from the many-output models, while the differences in the one-output model are trivial (Table~\ref{tab:rq1}). In \textit{rolled}\xspace mode, the average accuracy loss for one-output models is -0.7\%, while it is -50.87\% for many-output models. However, in \textit{unrolled}\xspace mode, decomposition quality for both one and many-output models are comparable (avg. loss for one-output: -0.2\% and for many-output: -1.02\%). This is because \textit{rolled}\xspace-variant is insensitive to timestep, therefore, more likely to lose output-related contextual information at a timestep. In other words, timestep-specific output sensitivity is lost in \textit{rolled}\xspace-variant. Many-output models, where each timestep has an output, require that concern is identified for that output based on what is observed in that timestep, which \textit{unrolled}\xspace-variant does. On the other hand, one-output models only rely on the hidden state of the final \text{RNN}\xspace cell, requiring no output sensitivity for different timesteps. Therefore, we recommend \textit{unrolled}\xspace-variant for many-output models, particularly where each timestep-output is subject to decomposition. For language models, we compute the BLEU score for each pair of languages. This score measures their translation quality~\cite{papineni2002bleu}. We found an average gain of 0.10\% (median: +0.01\%) for the \textit{rolled}\xspace-variant in the BLEU score. While, in \textit{unrolled}\xspace mode, the average BLEU score loss is -0.2\% (median: -0.25\%). Based on the argument by~\cite{bleu}, such a change in the BLEU score does not affect the quality of the translation. Furthermore, for 52.8\% cases in \textit{rolled}\xspace mode, the composed model's BLEU score remains the same or improves compared to the original one. \textbf{Similarity:} Apart from the cost, we also measure the structural similarity (in terms of learned parameters) between the monolithic model and module to assess the effectiveness of decomposition. A high similarity indicates an ineffective decomposition approach, creating modules replicating the original model. To evaluate the variability among modules and models, we compute Jaccard Index (JI). We found that, on average, the \textit{JI} value for the rolled-based approach is 0.82, and for the unrolled one is 0.83. This result shows that the modules are significantly different from the parent models. Overall, we found that the RNN model can be decomposed into modules at a very small cost. Also, the decomposed modules are significantly different from the original model. \subsubsection{RQ2: Can Decomposed Modules be Reused to Create a New Problem?} In this RQ, we reuse the decomposed modules. Our evaluation focuses on two reusability cases: a) (re)use the modules within the same input-output (I/O) type, and b) from a different type, to create a new problem. We perform these experiments separately for three RNN variants (LSTM, GRU, and Vanilla). Next, we discuss the results from each case. \input{rq2table.tex} \textbf{Intra RNN Type Reuse.} To evaluate this reuse type, we take modules from the same I/O type of RNN. To do so, we use the dataset available in our benchmark. We take two modules, compose them, and evaluate the accuracy of the composed models. Additionally, we train a model with the same model architecture of the modules with examples of the dominant classes of the modules. For example, consider the case of intra-reuse for a \textit{M:1} \textit{GRU} model trained on the Clinc OOS dataset. In this case, consider the two output toxicity levels: \textit{severe} and \textit{threat}. First, a model is trained from scratch using inputs of these two labels alone to reuse them. Then, we take corresponding modules from a previously decomposed model with all labels and compare their composed accuracy with that of the trained one newly. We take 2 modules from each trained model and build a sub-problem. The total possible combinations for taking 2 modules from a model trained with a dataset having $N$ output classes are $N \choose 2$. Our benchmark has 6, 7, 10, and 12 output classes in the datasets used to train the models for \textit{1:1}, \textit{1:N}, \textit{M:1}, and \textit{M:N} (traditional) architectures, respectively. So, the total possible combinations can be 152 ($6 \choose 2$ + $7 \choose 2$ + $10 \choose 2$ + $12 \choose 2$). For each case, we train a model from scratch using two labels. Then, to get composed accuracy from reused modules, we consider the modules decomposed from RNN-4 (one with the highest number of layers), similar to prior work~\cite{pan2020decomposing}. Then, we compare their accuracies to understand the effectiveness of intra-reuse. We found that for \textit{1:1}, \textit{1:N}, \textit{M:1}, and \textit{M:N} (traditional), the change of accuracy is -0.05\% (median 0\%), -2.44\% (median -0.17\%), -0.69\% (median -0.56\%), and -0.02\% (median 0\%), respectively. In Table~\ref{tab:rq2}, we report the results. Overall, there is a slight loss (mean: -0.58\%, median: -0.11\%) of accuracy when modules are reused. We also perform a similar evaluation for language translation modules. Since there are 3 modules produced from the trained model, taking 2 modules at a time can create 3 possible scenarios. We also train a multi-lingual model that takes English sentences as input and converts it into the 2 chosen non-English languages. We report the results in Table~\ref{tab:rq2}. We found that there is an average gain of 4.40\% BLEU score (median: +2.66\%) for each language pair. \textbf{Inter RNN Type Reuse.} We use modules from different I/O architecture types to evaluate this reuse type to build a new problem. However, to compose the modules, all of them should be able to process similar input types. For instance, assume taking a module from an RNN model that receives one input (1-to-\{1, N\}) and reusing it with a module from a model that receives several inputs at a time (M-to-\{1, N\}). This composition would not work because the two modules do not satisfy the same input constraints. For that, we evaluate in two different settings. First, \textbf{1-to-\{1, N\}}, in which we take one module decomposed from a \textit{1:1} model and another from a \textit{1:N} model. Then we compose them together to form a model. Second, \textbf{M-to-\{1, N\}}, in which we take one module decomposed from the \textit{M:1} model and another from \textit{M:N} (traditional) model. The encoder-decoder architecture prevents model reuse with other I/O types for language-translation models. However, such modules can be reused if decomposed from different datasets. We discuss such an experiment in \S\ref{subsubsec:motivate}, when we recreate the motivation scenario and show the possibilities of solving the problem. We found that for the former scenario (1-to-\{1, N\}), there is an -6.22\% (median -2.95\%) loss of accuracy, on average. Whereas, for the latter scenario (M-to-\{1, N\}), the loss is, on average, -3.25\% (median -2.20\%). \subsubsection{RQ3: Can Decomposed Modules be Replaced?} This RQ investigates how to replace a decomposed module with another one. Similar to RQ2, we evaluate two different scenarios--(a) replacing a module with another performing the same operation within the same I/O type and (b) between different I/O types (in our case, different datasets too). We perform these experiments for different RNN-variants separately. We discuss each scenario in the following paragraphs. \input{rq3table.tex} \textbf{Intra RNN Type Replacement.} Here, a module is replaced with another one performing the same operation. The rationale of this experiment is to investigate how decomposition can help fix faulty models (e.g., low accuracy). To that end, we take the model with the lowest performance score. Then, we replace a module with one decomposed from the model with the highest accuracy in that category. For instance, consider the case of intra-replace for \textit{1:1} \textit{LSTM} models trained on the Math QA dataset. In this case, LSTM-1 performs best and worst for LSTM-4. Therefore, we replace a module from LSTM-4 with one decomposed from LSTM-1. Then, we compute the accuracy of the composed model. Table~\ref{tab:rq3} shows the result of the experiments for all types of RNN models. We found that for a model trained with (\textit{1:1}, Math QA), (\textit{M:1}, Clinc OOS), (\textit{1:N}, Toxic comment), and (\textit{M:N}, Brown corpus) architecture-dataset pair, the average change of accuracy is +0.07\% (median +0.25\%), -1.03\% (median -0.42\%), -1.07\% (median -0.27\%), and -2.66\% (median -2.90\%), respectively. For the \textit{M:N} encoder-decoder architecture, we replace the modules from the lowest average BLEU score model with the highest. As a result, we observed a 0.98\% increase in the BLEU score compared to the monolithic model's BLEU score. \textbf{Inter RNN Type Replacement.} Here, we replace a module with another one between different I/O types. We use the resulting composed model to perform different tasks. For instance, we replace a module from a model with a \textit{1:1} architecture with one from a \textit{1:N} model. Similar to the RQ2, the replaced module must accept a similar input type. For this reason, we perform two different experiments. First, for \textbf{1-to-\{1, N\}} architectures, we replace a module decomposed from \textit{1:1} with one from an RNN model using the \textit{1:N} architecture. Second, for the \textbf{M-to-\{1, N\}}, we replace a module decomposed from a \textit{M:1} with a module from an RNN model with \textit{M:N} architecture (traditional). Like RQ2, for \textit{M:N} encoder-decoder architecture, we cannot perform the inter-RNN type replaceability due to the difference in the I/O architecture. We found that for the 1-to-\{1, N\} replaceability, there is an average -4.64\% (median -3.85\%) accuracy loss. Whereas for M-to-\{1, N\} replaceability, the loss is -9.81\% (median -11.49\%) (Table~\ref{tab:rq3}). Overall, the loss is -8.47\% (median -10.79\%) for the inter-model type replaceability. \section{Threats to validity} \label{sec:threat} \textbf{Internal threat:} An internal threat can be the trained models. To mitigate, we follow prior works~\cite{pan2020decomposing,pan2022decomposing,sutskever2014sequence} to build the model (details in \S-V.A). Another threat can arise from the stochastic nature of DL. To mitigate, in RQ1, each task is evaluated on four different model architectures, and in RQ2 and RQ3, every combination is exhaustively evaluated. \textbf{External threat:} An external threat can be the experimental datasets. To mitigate this, we chose canonical datasets already used in the literature~\cite{amini2019mathqa,francis1967computational,wulczyn2017ex,larsonetal2019evaluation,chollet2021deep}. These datasets have a rich corpus and are adequately diverse to allow evaluation of our technique in different practical usage of NLP, i.e., single-output, multi-output, and generation (language translation).
{ "redpajama_set_name": "RedPajamaArXiv" }
5,419
Senator Moran Applauds Deal to Pass Landmark Veteran Mental Health & Suicide Prevention Legislation WASHINGTON – U.S. Senator Jerry Moran (R-Kan.) – chairman of the Senate Veterans' Affairs Committee (SVAC) – today spoke on the Senate floor regarding the agreement with House Veterans' Affairs Committee Chairman Mark Takano (D-Calif.) to pass landmark mental health and suicide prevention legislation in both the House and the Senate. The House is scheduled to pass S. 785, the Commander John Scott Hannon Veterans Mental Health Care Improvement Act, and H.R. 8247, the Veterans' COMPACT Act tomorrow afternoon. S. 785 passed the Senate unanimously on August 5, and there is a bipartisan agreement to pass H.R. 8247 when it is sent to the Senate. "I want to thank my colleague Sen. Tester, Ranking Member of the Senate Veterans' Affairs Committee, Chairman Takano and Dr. Roe, our counterparts on the House Veterans' Affairs Committee, for working expeditiously with me to reach an agreement to pass this comprehensive mental health and suicide prevention bill for America's veterans," said Chairman Moran. "One veteran lost to suicide is one too many, and it's a national tragedy that we continue to lose 20 veterans each day to suicide. I'm glad that Congress has come together to do our part and ensure this bill that will save lives, is passed without delay and signed into law." This legislation passed out of the Senate Veterans' Affairs Committee on January 29 and unanimously out of the Senate on August 5. Click HERE to view Sen. Moran's full remarks.
{ "redpajama_set_name": "RedPajamaCommonCrawl" }
4,856
\section{\label{sec:introduction} Introduction} Galaxy evolution in the cosmological context is an important topic of modern astrophysics. In particular, processes that drive star formation and gas accretion within galaxies are not well understood. Observational constraints from deep surveys should provide insights for solving this complex problem. Obtaining accurate star formation rate (SFR) estimates for statistically significant samples of galaxies is thus particularly important. In deep photometric surveys, the rest-frame far-ultraviolet (hereafter UV) continuum emitted by blue, young and massive stars is a good probe of the SFR. Unfortunately, dust in star-forming regions absorbs a large fraction of the UV photons and reprocesses them into mid- and far-infrared (hereafter IR) emissions. The fraction of escaping UV photons can be estimated by computing the ratio between the IR and UV luminosity density ($\rm LD_{IR}/\rm LD_{UV} $), which are estimated integrating the UV \citep[e.g.][]{Arnouts2005,Cucciati2012} and IR \citep[e.g.][]{Le_Floch2005,Rodighiero2010,Magnelli2009,Casey2012,Gruppioni2013} luminosity functions. This quantity evolves from $\sim 60 \%$ in the local Universe up to $\sim 90 \%$ at $\rm z \sim 1.5$ \citep[e.g.][]{Takeuchi2005,Burgarella2013}.\\ To measure the SFR in galaxies, it is thus crucial to estimate accurately the fraction of UV light reprocessed by dust. The easiest method is to measure both unabsorbed UV and reprocessed IR emissions to trace the full intrinsic UV light emitted by young stars. Nevertheless, even the deepest and most recent IR surveys (e.g. \textit{Herschel}) are limited by the confusion phenomenon \citep{Dole2004,Nguyen2010} and the low sensitivity of the detectors as compared to the optical regime. Indeed, the majority of high redshift UV galaxies cannot be detected in IR. For these IR-undetected galaxies, the correction for dust attenuation has to be estimated using UV and optical data only. For instance, \cite{Meurer1999} proposed a relation, which links the attenuation to the UV continuum slope, calibrated using observations in the local Universe. This relation was tested up to $\rm z \sim 2$ \citep[e.g.][]{Buat2005,Reddy2010,Heinis2013a}. However, such analyses are either based on samples detected in both IR and UV, which could introduce a selection bias, or based on stacking analyses \citep{Reddy2010,Heinis2013a}, which does not allow to measure the scatter. Furthermore, the \cite{Meurer1999} relation may also be subject to aperture effects \citep{Overzier2011,Takeuchi2012}. The understanding of selection effects caused by the limited depth of IR observations and the very different dust attenuation observed in galaxies is thus crucial to estimate accurately the star formation rate density in the high redshift Universe.\\ These selection effects can be studied using phenomenological models. In particular, the 2SFM (2 star-formation modes, \citealt{Sargent2012,Bethermin2012c}) model was motivated by the finding of a strong correlation between the SFR and the stellar mass (M) of star-forming galaxies, called main sequence (MS), which evolves with redshift in normalisation \citep[e.g.][]{Noeske2007,Elbaz2007,Daddi2007}. This strong correlation suggests that the bulk of the stars are formed in galaxies following secular processes. \cite{Sargent2012} showed that the IR luminosity function can be reproduced well by adding to the MS a minor population ($\sim$3 \% of the whole population) of starburst (SB) that display a strong excess of SFR compared to the main sequence. This population is thought to have SFR driven by short-lasting, extreme events such as major mergers (\citealp{Elbaz2007,Tacconi2008,Elbaz2011,Daddi2010a, Genzel2010}). \cite{Bethermin2012c} show that galaxy number counts from the mid-infrared (MIR) to the radio can be reproduced considering distinct spectral energy distributions (SED) for MS and SB galaxies. Using a method based on abundance matching, \cite{Bethermin2013} have also shown that the 2SFM model efficiently predicts the large-scale fluctuations of the cosmic IR background produced by dusty, star forming galaxies, thereby probing the link between IR galaxies and dark matter halos. This modelling approach is thus very efficient for reproducing and interpreting IR observables. As \cite{Sargent2012} did not consider the unobscured component of SFR emitted in the UV by star forming galaxies, we propose in this paper to extend the model to the UV.\\ Our extension to UV emission requires a well-constrained prescription for how the intrinsic UV light emitted by young stars is redistributed between the unattenuated UV escaping from galaxies and the IR reprocessed by dust. Here we use the link between the stellar mass and the IR excess (IRX, defined as log(L$_{\rm IR}$/L$_{\rm UV}$), where L$_{\rm IR}$ and L$_{\rm UV}$ are respectively the IR and UV luminosities) found by several observational studies (\citealt{Pannella2009,Heinis2013b}; Pannella et al. in prep.). We note that we could also have used the relation between IRX and SFR. However, this relation is more difficult to measure in an unbiased and consistent way, because SFR estimates require, at least, UV flux measurements, and corrections for dust attenuation. The trends observed on samples detected in both UV and IR are less clear and have a large scatter \citep[e.g.][]{Buat2012}. In this paper, we show that an IRX-M relation based on the stacking analysis of \cite{Heinis2013b}, after addition of a dispersion, is capable of reproducing the statistical properties of UV galaxies.\\ In Sect.\,\ref{sect:moddescr} we describe the construction of our empirical model. In Sect.\,\ref{sect:lumfct}, we present our predictions for UV and IR luminosity function evolution and compare these with observations. In Sect.\,\ref{sect:irpropuv} we use our model to interpret key IR properties of UV-selected populations. In Sect.\,\ref{sect:pred} we present additional predictions of our model and discuss the UV-detectability of ALMA sources. We conclude in Sect\,\ref{sect:conc}.\\ In this paper, we assume a WMAP-7-year cosmology \citep{Larson2010} and a \cite{Salpeter1955} initial mass function (IMF), converting from a \cite{Chabrier2003} IMF where necessary. \begin{table*} \centering \begin{tabular}{c c c} \hline \hline Parameter & Description & Value $\pm$ Error \\ \hline \multicolumn{3}{c} {Distribution of sSFR \citep{Sargent2012, Bethermin2012c}}\\ \hline $\rm sSFR_{MS,0}$ & sSFR on the MS at z = 0 and M = $10^{11} \rm M_{\odot}$ (in $\log(\rm yr^{-1} )$) & $-10.2 \pm 0.1$\\ $\beta_{MS}$ & Slope of the $\rm sSFR-\rm M^{*}$ relation at a given redshift & $-0.2\pm 0.04$ \\ $\gamma_{MS}$ & Evolution of the normalisation of the MS with redshift & $3\pm 0.2$\\ $\sigma_{MS}$ & Width of the MS log-normal distribution (in dex) & $0.15 \pm 0.003$ \\ $\rm r_{SB_0}$ & Relative amplitude of SB log-normal distribution compared to MS & $0.012 \pm 0.003$\\ $\sigma_{SB}$ & Width of the SB log-normal distribution (in dex) & $0.20 \pm 0.07$ \\ $\rm B_{SB}$ & Boost of specific star formation rate in SB (in dex) & $0.6 \pm 0.07$\\ \hline \multicolumn{3}{c} {Attenuation relation $\rm IRX=\alpha \log{M}+\rm IRX_{0}$ \citep{Heinis2013b}}\\ \hline $\alpha$ & Slope of the $\rm IRX-\rm M^{*}$ relation & $0.71\pm 0.21$\\ $\rm IRX_{0}$ & Normalisation of the $\rm IRX-\rm M^{*}$ relation & $1.32 \pm 0.11$\,dex\\ \hline \multicolumn{3}{c} {Mass function \citep{Ilbert2013}}\\ \hline \multicolumn{3}{c} {All parameters and errors required to evaluate eq. \ref{eq:massdistrib} are listed in Table 2 of \cite{Ilbert2013}, converted to a Salpeter IMF}\\ \hline \end{tabular} \centering\caption{Central values and uncertainties on the parameters used in our model. These values come from previous works of \citealt{Bethermin2012c}, \citealt{Sargent2012}, \citealt{Heinis2013b}, and \citealt{Ilbert2013}.} \label{tab:error} \end{table*} \section {Model description} \label{sect:moddescr} Our model is based on empirical relations derived from recent observational studies. We use the following steps to derive the evolution of the statistical UV and IR properties of galaxies with cosmic time: \begin{itemize} \item Our analysis is based on the observed mass functions of \cite{Ilbert2013} which allow us to fix the number of galaxies with a certain stellar mass in a given cosmological volume (Sect.\,\ref{sect:mf}); \item We then assume a SFR-M relation and a scatter around it following \citet{Sargent2012} to stochastically assign a SFR to each galaxy (Sect.\,\ref{sect:sfr}); \item Finally we apply the observed IRX-M relation of \cite{Heinis2013b} to predict the relative fraction of UV light that escapes star-forming galaxies and that is reprocessed by dust, respectively (Sect.\,\ref{sect:irxm}); \item Additional refinements to the model, e.g. the special treatment of the dust-attenuation in starbursts and the evolution of the IRX-M relation at z$<$1, are described in Sect.\,\ref{subsec:refinements}. \end{itemize} \subsection{Mass function} \label{sect:mf} As our starting point we use the mass functions of star-forming galaxies at different redshifts (0$<$z$<$4) to predict their expected number per comoving volume in various mass and redshift bins. Our analysis thus neglects the passive galaxy population. The version of the 2SFM model used by previous analyses was based on the evolving mass functions of \cite{Ilbert2010} which cover the redshift range of $z\lesssim2$. These have now been extended to $z\sim4$ by \cite{Ilbert2013}. As such we use the full range of mass functions of this latter study, i.e., $0.2<z<4$. As well as extending to higher redshifts, \cite{Ilbert2013} also found steeper low mass tails at all redshifts, implying greater numbers of low mass galaxies per comoving volume. The parametric form of this mass function, as presented in \cite{Ilbert2013} and implemented in this model version, is given by:\\ \begin{equation} \begin{split} \phi(\rm M) ~\rm dlog(M)=\exp \left (-\frac{\rm M}{\rm M^{*}} \right )~ \left [\phi^{*}_1\left (\frac{\rm M}{\rm M^{*}} \right)^{\alpha_1}+\phi^{*}_2 \left (\frac{\rm M}{\rm M^{*}} \right)^{\alpha_2} \right ]\\ \times \left (\frac{\rm M}{\rm M^{*}} \right )\log(10) ~\rm dlog(M), \end{split} \label{eq:massdistrib} \end{equation} \noindent where the values for $M^{*}$ (i.e., the location of the knee of the stellar mass function), $\phi^{*}_1$, $\phi^{*}_2$, $\alpha_1$ and $\alpha_2$ are given in Table 2 of \cite{Ilbert2013} for each redshift slice. Above $z=1.5$, $\phi^{*}_2$ is fixed to 0, thus, equation \ref{eq:massdistrib} becomes a simple Schechter function with parameters $\phi^{*}$ and $\alpha$. For redshifts lower than 0.2, the evolution of the \cite{Ilbert2013} mass-function parameters is extrapolated from the higher-redshift values. We note that our extrapolation is consistent with \cite{Baldry2012} at $z=0.06$ (i.e., the highest redshift of that study). Finally, we note that the redshift bins of \cite{Ilbert2013} are typically too broad for use in our model, leading to discontinuities in the galaxy redshift distributions and over- or under-estimates of source counts at the extremes of each redshift bins. To avoid this, we linearly interpolate their bins onto a finer redshift grid with logarithmic spacing $\Delta{\rm log}(z)$\,=\,0.05. The evolution of the mass function of star-forming galaxies used in our analysis is shown in Fig.\,\ref{fig:moddescr} (upper panel). \subsection{Link between stellar mass and star formation rate} \label{sect:sfr} To derive the specific SFR (sSFR=SFR/M) for the galaxy population described by our chosen mass functions (see above) we use the same parametric representation of the main-sequence as \citet{Bethermin2012c}: \begin{equation} \begin{split} \rm sSFR_{\rm MS}(\rm M,\rm z) = \rm sSFR_{\rm MS,0} \left(\frac{\rm M}{10^{11}\rm M_{\odot}}\right)^{\beta_{\rm MS}}\left(1+\rm min(\rm z,\rm z_{\rm evo})\right)^{\gamma_{\rm MS}}, \end{split} \label{eq:ssfrms} \end{equation} \noindent where $\textrm{sSFR}_{\rm MS}$ is the sSFR of a $10^{11} \rm M_{\odot}$ galaxy lying exactly at the center of the main sequence, log$(\textrm{sSFR}_{\textrm{MS},0}) = -10.2$\,yr$^{-1}$, $\beta_{\rm MS}=-0.2$, $z_{\rm evo} = 2.5$, and $\gamma_{\rm MS}$ = 3. These values are based on observational calibrations as discussed in \citet{Sargent2012} and \citet{Bethermin2012c}. The chosen scenario for the SFR-M relation, described by Eq.\,2 (i.e. a rising power law, following by a plateau beyond z=2.5), is illustrated in Fig\,\ref{fig:moddescr} (central panel). Recent studies (e.g. \citealt{De_Barros2014}) suggest that, once the impact of nebular emission lines on the near-IR photometry (which leads to an overestimate of the stellar mass) is correctly taken into account, sSFRs continue to increase beyond z=2.5. However, the mass functions of \citet{Ilbert2013}, the observational calibration of the sSFR evolution, and the measurements of the IRX-M relation have all been computed neglecting this phenomenon. Since SFRs and IRXs are oberved properties, updating the masses has a proportionnal impact on these relationships, which cancels when we assume these updated masses in our analysis. As such, correcting for nebular emission has no impact on the derived UV and IR galaxy properties.\\ To describe the dispersion around this relation, we used the probability distribution of \cite{Sargent2012} which incorporates both MS and SB galaxies and is based on the empirical results of \cite{Rodighiero2011}. The result of \cite{Sargent2012} was based on a sample of $z\sim2$ star forming galaxies with $M>10^{10}M_{\odot}$, and is parametrized as a double log-normal law decomposed into MS and SB components:\\ \begin{equation} \begin{split} \rm p(\log(\rm sSFR))\propto \exp({-\frac{(\log(\rm sSFR)-\log{\rm (sSFR_{MS})})^2}{2\sigma_{MS}^2}})\\ +\rm r_{SB}\exp({-\frac{(\log(\rm sSFR)-\log{\rm (sSFR_{MS})}-\rm B_{SB})^2}{2\sigma_{SB}^2}}) \end{split} \label{eq:lognormal} \end{equation} \noindent where $\sigma_{MS}$ and $\sigma_{SB}$ are the standard deviations of MS and SB log-normal distributions respectively, ${\rm sSFR_{MS}}$ is the central sSFR value for MS galaxies at $z\sim 2$, $r_{SB}$ is the relative amplitude between SB and MS galaxies and $B_{SB}$ (interpreted as the average sSFR "boost" for SB galaxies in \citealt{Sargent2012}) is the ratio between the sSFR loci of SB and MS galaxies. This is illustrated by Fig.\,\ref{fig:moddescr} (lower panel).\\ As our model incorporates galaxies spanning a wide range of masses and redshifts we must modify the probability distribution of \cite{Sargent2012} to take this into account. For this, we adopt the same assumptions as adopted by \cite{Bethermin2012c} to reproduce IR number counts. To summarise: \begin{itemize} \item $\sigma_{\rm MS} = 0.15$~dex, $\sigma_{\rm SB} = 0.2$~dex, and $\rm B_{\rm SB}=0.6$ are kept constant throughout\footnote{Following \citet{Bethermin2012c}, the measured values of $\sigma_{\rm MS}$ and $\sigma_{\rm SB}$ are corrected for artificial broadening effects, already noted in \cite{Rodighiero2011}, namely (a) cosmological evolution within finite redshift bins, and (b) instrumental noise. $\sigma_{\rm SB}$ is slightly larger than $\sigma_{\rm MS}$ because of the scatter about the mean sSFR-boost observed for SB (see discussion in \citealt{Sargent2013})} (i.e., unchanging with respect to either mass or redshift) for simplicity. Furthermore, \citet{Sargent2012} found no evidence for evolution of these parameters; \item ${\rm sSFR_{\rm MS}}$ evolves with redshift and mass as described previously (eq \ref{eq:ssfrms}); \item Following \cite{Bethermin2012c}, and consistent with the indications for somewhat lower starburst contribution at z=0 found in \cite{Sargent2012}, we set $\rm r_{\rm SB}\propto(1+\rm z)$ at $\rm z<1$, followed by a constant, $\rm r_{\rm SB}=0.024$ (\citealt{hopkins2010} and \citealt{Sargent2012}) at higher redshifts (Eq.\,3 in \citealt{Bethermin2012c}). \end{itemize} \begin{figure} \includegraphics[width=8.5cm]{Fig1_top.eps} \includegraphics[width=8.5cm]{Fig1_center.eps} \includegraphics[width=8.5cm]{Fig1_bottom.eps} \caption{\label{fig:moddescr} \textbf{Upper panel:} Evolution of the stellar mass function of star-forming galaxies used in this paper. \textbf{Central panel:} Evolution of the mean sSFR-M relation (i.e. the main-sequence) as a function of redshift. \textbf{Lower panel:} Figure illustrating how the scatter around the main-sequence is parametrised in our model. $\rm r_{\rm SB}$ corresponds to the ratio between the amplitude of the peak of the SB and MS distributions.} \end{figure} \subsection{\label{sect:IRX}Relation between stellar mass and dust attenuation} \label{sect:irxm} Dust-enshrouded star-forming regions absorb UV light emitted by young stars and emit it as IR radiation. As such, the relation between dust attenuation and stellar mass, hereafter called `attenuation relation', can be used to compute the ratio between the IR and UV luminosity for our star-forming galaxies, as shown in several studies (e.g. \citealt{Pannella2009}, \citealt{Heinis2013b}, and Pannella et al. in prep.). We used the following parametric form for the IRX-M relation: \begin{equation} \textrm{IRX}=\log(\rm L_{IR}/\rm L_{UV})=\alpha \left ( \log(\frac{\rm M}{ M_{\odot}}) - 10.35 \right ) +{\rm IRX}_{0}, \label{eq:irx} \end{equation} where $\alpha=0.71\pm 0.21$ and $\rm IRX_0=1.32\pm 0.11$ following \cite{Heinis2013b}, who do not see any evolution of this relation between z=1.5 and z=4. This relation was measured only for galaxies with M$>10^{9.5}\, \rm M_\odot$ while we here extrapolate it also to lower masses and beyond this redshift range. \cite{Heinis2013b} base their work on UV-detected populations but their findings are similar to new results obtained by Pannella et al. (in prep.) with a purely mass-selected sample of star forming galaxies.\\ From the SFR, we then derive the UV and IR luminosity emitted by the galaxy, assuming an energy balance between the SFR probed by unattenuated UV light and reprocessed IR, i.e. $\rm SFR=\rm SFR_{IR}+\rm SFR_{UV}$. The link between SFR and, IR or UV, luminosities is computed following \citet{Kennicutt1998}: $\rm SFR_{\rm IR}=\rm K_{IR} \times \rm L_{IR}$ with $\rm K_{IR} =1.7 \times 10^{-10}$\,M$_\odot$yr$^{-1}$L$_\odot^{-1}$ and $\rm SFR_{UV}=\rm K_{UV} \times \rm L_{UV}$ with $\rm K_{UV} = 2.8 \times 10^{-10}$\,M$_\odot$yr$^{-1}$L$_\odot^{-1}$. The IR luminosity is the total bolometric emission of the galaxy from 8\,$\mu$m to 1000\,$\mu$m rest-frame and the UV luminosity is the monochromatic luminosity at 150\,nm rest-frame. Combining these three equations and the IRX-M relation, we obtain: \begin{equation} \rm L_{IR}=\frac{\rm SFR}{\rm K_{UV}}\frac{10^{IRX}}{1+\frac{\rm K_{IR}}{\rm K_{UV}}10^{IRX}} \, \,\textrm{and} \, \, \rm L_{UV} = \frac{\rm SFR}{\rm K_{UV}}\frac{1}{1+\frac{\rm K_{IR}}{\rm K_{UV}}10^{IRX}}. \label{eq:lir} \end{equation} \subsection{Refinements} \label{subsec:refinements} The attenuation relation used in our model \citep{Heinis2013b} is derived from a stacking analysis and hence provides no information on the dispersion around this mean relation. This kind of measure is difficult to perform and could be strongly biased by selection effects. \citet{Buat2012} studied the IR emission of a sample of UV-selected galaxies at $z\sim1.5$ and found a mean relation between IRX and M that is fully consistent with the one of \citet{Heinis2013b} which we adopt for our predictions. \citet{Buat2012} measure the observed scatter around the mean relation to be 0.30 dex. This value must be considered a lower limit in view of the incompleteness of their sample, in which galaxies have to be detected both in the UV and IR. A value of 0.3 dex is also representative of the dispersion found on IRX at redshifts from 0 to 2 for a given UV luminosity (\citet{Heinis2013b} and references therein). Pannella et al. (in prep.) estimated a dispersion of 0.4 dex using the \textit{Herschel} detections up to z= 1.3 in the deepest regions of the H-GOODS survey. \cite{Wuyts2012} report that the dispersion of the attenuation relation is independent of stellar mass. We will thus assume a constant log-normal scatter of 0.4 dex (1 magnitude) versus M for simplicity.\\ \citet{Takeuchi2005} have found that the ratio between the IR and the UV luminosity density increases by a factor of $\sim$3 ($\sim$0.5\,dex) from redshift 0 to 1. The evolution of this integrated property cannot be reproduced by the simplest version of our model because of the \textbf{adopted} non-evolution of the IRX-M relation and the weak evolution of the mass function of star-forming galaxies \citep{Ilbert2013,Muzzin2013} below z=1. To solve this problem, we thus assume a slightly evolving normalisation of the IRX-M relation: \begin{equation} \rm IRX_0'=\rm IRX_0-0.5 \times (1-z) \hspace{1cm} \textrm{at} \, \, \, z<1. \label{eq:lowzcorrection} \end{equation} We could have also assumed an evolution of the slope of the relation, but we chose to use an evolving normalisation for simplicity. Indeed, \citet{Buat2013b} found lower attenuations at fixed mass in the local Universe. In a similar way, Pannella et al. in prep. found also a lower normalisation of the IRX-M relation in their z=0.5-1 bin than at z$>$1. This evolution of IRX at fixed mass can be also connected with the evolution of the average ratio between dust and stellar mass (B\'ethermin et al. in prep., Tan et al. in prep.), and the increase of disk-opacity observed by \citet{Sargent2010}, below z=1. This modification of the individual properties of galaxies correctly reproduced that evolution of LD$_{\rm IR}$/LD$_{\rm UV}$ at low redshift. We explicitly show how much this modification impacts the predictions of the model in Sect.\,\ref{sect:lfuv}. While \citet{Heinis2013b} find the attenuation relation to remain constant at high redshift, \citet{Cucciati2012} and \citet{Burgarella2013} report a decreasing integrated LD$_{\rm IR}$/LD$_{\rm UV}$ at z$>$2. These two observations do not contradict each other as the higher mean transparency of the Universe at high redshift is naturally recovered by our model because of the decrease of M$^\star$ at high redshift \citep{Ilbert2013,Muzzin2013}. The star formation budget at very high redshift is thus dominated by lower mass galaxies and the average attenuation is accordingly lower.\\ In the simplest implementation of our model SB galaxies are much less attenuated than MS galaxies with a similar SFR because of their lower mass. This disagrees with the observational results of e.g. \cite{Wuyts2011}. We hence adopt another prescription whereby starburst activity is taken to be fully dust-obscured. Specifically, we assume that star formation in SB galaxies is split between two processes such that SFR=$\rm SFR_{MS}+\rm SFR_{SB}$: extended star formation -- subject to the same mass-dependent attenuation (see eq. \ref{eq:irx}) as normal main-sequence galaxies -- and one or several compact SB regions, probably induced by major mergers, which are heavily dust-enshrouded and consequently emit only in the IR. We showed in \cite{Sargent2013} that it is possible to statistically establish by how much the activity of starbursting galaxies of a given sSFR-excess has been boosted with respect to their pre-burst state on the star-forming main sequence. For the present analysis, we use these sSFR-dependent boost-distributions \citep[see][Sect. 4.2.3]{Sargent2013} to compute the relative importance of the two star-formation modes for a given SB galaxy. The surplus SFR activity, $\rm SFR_{SB}$ (i.e. the difference between the SFR in the starburst state and the SFR prior to the onset of the burst phase), is assumed to be fully dust-obscured, while the remainder, $\rm SFR_{MS}$, is identified with the only partially obscured, extended component of the star-formation activity in the SB galaxy. \begin{figure*} \centering \includegraphics[scale=0.95]{Fig2.eps} \caption{\label{fig:irlf} IR luminosity function from z$\sim$0 to z $\sim$3. Black solid lines represent the IR luminosity functions derived from our best model. Red dotted lines represents the same model, but without scatter on the attenuation relation. Grey areas represent the one sigma confidence region of our best model. Colored points are measurements from various observational studies \citep{Gruppioni2013, Magnelli2011, Rodighiero2010, Le_Floch2005, Sanders2003}.} \end{figure*} \begin{figure*} \centering \includegraphics[scale=0.95]{Fig3.eps} \caption{\label{fig:uvlf} UV luminosity function from z$\sim$0 to z $\sim$4. Black solid lines represent the UV luminosity function derived from our best model. Red dotted lines represent the same model, but without scatter on the attenuation relation. Yellow dashed lines represents the best model, but without evolution of the IRX-M relation at low redshift. Grey areas represent the one sigma confidence region of our best model. Colored points are measurements from various observational studies \citep{Cucciati2012, Hathi2010, Oesch2010, Reddy2008, Bouwens2007, Arnouts2005, Wyder2005, Steidel1999}} \end{figure*} \section{UV and IR luminosity functions} \label{sect:lumfct} \subsection{Computation of the luminosity function and uncertainties} The computation of the IR and UV luminosity functions is difficult to perform analytically, because our model uses several scaling laws including a dispersion around them. We thus use the simpler method of constructing mock catalogues that we generate following the prescriptions detailed in Sect.\,\ref{sect:moddescr}. Luminosity functions are then derived by counting the number of galaxies in each redshift slice and luminosity bin, and dividing it by the volume of the redshift slice and the size (in dex) of the luminosity bin.\\ The mock catalogues are generated as follows: \begin{itemize} \item We generate a mock catalogue containing only M and z based on the mass function described in Sect.\,\ref{sect:mf} (Eq.\,\ref{eq:massdistrib}). In practice, we use a 2\,deg$^2$ field, to reach a compromise between sufficient statistics and computation time, and split it by redshift slices of $\Delta \log (1+z) = 0.05$. Mock galaxies are then generated based on the mass function at the center of each slice. Redshifts are drawn in the slice assuming a flat distribution. The number of objects predicted by the mass function diverges at low mass. Consequently, we apply a mass cut of 10$^6$\,M$_\odot$. We have checked that this low mass cut has no impact on the luminosity functions in the regime where data points are available. \item We assign a (s)SFR for each mock galaxy based on the prescriptions of the 2SFM model described in Sect.\,\ref{sect:sfr}. To do this, we first compute $\rm sSFR_{MS}$ from the M and z of each object using Eq.\,\ref{eq:ssfrms}. We then compute the SB fraction ($\rm f_{\rm SB}(\rm z)$) given by the ratio between the integration of the SB probability distribution (i.e. $2^{nd}$ part of Eq. \,\ref{eq:lognormal}) and the sum of the whole probability distribution (Eq.\,\ref{eq:lognormal}). Following $\rm f_{\rm SB}(\rm z)$, we can now draw a type (i.e. MS or SB). Then, we draw a sSFR for MS type along a gaussian centered on $\rm sSFR_{\rm MS}$ and with a $\sigma_{\rm MS}$ standard deviation; and for SB type along an other gaussian centered on $\rm sSFR_{\rm SB}=\rm sSFR_{\rm MS}+\rm B_{\rm SB}$ and with a $\sigma_{\rm SB}$ standard deviation. \item We decompose the SFR in an UV and IR component. For each MS galaxy, we compute the mean expected IRX from M with Eq.\,\ref{eq:irx} and draw its actual IRX assuming a scatter of 0.4\,dex (1\,mag). We then compute the $\rm L_{UV}$ and $\rm L_{IR}$ using Eq.\,\ref{eq:lir}. For each SB object, we decompose the SFR into a MS and a SB component based on the boost-function formalism of \citet{Sargent2013}. The MS component is treated as previously explained. The IR luminosity emited by the SB component is assumed to be fully obscured, such that $\rm L_{IR,SB} = \rm SFR_{SB}/ \rm K_{IR}$.\\ \end{itemize} We generated several mock catalogues. Our best model follows all the prescriptions listed in Sect.\,\ref{sect:moddescr}, including the refinements described in Sect.\,\ref{subsec:refinements}. We also generated a mock catalogue without scatter on the IRX-M relation and another one without low redshift modification of this relation. To derive confidence region for the best model, we generated 50 Monte Carlo mock catalogues using parameter values drawn randomly in their error region as summarised in Table\,\ref{tab:error}.\\ \subsection{Comparison with observed infrared luminosity functions up to z$\sim$3} Using the same approach but neglecting attenuation, \cite{Sargent2012} were able to recover IR luminosity function evolution up to z$\sim$2. In this section, we compare the IR luminosity function evolution we obtain when including the attenuation with measurements at z$\sim$2 and beyond \citep[][, see Fig.\,\ref{fig:irlf}]{Sanders2003,Le_Floch2005,Rodighiero2010,Magnelli2011,Gruppioni2013}. We use the same redshift bins as \citet{Gruppioni2013}, whose measurements cover the largest redshift range. The confidence region of our model (grey area) agrees well with the data, except a mismatch with the measurements of \citet{Sanders2003}. These data are based on a very local sample and there is a significant evolution of the luminosity function up to z=0.3 (essentially a luminosity-evolution proportional to $(1+z)^3$). This tension disappears if we compute the luminosity function only up to z=0.05. We also tested the impact of the scatter in the IRX-M relation, which was not implemented in the \citet{Bethermin2012c} source counts model, and found this to be totally negligible (red dotted line). This is not surprising. Most of IR-detected galaxies are massive and their star-formation activity predominantly manifests itself as IR emission. Unattenuated UV light thus represents a modest fraction of the energy budget. Consequently, increasing or decreasing it by 0.4\,dex and removing or adding it to IR emission has thus a very modest impact. This also implies that it is irrelevant for the IR luminosity function whether we assume an evolving IRX-M relation at $z<1$ or not. In Fig.\,\ref{fig:irlf} we only plot luminosity functions for our realisations including this evolution.\\ \subsection{Comparison with observed UV luminosity functions at $z<4$} \label{sect:lfuv} In Fig.\,\ref{fig:uvlf}, we compare our model predictions with the UV luminosity functions measured by various authors \citep{Cucciati2012, Hathi2010, Oesch2010, Reddy2008, Bouwens2007, Arnouts2005, Wyder2005, Steidel1999}. We used the same redshift bins as \citet{Cucciati2012}, who cover the largest redshift range with their study. There is a good overall agreement between the confidence region of the model (grey area) and the data points. This shows how efficient our approach is in spite of involving very few scaling laws. We do find that our model is systematically higher than the \citet{Cucciati2012} points at the faint-end between z=0.4 and z=0.8, but this offset is always within the confidence region of the model. This could be caused by a problem of incompleteness in the faintest magnitude bins of the literature studies. Our model is also 2-$\sigma$ higher than \citet{Oesch2010} measurements at L$_{\rm UV}>10^{10}$\,L$_\odot$ in the range $1.7<\rm z<2.5$, but agrees with the other authors in this regime.\\ We switched off the modification of the IRX-M relation at low redshift to quantify its impact. The yellow dashed lines represent the prediction of the model with a non-evolving relation. Between z=0.6 and z=1, there is only a mild impact, since the offset from the constant IRX-M relation at higher redshift is small. At lower redshift, the model without low-z evolution systematically underestimates the bright-end; the faint-end is not affected by changes to the IRX-M relation. Our model thus favors a scenario with a minor evolution of the IRX-M relation at low redshift, implying slightly more transparent galaxies at fixed stellar mass in the local Universe.\\ We also studied the effect of the scatter on the IRX-M relation. The red dotted lines in Fig.\,\ref{fig:uvlf} show the model predictions in absence of scatter. There are almost no changes below the knee of the UV luminosity function, but the model without scatter underpredicts the number of objects ($\sim$0.5\,dex) above the knee of the luminosity function by an order of magnitude. A scatter is thus mandatory to reproduce the bright-end of the UV luminosity function. Indeed, because of the existence of a main-sequence, only intermediate- and high-mass ($\gtrsim \rm M^\star$) galaxies can produce a sufficient SFR and thus intrinsic UV luminosity. However, because of the IRX-M relation, the more massive the object is, the higher its attenuation will be. The scatter generates a population of intermediate mass galaxies with a lower attenuation and thus a bright observed UV luminosity. To test this hypothesis, we selected $\rm L_{UV}>10^{11}\,\rm L_\odot$ galaxies at $1.7< \rm z < 2.5$ in the catalogue based on our best model (with a scatter of 0.4\,dex) and compute their median mass and IRX. We found $6\times10^{10}\, \rm M_\odot$ and 0.81, respectively. The median IRX at this mass is 1.62. UV bright populations are thus M$^\star$ galaxies, which are negative outliers of the attenuation relation. Finally, we tested various values for the scatter on the attenuation relation and found that the UV luminosity function is well reproduced only for scatters in the 0.2-0.5\,dex interval, in agreement with the observational estimates cited in Sect.\,\ref{subsec:refinements}.\\ \begin{figure} \centering \includegraphics[width=9cm]{Fig4.eps} \caption{\label{fig:uvlf_lbg} UV luminosity function at z$\sim$5 and z$\sim$6 from LBG-selected samples. Black solid lines represent the UV luminosity function derived from our best model. Red dotted lines represent the same model, but without scatter on the attenuation relation. Colored points are measurements from various observational studies \citep{Bouwens2007, Steidel1999}.} \end{figure} \subsection{Comparison with UV luminosity function of high-redshift LBGs} We extended our model to $z>4$ as a first order test of whether the simple ingredients we assumed at lower redshift are sufficient for reproducing high-redshift measurements as well. Unfortunately, we currently have no access to IR data at these redshifts, but UV luminosity functions were measured using the Lyman-break-selection technique \citep{Steidel1996}. However, our parametric mass function based on \citet{Ilbert2013} was calibrated only up to z=4. We thus used the fit of a compilation of mass function measurements coming from K-band-selected and LBG-selected populations performed by Sargent et al. (in prep.). Basic features of this compilation are a successive steepening of the faint-end slope, a quickly declining characteristic density, and a decreasing M$^\star$ with redshift. We assume no evolution of the sSFR-M and IRX-M relation beyond a redshift of 4 for the sake of simplicity.\\ Figure\,\ref{fig:uvlf_lbg} shows the comparison between our model (black solid line) and the data of \citet{Bouwens2007} and \citet{Steidel1999} at z$\sim$5 and 6. All the data points lie in the confidence area of our empirical predictions (grey area). This demonstrates the predictive power of our method and suggests that a non-evolving IRX-M and SFR-M relation at high-z is a fair hypothesis to interpret the current data. In a similar way as at lower redshifts, it is clear that a scatter on the attenuation relation is necessary to reproduce the bright-end of the UV luminosity functions at z$\sim$5 and 6.\\ \begin{figure} \centering \includegraphics[width=9cm]{Fig5.eps} \caption{\label{fig:attluv} Mean attenuation as a function of UV luminosity at $z \sim 1.5$. The blue solid line is the prediction of our best model; the grey area is the associated 1$\sigma$ confidence region. The red dotted line stands for the model without scatter in the IRX-M relation. Inverted triangles are from the stacking analysis of \citet{Heinis2013a}. The hatched region indicates the parameter space where no object was found by \citet{Buat2012} in a 0.025\,deg$^2$ field (see discussion Sect.\,\ref{sect:sbobs}).} \end{figure} \section{IR properties of UV selected population} \label{sect:irpropuv} The IR properties of UV-selected population are not expected to be similar to those of the full population. Our model is a useful tool to understand how this selection biases the obtained results. We now discuss recent observational results obtained on these UV-selected populations, and how they can be interpreted by our model.\\ \subsection{Mean attenuation in UV-selected galaxies} \citet{Heinis2013a} studied the mean IRX of UV-selected populations, measured with a stacking analysis as a function of $\rm L_{UV}$ at z$\sim$1.5. The results are compatible with a plateau at $10^{\rm IRX}=6.9\pm1.0$ between $10^{9.5}$ and $10^{11}$\,L$_\odot$ (see Fig.\,\ref{fig:attluv}). The flat trend come from the mix of low and high mass galaxies in each UV bin, but is not trivial to understand, because of the rising IRX-M relation \citep{Heinis2013b}. However, our best model also predicts a flat trend in this $\rm L_{UV}$ range (blue solid line on Fig.\,\ref{fig:attluv} ). This result is essentially caused by the scatter on the attenuation relation, since we find a rising trend in absence of dispersion (red dotted line on Fig. \,\ref{fig:attluv}). This is another indication for the importance of the scatter in order to be able to model simultaneously the statistical properties UV and IR populations. At fixed UV luminosity, there is thus a mix between galaxies with higher SFR (mass) and attenuation and others with lower SFR (mass) and attenuation. This picture is consistent with the distribution in the IRX-M diagram of populations selected by UV luminosity recovered from the simulation of \citep{Heinis2013b}. Nevertheless, there is a 2$\sigma$ systematic discrepancy around $10^{10}$\,L$_\odot$. We tried to modify the scatter and the IRX-M relation to reproduce this feature without success. This could be caused by cosmic variance, but also a clue of an higher complexity of real galaxy populations. Finally, our model predicts a rising relation with $\rm L_{UV}$ at $\rm L_{UV}<10^{9.5}$\,L$_\odot$, in contrast with \citet{Heinis2013a} who have found clues of a decreasing trend for their three faintest points. Measurements at lower UV luminosity will thus be a challenging test for our model.\\ \subsection{Absence of strongly-attenuated, UV-bright galaxies} \label{sect:sbobs} The results of \citet{Heinis2013a} were obtained in a stacking analysis and do not provide any information about the dispersion around the IRX-L$_{\rm UV}$ relation. \citet{Buat2012} have studied the distribution of IR- and UV-detected population between z=0.95 and z=2.2 in the same diagram. This type of analysis could be biased by the need of a double detection. However, we note that they found no objects with $\log \,( \rm L_{\rm UV}) \gtrsim 10.7 \, \rm L_{\odot}$ and IRX $\gtrsim 1.6$ (hatched region in fig.\ \ref{fig:attluv}) in a 0.028\,deg$^2$ field, where all galaxies should be detected in both UV and IR. Whereas, on average, SB galaxies represent only $3\%$ of the entire population, they contribute $55 \%$ in this particular area of the IRX-L$_{\rm UV}$ diagram. We will thus use this constraint on the $\rm IRX-\rm L_{\rm UV}$ diagram to test the impact of our model prescription for attenuation in SBs (see Sect.\,\ref{subsec:refinements}). When applying the same attenuation for MS and SB galaxies, we count 1.72 objects ($\rm P[\rm N=0] = 0.17$) in the empty region of the $\rm IRX-\rm L_{\rm UV}$ plane. If we assume that $\rm sSFR_{SB}$ is completely reprocessed into IR we count 0.99 objects ($\rm P[N=0]=0.37$) in the same region. Therefore, observations slightly favour our refined recipe for attenuation in SB. Nevertheless, studies on larger fields are necessary to conclusively test the validity of our assumptions in this regime.\\ \begin{figure*} \centering \includegraphics[width=17cm]{Fig6.eps} \caption{\label{fig:cut} \textbf{Left panels}: Contribution of galaxies above various IR luminosity cuts to the UV luminosity functions at various redshifts. \textbf{Right panels}: Contribution of galaxies above various UV luminosity cuts to the IR luminosity functions at various redshifts.} \end{figure*} \begin{figure*} \centering \includegraphics[width=17cm]{Fig7.eps} \caption{\label{fig:fluxalma} AB apparent magnitude at (1+z) $\times$ 150\,nm at which a given fraction of galaxies (colour coded) are detected as a function of their (sub-)millimeter flux. Left panels correspond to fluxes at 850\,$\mu$m and right panels to fluxes at 1300 \,$\mu$m. Various redshift slices are presented, from the lowest on the top panels, to the highest on the bottom panels.} \end{figure*} \section{Predictions} \label{sect:pred} All predictions presented in this section are based on our 'full' model, i.e. the realisation with a scatter on IRX-M relation, a special treatment of the starbursts, and an evolution of the IRX-M relation below z=1. \subsection{Contribution of IR-selected populations to the UV luminosity function} \label{sect:IRtoUV} We used our model to predict how much IR galaxies above various luminosity cuts contribute to the UV luminosity function (see Fig.\,\ref{fig:cut} left panel). At all redshifts, we note that the bright-end of the UV luminosity function is predominantly populated by IR-bright galaxies. This is expected, because UV-bright galaxies are essentially M$^*$ galaxies with a median IRX of 0.81 (see Sect.\,\ref{sect:lfuv}). These objects thus mainly emit in the IR. The sub-L$^\star$ regime is populated by IR-faint sources, and ultra deep IR observations are necessary to recover a significant fraction of these objects in the IR. This part of the UV luminosity function is dominated by low-mass galaxies, which have correspondingly low attenuations and low SFRs, and so, low IR luminosities. We also note in the left hand side of Fig.\,\ref{fig:cut} that the UV luminosity distribution of IR-selected sources peaks around the knee of the UV luminosity function for a large range of IR-luminosity cuts ($10^{10}-10^{13}$\,L$_\odot$). The mean UV luminosity of IR-selected population thus slowly evolves as a function of L$_{\rm IR}$ (1\,dex in UV for 2.5\,dex in IR). Indeed, the brighter L$_{\rm IR}$ is, the more massive and attenuated the galaxy will be. Consequently, a strong increase of L$_{\rm IR}$ involves only a weak one of L$_{\rm UV}$, because the highest SFR is partially compensated by an higher attenuation.\\ \subsection{Contribution of UV-selected populations to the IR luminosity function} We then studied the contribution of UV-selected galaxies to the IR luminosity function (see Fig.\,\ref{fig:cut} right panel). We found that the brightest IR galaxies ($>10\, \rm L_{IR}^\star$) are not the brightest UV galaxies, contrary to what was found for the opposite case in Sect.\,\ref{sect:IRtoUV}. SB galaxies dominates this regime and are very attenuated (see Sect.\,\ref{subsec:refinements}). Consequently, they tend to be missed by shallow UV surveys. In contrast, the sub-L$^\star$ galaxies are well recovered by UV surveys, because they are in general less attenuated. We also note that the L$_{\rm IR}$ distribution of galaxies above a given L$_{\rm UV}$ is much broader than in the opposite case. IR-selected populations have thus more homogeneous L$_{\rm UV}$ than L$_{\rm IR}$ of UV-selected populations. Overall, UV selections are better suited to study low-mass, low-SFR populations, because of their low attenuation. But, IR selections are better suited to study massive, strongly-star-forming galaxies, which tend to be missed by UV surveys because of their strong attenuation. Our model thus confirms the complementarity of UV and IR data, and confirms the commonly-accepted fact that UV is better to probe low SFR and IR is better to probe the high SFR. \\ \subsection{Will the sources of millimeter deep surveys be detected in UV?} In the next years, ALMA, NIKA on PdBI, and CCAT will perform deep IR continuum surveys around a wavelength of 1\,mm. Detecting the UV rest-frame counterpart of such sources will be useful to constrain the dust attenuation of these distant objects, and better understand the stellar, gas, and dust content of such objects. Our model enables us to estimate the typical depth of rest-frame UV surveys requested to match the sensitivity of future millimeter surveys. Figure\,\ref{fig:fluxalma} shows the fraction of UV-detected sources as a function of the depth of the survey in the millimeter domain and in UV-rest-frame. To simplify the reading of this plot, we defined m$_{\rm UV}$ as the apparent magnitude of a source at 150$\times (1+z)$\,nm. This corresponds to FUV, U, R, I, and J band for sources at z=0, z=1, z=2.65, z=4.35, and z=7.15, respectively. The fluxes in the millimeter band at 850\,$\mu$m and 1.3\,mm are computed using the IR SED templates of \citet{Magdis2012}. This library provides two distinct templates for main-sequence galaxies, and starbursts that depend only on redshift (but not on, e.g., luminosity once the redshift is fixed). Following \citet{Bethermin2012c}, we assume a scatter of 0.2\,dex on the parameter $\langle \rm U \rangle$, which represents the mean intensity of the radiation field and which correlates with dust temperature. Using this SED library, galaxy number counts (including counts split in different redshift bins) from the mid-IR to millimeter wavelengths are correctly reproduced with the 2SFM formalism \citep{Bethermin2012c}.\\ The typical depth of surveys performed at the confusion limit with the next generation of millimeter cameras on thirty-meter class telescopes (NIKA2 at IRAM, LMT, CCAT) will be $\sim$0.5\,mJy \citep{Bethermin2011}. These telescopes will be able to cover fields of 0.1-10\,deg$^{2}$ at this sensitivity. An optical depth of $m_{\rm UV,rest} \sim 26.5$ (COSMOS, \citealt{Capak2007}\footnote{The depth of the GALEX imaging in COSMOS, i.e. of the observer-frame UV-coverage of COSMOS is shallower than quoted here. We use $m_{\rm UV,rest}$ to denote the apparent magnitude at the wavelength which samples the rest-frame UV-emission of galaxies at different redshifts. The bulk of the sources we consider here are at z$>$1 and thus have rest-frame UV emission that falls into observed optical bands, for which the sensitivity is around 26.5 magnitudes.}) will thus provide the UV luminosity to $>80\%$ up to z$\sim$2.5. At z$>$5, a depth of 29\,magnitudes will be necessary. This depth is nowadays reached in field of only few arcmin$^2$. The new generation of millimeter interferometers (ALMA and NOEMA) will be able to probe fluxes one order of magnitude fainter in fields of few arcmin$^2$ or less. In this case, a typical magnitude of 29, which is already reached in HUDF \citep{Coe2006}, will allow to detect the $>80\%$ of UV counterparts at z$<$5. At larger redshift, a depth of $\sim30$ will be necessary. This should be possible with the James Webb Space Telescope (JWST).\\ \section{Conclusion} \label{sect:conc} We modeled the evolution of the UV and IR emissions of galaxies across cosmic times based on the 2SFM formalism, built from the empirically-measured evolution of the main-sequence of star-forming galaxies, and the observed IRX-M relation assuming a 0.4\,dex scatter around it. This modeling work allows to better understand the connection between the IR-selected and UV-selected populations. Our main findings are: \begin{itemize} \item Our model is able to consistently predict the co-evolution of the IR luminosity function up to z$\sim$3 and the UV luminosity function up to z$\sim$6. \item We showed that scatter on the IRX-M relation has no effects on the IR luminosity function. This is not the case for the UV, where a scatter of $\sim$0.4\,dex is necessary to reproduce the UV luminosity function. This is caused by the fact that the UV bright galaxies are not the most massive or the most star-forming, but M$^*$ galaxies, which are negative outliers of the attenuation relation. \item We recover naturally a flat mean IRX-$\rm L_{UV}$ relation measured by stacking in \textit{Herschel} data of UV-selected sources as a consequence of the scatter on the IRX-M relation, the shape of the mass function, and the SFR-M relation. \item We performed predictions from our model and showed that IR-selected populations have similar $\rm L_{UV}$ around the knee of the UV luminosity function, while UV-selected populations can have very different IR properties. Overall, the IR-selection is very efficient for selecting massive and/or strongly-star-forming galaxies, but UV is much better suited for studying the low-mass, weakly star-forming galaxies. \end{itemize} This simple model will be useful to understand the selection bias of various studies of star-formation in distant galaxies, and especially the IR-selected sample from the next generation of deep interferometer surveys or large single-dish surveys.\\ \section{acknowledgements} We thank E. Le Floc'h, D. Elbaz, and Olivier Ilbert for useful/helpful comments, and S. Arnouts, O. Cucciati, N.P. Hathi, P.A. Oesch, and T.K. Wyder for providing data. EB thanks C. Schreiber for help with IDL programming. We aknowledge the anonymous referee for their constructive and helpful comments. MB, MS, and ED acknowledge support from ERC-StG UPGAL 240039 and ANR-08-JCJC-0008.\\ \bibliographystyle{mn2e}
{ "redpajama_set_name": "RedPajamaArXiv" }
349
\section{Introduction} \label{intro} Bitcoin's security level is traditionally measured as the proportion of the mining power that an adversary must control to successfully attack it. Nakamoto assumed that an adversary would not control the majority of the mining power~\cite{nakamoto2008bitcoin}. If this assumption does not hold, an attacker is able to spend a coin twice and affect the system consistency in what is known as a double spending attack or 51\% attack. The soundness of the honest majority assumption has been discussed in the literature and mechanisms have been proposed to harden the mining process against the 51\% attack without completely eliminating it~\cite{Bonneau16,yu2019repucoin,HanSYL021,BadertscherLZ21}. Despite rewarding miners with newly minted coins and transaction fees, the Bitcoin mining process has also been shown to be vulnerable to selfish behaviors. Using selfish mining, a miner withholds mined blocks and releases them only after the honest miners have wasted computing resources mining alternative blocks. Selfish mining increases a miner's revenue beyond the fair share it would obtain by following the default Bitcoin mining protocol~\cite{selfish14}. In practice, selfish mining has been shown to be profitable after a difficulty adjustment period in Bitcoin for any miner with more than 33\% of the global hash power~\cite{Gervais16,negy2020selfish}, and variants of selfish mining further optimize a miner's expected revenue~\cite{sapirshtein2015optimal}. Additionally, miners face the verifier's dilemma~\cite{luu2015demystifying,teutsch2019scalable,alharby2020data}, where upon receiving a block header they have to decide whether they should wait to have received and verified the corresponding transactions, or whether they should start mining right away based on the block header. Different miners might react differently to this dilemma. Following previous works, we say that a chain of blocks is public if the honest miners are able to receive all its content, while we say that a chain is private if some contents of the chain are kept hidden by the adversary. In this paper, we show that an adversary can leverage a novel block withholding strategy, which we call perishing mining, to slow down the public chain in an unprecedented manner. In practice, perishing mining leads miners that react differently to the verifier's dilemma to mine on different forks. We then present the Dual Private Chain (DPC) attack, which further leverages the verifier's dilemma to double spend on Bitcoin. This attack is, to the best of our knowledge, the first attack where an adversary temporarily sacrifices part of its hash power to later favor its double spending attack, and the first attack where an adversary simultaneously manages two private chains. Intuitively, the first adversarial chain inhibits the public chain's growth, so that the second one benefits from more favorable conditions for a double spending attack. To evaluate the impact of the distraction chain on the public chain we first establish the Markov decision process (MDP) of perishing mining. From this MDP, we obtain the probability for the system to be in each state, and quantify the impact of perishing mining on the public chain, i.e., its growth rate decrease. We further describe the DPC attack and its associated MDP. We then evaluate its expected success rate based on Monte Carlo simulations. Counterintuitively, our results show that the adversary increases its double spending success rate by dedicating a fraction of its hash power to slow the public chain down, instead of attacking it frontally with all its hash power. Overall, this work makes the following contributions. $\bullet$ We present perishing mining, a mining strategy that is tailored to slow down the progress of the public chain by leveraging the verifier's dilemma. Using perishing mining an adversary releases the headers of blocks that extend the public chain so that some honest miners mine on them while some honest miners keep mining on the public chain, which effectively divides the honest miners hash power. We present the pseudocode of the perishing mining strategy, establish its Markov chain model and quantify its impact on the public chain growth. $\bullet$ Building on perishing mining, we describe the DPC attack that an adversary can employ to double spend by maintaining up to two private chains. The first chain leverages the perishing mining strategy to slow down the public chain's growth and ease the task of the second chain, which aims at double spending. We provide the pseudocode of the attack, and characterize the states and transitions of its Markov chain model. $\bullet$ We evaluate the perishing mining strategy and the DPC attack based on extensive Monte Carlo simulations. Our results indicate that perishing mining reduces the public chain progress by 69\% when the adversary owns 20\% of the global power and 50\% of the hash power belongs to miners that mine on block headers without verifying their transactions. In comparison, selfish mining, which aims at optimizing a miner's revenue share, would only decrease it down by 15\%. Our evaluation also shows that an adversary that owns 30\% of the global hash power can double spend with 100\% success rate when 50\% of the hash power belongs to optimistic type 2 miners in the presence of verifier's dilemma. While we focus on the double spending threat, we also show that the DPC attack allows an adversary to obtain a higher revenue than the one it would obtain by mining honestly or following previously known strategies (Appx.~\ref{profit}). The remainder of this paper is organized as follows. \S\ref{sec:background} discusses the related work and provides some necessary background. \S\ref{sec:models} defines our system model. \S\ref{sec:overview} provides an overview of the DPC attack. \S\ref{sec:dpc_spv} details the perishing mining strategy and the DPC attack that builds on it. \S\ref{sec:perf_eval} presents our evaluation results. \S\ref{sec:discussion} provides a discussion on other aspects of the attack. Finally, \S\ref{sec:conclusion} concludes this paper. \section{Related Work} \label{sec:background} \textbf{Double spending attack.} The double spending attack on Bitcoin was described in Nakamoto's whitepaper~\cite{nakamoto2008bitcoin}, and has been further analyzed since~\cite{karame2012doublespending,rosenfeld2014analysis}. An adversary with at least 51\% of the global mining power is able to use a coin in a first validated transaction and, later on, in a second conflicting transaction. Nowadays, $z=6$ blocks need to be appended after a block for its transactions to be considered permanent. Nakamoto characterized the race between the attacker and the honest miners as a random walk, and calculated the probability for an attacker to catch up with the public chain after $z$ blocks have been appended after its initial transaction. Our DPC attack aims at double spending, and improves upon the classical double spending's success rate. \textbf{Block-withholding attacks.} Selfish mining was the first mining strategy that allows a rational miner to increase its revenue share~\cite{selfish14}, and was later shown to harm the mining fairness~\cite{bonneau2015sok,CromanDEGJKMSSS16}. Selfish mining strategy is not more profitable than honest mining when the mining difficulty remains constant despite the fact that the adversary is able to increase its revenue share~\cite{gobel2016bitcoin,Gervais16}. Nayak et al. proposed plausible values for the selfish miner's propagation factor by utilizing the public overlay network data~\cite{stubborn16}. They pointed out that the attacker could optimize its revenue, and win more blocks by eclipsing the honest miners when the propagation factor increases. Gervais et al. analyzed the impact of stale rate on selfish mining attack~\cite{Gervais16}, and described the eclipse attack~\cite{heilman2015eclipse}. Negy et al. pointed out that applying the selfish mining strategy in Bitcoin is profitable after at least one difficulty adjustment period (i.e., after approximately two weeks at least)~\cite{negy2020selfish}. The DPC attack differs from these works in the sense that its main goal is not to increase the adversary's mining share but to double spend with higher probability than previous attacks. \textbf{Combining selfish mining and double spending.} Previous works have shown that an adversary can combine the double spending attack with selfish mining~\cite{Gervais16,sompolinsky2016bitcoin}. In this attack, the attacker maintains a single chain, which lowers the double spending success rate compared to the initial double spending attack. Our DPC attack shows that an adversary can simultaneously manage two private chains to launch a more powerful double spending attack. \textbf{Blockchain Denial of Service Attacks.} The BDOS attack proposed strategies to partially or completely shut down the mining network~\cite{mirkin2020bdos}. To do so, the adversary only sends the block header to the network whenever she discovers a block that is ahead of the public chain and there is no fork, and publishes the block body if the next block is generated by the honest miners. By doing so, the profitability and utility of the rational miners and Simplified Payment Verification (SPV) miners is decreased, so that they eventually leave the mining network. The objective of BDOS attacks is to halt the system. An adversary would need to spend approximately 1 million USD per day to shut down the system. Our DPC attack frequently separates other miners' hash power, which has some similarities with the BDOS attack's partial shut down case. However, the DPC attack allows the adversary to double spend. \section{System Model} \label{sec:models} This section introduces the categories of miners we consider, and the adversary that launches a DPC attack. Table~\ref{table:1} summarizes the notations we use throughout this paper. \begin{table*}[t] \centering \caption{Notations.} \begin{tabular}{|c|p{10cm}|} \hline Symbol & Interpretation \\ \hline $\alpha \in [0,0.5]$ & Mining power of the adversary. \\ $\beta \in [0,1]$ & Fraction of its mining power that the adversary dedicates to its first private chain. \\ $\mu \in [0,0.5]$ & Mining power of type 2 miners. \\ \hline $v_t$ & Value of the transaction the adversary inserts in a block when starting the DPC attack and attempts to double spend.\\ $v_b$ & Mining reward per block.\\ \hline \end{tabular} \label{table:1} \end{table*} \subsection{Bitcoin mining and the verifier's dilemma} Bitcoin mining is a trial-and-error process\footnote{https://en.bitcoin.it/wiki/Block\_hashing\_algorithm}. The public blockchain (or chain) is visible to all participants, and is maintained by honest miners. To achieve consistency, honest miners accept the longest chain in case of visible forks~\cite{pass2017analysis,gavzi2020tight,dembo2020everything}. However, temporary block withholding attacks have been shown to threaten Bitcoin's security~\cite{karame2012doublespending,rosenfeld2014analysis,selfish14,sapirshtein2015optimal}. Honest miners monitor the network to verify block headers and verify transactions. In the Bitcoin's network, block headers are often propagated faster than transactions. Bitcoin's incentive mechanism does not directly reward the verification of transactions, and BIP-152\footnote{https://github.com/bitcoin/bips/blob/master/bip-0152.mediawiki} introduced the compact block propagation optimization where each node can relay a block in a compact format before verifying its transactions. In this case, a miner that immediately mines on the block header of a correct block gets a time advantage to find the next block. If the miners instead waits and verifies the included transactions before the next mining round, then they might sacrifice some non-negligible time in the mining race~\cite{luu2015demystifying,teutsch2019scalable,alharby2020data,tcao2021characterizing}. We assume that miners follow the traditional block exchange pattern~\cite{DeckerW13,mirkin2020bdos} using the overlay network. Block dissemination over the overlay network takes seconds, whereas the average mining interval is 10 minutes. While accidental forks (which may occur every 60 blocks~\cite{DeckerW13} on average) reduce the effective honest mining power on the public chain and makes our attack easier, we do not consider accidental forks created by honest miners in order for simplicity. We evaluate mining and double spending strategies using event-based simulations where an event is the discovery of a block by a category of miner. We note $v_b$ the mining reward that miners obtain whenever a block they have discovered is permanently included in the blockchain. \subsection{Miner Categories} We consider two types of honest Bitcoin miners according to the way they react to the verifier's dilemma: \emph{type 1 honest miners} and \emph{type 2 honest miners} \emph{Type 1 honest miners} always follow the default mining protocol and mine on the longest chain of fully verified blocks. In particular, these miners do not mine on a block header that extends a longer non-fully verified concurrent chain. \emph{Type 2 honest miners} are profit-driven \tc{effectiveness-oriented.}. As Bitcoin allows miners to accept and generate new blocks without verifying their transactions, type 2 miners start mining on a new block or its header if it extends the longest chain as soon as possible without verifying the transactions it contains. Note that type 2 miners can verify transactions whenever they are received and stop mining on a block header when associated transactions are faulty, or if they successfully mine the next block without having received the previous transactions. \JS{if profit-driven, then the last case will encourage the miner to continue. We may want to re-visit the conditions} In our experiments, we consider two opposite categories of type 2 miners that behave differently upon reception of successive block headers to evaluate the best and worst possible attack results. \begin{itemize}[noitemsep,topsep=0pt] \item \emph{Optimistic type 2 miners} miners always mine on the longest chain of blocks, which is possibly made of several block whose transactions have not yet been received. In particular, Simplified Payment Verification (SPV) miners~\cite{f2pool,halfspv,spvpools,btcstack} can be categorized as optimistic type 2 miners. Upon finding a block, optimistic type 2 miners can create an empty block or include transactions that they know cannot create conflicts (e.g., internal transactions for mining pools). \item \emph{Pessimistic type 2 miners} only accept to mine on a block header if it extends a chain of full blocks. In particular, a pessimistic type 2 miner that extends a block header would then mine on the last block with transactions not to waste time. If the missing transactions eventually arrive, they then release the next full block. While if they extend over the last full block, they then create a fork. \end{itemize} In practice, it would be difficult for the adversary to identify the exact proportion of the global mining power that each type 2 miner subcategory represents. However, the adversary can be conservative and assume that all type 2 miners are pessimistic, since our attack still improves over the state-of-the-art in that case. We also discuss evidence for SPV mining in \S\ref{sec:discussion}, which is arguably the simplest type 2 mining strategy. \emph{The adversary} owns a fraction $\alpha \in [0,0.5]$ of the global hash power and its aim is to double spend with higher probability than using previous attacks. When launching its attack the adversary introduces a transaction of value $v_t$ in a block that is included in the public chain and that it attempts to double spend. We also assume that the adversary cannot break cryptographic primitives. Contrary to the selfish mining's adversary model~\cite{selfish14,Gervais16}, our model does not assume that the adversary has a privileged network access, which is required in selfish mining when the adversary releases a conflicting block it had pre-mined in reaction to the extension of the public chain by an honest miner. For simplicity we consider that all newly discovered and propagated block is almost instantaneously received by all miners. \section{Attack Overview} \label{sec:overview} This section provides a high-level description of the Dual Private Chain (DPC) attack, where an adversary maintains two private chains. It then summarizes the respective roles of adversary's two private chains and their interactions. \subsection{Intuition} In a DPC attack, the adversary maintains two private chains from which it might release block headers or full blocks with the ultimate goal of double spending. During the attack, both of the adversary's private chains compete with the public chain and may diverge from it starting from different blocks. At a given point in time, the adversary might dedicate its full hash power to one of its private chains, or divide its hash power to simultaneously extend both private chains. The DPC attack starts when the adversary creates a transaction of value $v_t$ that is the basis for its double spending attempt. Once the adversary generates the block that contains this transaction, she initializes both its private chains with it and starts mining on it. Initially, the two chains are therefore equal, but they might diverge or converge again later on depending on the created blocks. The double spending attack succeeds if the double spending chain becomes longer than the public chain and if the public chain contains $z=6$ blocks that have been included after the block that contains the initial transaction of the adversary. \emph{Role of the Distraction Chain.} The first private chain that the adversary maintains is called the \emph{distraction chain}. We present perishing mining, a strategy that the adversary employs to maintain its first private chain to waste the hash power of type 2 honest miners and slow down the public chain. Whenever the adversary divides its hash power to simultaneously mine on its two private chains, it dedicates $\beta$ of its hash power to mine on its first private chain. This chain is private in the sense that the adversary never releases the full blocks, but only the corresponding block headers. The strategy that the adversary applies on its distraction chain divides the honest miners so that they mine on different blocks, and wastes the hash power of type 2 honest miners, which collectively account for hash power $\mu$. The adversary leverages a BDOS-like attack to only share the header of blocks it discovers on the distraction chain (see Section~\ref{sec:dpc_spv}). As the body of those blocks contain adversary-created transactions that are never publicly released, only type 2 honest miners mine on them. In this way, the adversary can distract type 2 honest miners from mining on the public chain. \emph{Role of the Double Spending Chain.} The adversary maintains a second private chain to attempt to double spend, and we therefore call this chain the \emph{double spending chain}. Whenever the adversary is simultaneously mining on its two private chains it dedicates $\alpha(1{-}\beta)$ of the global hash power to its second private chain. This chain is private in the sense that, even though block headers might be released, the actual blocks it contains are only published if the double spending attack is successful. Following previous analyses~\cite{nakamoto2008bitcoin,rosenfeld2014analysis}, we consider that a double spending attempt is successful when: (i) the double spending chain's length is larger than or equal to the public chain's length; and (ii) $z\texttt{-}1$ blocks have been appended after the block that contains the adversary's initial transaction ($z=6$ in Bitcoin). \begin{figure}[t] \centering \begin{subfigure}[b]{0.49\textwidth} \centering \includegraphics[width=\textwidth]{FIG1.pdf} \caption{Case 1.} \end{subfigure} \hfill \begin{subfigure}[b]{0.49\textwidth} \centering \includegraphics[width=\textwidth]{FIG2.pdf} \caption{Case 2.} \end{subfigure} \caption{Illustration of two possible cases that would lead type 2 miners to waste their hash power during a DPC attack. $B_n,B_{n+1},B_{n+1}',B_{n+2}$ are full blocks, $B_{n+1}^h,B_{n+2}^h$ are block headers, and $B_{n+1}^b,B_{n+2}^b$ are block bodies. We use solid rectangles when the content of a block is visible to honest miners, and a dotted rectangle when it is hidden by the adversary. We note interesting adversary's actions with $action_1$ and $action_2$ (see text for explanations).} \label{fig:dpcm2} \end{figure} \subsection{Interplay Between the Two Private Chains} Whenever type 1 and type 2 miners are mining on the same block, the adversary divides its hash power to concurrently mine with hash power $\alpha\beta$ on the last block of its distraction chain, which is then equal to the public chain, and mine with mining power $\alpha(1-\beta)$ on its double spending chain. The adversary's goal is then to create a fork and release a block header so that type 1 and type 2 honest miners mine on different blocks. Note that the adversary will use all its hash power on the second private chain as long as the first private chain is longer than the public chain. This hash power shifting between two private chains is at the core of the DPC attack, which is detailed in Section~\ref{sec:combine_all}. In the DPC attack, the adversary executes different actions to lead the honest miners to mine on different blocks. Fig.~\ref{fig:dpcm2} shows two possible scenarios where the attack is initialized based on block $B_n$. The adversary generates a pair of conflicting transactions for its double spending attack. The first transaction is released to the public network and collected by the honest miners. The second transaction is kept private by the adversary. In both examples, after $action_1$, the adversary separates her hash power into two parts: she uses $\alpha\beta$ to work on public block lead $B_{n+1}$, and $\alpha(1-\beta)$ to work on extending $chain_2$ to double spend. After $action_2$ the adversary releases the block header and use all of her hash power to extend $chain_2$ for double spending. In both cases, type 2 honest miners (with $\mu$ of global hash power) are led to generate some blocks that will never be included in the public chain due to the adversary's block body withholding strategy. Consequently, the adversary's second private chain $chain_2$, which is used to attempt to double spend, benefits from the distraction of $chain_1$. We detail the DPC attack in \S\ref{sec:dpc_spv} \section{The Dual Private Chains Attack} \label{sec:dpc_spv} This section presents the details of the DPC attack, which attempts to lure type 2 honest miners away from extending the public chain, thus, facilitates a double spending attack. We first describe perishing mining, a strategy that a miner can use to slow down the progress of the public chain by making honest miners mine on different blocks. We then describe the full DPC attack that builds on perishing mining to maintain the adversary's first private chain. We provide an additional discussion on the DPC attack in \S\ref{sec:discussion}. \subsection{Perishing mining}\label{pmstrategy} We call \textit{perishing mining} the strategy that the adversary uses on the distraction chain (whenever she is mining on it). After the initialization of the perishing mining strategy, the distraction chain and the public chain mine on the same block. The adversary's action then depends on whether the next block is discovered by the public miners or by itself, as shown in Alg.~\ref{alg:perishing}. First, when the adversary discovers a block $B_{n+1}$ that makes its distraction chain longer than the public chain, it releases the corresponding block header to the network (Alg.~\ref{alg:perishing}, l.~\ref{perishing2}). Upon receiving this header, type 2 miners start mining based on it, while type 1 miners continue working on block $B_n$. Second, when type 1 miners discover a block, the public chain is extended (Alg.~\ref{alg:perishing}, l.~\ref{perishing3}). Third, when type 2 miners find a block, the public chain is extended when the public chain is equal to the private chain (Alg.~\ref{alg:perishing}, l.~\ref{perishing4}). Otherwise, the block is abandoned due to the incomplete block verification, which wastes the hash power of type 2 miners. Note that when type 2 miners are optimistic the private chain is extended when it is not equal to the public chain (Alg.~\ref{alg:perishing}, l.~\ref{perishing5}). Alg.~\ref{alg:perishing} details the pseudocode of perishing mining with either optimistic or pessimistic type 2 miners. Perishing mining aims at slowing down the growth of the public chain. \begin{algorithm}[hbpt] \caption{\textit{The perishing mining strategy}.} \label{alg:perishing} \begin{algorithmic}[1] \scriptsize \State \textbf{function} \texttt{Init()} \State \hspace*{2em} $chain_{pub}$, $chain_{1}$ $\leftarrow$ publicly known blocks \comalgo{public and private chains} \State \hspace*{2em} $l_{pub} = l_1 = 0$ \State \hspace*{2em} \textbf{mine} on $chain_{1}$'s head \State \State \textbf{upon event} \texttt{Adv. finds block B on $chain_{1}$} \textbf{do} \comalgo{prob. $\alpha$} \State \hspace*{2em} Adv. appends B to $chain_1$ \State \hspace*{2em} $l_1\texttt{++}$ \State \hspace*{2em} \textbf{release} Header(B) \comalgo{withhold block body} \label{perishing2} \State \hspace*{2em} \textbf{mine} on B \State \State \textbf{upon event} \texttt{Type 1 miners find and append block B on $chain_{pub}$} \textbf{do} \comalgo{prob. $1-\alpha-\mu$} \State \hspace*{2em} $l_{pub}\texttt{++}$ \label{perishing3} \State \hspace*{2em} \textbf{if} $l_{pub} > l_1$ \textbf{then} \State \hspace*{4em} \texttt{Init()} \comalgo{adopt} \label{perishing1} \State \State \textbf{upon event} \texttt{Type 2 miners find block B} \textbf{do} \comalgo{prob. $\mu$} \State \hspace*{2em} \textbf{if} $chain_{pub} \texttt{==} chain_1$ \textbf{then} \State \hspace*{4em} Type 2 miners append B to $chain_{pub}$ \State \hspace*{4em} $\texttt{Init()}$ \comalgo{adopt} \label{perishing4} \State \hspace*{2em} \textbf{else} \State \hspace*{4em} $\{ \texttt{Init()} \}$ \comalgo{pessimistic type 2 miners.} \State \hspace*{6em} or \State \hspace*{4em} $\{$Type 2 miners append B to $chain_1$ \comalgo{optimistic type 2 miners} \State \hspace*{4em} $l_1\texttt{++}$ \label{perishing5} \State \hspace*{4em} \textbf{mine} on B$\}$ \end{algorithmic} \end{algorithm} \begin{figure}[t] \centering \begin{subfigure}[b]{0.42\textwidth} \centering \includegraphics[width=\textwidth]{FIG3.pdf} \caption{With optimistic type 2 miners.} \label{fig:mdp-spv} \end{subfigure} \hfill \begin{subfigure}[b]{0.42\textwidth} \centering \includegraphics[width=\textwidth]{FIG4.pdf} \caption{With pessimistic type 2 miners.} \label{fig:mdp-type2} \end{subfigure} \caption{Perishing mining's Markov chain models with optimistic and pessimistic type 2 miners. Arrows that do not lead to a state (on the right subfigure) represent the wasted mining effort of pessimistic type 2 miners. Only the top-left transition on the left figure has probability $\alpha$.} \label{fig:pm} \end{figure} Fig.~\ref{fig:pm} illustrates the MDP models of the perishing mining strategy assuming that type 2 miners are either optimistic or pessimistic. In this Markov chains, $\alpha$, $\mu$ and $1{-}\alpha{-}\mu$, are respectively the probabilities for the adversary, type 2 and type 1 miners to discover a block. We use a tuple $(i,j)$ to denote the state in perishing mining's MDP, where $i$ and $j$ are respectively the lengths of the private chain and the public chain. The fact that the adversary adopts the public chain whenever it is longer than the private chain implies that $i {\le} j$. The adversary releases the header of the leading block to lure type 2 miners. When type 2 miners are optimistic (Fig.~\ref{fig:mdp-spv}), the adversary relies on type 2 miners that also attempt to extend the private chain. When type 2 miners are pessimistic (Fig.~\ref{fig:mdp-type2}), the adversary is not able to use them to extend the private chain. We evaluate the negative impact of perishing mining on the public chain growth in \S\ref{impact-pm}. \subsection{Combining Perishing Mining and Double Spending} \label{sec:combine_all} The DPC attack leverages the perishing mining strategy to distract type 2 miners and facilitate double spending. Alg.~\ref{alg:bracha} details the attack's pseudocode, where $l_1$, $l_2$, and $l_{pub}$ represent the length of the first private chain $chain_1$, the second private chain $chain_2$, and the public chain $chain_{pub}$ respectively. During the DPC attack, the two invariants $l_2 \le l_1$ and $l_{pub} \le l_1$ are verified. The distraction chain is therefore always the longest chain among the three chains, and can adopt the public chain and the double spending chain when it is not the longest chain. For example, if it happens that the double spending becomes the longest chain then the distraction chain is set to be equal to the double spending chain. As a consequence, the type 2 miners would mine on the headers of the double spending chain, which would facilitate the double spending attack. When the DPC attack starts, all three chains are equal and all miners mine on the same block (Alg.~\ref{alg:bracha}, l.~\ref{line:init}). The adversary's actions are defined in reaction to block discoveries. When the adversary finds a block on the distraction chain (Alg.~\ref{alg:bracha}, l.~\ref{line:chain1}), it releases the corresponding block header so that type 2 miners mine on it, because the distraction chain is then the longest chain. If the two private chains are equal, the newly found block also extends the double spending chain. As a consequence, the adversary extends the distraction chain, and the honest miners are mining on different blocks, type 1 miners mine on the last full block of the public chain while type 2 miners mine on the last block header of the distraction chain. The adversary then allocates all its hash power ($\alpha$) to mining on the double spending chain. When the adversary finds a block on its double spending chain (Alg.~\ref{alg:bracha}, l.~\ref{line:chain2}), it releases the block header if the second private chain becomes the longest chain. In this case, type 2 miners then mine on the double spending chain. The first private chain also adopts the second private chain so that the total hash power used to extend the double spending chain is $\alpha+\mu$. When the second private chain is shorter than the public chain, the adversary keeps mining on it with $1-\beta$ of its hash power. As soon as the double spending chain becomes longer than the public chain and that at least 6 blocks have been appended to the public chain since the beginning of the attack, the adversary uses the double spending chain to override the public chain, and the DPC attack succeeds. When type 1 miners find a block (Alg.~\ref{alg:bracha}, l.~\ref{line:honest}), they extend the public chain. If the public chain becomes the longest chain, then all honest miners will mine on the public chain and the adversary modifies its first private chain so that it adopts the public chain. The adversary then allocates $\alpha\beta$ of hash power to its distraction chain so that it tries to generate a block that will divide again the honest miners. When type 2 miners find a block (Alg.~\ref{alg:bracha}, l.~\ref{line:spv}), three cases are possible. First, the double spending chain is extended if two private chains are equal and longer than the public chain. Second, the public chain and first private chain are extended if they are equal. Finally, in the other cases the newly discovered block is abandoned, which wastes the hash power of type 2 honest miners. The DPC attack can be tailored to optimistic or pessimistic type 2 miners. For example, lines~\ref{line:spv1},~\ref{line:spv2},~\ref{line:spv3},~\ref{line:spv4},~\ref{line:spv5} in Alg.~\ref{alg:bracha} describe the adversary's behavior with optimistic type 2 honest miners. Alg.~\ref{alg:bracha} presents the pseudocode of the full DPC attack where an adversary manages two private chains to attempt to double spend. Table~\ref{transition} details the states that can be reached during a DPC attack and the possible transitions between them in presence of optimistic type 2 miners. Table~\ref{transition-type2} assumes the presence of pessimistic type 3 miners. Transitions happen when a block is discovered either by the adversary or by an honest miner (type 1 or type 2). \begin{algorithm}[!htbp] \caption{ \textit{The DPC attack, which the adversary can configure to assume that all type 2 miners are pessimistic or optimistic.}} \label{alg:bracha} \begin{algorithmic}[1] \scriptsize \State \textbf{function} \texttt{Init} \textbf{do} \label{line:init} \State \hspace*{2em} $chain_{pub}$ $\leftarrow$ publicly known blocks \State \hspace*{2em} $chain_{1}$ $\leftarrow$ publicly known blocks \comalgo{1st priv. chain (distraction chain)} \State \hspace*{2em} $chain_{2}$ $\leftarrow$ publicly known blocks \comalgo{2nd priv. chain (double spending chain)} \State \hspace*{2em} \textbf{mine} on $chain_{1}$'s head with power $\alpha\beta$ \State \hspace*{2em} \textbf{mine} on $chain_{2}$'s head with power $\alpha(1-\beta)$ \State \hspace*{2em} $l_{pub} = l_1 = l_2 = 0$ \State \textbf{upon event} \texttt{Adv. finds a block B on $chain_{1}$} \textbf{do} \label{line:chain1} \State\hspace*{2em} \textbf{if} $chain_{1} {\neq} chain_2$ \textbf{then} \State\hspace*{4em} Adv. appends B to $chain_1$ \State\hspace*{4em} $l_1\texttt{++}$ \State\hspace*{4em} \textbf{release} Header(B) \State\hspace*{4em} \textbf{mine} on $chain_2$ with power $\alpha$ \State\hspace*{2em} \textbf{else if} $chain_{1} \texttt{==} chain_2 $ \textbf{then} \State\hspace*{4em} Adv. appends B to $chain_1$ (and $chain_2$) \label{linea} \State\hspace*{4em} $l_1\texttt{++}$ \State\hspace*{4em} $l_2\texttt{++}$ \State\hspace*{4em} \textbf{release} Header(B) \State\hspace*{4em} \textbf{mine} on $chain_2$ with power $\alpha$ \label{lineb} \State \textbf{upon event} \texttt{Adv. finds a block B on $chain_{2}$} \textbf{do} \label{line:chain2} \State\hspace*{2em} \textbf{if} $chain_{1} {\neq} chain_2$ \textbf{then} \State\hspace*{4em} Adv. appends B to $chain_2$ \State\hspace*{4em} $l_2\texttt{++}$ \State\hspace*{4em} \textbf{release} Header(B) \State\hspace*{4em} \textbf{mine} on $chain_2$ with $\alpha(1-\beta)$ \State\hspace*{2em} \textbf{else if} $chain_{1} \texttt{==} chain_2 $ \textbf{then \State\hspace*{4em} Execute lines~\ref{linea} to~\ref{lineb} \State\hspace*{2em} \textbf{if} $l_2 \geq l_{pub} \geq 6$ \textbf{then} \State \hspace*{4em} \textbf{override} $chain_{pub}$ with $chain_2$ \comalgo{double spending} \State \textbf{upon event} \texttt{type 1 honest miners find and append block B on $chain_{pub}$} \textbf{do} \label{line:honest} \State \hspace*{2em} \textbf{if} $l_{1} \texttt{==} l_{pub}$ \textbf{then} \State \hspace*{4em} $chain_{1} = chain_{pub}$ \comalgo{reinit. 1st priv. chain} \label{linec} \State \hspace*{4em} $l_{pub}\texttt{++}$ \State \hspace*{4em} $l_1\texttt{++}$ \State \hspace*{4em} \textbf{mine} on $chain_1$ with power $\alpha\beta$ \label{lined} \State \hspace*{2em} \textbf{else if} $l_{1} \texttt{>} l_{pub}$ \textbf{then} \State \hspace*{4em} $l_{pub}\texttt{++}$ \State \textbf{upon event} \texttt{type 2 honest miners find block B} \textbf{do}\label{line:spv} \State \hspace*{2em} \textbf{if} $chain_{1} \texttt{==} chain_{2} {\neq} chain_{pub}$ \textbf{then} \State \hspace*{4em} $\{$type 2 honest miners append B to $chain_{2}$ \comalgo{conservative approach with pessimistic type 2 miners} \State \hspace*{4em} $chain_1 \texttt{=} chain_{pub}$ \State \hspace*{4em} $l_2\texttt{++} \}$ \State \hspace*{6em} or \comalgo{optimistic type 2 miners} \State \hspace*{4em} $\{$type 2 honest miners append B to $chain_{2}$ (and $chain_1$)~\label{line:spv1} \State \hspace*{4em} Execute lines~\ref{linea} to~\ref{lineb}$\}$~\label{line:spv2} \State \hspace*{2em} \textbf{else if} $chain_{1} \texttt{==} chain_{pub}$ \textbf{then} \State \hspace*{4em} type 2 honest miners append B to $chain_1$ (and $chain_{pub}$) \State \hspace*{4em} Execute lines~\ref{linec} to~\ref{lined} \State \hspace*{2em} \textbf{else} \State \hspace*{4em} $\{chain_1 \texttt{=} chain_{pub}$\comalgo{conservative approach with pessimistic type 2 miners} \State \hspace*{4em} $l_1\texttt{=}l_{pub}\}$ \State \hspace*{6em} or \comalgo{optimistic type 2 miners} \State \hspace*{4em} $\{$type 2 honest miners append B to $chain_1$~\label{line:spv3} \State \hspace*{4em} $l_1\texttt{++}$~\label{line:spv4} \State \hspace*{4em} \textbf{mine} on $chain_2$ with power $\alpha\}$~\label{line:spv5 \end{algorithmic} \end{algorithm} \subsection{Markov Decision Process of the DPC Attack} We establish the Markov decision process (MDP) of the DPC attack by simultaneously considering the two private chains and observing that each state is a 5-tuple $(l_{pub}, l_1, l_2, s_{(pub,1)}, s_{(1,2)})$. $l_{pub}$, $l_1$, and $l_2$ are respectively the lengths of the public chain $chain_{pub}$, the first private chain $chain_1$, and the second private chain $chain_2$. $s_{(pub,1)}, s_{(1,2)} \in \{\texttt{t(rue)}, \texttt{f(alse)}\}$ respectively indicate whether $chain_{pub}$ is equal to $chain_1$, and whether $chain_1$ is equal to $chain_2$. Based on the relations between the three chains (synchronized or not), we identified 10 types of states in the presence of optimistic type 2 miners, and 9 types of states in presence of pessimistic type 2 miners. The corresponding transitions are presented in Tables~\ref{transition} and~\ref{transition-type2} (in Appendix~\ref{appx:pseudocode}). Note that we were not able to obtain closed form formulas for the probabilities of each possible state due to the complexity of the DPC attack's MDP model. Nevertheless, we use Monte Carlo simulations to estimate the adversary's success rate and revenue, as in previous block withholding attacks~\cite{selfish14,Gervais16,stubborn16}. \begin{table*}[htbp] \centering \scriptsize \caption{States and transitions of the DPC attack with optimistic type 2 miners (e.g., SPV miners). We use $(r_a,r_h)$ to denote the revenue of the adversary and other miners, $v_b$ to denote the value of a single block, and $v_t$ to denote the value of the double-spent transactions. Because type 2 miners could help to extend the double spending chain, we use $n_{t2}$ to denote the number of blocks that were discovered by type 2 miners on the 2nd private chain.} \renewcommand{\arraystretch}{1.2} \begin{adjustbox}{angle=0} \begin{tabular}{p{4.6cm}|p{4.4cm}|p{1cm}|l|p{2.8cm}} \textbf{State S} & \textbf{Event} & \textbf{Prob.} & \textbf{Destination state} & \textbf{Revenue} \\ $(l_{pub}, l_1, l_2, {sync}_{(pub,1)}, {sync}_{(1,2)})$ & & & & $(r_a,r_h)$ \\ \hline Case 0 (Contains Init state) & Adv. extends $chain_1 {=} chain_2$ & $\alpha$ & $(l_{pub},l_1+1,l_2+1,\texttt{f},\texttt{t})$ & $(r_a,r_h)$\\ \cline{2-5} $(l_{pub}, l_1, l_2, \texttt{t}, \texttt{t})$ & Type 1 or 2 extends $chain_{pub}$ & $1-\alpha$ & $(l_{pub}+1,l_1+1,l_2,\texttt{t},\texttt{f})$) & $(r_a,r_h+v_b)$ \\ \hline Case 1.1 & Adv. or type 2 extends $chain_1 {=} chain_2$ & $\alpha+\mu$ & $(l_{pub}, l_1+1, l_2+1, \texttt{f}, \texttt{t})$ & $(r_a,r_h)$ \\ \cline{2-5} $(l_{pub}, l_1 > l_{pub}, l_2, \texttt{f}, \texttt{t})$ & Type 1 extends $chain_{pub}$ & $1-\alpha-\mu$ & $(l_{pub}+1, l_1, l_2, \texttt{f}, \texttt{t})$ & $(r_a,r_h+v_b)$\\ \hline Case 1.2 & Adv. or type 2 extends $chain_{1}$ & $\alpha+\mu$ & $(l_{pub}, l_1+1, l_2+1, \texttt{f}, \texttt{t})$ & $(r_a,r_h)$ \\ \cline{2-5} $(l_{pub}, l_1=l_{pub}, l_2, \texttt{f}, \texttt{t})$ & Type 1 extends $chain_{pub}$ & $1-\alpha-\mu$ & $(l_{pub}+1, l_1+1, l_2, \texttt{t}, \texttt{f})$ & $(r_a,r_h+v_b)$ \\ \hline Case 2.1 & Adv. extends $chain_1$ & $\alpha \beta$ & $(l_{pub}, l_1+1, l_2, \texttt{f}, \texttt{f})$ & $(r_a,r_h)$ \\ \cline{2-5} $(l_{pub}, l_1=l_{pub}, l_2 < l_{pub}, \texttt{t}, \texttt{f})$ & Adv. extends $chain_2$ & $\alpha(1-\beta)$ & $(l_{pub}, l_1, l_2+1, \texttt{t}, \texttt{f})$ & $(r_a,r_h)$ \\ \cline{2-5} & Type 1 or 2 extends $chain_{pub}$ & $1-\alpha$ & $(l_{pub}+1, l_1+1, l_2, \texttt{t}, \texttt{f})$ & $(r_a,r_h+v_b)$\\ \hline Case 2.2 & Adv. extends $chain_1$ & $\alpha \beta$ & $(l_{pub}, l_1+1, l_2, \texttt{f}, \texttt{f})$ & $(r_a,r_h)$ \\ \cline{2-5} $(l_{pub}, l_1=l_{pub}, l_2 = l_{pub}, \texttt{t}, \texttt{f})$ & Adv. extends $chain_2$ & $\alpha(1-\beta)$ & $(l_{pub}, l_1+1, l_2+1, \texttt{f}, \texttt{t})$ & $(r_a,r_h)$ \\ \cline{2-5} & Type 1 or 2 extends $chain_{pub}$ & $1-\alpha$ & $(l_{pub}+1, l_1+1, l_2, \texttt{t}, \texttt{f})$ & $(r_a,r_h+v_b)$\\ \hline Case 3.1 & Adv. extends $chain_2$ & $\alpha$ & $(l_{pub}, l_1, l_2+1, \texttt{f}, \texttt{f})$ & $(r_a,r_h)$ \\ \cline{2-5} $(l_{pub}, l_1 > l_{pub}, l_2 < l_1, \texttt{f}, \texttt{f})$ & Type 2 extends $chain_1$ & $\mu$ & $(l_{pub}, l_1, l_2+1, \texttt{f}, \texttt{f})$ & $(r_a,r_h)$ \\ \cline{2-5} & Type 1 extends $chain_{pub}$ & $1 - \alpha - \mu$ & $(l_{pub}+1, l_1, l_2, \texttt{f}, \texttt{f})$ &$(r_a,r_h+v_b)$ \\ \hline Case 3.2 & Adv. extends $chain_2$ & $\alpha$ & $(l_{pub}, l_1, l_2+1, \texttt{f}, \texttt{f})$ & $(r_a,r_h)$ \\ \cline{2-5} $(l_{pub}, l_1 > l_{pub}, l_2 = l_1, \texttt{f}, \texttt{f})$ & Type 2 extends $chain_1$ & $\mu$ & $(l_{pub}, l_1+1, l_2+1, \texttt{f}, \texttt{t})$ & $(r_a,r_h)$ \\ \cline{2-5} & Type 1 extends $chain_{pub}$ & $1-\alpha -\mu$ & $(l_{pub}+1, l_1, l_2, \texttt{f}, \texttt{f})$ & $(r_a,r_h+v_b)$ \\ \hline Case 3.3 & Adv. extends $chain_2$ & $\alpha$ & $(l_{pub}, l_1, l_2+1, \texttt{f}, \texttt{f})$ & $(r_a,r_h)$ \\ \cline{2-5} $(l_{pub}, l_1 = l_{pub}, l_2 < l_1, \texttt{f}, \texttt{f})$ & Type 2 extends $chain_1$ & $\mu$ & $(l_{pub}, l_1, l_2+1, \texttt{f}, \texttt{f})$ & $(r_a,r_h)$ \\ \cline{2-5} & Type 1 extends $chain_{pub}$ & $1 - \alpha - \mu$ & $(l_{pub}+1, l_1+1, l_2, \texttt{t}, \texttt{f})$ &$(r_a,r_h+v_b)$ \\ \hline Case 3.4 & Adv. extends $chain_2$ & $\alpha$ & $(l_{pub}, l_1, l_2+1, \texttt{f}, \texttt{f})$ & $(r_a,r_h)$ \\ \cline{2-5} $(l_{pub}, l_1 = l_{pub}, l_2 = l_1, \texttt{f}, \texttt{f})$ & Type 2 extends $chain_1$ & $\mu$ & $(l_{pub}, l_1+1, l_2+1, \texttt{f}, \texttt{t})$ & $(r_a,r_h)$ \\ \cline{2-5} & Type 1 extends $chain_{pub}$ & $1-\alpha -\mu$ & $(l_{pub}+1, l_1+1, l_2, \texttt{t}, \texttt{f})$ & $(r_a,r_h+v_b)$ \\ \hline Case 4 (Double spending) & (instantaneous transition) & $1$ & $(l_{pub}=0, l_1=l_1-l_{pub},$ & $(r_a+(l_2-n_{t2})v_b+v_t,$ \\ S s.t. $l_2 {\geq} l_{pub} {\geq} 6$ & $chain_{pub}=chain_2$& &$l_2=0, s_{(pub,1)}, \texttt{t})$ & $r_h-(l_{pub}-n_{t2})v_b)$\\ \end{tabular} \end{adjustbox} \renewcommand{\arraystretch}{1} \label{transition} \end{table*} \begin{table*}[htbp] \centering \scriptsize \caption{States and transitions of the DPC attack in the presence of pessimistic type 2 miners.} \renewcommand{\arraystretch}{1.2} \begin{adjustbox}{angle=0} \begin{tabular}{p{4.6cm}|p{4.4cm}|p{1cm}|l|p{2.8cm}} \textbf{State S} & \textbf{Event} & \textbf{Prob.} & \textbf{Destination state} & \textbf{Revenue} \\ $(l_{pub}, l_1, l_2, {sync}_{(pub,1)}, {sync}_{(1,2)})$ & & & & $(r_a,r_h)$ \\ \hline Case 0 (Contains Init state) & Adv. extends $chain_1 {=} chain_2$ & $\alpha$ & $(l_{pub},l_1+1,l_2+1,\texttt{f},\texttt{t})$ & $(r_a,r_h)$\\ \cline{2-5} $(l_{pub}, l_1, l_2, \texttt{t}, \texttt{t})$ & Type 1 or 2 extends $chain_{pub}$ & $1-\alpha$ & $(l_{pub}+1,l_1+1,l_2,\texttt{t},\texttt{f})$) & $(r_a,r_h+v_b)$ \\ \hline Case 1 & Adv. extends $chain_2$ & $\alpha$ & $(l_{pub}, l_1, l_2+1, \texttt{f}, \texttt{f})$ & $(r_a,r_h)$ \\ \cline{2-5} $(l_{pub}, l_1 > l_{pub}, l_2, \texttt{f}, \texttt{t})$ & Type 1 extends $chain_{pub}$ & $1-\alpha-\mu$ & $(l_{pub}+1, l_1, l_2, \texttt{t}, \texttt{f})$ & $(r_a,r_h+v_b)$\\ \cline{2-5} & Type 2 adopts $chain_{pub}$ & $\mu$ & $(l_{pub}, l_1-1, l_2, \texttt{t}, \texttt{f})$ & $(r_a,r_h+v_b)$\\ \hline Case 2.1 & Adv. extends $chain_1$ & $\alpha \beta$ & $(l_{pub}, l_1+1, l_2, \texttt{f}, \texttt{f})$ & $(r_a,r_h)$ \\ \cline{2-5} $(l_{pub}, l_1=l_{pub}, l_2 < l_{pub}, \texttt{t}, \texttt{f})$ & Adv. extends $chain_2$ & $\alpha(1-\beta)$ & $(l_{pub}, l_1, l_2+1, \texttt{t}, \texttt{f})$ & $(r_a,r_h)$ \\ \cline{2-5} & Type 1 or 2 extends $chain_{pub}$ & $1-\alpha$ & $(l_{pub}+1, l_1+1, l_2, \texttt{t}, \texttt{f})$ & $(r_a,r_h+v_b)$\\ \hline Case 2.2 & Adv. extends $chain_1$ & $\alpha \beta$ & $(l_{pub}, l_1+1, l_2, \texttt{f}, \texttt{f})$ & $(r_a,r_h)$ \\ \cline{2-5} $(l_{pub}, l_1=l_{pub}, l_2 = l_{pub}, \texttt{t}, \texttt{f})$ & Adv. extends $chain_2$ & $\alpha(1-\beta)$ & $(l_{pub}, l_1, l_2+1, \texttt{t}, \texttt{f})$ & $(r_a,r_h)$ \\ \cline{2-5} & Type 1 or 2 extends $chain_{pub}$ & $1-\alpha$ & $(l_{pub}+1, l_1+1, l_2, \texttt{t}, \texttt{f})$ & $(r_a,r_h+v_b)$\\ \hline Case 2.3 & Adv. extends $chain_1$ & $\alpha \beta$ & $(l_{pub}, l_1+1, l_2, \texttt{f}, \texttt{f})$ & $(r_a,r_h)$ \\ \cline{2-5} $(l_{pub}, l_1=l_{pub}, l_2 > l_{pub}, \texttt{t}, \texttt{f})$ & Adv. extends $chain_2$ & $\alpha(1-\beta)$ & $(l_{pub}, l_1, l_2+1, \texttt{t}, \texttt{f})$ & $(r_a,r_h)$ \\ \cline{2-5} & Type 1 or 2 extends $chain_{pub}$ & $1-\alpha$ & $(l_{pub}+1, l_1+1, l_2, \texttt{t}, \texttt{f})$ & $(r_a,r_h+v_b)$\\ \hline Case 3.1 & Adv. extends $chain_2$ & $\alpha$ & $(l_{pub}, l_1, l_2+1, \texttt{f}, \texttt{f})$ & $(r_a,r_h)$ \\ \cline{2-5} $(l_{pub}, l_1 > l_{pub}, l_2 < l_1, \texttt{f}, \texttt{f})$ & Type 2 adopts $chain_{pub}$ & $\mu$ & $(l_{pub}, l_1-1, l_2, \texttt{f}, \texttt{f})$ & $(r_a,r_h)$ \\ \cline{2-5} & Type 1 extends $chain_{pub}$ & $1 - \alpha - \mu$ & $(l_{pub}+1, l_1, l_2, \texttt{t}, \texttt{f})$ &$(r_a,r_h+v_b)$ \\ \hline Case 3.2 & Adv. extends $chain_2$ & $\alpha$ & $(l_{pub}, l_1, l_2+1, \texttt{f}, \texttt{f})$ & $(r_a,r_h)$ \\ \cline{2-5} $(l_{pub}, l_1 > l_{pub}, l_2 = l_1, \texttt{f}, \texttt{f})$ & Type 2 adopts $chain_{pub}$ & $\mu$ & $(l_{pub}, l_1-1, l_2, \texttt{t}, \texttt{f})$ & $(r_a,r_h)$ \\ \cline{2-5} & Type 1 extends $chain_{pub}$ & $1-\alpha -\mu$ & $(l_{pub}+1, l_1, l_2, \texttt{t}, \texttt{f})$ & $(r_a,r_h+v_b)$ \\ \hline Case 3.3 & Adv. extends $chain_2$ & $\alpha$ & $(l_{pub}, l_1, l_2+1, \texttt{f}, \texttt{f})$ & $(r_a,r_h)$ \\ \cline{2-5} $(l_{pub}, l_1 > l_{pub}, l_2 > l_1, \texttt{f}, \texttt{f})$ & Type 2 extends $chain_1$ & $\mu$ & $(l_{pub}, l_1-1, l_2, \texttt{f}, \texttt{f})$ & $(r_a,r_h)$ \\ \cline{2-5} & Type 1 extends $chain_{pub}$ & $1-\alpha -\mu$ & $(l_{pub}+1, l_1, l_2, \texttt{t}, \texttt{f})$ & $(r_a,r_h+v_b)$ \\ \hline Case 4 (Double spending) & (instantaneous transition) & $1$ & $(l_{pub}=0, l_1=0,l_2=0,\texttt{t}, \texttt{t}$ & $(r_a+(l_2-n_{type2})v_b+v_t,$ \\ S s.t. $l_2 {\geq} l_{pub} {\geq} 6$ & $chain_{pub}=chain_2$& && $r_h-(l_{pub}-n_{type2})v_b)$\\ \end{tabular} \end{adjustbox} \renewcommand{\arraystretch}{1} \label{transition-type2} \end{table*} In particular, case 0 is the initial state of the attack. Case 4 captures the success of the DPC attack, which happens if the public and the double spending chains contain more than 6 blocks, and if the double spending chain is longer than the public chain. Cases 1.x, 2.x, 3.x are all possible intermediary states and consider scenarios that differ based on the lengths of the chains, and whether or not they are equal, which happens when the adversary reinitializes one or both of its private chains. Our Monte Carlo simulations are based on this MDP. We emphasize that an adversary that executes the DPC attack earns a mining reward only when the double spending chain succeeds. In this case, the adversary earns the block mining reward that corresponds to the private blocks it mined that end up in the public chain and the value of the transaction it managed to double spend. We note value of blocks $v_b$, but also the value of double spent transactions $v_t$. \section{Analysis using Monte Carlo Simulations} \label{sec:perf_eval} This section evaluates the perishing mining strategy and the DPC attack using Monte Carlo simulations that react based on the event of block discovery. \subsection{Methodology and Settings} We evaluate perishing mining and the DPC attack using random walks in their respective Markov decision processes. Our evaluations are based on Python scripts. In each scenario, we simulate the creation of 2,016 blocks, repeat each configuration 10,000 times, and report the average of the metrics of interest. Simulating the creation of 2,016 blocks maintains the mining difficulty constant during the experiment since Bitcoin's mining difficulty is adjusted every 2,016 blocks. We quantify the impact of perishing mining on the public chain's growth rate, and then evaluate the double spending success rate of the DPC attack. We compare the success rate of the DPC attack to the success rate of the classical double spending attack using the success rate formulas that were obtained by Nakamoto~\cite{nakamoto2008bitcoin} and Rosenfeld~\cite{rosenfeld11}. We study the various strategies with $\alpha, \mu \in [0,0.1,0.2,0.3,0.4,0.5]$ and $\beta \in [0,1]$ (by 0.01 steps). Moreover, we analyze the adversary's expected revenue in Appx.~\ref{profit}. \subsection{Impact of Perishing Mining on Chain Growth}\label{impact-pm} \begin{figure}[t] \centering \begin{subfigure}[b]{0.48\textwidth} \centering \includegraphics[width=\textwidth]{FIG5.pdf} \caption{With optimistic type 2 miners.} \label{fig:pm-cgr-1} \end{subfigure} \hfill \begin{subfigure}[b]{0.48\textwidth} \centering \includegraphics[width=\textwidth]{FIG6.pdf} \caption{With pessimistic type 2 miners.} \label{fig:pm-cgr-2} \end{subfigure} \caption{Relative growth rate of the public chain (compared to the attack-free case) when the adversary uses selfish mining (SM) or perishing mining (PM), where type 2 miners own a fraction $\mu$ of the global power.} \label{fig:pmchaingrowth} \end{figure} In a DPC attack, the adversary leverages perishing mining strategy to inhibit public chain's growth. We now consider a scenario where the adversary constantly dedicates a fraction of its full hash power to perishing mining, so that we can quantify its effect on the growth rate of the public chain. Fig.~\ref{fig:pmchaingrowth} represents the relative public chain growth rate of a system under attack, which is expressed as a fraction (in \%) of the public chain growth rate in the attack-free case. We compare perishing mining to selfish mining and vary the global hash power $\mu$ of type 2 miners $0$ to $0.5$ (i.e., ranging from 0\% to 50\% of the global hash power). The public chain is extended at a lower rate when the adversary's power increases and when the global power of type 2 miners increases. By comparing Fig.~\ref{fig:pm-cgr-1} and Fig.~\ref{fig:pm-cgr-2}, one can see that perishing mining has a stronger impact with optimistic type 2 miners than with pessimistic type 2 miners, as one could expect. \subsection{Double Spending Success Rate}\label{sr-spv} \begin{figure}[t] \centering \begin{subfigure}[b]{0.48\textwidth} \centering \includegraphics[width=\textwidth]{FIG7.pdf} \caption{With optimistic type 2 miners.} \label{fig:successrate1} \end{subfigure} \hfill \begin{subfigure}[b]{0.48\textwidth} \centering \includegraphics[width=\textwidth]{FIG8.pdf} \caption{With pessimistic type 2 miners.} \label{fig:successrate2} \end{subfigure} \caption{Success rate of the DPC attack depending on the hash power $\mu$ of the type 2 miners with the best value of parameter $\beta$ within 2016 blocks. The ``NS'' line represents the success rate of the classical double spending attack (based on Nakamoto's evaluation). A darker color indicates a higher success probability.} \label{fig:successrate} \end{figure} Fig.~\ref{fig:successrate} illustrates the success rates of the DPC attack for different $\mu$ and with the best $\beta$ value that we obtained experimentally. It is interesting to observe the differences between the partitions corresponding to a given $\mu$ with the best $\beta$ value to see that maintaining distraction chain and double spending chain simultaneously makes a real difference. An adversary would be able to determine the best $\beta$ after estimating $\mu$, as we discuss in \S\ref{sec:discussion}. In the presence of type 2 miners (i.e., when $\mu>0$), the DPC attack's success rate is always higher than the one of the traditional double spending attack (i.e., 0(NS) in Fig.~\ref{fig:successrate}). The success rate of the double spending attack (with 6 confirmations) with $\alpha=0.2$ (the power of the biggest mining pool) increases from 1\% to 87\% (or from 1\% to 12\%) via the DPC attack depending on $\mu$ as shown in Fig.~\ref{fig:successrate1} (or Fig.~\ref{fig:successrate2}). The impact of optimistic type 2 miners on DPC attack' success rate is more severe than pessimistic type 2 miners, for example, if $\mu=0.2$ and $\alpha=0.2$, the DPC attack's success rate is $28\%$ in Fig.~\ref{fig:successrate1} while it is $7.7\%$ in Fig.~\ref{fig:successrate2}. Importantly, the DPC attack lowers Bitcoin's safety bound, i.e., not only the minimum hash power that the adversary needs to double spend, but also the threshold for breaking chain's consistency. For instance, when $\mu=0.5,0.4,0.3,0.2$ and type 2 miners are optimistic, a DPC adversary with $30\%,35\%,40\%,45\%$ of the global hash power could completely manipulate the blockchain (i.e., 100\% success rate in Fig.~\ref{fig:successrate1}), which is more threatening than the existing block withholding attacks~\cite{selfish14,Gervais16,stubborn16}. Inspired by M. Rosenfeld~\cite{rosenfeld11}, we further evaluate the safe transaction value (i.e., the suggested maximum value of transaction for clients) against double spending attack. Fig.~\ref{fig:vt} plots the minimum value for $\frac{v_t}{v_b}$ that allows the DPC attacker to be more profitable than honest mining. When $\mu=0.2$ and type 2 miners are optimistic, the adversary with $0.05,0.1,0.15,0.2$ (the possible hash power share of mining pools in Bitcoin) of global hash power is incentivized to perform DPC attack as long as the merchants are willing to accept the transaction with $26.29*v_b,13.49*v_b,9*v_b,5.69*v_b$ BTC respectively (as shown in Fig.~\ref{fig:vt1}). In the same case, when type 2 miners are pessimistic, the safe transaction value would increase and become $4026.56*v_b,329.86*v_b,81.4*v_b,30.97*v_b$. Bitcoin's future block reward halving will decrease both the threshold to launch profitable DPC attacks and the safe transaction value, which confirms Carlsten et al.'s previous observation~\cite{carlsten2016instability}. \begin{figure}[t] \centering \begin{subfigure}[b]{0.48\textwidth} \centering \includegraphics[width=\textwidth]{FIG9.pdf} \caption{With optimistic type 2 miners.} \label{fig:vt1} \end{subfigure} \hfill \begin{subfigure}[b]{0.48\textwidth} \centering \includegraphics[width=\textwidth]{FIG10.pdf} \caption{With pessimistic type 2 miners.} \label{fig:vt2} \end{subfigure} \caption{Minimum value for $\frac{v_t}{v_b}$ for the DPC attack to be more profitable than honest mining depending on $\mu$. ``9999'' represents $\frac{v_t}{v_b} \geq 9999$. } \label{fig:vt} \end{figure} \subsection{Revenue of a DPC Adversary} \label{profit} To evaluate the adversary's revenue when it executes the DPC attack we consider the mining reward $v_b$ per block to be equal to 6.25 BTC (which is the case since May 2021). We do not consider the transaction fees as their impact is negligible and because they vary with time~\cite{bar2022werlman}. We evaluate the adversary's revenue depending on the value $v_t$ of a block of transactions it attempts to double spend plus the mining reward $v_b$ per block. In terms of a block of transactions, the adversary might distribute the value of $v_t$ over the transactions of the attack initialization block since each Bitcoin block (1MB) normally includes from 1,500 to 2,500 transactions. \begin{figure}[t] \centering \begin{subfigure}[b]{0.48\textwidth} \centering \includegraphics[width=\textwidth]{FIG11.pdf} \caption{With optimistic type 2 miners.} \end{subfigure} \hfill \begin{subfigure}[b]{0.48\textwidth} \centering \includegraphics[width=\textwidth]{FIG12.pdf} \caption{With pessimistic type 2 miners.} \end{subfigure} \caption{Revenue of the adversary when it repetitively attempts to double spend a block with transactions of value $v_t=10v_b$ with the DPC attack and SPV miners, or with a previous mining strategy or attack, over a period of $2,016$ discovered blocks. The bottom 3 rows correspond to previous adversarial mining strategies (classical double spending, selfish mining and honest mining). A lighter color indicates a higher revenue. } \label{fig:result-10} \end{figure} We now show that the DPC attack also increases the revenue a powerful adversary would perceive, assuming that the coin value remains constant despite a successful double spending. Upon successfully executing a double spending attack, the on-chain revenue of the adversary consists of the value of the double spent transaction and the mining rewards associated to the blocks that it mined in the longest chain. We consider that the adversary reinitializes its attack when its double spending chain is too far behind the public chain (cf. Appx.~\ref{sec:reinit}). We plot the adversary's revenue when $v_t{=}10v_b$, which is reasonable since currently $v_b{=}6.25$~BTC, to compare the different strategies the adversary might follow. Fig.~\ref{fig:result-10} compares the expected adversary's revenue for the DPC attack with the revenue it would perceive using honest mining (HM), selfish mining (SM)~\cite{selfish14}, the double spending attack (DS)~\cite{rosenfeld2014analysis}, whose probabilities are represented in the last three lines. We omit the identical energy costs associated to mining for all strategies. Selfish mining is less profitable than honest mining, which is expected with a constant mining difficulty~\cite{selfish14,Gervais16}. When $v_t=10v_b$ and $\alpha \in [0,0.5]$, the DPC attack is the only strategy for which the adversary's expected revenue can be higher than with honest mining if $\mu > 0$ and $\alpha$ is large enough. For example, when $\mu > 0.4$, an adversary with more than $20\%$ of the global hash power (i.e., $\alpha=0.2$) benefits more from the DPC attack than from honest mining. Using larger $v_t$ values would also make the DPC attack more profitable than other strategies for given $\mu$ and $\alpha$ values. \section{Attack Discussion} \label{sec:discussion} \textbf{Attack variants.} We have presented the DPC attack we found to be the most effective when the adversary splits its hash power in two constant parts $\alpha\beta$ and $\alpha(1-\beta)$. We foresee that one could devise variants of the DPC attack, e.g., using techniques that have been applied to selfish mining~\cite{karame2012doublespending,selfish14,rosenfeld2014analysis,sapirshtein2015optimal}. In these variants the adversary would mine on different blocks depending on the system's state, or dedicate a different fraction of its hash power to extend each of its two private chains. We leave the study of these variants to future work. \textbf{Estimating $\mu$ and Selecting $\beta$.} It is sufficient for the adversary to approximate the value of $\mu$, which is the proportion of the global hash power that belongs to type 2 miners, for a DPC attack to be successful, as our experimental results demonstrate. However, in practice, an adversary would be able to optimize its DPC attack by determining a precise value for $\mu$. The adversary can estimate $\mu$ based on some public websites~\cite{f2pool}, or establish direct connections with the public mining pools to perform a statistical analysis. Moreover, the perishing mining strategy that we present in this paper can be used as a probing technique to measure $\mu$. Indeed, the adversary can directly monitor the impact of perishing mining on the public chain growth and compute $\mu$ based on the it (Section~\ref{sec:combine_all} provides an equation for the public chain growth rate under a perishing mining attack). Once the exact value of $\mu$ is known, an adversary can find the best $\beta$ for the DPC attack by replicating our experiments. \textbf{Attack Detection and Prevention.} The DPC attack leverages the fact that type 2 miners, which include SPV miners, accept block headers without waiting for and verifying the corresponding transactions. One partial countermeasure against the DPC attack would consist in miners deliberately choosing to stop mining on block headers alone. However, it does not seem reasonable to assume that all miners would avoid this strategy because they can start working on the next block earlier than other miners and therefore increase their profit. Type 2 miners could also avoid mining on the adversary's blocks by accepting to mine only on blocks that were discovered from known mining pools. It is unclear whether this modification would have undesired security implications, e.g., regarding the decentralization of proof-of-work blockchains, or because pool sub-miners run a mining software that is developed internally and independently from the official protocol specification~\cite{eyal2015miner}. In addition, this modification would require type 2 miners to trust mining pools, and a malicious pool manager would still be able to execute the DPC attack. Another idea would be for type 2 miners to stop mining on a block header if the associated transactions are not received before a maximum delay and then mine on the last full block. However, the adversary could also update its strategy to regularly send the unmatched block bodies so that type 2 miners keep mining on its blocks. It is unclear whether this countermeasure would be efficient, and in particular in practical settings. Moreover, the variation of message delays in Bitcoin's peer to peer network would sometimes lead type 2 miners to reject blocks that are generated by honest miners, and might imply possible DoS attacks. \textbf{Evidence of type 2 mining.} In practice, it is difficult to know the exact strategy that miners follow. However, previous works have provided evidence of SPV mining~\cite{mirkin2020bdos,emptyblocks,halfspv,f2pool,spvpools}. Our assumptions in this work are not stronger since our pessimistic type 2 miners are more conservative than SPV miners. In 2020, 9+ mining pools representing 36\% of the global power produced empty blocks, which one might consider evidence of SPV mining~\cite{theblock}. We analysed the Bitcoin blockchain and found that Antpool, Binance, F2pool, Huobi, Poolin, ViaBTC published empty blocks from 01/2021 to 02/2022 and collectively represent more than 60\% of the global power. \section{Conclusion} \label{sec:conclusion} In this paper, we proposed perishing mining, a novel adversarial mining strategy that slows down the public chain by leveraging the verifier's dilemma. We then described the dual private chain (DPC) attack where an adversary dedicates a part of its hash power to the perishing mining strategy and launches a parallel double spending attack. We established the Markov decision process of both the perishing mining and the DPC attack. We relied on Monte Carlo simulations to quantify the impact of perishing mining on the public chain growth, and evaluate the double spending success rate of the DPC attack. Our performance evaluation showed that the DPC attack is more powerful than the classical double spending attack as soon as a fraction of the miners mine on blocks without verifying their transactions. We also evaluated the revenue an adversary could expect from running the DPC attack, and showed that an adversary with sufficient funds or with sufficient hash power would maximize its revenue with the DPC attack. \bibliographystyle{IEEEtran}
{ "redpajama_set_name": "RedPajamaArXiv" }
7,966
const timer = (state = 0, action) => { switch(action.type) { case 'NEXT_TASK': return state + 1; case 'SET_CURRENT_TASK': return action.id; default: return state; } } export default timer;
{ "redpajama_set_name": "RedPajamaGithub" }
1,488
declare module phosphor.collections.algorithm { /** * Find the index of the first occurrence of a value in an array. * * @param array - The array of values to be searched. * * @param value - The value to locate in the array. * * @param fromIndex - The starting index of the search. If this value * is negative, it is taken as an offset from the end of the array. * If the adjusted value is still negative, it is clamped to `0`. * * @param wrap - Whether the search wraps around at the end of the array. * If `true` and the end of the array is reached without finding the * value, the search will wrap to the front of the array and continue * until one before `fromIndex`. * * @returns The index of the first occurrence of `value` in `array`, * or `-1` if `value` is not in `array`. * * #### Notes * Values are compared using the strict equality `===` operator. * * #### Example * ```typescript * import algo = phosphor.collections.algorithm; * * var data = ['zero', 'one', 'two', 'three', 'two', 'one', 'zero']; * algo.indexOf(data, 'two'); // 2 * algo.indexOf(data, 'two', 3); // 4 * algo.indexOf(data, 'two', -4); // 4 * algo.indexOf(data, 'two', 5); // -1 * algo.indexOf(data, 'two', 5, true); // 2 * ``` * * **See also** [[lastIndexOf]] and [[findIndex]]. */ function indexOf<T>(array: T[], value: T, fromIndex?: number, wrap?: boolean): number; /** * Find the index of the last occurrence of a value in an array. * * @param array - The array of values to be searched. * * @param value - The value to locate in the array. * * @param fromIndex - The starting index of the search. If this value * is negative, it is taken as an offset from the end of the array. * If this value is positive, it is clamped to `array.length - 1`. * * @param wrap - Whether the search wraps around at the front of the * array. If `true` and the front of the array is reached without * finding the value, the search will wrap to the end of the array * and continue until one after `fromIndex`. * * @returns The index of the last occurrence of `value` in `array`, * or `-1` if `value` is not in `array`. * * #### Notes * Values are compared using the strict equality `===` operator. * * #### Example * ```typescript * import algo = phosphor.collections.algorithm; * * var data = ['zero', 'one', 'two', 'three', 'two', 'one', 'zero']; * algo.lastIndexOf(data, 'two'); // 4 * algo.lastIndexOf(data, 'two', 3); // 2 * algo.lastIndexOf(data, 'two', -4); // 2 * algo.lastIndexOf(data, 'two', 1); // -1 * algo.lastIndexOf(data, 'two', 1, true); // 4 * ``` * * **See also** [[indexOf]] and [[findLastIndex]]. */ function lastIndexOf<T>(array: T[], value: T, fromIndex?: number, wrap?: boolean): number; /** * Find the index of the first value in an array which matches a predicate. * * @param array - The array of values to be searched. * * @param pred - The predicate function to apply to the values. * * @param fromIndex - The starting index of the search. If this value * is negative, it is taken as an offset from the end of the array. * If the adjusted value is still negative, it is clamped to `0`. * * @param wrap - Whether the search wraps around at the end of the array. * If `true` and the end of the array is reached without finding the * value, the search will wrap to the front of the array and continue * until one before `fromIndex`. * * @returns The index of the first matching value, or `-1` if no value * matches the predicate. * * #### Notes * The range of visited indices is set before the first invocation of * `pred`. It is not safe for `pred` to change the length of `array`. * * #### Example * ```typescript * import algo = phosphor.collections.algorithm; * * function isEven(value: number): boolean { * return value % 2 === 0; * } * * var data = [1, 2, 3, 4, 3, 2, 1]; * algo.findIndex(data, isEven); // 1 * algo.findIndex(data, isEven, 4); // 5 * algo.findIndex(data, isEven, -4); // 3 * algo.findIndex(data, isEven, 6); // -1 * algo.findIndex(data, isEven, 6, true); // 1 * ``` * * **See also** [[findLastIndex]] and [[indexOf]]. */ function findIndex<T>(array: T[], pred: IPredicate<T>, fromIndex?: number, wrap?: boolean): number; /** * Find the index of the last value in an array which matches a predicate. * * @param array - The array of values to be searched. * * @param pred - The predicate function to apply to the values. * * @param fromIndex - The starting index of the search. If this value * is negative, it is taken as an offset from the end of the array. * If this value is positive, it is clamped to `array.length - 1`. * * @param wrap - Whether the search wraps around at the front of the * array. If `true` and the front of the array is reached without * finding the value, the search will wrap to the end of the array * and continue until one after `fromIndex`. * * @returns The index of the last matching value, or `-1` if no value * matches the predicate. * * #### Notes * The range of visited indices is set before the first invocation of * `pred`. It is not safe for `pred` to change the length of `array`. * * #### Example * ```typescript * import algo = phosphor.collections.algorithm; * * function isEven(value: number): boolean { * return value % 2 === 0; * } * * var data = [1, 2, 3, 4, 3, 2, 1]; * algo.findLastIndex(data, isEven); // 5 * algo.findLastIndex(data, isEven, 4); // 3 * algo.findLastIndex(data, isEven, -5); // 1 * algo.findLastIndex(data, isEven, 0); // -1 * algo.findLastIndex(data, isEven, 0, true); // 5 * ``` * * **See also** [[findIndex]] and [[lastIndexOf]]. */ function findLastIndex<T>(array: T[], pred: IPredicate<T>, fromIndex?: number, wrap?: boolean): number; /** * Find the first value in an array which matches a predicate. * * @param array - The array of values to be searched. * * @param pred - The predicate function to apply to the values. * * @param fromIndex - The starting index of the search. If this value * is negative, it is taken as an offset from the end of the array. * If the adjusted value is still negative, it is clamped to `0`. * * @param wrap - Whether the search wraps around at the end of the array. * If `true` and the end of the array is reached without finding the * value, the search will wrap to the front of the array and continue * until one before `fromIndex`. * * @returns The first matching value, or `undefined` if no value matches * the predicate. * * #### Notes * The range of visited indices is set before the first invocation of * `pred`. It is not safe for `pred` to change the length of `array`. * * #### Example * ```typescript * import algo = phosphor.collections.algorithm; * * function isEven(value: number): boolean { * return value % 2 === 0; * } * * var data = [1, 2, 3, 4, 3, 2, 1]; * algo.find(data, isEven); // 2 * algo.find(data, isEven, 4); // 2 * algo.find(data, isEven, -5); // 4 * algo.find(data, isEven, 6); // undefined * algo.find(data, isEven, 6, true); // 2 * ``` * * **See also** [[findLast]] and [[binaryFind]]. */ function find<T>(array: T[], pred: IPredicate<T>, fromIndex?: number, wrap?: boolean): T; /** * Find the last value in an array which matches a predicate. * * @param array - The array of values to be searched. * * @param pred - The predicate function to apply to the values. * * @param fromIndex - The starting index of the search. If this value * is negative, it is taken as an offset from the end of the array. * If this value is positive, it is clamped to `array.length - 1`. * * @param wrap - Whether the search wraps around at the front of the * array. If `true` and the front of the array is reached without * finding the value, the search will wrap to the end of the array * and continue until one after `fromIndex`. * * @returns The last matching value, or `undefined` if no value matches * the predicate. * * #### Notes * The range of visited indices is set before the first invocation of * `pred`. It is not safe for `pred` to change the length of `array`. * * #### Example * ```typescript * import algo = phosphor.collections.algorithm; * * function isEven(value: number): boolean { * return value % 2 === 0; * } * * var data = [1, 2, 3, 4, 3, 2, 1]; * algo.findLast(data, isEven); // 2 * algo.findLast(data, isEven, 4); // 4 * algo.findLast(data, isEven, -1); // 2 * algo.findLast(data, isEven, 0); // undefined * algo.findLast(data, isEven, 0, true); // 2 * ``` * * **See also** [[find]] and [[binaryFindLast]]. */ function findLast<T>(array: T[], pred: IPredicate<T>, fromIndex?: number, wrap?: boolean): T; /** * Using a binary search, find the index of the first element in an * array which compares `>=` to a value. * * @param array - The array of values to be searched. It must be sorted * in ascending order. * * @param value - The value to locate in the array. * * @param cmp - The comparator function to apply to the values. * * @returns The index of the first element in `array` which compares * `>=` to `value`, or `array.length` if there is no such element. * * #### Example * ```typescript * import algo = phosphor.collections.algorithm; * * function numberCmp(a: number, b: number): number { * return a - b; * } * * var data = [0, 3, 4, 7, 7, 9]; * algo.lowerBound(data, 0, numberCmp); // 0 * algo.lowerBound(data, 6, numberCmp); // 3 * algo.lowerBound(data, 7, numberCmp); // 3 * algo.lowerBound(data, -1, numberCmp); // 0 * algo.lowerBound(data, 10, numberCmp); // 6 * ``` * * **See also** [[upperBound]] and [[binaryFindIndex]]. */ function lowerBound<T, U>(array: T[], value: U, cmp: IComparator<T, U>): number; /** * Using a binary search, find the index of the first element in an * array which compares `>` than a value. * * @param array - The array of values to be searched. It must be sorted * in ascending order. * * @param value - The value to locate in the array. * * @param cmp - The comparator function to apply to the values. * * @returns The index of the first element in `array` which compares * `>` than `value`, or `array.length` if there is no such element. * * #### Example * ```typescript * import algo = phosphor.collections.algorithm; * * function numberCmp(a: number, b: number): number { * return a - b; * } * * var data = [0, 3, 4, 7, 7, 9]; * algo.upperBound(data, 0, numberCmp); // 1 * algo.upperBound(data, 6, numberCmp); // 3 * algo.upperBound(data, 7, numberCmp); // 5 * algo.upperBound(data, -1, numberCmp); // 0 * algo.upperBound(data, 10, numberCmp); // 6 * ``` * * **See also** [[lowerBound]] and [[binaryFindLastIndex]]. */ function upperBound<T, U>(array: T[], value: U, cmp: IComparator<T, U>): number; /** * Using a binary search, find the index of the first element in an * array which compares `==` to a value. * * @param array - The array of values to be searched. It must be sorted * in ascending order. * * @param value - The value to locate in the array. * * @param cmp - The comparator function to apply to the values. * * @returns The index of the first element in `array` which compares * `==` to `value`, or `-1` if there is no such element. * * #### Example * ```typescript * import algo = phosphor.collections.algorithm; * * function numberCmp(a: number, b: number): number { * return a - b; * } * * var data = [0, 3, 4, 7, 7, 9]; * algo.binaryFindIndex(data, 7, numberCmp); // 3 * algo.binaryFindIndex(data, 6, numberCmp); // -1 * ``` * * **See also** [[binaryFindLastIndex]] and [[lowerBound]]. */ function binaryFindIndex<T, U>(array: T[], value: U, cmp: IComparator<T, U>): number; /** * Using a binary search, find the index of the last element in an * array which compares `==` to a value. * * @param array - The array of values to be searched. It must be sorted * in ascending order. * * @param value - The value to locate in the array. * * @param cmp - The comparator function to apply to the values. * * @returns The index of the last element in `array` which compares * `==` to `value`, or `-1` if there is no such element. * * #### Example * ```typescript * import algo = phosphor.collections.algorithm; * * function numberCmp(a: number, b: number): number { * return a - b; * } * * var data = [0, 3, 4, 7, 7, 9]; * algo.binaryFindLastIndex(data, 7, numberCmp); // 4 * algo.binaryFindLastIndex(data, 6, numberCmp); // -1 * ``` * * **See also** [[binaryFindIndex]] and [[upperBound]]. */ function binaryFindLastIndex<T, U>(array: T[], value: U, cmp: IComparator<T, U>): number; /** * Using a binary search, find the first element in an array which * compares `==` to a value. * * @param array - The array of values to be searched. It must be sorted * in ascending order. * * @param value - The value to locate in the array. * * @param cmp - The comparator function to apply to the values. * * @returns The first element in `array` which compares `==` to * `value`, or `undefined` if there is no such element. * * #### Example * ```typescript * import algo = phosphor.collections.algorithm; * * interface IPair { * rank: number; * value: string; * } * * var data: IPair[] = [ * { rank: 0, value: 'zero' }, * { rank: 3, value: 'three' }, * { rank: 7, value: 'seven-A' }, * { rank: 7, value: 'seven-B' }, * { rank: 9, value: 'nine' }, * ]; * * function rankCmp(pair: IPair, rank: number): number { * return pair.rank - rank; * } * * algo.binaryFind(data, 7, rankCmp); // { rank: 7, value: 'seven-A' } * algo.binaryFind(data, 8, rankCmp); // undefined * ``` * * **See also** [[binaryFindLast]] and [[find]]. */ function binaryFind<T, U>(array: T[], value: U, cmp: IComparator<T, U>): T; /** * Using a binary search, find the last element in an array which * compares `==` to a value. * * @param array - The array of values to be searched. It must be sorted * in ascending order. * * @param value - The value to locate in the array. * * @param cmp - The comparator function to apply to the values. * * @returns The last element in `array` which compares `==` to * `value`, or `undefined` if there is no such element. * * #### Example * ```typescript * import algo = phosphor.collections.algorithm; * * interface IPair { * rank: number; * value: string; * } * * var data: IPair[] = [ * { rank: 0, value: 'zero' }, * { rank: 3, value: 'three' }, * { rank: 7, value: 'seven-A' }, * { rank: 7, value: 'seven-B' }, * { rank: 9, value: 'nine' }, * ]; * * function rankCmp(pair: IPair, rank: number): number { * return pair.rank - rank; * } * * algo.binaryFindLast(data, 7, rankCmp); // { rank: 7, value: 'seven-B' } * algo.binaryFindLast(data, 8, rankCmp); // undefined * ``` * * **See also** [[binaryFind]] and [[findLast]]. */ function binaryFindLast<T, U>(array: T[], value: U, cmp: IComparator<T, U>): T; /** * Create a shallow copy of an array. * * @param array - The array of values to copy. * * @returns A shallow copy of `array`. * * #### Notes * The result array is pre-allocated, which is typically the fastest * option for arrays `<` 100k elements. Use this function when copy * performance of small arrays is critical. * * #### Example * ```typescript * import algo = phosphor.collections.algorithm; * * var data = [0, 1, 2, 3, 4]; * algo.copy(data); // [0, 1, 2, 3, 4]; * ``` */ function copy<T>(array: T[]): T[]; /** * Insert an element into an array at a specified index. * * @param array - The array of values to modify. * * @param index - The index at which to insert the value. If this value * is negative, it is taken as an offset from the end of the array. If * the adjusted value is still negative, it is clamped to `0`. If this * value is positive, it is clamped to `array.length`. * * @param value - The value to insert into the array. * * @returns The index at which the value was inserted. * * #### Example * ```typescript * import algo = phosphor.collections.algorithm; * * var data = [0, 1, 2, 3, 4]; * algo.insert(data, 0, 12); // 0 * algo.insert(data, 3, 42); // 3 * algo.insert(data, 9, 19); // 7 * algo.insert(data, -9, 9); // 0 * algo.insert(data, -2, 8); // 7 * console.log(data); // [9, 12, 0, 1, 42, 2, 3, 8, 4, 19] * ``` * * **See also** [[removeAt]] and [[remove]]. */ function insert<T>(array: T[], index: number, value: T): number; /** * Move an element in an array from one index to another. * * @param array - The array of values to modify. * * @param fromIndex - The index of the element to move. If this value * is negative, it is taken as an offset from the end of the array. * If the adjusted value is not a valid index, the array will not * be modified and `-1` will be returned. * * @param toIndex - The target index of the element. If this value is * negative, it is taken as an offset from the end of the array. If * the adjusted value is still negative, it is clamped to `0`. If * this value is positive, it is clamped to `array.length - 1`. * * @returns The index to which the element was moved, or `-1` if * `fromIndex` is invalid. * * #### Example * ```typescript * import algo = phosphor.collections.algorithm; * * var data = [0, 1, 2, 3, 4]; * algo.move(data, 1, 2); // 2 * algo.move(data, -1, 0); // 0 * algo.move(data, 3, -4); // 1 * algo.move(data, 10, 0); // -1 * console.log(data); // [4, 1, 0, 2, 3] * ``` */ function move<T>(array: T[], fromIndex: number, toIndex: number): number; /** * Remove an element from an array at a specified index. * * @param array - The array of values to modify. * * @param index - The index of the element to remove. If this value * is negative, it is taken as an offset from the end of the array. * If the adjusted value is not a valid index, the array will not * be modified and `undefined` will be returned. * * @returns The element which was removed from `array`, or `undefined` * if `index` is invalid. * * #### Example * ```typescript * import algo = phosphor.collections.algorithm; * * var data = [0, 1, 2, 3, 4]; * algo.removeAt(data, 1); // 1 * algo.removeAt(data, -2); // 3 * algo.removeAt(data, 10); // undefined * console.log(data); // [0, 2, 4] * ``` * * **See also** [[remove]] and [[insert]]. */ function removeAt<T>(array: T[], index: number): T; /** * Remove the first occurrence of a value from an array. * * @param array - The array of values to modify. * * @param value - The value to remove from the array. * * @returns The index where `value` was located, or `-1` if `value` * is not in `array`. * * #### Example * ```typescript * import algo = phosphor.collections.algorithm; * * var data = [0, 1, 2, 3, 4]; * algo.remove(data, 1); // 1 * algo.remove(data, 3); // 2 * algo.remove(data, 7); // -1 * console.log(data); // [0, 2, 4] * ``` * * **See also** [[removeAt]] and [[insert]]. */ function remove<T>(array: T[], value: T): number; /** * Reverse an array in-place subject to an optional range. * * @param array - The array to reverse. * * @param fromIndex - The index of the first element of the range. If * this value is negative, it is taken as an offset from the end of * the array. The value is clamped to the range `[0, length - 1]`. * The default is `0`. * * @param fromIndex - The index of the last element of the range. If * this value is negative, it is taken as an offset from the end of * the array. The value is clamped to the range `[0, length - 1]`. * The default is `length`. * * @returns A reference to the original array. * * #### Example * ```typescript * import algo = phosphor.collections.algorithm; * * var data = [0, 1, 2, 3, 4]; * algo.reverse(data, 1, 3); // [0, 3, 2, 1, 4] * algo.reverse(data, 3); // [0, 3, 2, 4, 1] * algo.reverse(data); // [1, 4, 2, 3, 0] * algo.reverse(data, -3); // [1, 4, 0, 3, 2] * algo.reverse(data, -5, -2); // [3, 0, 4, 1, 2] * ``` */ function reverse<T>(array: T[], fromIndex?: number, toIndex?: number): T[]; /** * Rotate the elements an array by a positive or negative delta. * * @param array - The array to rotate. * * @param delta - The amount of rotation to apply to the elements. A * positive delta will shift elements to the left. A negative delta * will shift elements to the right. * * @returns A reference to the original array. * * #### Notes * This executes in `O(n)` time and `O(1)` space. * * #### Example * ```typescript * import algo = phosphor.collections.algorithm; * * var data = [0, 1, 2, 3, 4]; * algo.rotate(data, 2); // [2, 3, 4, 0, 1] * algo.rotate(data, -2); // [0, 1, 2, 3, 4] * algo.rotate(data, 10); // [0, 1, 2, 3, 4] * algo.rotate(data, 9); // [4, 0, 1, 2, 3] * ``` */ function rotate<T>(array: T[], delta: number): T[]; } declare module phosphor.collections { /** * A circular buffer with a fixed maximum size. * * A circular buffer is a buffer with constant time access to its * elements and constant times inserts and deletes from the front * and back of the buffer. When the buffer reaches its maximum * size, newly added elements will overwrite existing elements. */ class CircularBuffer<T> { /** * Construct a new circular buffer. */ constructor(maxSize: number, items?: T[]); /** * The maximum size of the buffer. */ maxSize: number; /** * The number of elements in the buffer. */ size: number; /** * True if the buffer has elements, false otherwise. */ empty: boolean; /** * The value at the front of the buffer. */ front: T; /** * The value at the back of the buffer. */ back: T; /** * Get the value at the given index. * * Returns `undefined` if the index is out of range. */ get(index: number): T; /** * Set the value at the given index. * * Returns false if the index is out of range. */ set(index: number, value: T): boolean; /** * Push a value onto the back of the buffer. * * If the buffer is full, the front element will be overwritten. */ pushBack(value: T): void; /** * Push a value onto the front of the buffer. * * If the buffer is full, the back element will be overwritten. */ pushFront(value: T): void; /** * Pop and return the value at the back of the buffer. */ popBack(): T; /** * Pop and return the value at the front of the buffer. */ popFront(): T; /** * Remove all values from the buffer. */ clear(): void; /** * Create an array from the values in the buffer. */ toArray(): T[]; /** * Returns true if any value in the buffer passes the given test. */ some(pred: IPredicate<T>): boolean; /** * Returns true if all values in the buffer pass the given test. */ every(pred: IPredicate<T>): boolean; /** * Create an array of the values which pass the given test. */ filter(pred: IPredicate<T>): T[]; /** * Create an array of callback results for each value in the buffer. */ map<U>(callback: ICallback<T, U>): U[]; /** * Execute a callback for each element in buffer. * * Iteration will terminate if the callbacks returns a value other * than `undefined`. That value will be returned from this method. */ forEach<U>(callback: ICallback<T, U>): U; /** * Get the value for the apparent index. * * The index is assumed to be in-range. */ private _get(index); /** * Set the value for the apparent index. * * The index is assumed to be in-range. */ private _set(index, value); /** * Clear and return the value at the apparent index. * * The index is assumed to be in-range. */ private _rem(index); /** * Increment the offset by one. */ private _incr(); /** * Decrement the offset by one. */ private _decr(); private _size; private _offset; private _array; } } declare module phosphor.collections { /** * A sequence callback function. */ interface ICallback<T, U> { /** * @param value The current value in the sequence. * @param index The index of the value in the sequence. * @returns The result of the callback for the value. */ (value: T, index: number): U; } /** * A three-way comparison function. */ interface IComparator<T, U> { /** * @param first The LHS of the comparison. * @param second The RHS of the comparison. * @returns * - zero if `first === second` * - a negative value if `first < second` * - a positive value if `first > second` */ (first: T, second: U): number; } /** * A boolean predicate function. */ interface IPredicate<T> { /** * @param value The current value in the sequence. * @param index The index of the value in the sequence. * @returns `true` if the value matches the predicate, `false` otherwise. */ (value: T, index: number): boolean; } } declare module phosphor.collections { /** * A canonical singly linked FIFO queue. */ class Queue<T> { /** * Construct a new queue. */ constructor(items?: T[]); /** * The number of elements in the queue. */ size: number; /** * True if the queue has elements, false otherwise. */ empty: boolean; /** * The value at the front of the queue. */ front: T; /** * The value at the back of the queue. */ back: T; /** * Push a value onto the back of the queue. */ pushBack(value: T): void; /** * Pop and return the value at the front of the queue. */ popFront(): T; /** * Remove all values from the queue. */ clear(): void; /** * Create an array from the values in the queue. */ toArray(): T[]; /** * Returns true if any value in the queue passes the given test. */ some(pred: IPredicate<T>): boolean; /** * Returns true if all values in the queue pass the given test. */ every(pred: IPredicate<T>): boolean; /** * Create an array of the values which pass the given test. */ filter(pred: IPredicate<T>): T[]; /** * Create an array of callback results for each value in the queue. */ map<U>(callback: ICallback<T, U>): U[]; /** * Execute a callback for each element in queue. * * Iteration will terminate if the callbacks returns a value other * than `undefined`. That value will be returned from this method. */ forEach<U>(callback: ICallback<T, U>): U; private _size; private _front; private _back; } } declare module phosphor.collections { /** * An object which manages a collection of variable sized sections. * * A section list is commonly used to manage row heights in virtually * scrolling list controls. In such a control, most rows are uniform * height while a handful of rows are variable sized. * * A section list has guaranteed `O(log(n))` worst-case performance for * most operations, where `n` is the number of variable sized sections. */ class SectionList { /** * Get the total number of sections in the list. * * #### Notes * This operation has `O(1)` complexity. */ count: number; /** * Get the total size of all sections in the list. * * #### Notes * This operation has `O(1)` complexity. */ size: number; /** * Find the index of the section which covers the given offset. * * @param offset - The positive offset position of interest. * * @returns The index of the section which covers the given offset, * or `-1` if the offset is out of range. * * #### Notes * This operation has `O(log(n))` complexity. */ indexOf(offset: number): number; /** * Find the offset position of the section at the given index. * * @param index - The index of the section of interest. If this value * is negative, it is taken as an offset from the end of the list. * * @returns The offset position of the section at the given index, or * `-1` if the index is out of range. * * #### Notes * This operation has `O(log(n))` complexity. */ offsetOf(index: number): number; /** * Find the size of the section at the given index. * * @param index - The index of the section of interest. If this value * is negative, it is taken as an offset from the end of the list. * * @returns The size of the section at the given index, or `-1` if * the index is out of range. * * #### Notes * This operation has `O(log(n))` complexity. */ sizeOf(index: number): number; /** * Insert new sections into the list. * * @param index - The index at which to insert the first section. If * this value is negative, it is taken as an offset from the end of * the list. The value is clamped to the range `[0, list.count]`. * * @param count - The number of sections to insert. If this value is * `<= 0`, this method is a no-op. * * @param size - The size of each section. This value is clamped to * the range `[0, Infinity]`. * * #### Notes * This operation has `O(log(n))` complexity. */ insert(index: number, count: number, size: number): void; /** * Remove existing sections from the list. * * @param index - The index of the first section to remove. If this * value is negative, it is taken as an offset from the end of the * list. * * @param count - The number of sections to remove. If this value is * `<= 0`, this method is a no-op. If any of the sections are out * of range, they will be ignored. * * #### Notes * This operation has `O(log(n))` complexity. */ remove(index: number, count: number): void; /** * Resize existing sections in the list. * * @param index - The index of the first section to resize. If this * value is negative, it is taken as an offset from the end of the * list. * * @param count - The number of sections to resize. If this value is * `<= 0`, this method is a no-op. If any of the sections are out * of range, they will be ignored. * * @param size - The new size of each section. This value is clamped * to the range `[0, Infinity]`. */ resize(index: number, count: number, size: number): void; private _root; } } declare module phosphor.utility { /** * The box sizing data for an HTML element. */ interface IBoxSizing { /** * The minimum width, in pixels. */ minWidth: number; /** * The minimum height, in pixels. */ minHeight: number; /** * The maximum width, in pixels. */ maxWidth: number; /** * The maximum height, in pixels. */ maxHeight: number; /** * The top border width, in pixels. */ borderTop: number; /** * The left border width, in pixels. */ borderLeft: number; /** * The right border width, in pixels. */ borderRight: number; /** * The bottom border width, in pixels. */ borderBottom: number; /** * The top padding width, in pixels. */ paddingTop: number; /** * The left padding width, in pixels. */ paddingLeft: number; /** * The right padding width, in pixels. */ paddingRight: number; /** * The bottom padding width, in pixels. */ paddingBottom: number; /** * The sum of the vertical padding and border. */ verticalSum: number; /** * The sum of the horizontal padding and border. */ horizontalSum: number; } /** * Create a box sizing object for the given node. * * The values of the returned object are read only. */ function createBoxSizing(node: HTMLElement): IBoxSizing; } declare module phosphor.utility { /** * Override the cursor for the entire document. * * Returns an IDisposable which will clear the override. */ function overrideCursor(cursor: string): IDisposable; } declare module phosphor.utility { /** * An object which holds disposable resources. */ interface IDisposable { /** * Dispose of the resources held by the object. * * It is not safe to use an object after it has been disposed. */ dispose(): void; } /** * A concrete implementation of IDisposable. * * This will invoke a user provided callback when it is disposed. */ class Disposable implements IDisposable { /** * Construct a new disposable. */ constructor(callback: () => void); /** * Dispose the object and invoke the user provided callback. */ dispose(): void; private _callback; } } declare module phosphor.utility { /** * A singleton frozen empty object. */ var emptyObject: any; /** * A singleton frozen empty array. */ var emptyArray: any[]; /** * A singleton empty no-op function. */ var emptyFunction: () => void; } declare module phosphor.utility { /** * Test whether a client position lies within a node. */ function hitTest(node: HTMLElement, x: number, y: number): boolean; } declare module phosphor.utility { /** * A generic pair of values. */ class Pair<T, U> { first: T; second: U; /** * Construct a new pair. */ constructor(first: T, second: U); } } declare module phosphor.utility { /** * The position of a two dimensional object. */ class Point { /** * A static zero point. */ static Zero: Point; /** * A static infinite point. */ static Infinite: Point; /** * Construct a new point. */ constructor(x: number, y: number); /** * The X coordinate of the point. */ x: number; /** * The Y coordinate of the point. */ y: number; /** * Test whether the point is equivalent to another. */ equals(other: Point): boolean; private _x; private _y; } } declare module phosphor.utility { /** * The position and size of a 2-dimensional object. */ class Rect { /** * Construct a new rect. */ constructor(x: number, y: number, width: number, height: number); /** * The X coordinate of the rect. * * This is equivalent to `left`. */ x: number; /** * The Y coordinate of the rect. * * This is equivalent to `top`. */ y: number; /** * The width of the rect. */ width: number; /** * The height of the rect. */ height: number; /** * The position of the rect. * * This is equivalent to `topLeft`. */ pos: Point; /** * The size of the rect. */ size: Size; /** * The top edge of the rect. * * This is equivalent to `y`. */ top: number; /** * The left edge of the rect. * * This is equivalent to `x`. */ left: number; /** * The right edge of the rect. * * This is equivalent to `x + width`. */ right: number; /** * The bottom edge of the rect. * * This is equivalent to `y + height`. */ bottom: number; /** * The position of the top left corner of the rect. * * This is equivalent to `pos`. */ topLeft: Point; /** * The position of the top right corner of the rect. */ topRight: Point; /** * The position bottom left corner of the rect. */ bottomLeft: Point; /** * The position bottom right corner of the rect. */ bottomRight: Point; /** * Test whether the rect is equivalent to another. */ equals(other: Rect): boolean; private _x; private _y; private _width; private _height; } } declare module phosphor.utility { /** * The size of a 2-dimensional object. */ class Size { /** * A static zero size. */ static Zero: Size; /** * A static infinite size. */ static Infinite: Size; /** * Construct a new size. */ constructor(width: number, height: number); /** * The width of the size. */ width: number; /** * The height of the size. */ height: number; /** * Test whether the size is equivalent to another. */ equals(other: Size): boolean; private _width; private _height; } } declare module phosphor.utility { /** * Get the currently visible viewport rect in page coordinates. */ function clientViewportRect(): Rect; } declare module phosphor.core { /** * The base message object which can be sent to a message handler. */ interface IMessage { /** * The type of the message. */ type: string; } } declare module phosphor.core { /** * An object which filters messages sent to a message handler. */ interface IMessageFilter { /** * Filter a message sent to a message handler. * * Returns true if the message should be filtered, false otherwise. */ filterMessage(handler: IMessageHandler, msg: IMessage): boolean; } } declare module phosphor.core { import Queue = collections.Queue; /** * An object which processes messages. */ interface IMessageHandler { /** * Process a message sent to the handler. */ processMessage(msg: IMessage): void; /** * Compress a message posted to the handler. * * This optional method allows the handler to merge a posted message * with a message which is already pending. It should return true if * the message was compressed and should be dropped, or false if the * message should be enqueued for delivery as normal. */ compressMessage?(msg: IMessage, pending: Queue<IMessage>): boolean; } } declare module phosphor.core { /** * A concrete implementation of IMessage. * * This may be subclassed to create complex message types. */ class Message implements IMessage { /** * Construct a new message. */ constructor(type: string); /** * The type of the message. */ type: string; private _type; } } declare module phosphor.core { /** * Send a message to the message handler to process immediately. */ function sendMessage(handler: IMessageHandler, msg: IMessage): void; /** * Post a message to the message handler to process in the future. */ function postMessage(handler: IMessageHandler, msg: IMessage): void; /** * Test whether the message handler has pending messages. */ function hasPendingMessages(handler: IMessageHandler): boolean; /** * Send the first pending message to the message handler. */ function sendPendingMessage(handler: IMessageHandler): void; /** * Install a message filter for a message handler. * * A message filter is invoked before the message handler processes * the message. If the filter returns true from its `filterMessage` * method, processing of the message will stop immediately and no * other filters or the message handler will be invoked. * * The most recently installed filter is executed first. */ function installMessageFilter(handler: IMessageHandler, filter: IMessageFilter): void; /** * Remove a message filter added for a message handler. * * It is safe to call this function while the filter is executing. * * If the filter is not installed, this is a no-op. */ function removeMessageFilter(handler: IMessageHandler, filter: IMessageFilter): void; /** * Clear all message data associated with the message handler. * * This removes all pending messages and filters for the handler. */ function clearMessageData(handler: IMessageHandler): void; } declare module phosphor.core { import IDisposable = utility.IDisposable; /** * A base class for creating objects which manage a DOM node. */ class NodeBase implements IDisposable { /** * Create the DOM node for a new object instance. * * This may be reimplemented to create a custom DOM node. */ static createNode(): HTMLElement; /** * Construct a new node base. */ constructor(); /** * Dispose of the resources held by the object. * * This method only clears the reference to the DOM node, it does not * remove it from the DOM. Subclasses should reimplement this method * to perform custom cleanup. */ dispose(): void; /** * Get the DOM node managed by the object. */ node: HTMLElement; /** * Test whether the object's DOM node has the given class name. */ hasClass(name: string): boolean; /** * Add a class name to the object's DOM node. */ addClass(name: string): void; /** * Remove a class name from the object's DOM node. */ removeClass(name: string): void; private _node; } } declare module phosphor.core { /** * An object used for type-safe inter-object communication. * * #### Example * ```typescript * class SomeClass { * * static valueChanged = new Signal<SomeClass, number>(); * * // ... * } * ``` */ class Signal<T, U> { private _signalStructuralPropertyT; private _signalStructuralPropertyU; } /** * Connect the signal of a sender to the method of a receiver. * * @param sender - The object which will emit the signal. This will * be passed as the first argument to the receiver method when the * signal is emitted. This must be a non-primitive object. * * @param signal - The signal which will be emitted by the sender. * * @param receiver - The object to connect to the signal. This will * become the `this` context in the receiver method. This must be * a non-primitive object. * * @param method - The receiver method to invoke when the signal is * emitted. The sender is passed as the first argument followed by * the args object emitted with the signal. * * @returns `true` if the connection succeeds, `false` otherwise. * * #### Notes * Receiver methods are invoked synchronously, in the order in which * they are connected. * * Signal connections are unique. If a connection already exists for * the given combination of arguments, this function is a no-op. * * A newly connected receiver method will not be invoked until the next * emission of the signal, even if it is connected during an emission. * * #### Example * ```typescript * connect(someObject, SomeClass.valueChanged, myObject, myObject.onValueChanged); * ``` */ function connect<T, U>(sender: T, signal: Signal<T, U>, receiver: any, method: (sender: T, args: U) => void): boolean; /** * Disconnect the signal of a sender from the method of a receiver. * * @param sender - The object which emits the signal. * * @param signal - The signal emitted by the sender. * * @param receiver - The object connected to the signal. * * @param method - The receiver method connected to the signal. * * @returns `true` if the connection is broken, `false` otherwise. * * #### Notes * Any argument to this function may be null, and it will be treated * as a wildcard when matching the connection. However, `sender` and * `receiver` cannot both be null; one or both must be provided. * * A disconnected receiver method will no longer be invoked, even if * it is disconnected during signal emission. * * If no connection exists for the given combination of arguments, * this function is a no-op. * * #### Example * ```typescript * // disconnect a specific signal from a specific handler * disconnect(someObject, SomeClass.valueChanged, myObject, myObject.onValueChanged); * * // disconnect all receivers from a specific sender * disconnect(someObject, null, null, null); * * // disconnect all receivers from a specific signal * disconnect(someObject, SomeClass.valueChanged, null, null); * * // disconnect a specific receiver from all senders * disconnect(null, null, myObject, null); * * // disconnect a specific handler from all senders * disconnect(null, null, myObject, myObject.onValueChanged); * ``` */ function disconnect<T, U>(sender: T, signal: Signal<T, U>, receiver: any, method: (sender: T, args: U) => void): boolean; /** * Emit the signal of a sender and invoke the connected receivers. * * @param sender - The object which is emitting the signal. This will * be passed as the first argument to all connected receivers. This * must be a non-primitive object. * * @param signal - The signal to be emitted by the sender. * * @param args - The args object for the signal. This will be passed * as the second argument to all connected receivers. * * #### Notes * If a receiver throws an exception, dispatching of the signal will * terminate immediately and the exception will be propagated to the * call site of this function. * * #### Example * ```typescript * emit(someObject, SomeClass.valueChanged, 42); * ``` */ function emit<T, U>(sender: T, signal: Signal<T, U>, args: U): void; } declare module phosphor.di { /** * A token object which holds compile-time type information. */ class Token<T> { /** * Construct a new token. * * @param name - A human readable name for the token. */ constructor(name: string); /** * Get the human readable name for the token. */ name: string; private _name; private _tokenStructuralPropertyT; } } declare module phosphor.di { /** * A lightweight dependency injection container. */ class Container implements IContainer { /** * Construct a new container. */ constructor(); /** * Test whether a type is registered with the container. */ isRegistered<T>(token: Token<T>): boolean; /** * Register a type mapping with the container. * * An exception will be thrown if the type is already registered. * * The allowed lifetimes are: * * 'singleton' - Only a single instance of the type is ever * created, and that instance is shared by all objects * which have a dependency on the given type id. * * 'transient' - A new instance of the type is created each * time the dependency is fullfilled for an object which * has a dependency on the given type id. * * 'perresolve' - A single instance of the type is created * each time the `resolve` method is called, and that * instance is shared by all objects which are created * during the same resolve pass and have a dependency * on the given type id. * * The default lifetime is 'singleton'. */ registerType<T>(token: Token<T>, type: IInjectable<T>, lifetime?: string): void; /** * Register an instance mapping with the container. * * This is the same as a 'singleton' type registration, except * that the user creates the instance of the type beforehand. * * This will throw an exception if the token is already registered. */ registerInstance<T>(token: Token<T>, instance: T): void; /** * Resolve an instance for the given token or type. * * An error is thrown if no type mapping is registered for the * token or if the injection dependencies cannot be fulfilled. */ resolve<T>(token: Token<T> | IInjectable<T>): T; /** * Resolve an instance for the given token. * * An error is thrown if the token is not registered. */ private _resolveToken<T>(token, key); /** * Resolve an instance of the given type. * * An error is thrown if the type dependencies cannot be fulfilled. */ private _resolveType<T>(type, key); private _registry; } } declare module phosphor.di { /** * A class type which declares its injection dependencies. */ interface IInjectable<T> { /** * The constructor signature for the class. */ new (...args: any[]): T; /** * The type ids of the dependencies needed to instantiate the type. */ $inject?: Token<any>[]; } /** * An object which manages dependency injection. */ interface IContainer { /** * Test whether a type is registered with the container. */ isRegistered<T>(token: Token<T>): boolean; /** * Register a type mapping with the container. * * An exception will be thrown if the token is already registered. * * The allowed lifetimes are: * * 'singleton' - Only a single instance of the type is ever * created, and that instance is shared by all objects * which have a dependency on the given type id. * * 'transient' - A new instance of the type is created each * time the dependency is fullfilled for an object which * has a dependency on the given type id. * * 'perresolve' - A single instance of the type is created * each time the `resolve` method is called, and that * instance is shared by all objects which are created * during the same resolve pass and have a dependency * on the given type id. * * The default lifetime is 'singleton'. */ registerType<T>(token: Token<T>, type: IInjectable<T>, lifetime?: string): void; /** * Register an instance mapping with the container. * * This is the same as a 'singleton' type registration, except * that the user creates the instance of the type beforehand. * * This will throw an exception if the token is already registered. */ registerInstance<T>(token: Token<T>, instance: T): void; /** * Resolve an instance for the given token or type. * * An error is thrown if no type mapping is registered for the * token or if the injection dependencies cannot be fulfilled. */ resolve<T>(token: Token<T> | IInjectable<T>): T; } /** * The interface token for IContainer. */ var IContainer: Token<IContainer>; } declare module phosphor.virtualdom { /** * A typedef for a factory child argument. */ type FactoryChild = (string | Elem) | (string | Elem)[]; /** * A factory function which creates an elem instance. */ interface IFactory<T extends IData> { /** * Create an elem instance with the given children. */ (...children: FactoryChild[]): Elem; /** * Create an elem instance with the given data and children. */ (data: T, ...children: FactoryChild[]): Elem; } /** * Create an elem factory function for the given tag. * * This will typically be used to create an elem factory function for * a user defined component. The `virtualdom` module exports a `dom` * object which contains factories for the standard DOM elements. */ function createFactory<T extends IData>(tag: string | IComponentClass<T>): IFactory<T>; } declare module phosphor.virtualdom { import Queue = collections.Queue; import IMessage = core.IMessage; import NodeBase = core.NodeBase; /** * A concrete implementation of IComponent. * * This class serves as a convenient base class for components which * manage the content of their node independent of the virtual DOM. */ class BaseComponent<T extends IData> extends NodeBase implements IComponent<T> { /** * Construct a new base component. */ constructor(data: T, children: Elem[]); /** * Dispose of the resources held by the component. */ dispose(): void; /** * Get the current data object for the component. */ data: T; /** * Get the current elem children for the component. */ children: Elem[]; /** * Initialize the component with new data and children. * * This is called whenever the component is re-rendered by its parent. * * It is *not* called when the component is first instantiated. */ init(data: T, children: Elem[]): void; /** * Schedule an update for the component. * * If the `immediate` flag is false (the default) the update will be * scheduled for the next cycle of the event loop. If `immediate` is * true, the component will be updated immediately. Multiple pending * requests are collapsed into a single update. * * #### Notes * The semantics of an update are defined by a supporting component. */ update(immediate?: boolean): void; /** * Process a message sent to the component. */ processMessage(msg: IMessage): void; /** * Compress a message posted to the component. */ compressMessage(msg: IMessage, pending: Queue<IMessage>): boolean; /** * A method invoked on an 'update-request' message. * * The default implementation is a no-op. */ protected onUpdateRequest(msg: IMessage): void; /** * A method invoked on an 'after-attach' message. * * The default implementation is a no-op. */ protected onAfterAttach(msg: IMessage): void; /** * A method invoked on a 'before-detach' message. * * The default implementation is a no-op. */ protected onBeforeDetach(msg: IMessage): void; /** * A method invoked on a 'before-move' message. * * The default implementation is a no-op. */ protected onBeforeMove(msg: IMessage): void; /** * A method invoked on an 'after-move' message. * * The default implementation is a no-op. */ protected onAfterMove(msg: IMessage): void; private _data; private _children; } } declare module phosphor.virtualdom { import IMessage = core.IMessage; /** * A component which renders its content using the virtual DOM. * * User code should subclass this class and reimplement the `render` * method to generate the virtual DOM content for the component. */ class Component<T extends IData> extends BaseComponent<T> { /** * The tag name to use when creating the component node. * * This may be reimplemented by a subclass. */ static tagName: string; /** * The initial class name for the component node. * * This may be reimplemented by a subclass. */ static className: string; /** * Create the DOM node for a component. * * This method creates the DOM node from the `className` and `tagName` * properties. A subclass will not typically reimplement this method. */ static createNode(): HTMLElement; /** * Dispose of the resources held by the component. */ dispose(): void; /** * Get the current refs mapping for the component. */ refs: any; /** * Process a message sent to the component. */ processMessage(msg: IMessage): void; /** * Create the virtual DOM content for the component. * * The rendered content is used to populate the component's node. * * The default implementation returns `null`. */ protected render(): Elem | Elem[]; /** * A method invoked on an 'update-request' message. * * This renders the virtual DOM content into the component's node. */ protected onUpdateRequest(msg: IMessage): void; /** * A method invoked on a 'before-render' message. * * The default implementation is a no-op. */ protected onBeforeRender(msg: IMessage): void; /** * A method invoked on an 'after-render' message. * * The default implementation is a no-op. */ protected onAfterRender(msg: IMessage): void; private _refs; } } declare module phosphor.virtualdom { /** * The attributes available for all elements. */ interface IElementAttributes extends IData { accessKey?: string; className?: string; contentEditable?: string; dataset?: any; dir?: string; draggable?: boolean; hidden?: any; id?: string; lang?: string; spellcheck?: boolean; style?: any; tabIndex?: number; title?: string; onabort?: (ev: UIEvent) => any; onbeforecopy?: (ev: DragEvent) => any; onbeforecut?: (ev: DragEvent) => any; onbeforepaste?: (ev: DragEvent) => any; onblur?: (ev: FocusEvent) => any; oncanplay?: (ev: Event) => any; oncanplaythrough?: (ev: Event) => any; onchange?: (ev: Event) => any; onclick?: (ev: MouseEvent) => any; oncontextmenu?: (ev: MouseEvent) => any; oncopy?: (ev: DragEvent) => any; oncuechange?: (ev: Event) => any; oncut?: (ev: DragEvent) => any; ondblclick?: (ev: MouseEvent) => any; ondrag?: (ev: DragEvent) => any; ondragend?: (ev: DragEvent) => any; ondragenter?: (ev: DragEvent) => any; ondragleave?: (ev: DragEvent) => any; ondragover?: (ev: DragEvent) => any; ondragstart?: (ev: DragEvent) => any; ondrop?: (ev: DragEvent) => any; ondurationchange?: (ev: Event) => any; onended?: (ev: Event) => any; onemptied?: (ev: Event) => any; onerror?: (ev: ErrorEvent) => any; onfocus?: (ev: FocusEvent) => any; onhelp?: (ev: Event) => any; oninput?: (ev: Event) => any; onkeydown?: (ev: KeyboardEvent) => any; onkeypress?: (ev: KeyboardEvent) => any; onkeyup?: (ev: KeyboardEvent) => any; onload?: (ev: Event) => any; onloadeddata?: (ev: Event) => any; onloadedmetadata?: (ev: Event) => any; onloadstart?: (ev: Event) => any; onmousedown?: (ev: MouseEvent) => any; onmouseenter?: (ev: MouseEvent) => any; onmouseleave?: (ev: MouseEvent) => any; onmousemove?: (ev: MouseEvent) => any; onmouseout?: (ev: MouseEvent) => any; onmouseover?: (ev: MouseEvent) => any; onmouseup?: (ev: MouseEvent) => any; onmousewheel?: (ev: MouseWheelEvent) => any; onpaste?: (ev: DragEvent) => any; onpause?: (ev: Event) => any; onplay?: (ev: Event) => any; onplaying?: (ev: Event) => any; onprogress?: (ev: ProgressEvent) => any; onratechange?: (ev: Event) => any; onreadystatechange?: (ev: Event) => any; onreset?: (ev: Event) => any; onscroll?: (ev: UIEvent) => any; onseeked?: (ev: Event) => any; onseeking?: (ev: Event) => any; onselect?: (ev: UIEvent) => any; onselectstart?: (ev: Event) => any; onstalled?: (ev: Event) => any; onsubmit?: (ev: Event) => any; onsuspend?: (ev: Event) => any; ontimeupdate?: (ev: Event) => any; onvolumechange?: (ev: Event) => any; onwaiting?: (ev: Event) => any; } /** * The attributes for <a> elements. */ interface IAnchorAttributes extends IElementAttributes { download?: string; href?: string; hreflang?: string; media?: string; rel?: string; target?: string; type?: string; } /** * The attributes for <area> elements. */ interface IAreaAttributes extends IElementAttributes { alt?: string; coords?: string; download?: string; href?: string; hreflang?: string; media?: string; rel?: string; shape?: string; target?: string; type?: string; } /** * The attributes for <button> elements. */ interface IButtonAttributes extends IElementAttributes { autofocus?: boolean; disabled?: boolean; form?: string; formAction?: string; formEnctype?: string; formMethod?: string; formNoValidate?: boolean; formTarget?: string; name?: string; type?: string; value?: string; } /** * The attributes for <canvas> elements. */ interface ICanvasAttributes extends IElementAttributes { width?: number; height?: number; } /** * The attributes for <data> elements. */ interface IDataAttributes extends IElementAttributes { value?: string; } /** * The attributes for <embed> elements. */ interface IEmbedAttributes extends IElementAttributes { height?: string; src?: string; type?: string; width?: string; } /** * The attributes for <fieldset> elements. */ interface IFieldSetAttributes extends IElementAttributes { disabled?: boolean; form?: string; name?: string; } /** * The attributes for <form> elements. */ interface IFormAttributes extends IElementAttributes { acceptCharset?: string; action?: string; autocomplete?: string; enctype?: string; method?: string; name?: string; noValidate?: boolean; target?: string; } /** * The attributes for <iframe> elements. */ interface IIFrameAttributes extends IElementAttributes { allowFullscreen?: boolean; height?: string; name?: string; sandbox?: string; seamless?: boolean; src?: string; srcdoc?: string; width?: string; } /** * The attributes for <img> elements. */ interface IImageAttributes extends IElementAttributes { alt?: string; crossOrigin?: string; height?: number; isMap?: boolean; src?: string; sizes?: string; srcset?: string; width?: number; useMap?: string; } /** * The attributes for <input> elements. */ interface IInputAttributes extends IElementAttributes { accept?: string; alt?: string; autocomplete?: string; autofocus?: boolean; checked?: boolean; disabled?: boolean; form?: string; formAction?: string; formEnctype?: string; formMethod?: string; formNoValidate?: boolean; formTarget?: string; height?: string; inputMode?: string; list?: string; max?: string; maxLength?: number; min?: string; minLength?: number; multiple?: boolean; name?: string; pattern?: string; placeholder?: string; readOnly?: boolean; required?: boolean; size?: number; spellcheck?: boolean; src?: string; step?: string; type?: string; value?: string; width?: string; } /** * The attributes for <label> elements. */ interface ILabelAttributes extends IElementAttributes { form?: string; htmlFor?: string; } /** * The attributes for <li> elements. */ interface ILIAttributes extends IElementAttributes { value?: number; } /** * The attributes for <map> elements. */ interface IMapAttributes extends IElementAttributes { name?: string; } /** * The attributes for <meter> elements. */ interface IMeterAttributes extends IElementAttributes { high?: number; low?: number; max?: number; min?: number; optimum?: number; value?: number; } /** * The attributes for <audio> and <video> elements. */ interface IMediaAttributes extends IElementAttributes { autoplay?: boolean; controls?: boolean; crossOrigin?: string; loop?: boolean; mediaGroup?: string; muted?: boolean; preload?: string; src?: string; volume?: number; } /** * The attributes for <del> and <ins> elements. */ interface IModAttributes extends IElementAttributes { cite?: string; dateTime?: string; } /** * The attributes for <object> elements. */ interface IObjectAttributes extends IElementAttributes { data?: string; form?: string; height?: string; name?: string; type?: string; typeMustMatch?: boolean; useMap?: string; width?: string; } /** * The attributes for <ol> elements. */ interface IOListAttributes extends IElementAttributes { reversed?: boolean; start?: number; type?: string; } /** * The attributes for <optgroup> elements. */ interface IOptGroupAttributes extends IElementAttributes { disabled?: boolean; label?: string; } /** * The attributes for <option> elements. */ interface IOptionAttributes extends IElementAttributes { disabled?: boolean; label?: string; selected?: boolean; value?: string; } /** * The attributes for <output> elements. */ interface IOutputAttributes extends IElementAttributes { form?: string; htmlFor?: string; name?: string; } /** * The attributes for <param> elements. */ interface IParamAttributes extends IElementAttributes { name?: string; value?: string; } /** * The attributes for <progress> elements. */ interface IProgressAttributes extends IElementAttributes { max?: number; value?: number; } /** * The attributes for <blockquote> elements. */ interface IQuoteAttributes extends IElementAttributes { cite?: string; } /** * The attributes for <select> elements. */ interface ISelectAttributes extends IElementAttributes { autofocus?: boolean; disabled?: boolean; form?: string; multiple?: boolean; name?: string; required?: boolean; size?: number; } /** * The attributes for <source> elements. */ interface ISourceAttributes extends IElementAttributes { media?: string; sizes?: string; src?: string; srcset?: string; type?: string; } /** * The attributes for <col> elements. */ interface ITableColAttributes extends IElementAttributes { span?: number; } /** * The attributes for <td> elements. */ interface ITableDataCellAttributes extends IElementAttributes { colSpan?: number; headers?: number; rowSpan?: number; } /** * The attributes for <th> elements. */ interface ITableHeaderCellAttributes extends IElementAttributes { colSpan?: number; headers?: string; rowSpan?: number; scope?: string; sorted?: string; } /** * The attributes for <textarea> elements. */ interface ITextAreaAttributes extends IElementAttributes { autocomplete?: string; autofocus?: boolean; cols?: number; dirName?: string; disabled?: boolean; form?: string; inputMode?: string; maxLength?: number; minLength?: number; name?: string; placeholder?: string; readOnly?: boolean; required?: boolean; rows?: number; wrap?: string; } /** * The attributes for <time> elements. */ interface ITimeAttributes extends IElementAttributes { dateTime?: string; } /** * The attributes for <track> elements. */ interface ITrackAttributes extends IElementAttributes { default?: boolean; kind?: string; label?: string; src?: string; srclang?: string; } /** * The attributes for <video> elements. */ interface IVideoAttributes extends IMediaAttributes { height?: number; poster?: string; width?: number; } /** * The virtual dom factory functions. */ var dom: { a: IFactory<IAnchorAttributes>; abbr: IFactory<IElementAttributes>; address: IFactory<IElementAttributes>; area: IFactory<IAreaAttributes>; article: IFactory<IElementAttributes>; aside: IFactory<IElementAttributes>; audio: IFactory<IMediaAttributes>; b: IFactory<IElementAttributes>; bdi: IFactory<IElementAttributes>; bdo: IFactory<IElementAttributes>; blockquote: IFactory<IQuoteAttributes>; br: IFactory<IElementAttributes>; button: IFactory<IButtonAttributes>; canvas: IFactory<ICanvasAttributes>; caption: IFactory<IElementAttributes>; cite: IFactory<IElementAttributes>; code: IFactory<IElementAttributes>; col: IFactory<ITableColAttributes>; colgroup: IFactory<ITableColAttributes>; data: IFactory<IDataAttributes>; datalist: IFactory<IElementAttributes>; dd: IFactory<IElementAttributes>; del: IFactory<IModAttributes>; dfn: IFactory<IElementAttributes>; div: IFactory<IElementAttributes>; dl: IFactory<IElementAttributes>; dt: IFactory<IElementAttributes>; em: IFactory<IElementAttributes>; embed: IFactory<IEmbedAttributes>; fieldset: IFactory<IFieldSetAttributes>; figcaption: IFactory<IElementAttributes>; figure: IFactory<IElementAttributes>; footer: IFactory<IElementAttributes>; form: IFactory<IFormAttributes>; h1: IFactory<IElementAttributes>; h2: IFactory<IElementAttributes>; h3: IFactory<IElementAttributes>; h4: IFactory<IElementAttributes>; h5: IFactory<IElementAttributes>; h6: IFactory<IElementAttributes>; header: IFactory<IElementAttributes>; hr: IFactory<IElementAttributes>; i: IFactory<IElementAttributes>; iframe: IFactory<IIFrameAttributes>; img: IFactory<IImageAttributes>; input: IFactory<IInputAttributes>; ins: IFactory<IModAttributes>; kbd: IFactory<IElementAttributes>; label: IFactory<ILabelAttributes>; legend: IFactory<IElementAttributes>; li: IFactory<ILIAttributes>; main: IFactory<IElementAttributes>; map: IFactory<IMapAttributes>; mark: IFactory<IElementAttributes>; meter: IFactory<IMeterAttributes>; nav: IFactory<IElementAttributes>; noscript: IFactory<IElementAttributes>; object: IFactory<IObjectAttributes>; ol: IFactory<IOListAttributes>; optgroup: IFactory<IOptGroupAttributes>; option: IFactory<IOptionAttributes>; output: IFactory<IOutputAttributes>; p: IFactory<IElementAttributes>; param: IFactory<IElementAttributes>; pre: IFactory<IElementAttributes>; progress: IFactory<IProgressAttributes>; q: IFactory<IElementAttributes>; rp: IFactory<IElementAttributes>; rt: IFactory<IElementAttributes>; ruby: IFactory<IElementAttributes>; s: IFactory<IElementAttributes>; samp: IFactory<IElementAttributes>; section: IFactory<IElementAttributes>; select: IFactory<ISelectAttributes>; small: IFactory<IElementAttributes>; source: IFactory<ISourceAttributes>; span: IFactory<IElementAttributes>; strong: IFactory<IElementAttributes>; sub: IFactory<IElementAttributes>; summary: IFactory<IElementAttributes>; sup: IFactory<IElementAttributes>; table: IFactory<IElementAttributes>; tbody: IFactory<IElementAttributes>; td: IFactory<ITableDataCellAttributes>; textarea: IFactory<ITextAreaAttributes>; tfoot: IFactory<IElementAttributes>; th: IFactory<ITableHeaderCellAttributes>; thead: IFactory<IElementAttributes>; time: IFactory<ITimeAttributes>; title: IFactory<IElementAttributes>; tr: IFactory<IElementAttributes>; track: IFactory<ITrackAttributes>; u: IFactory<IElementAttributes>; ul: IFactory<IElementAttributes>; var: IFactory<IElementAttributes>; video: IFactory<IVideoAttributes>; wbr: IFactory<IElementAttributes>; }; } declare module phosphor.virtualdom { /** * An enum of supported elem types. */ enum ElemType { /** * The elem represents a text node. */ Text = 0, /** * The elem represents an HTMLElement node. */ Node = 1, /** * The elem represents a component. */ Component = 2, } /** * A typedef for an elem tag. */ type ElemTag = string | IComponentClass<any>; /** * A data object for an elem. */ interface IData { /** * The key id for the elem. * * If an elem is given a key id, the generated node will not be * recreated during a rendering update if it moves in the render * tree provided the type of the node does not change. */ key?: string; /** * The ref id for the elem. * * If an elem is given a ref id, the generated node or component * will be added to the ref mapping created by the renderer. */ ref?: string; } /** * A node in a virtual DOM hierarchy. * * User code will not typically instantiate an elem directly. Instead, * a factory function will be called to create the elem in a type-safe * fashion. Factory functions for all standard DOM nodes are provided * by the framework, and new factories may be created with the * `createFactory` function. * * An elem *must* be treated as immutable. Mutating the elem state will * result in undefined rendering behavior. */ class Elem { /** * The type of the elem. */ type: ElemType; /** * The tag for the elem. * * The interpretation of the tag depends on the elem type: * Text - the text content * Node - the node tag name * Component - the component constructor */ tag: ElemTag; /** * The data object for the elem. * * The interpretation of the data depends on the elem type: * Text - an empty object * Node - the node attributes object * Component - the component data object */ data: IData; /** * The array of child elements. */ children: Elem[]; /** * Construct a new virtual elem. */ constructor(type: ElemType, tag: ElemTag, data: IData, children: Elem[]); } } declare module phosphor.virtualdom { import IMessageHandler = core.IMessageHandler; import IDisposable = utility.IDisposable; /** * An object which manages its own DOM node in a virtual DOM hierarchy. * * The renderer will send a component the following messages: * * 'update-request' - Sent when the component should update. * * 'after-attach' - Sent after the node is attached to the DOM. * * 'before-detach' - Sent before the node is detached from the DOM. * * 'before-move' - Sent before the node is moved in the DOM. * * 'after-move' - Sent after the node is moved in the DOM. */ interface IComponent<T extends IData> extends IDisposable, IMessageHandler { /** * The DOM node for the component. * * This must remain constant for the lifetime of the component. */ node: HTMLElement; /** * Initialize the component with new data and children. * * This is called whenever the component is re-rendered by its parent. * * It is *not* called when the component is first instantiated. */ init(data: T, children: Elem[]): void; } /** * A component class type. */ interface IComponentClass<T extends IData> { /** * Construct a new component. */ new (data: T, children: Elem[]): IComponent<T>; } } declare module phosphor.virtualdom { /** * Render virtual content into a host node. * * This renders the delta from the previous rendering. It assumes that * the contents of the host node are not manipulated by external code. * Modifying the host node will result in undefined rendering behavior. * * Returns an object which maps ref names to nodes and components. */ function render(content: Elem | Elem[], host: Node): any; } declare module phosphor.widgets { /** * An enum of alignment bit flags. */ enum Alignment { /** * Align with the left edge. */ Left = 1, /** * Align with the right edge. */ Right = 2, /** * Align with the horizontal center. */ HorizontalCenter = 4, /** * Align with the top edge. */ Top = 16, /** * Align with the bottom edge. */ Bottom = 32, /** * Align with the vertical center. */ VerticalCenter = 64, /** * Align with the horizontal and vertical center. */ Center, /** * A mask of horizontal alignment values. */ Horizontal_Mask, /** * A mask of vertical alignment values. */ Vertical_Mask, } } declare module phosphor.widgets { import Message = core.Message; /** * A class for messages related to child widgets. */ class ChildMessage extends Message { /** * Construct a new child message. */ constructor(type: string, child: Widget); /** * The child widget for the message. */ child: Widget; private _child; } } declare module phosphor.widgets { /** * An enum of layout directions. */ enum Direction { /** * Left to right direction. */ LeftToRight = 0, /** * Right to left direction. */ RightToLeft = 1, /** * Top to bottom direction. */ TopToBottom = 2, /** * Bottom to top direction. */ BottomToTop = 3, } } declare module phosphor.widgets { /** * An enum of docking modes for a dock area. */ enum DockMode { /** * Insert the widget at the top of the dock area. */ Top = 0, /** * Insert the widget at the left of the dock area. */ Left = 1, /** * Insert the widget at the right of the dock area. */ Right = 2, /** * Insert the widget at the bottom of the dock area. */ Bottom = 3, /** * Insert the widget as a new split item above the reference. */ SplitTop = 4, /** * Insert the widget as a new split item to the left of the reference. */ SplitLeft = 5, /** * Insert the widget as a new split item to the right of the reference. */ SplitRight = 6, /** * Insert the widget as a new split item below the reference. */ SplitBottom = 7, /** * Insert the widget as a new tab before the reference. */ TabBefore = 8, /** * Insert the widget as a new tab after the reference. */ TabAfter = 9, } } declare module phosphor.widgets { import Size = utility.Size; /** * An object which manages an item in a layout. */ interface ILayoutItem { /** * Test whether the item manages a widget. */ isWidget: boolean; /** * Test whether the item manages empty space. */ isSpacer: boolean; /** * Test whether the item should be treated as hidden. */ isHidden: boolean; /** * The widget the item manages, if any. */ widget: Widget; /** * The alignment for the item in its layout cell. */ alignment: Alignment; /** * Test whether the item should be expanded horizontally. * * If this is true, the item will get as much space as possible * in the horizontal direction up to its maximum size. */ expandHorizontal: boolean; /** * Test Whether the item should be expanded vertically. * * If this is true, the item will get as much space as possible * in the vertical direction up to its maximum size. */ expandVertical: boolean; /** * Invalidate the cached data for the item. */ invalidate(): void; /** * Compute the preferred size of the item. */ sizeHint(): Size; /** * Compute the minimum allowed size of the item. */ minSize(): Size; /** * Compute the maximum allowed size of the item. */ maxSize(): Size; /** * Set the geometry of the item using the given values. */ setGeometry(x: number, y: number, width: number, height: number): void; } } declare module phosphor.widgets { import Message = core.Message; /** * A message class for 'move' messages. */ class MoveMessage extends Message { /** * Construct a new move message. */ constructor(oldX: number, oldY: number, x: number, y: number); /** * The previous X coordinate of the widget. */ oldX: number; /** * The previous Y coordinate of the widget. */ oldY: number; /** * The current X coordinate of the widget. */ x: number; /** * The current Y coordinate of the widget. */ y: number; /** * The change in X coordinate of the widget. */ deltaX: number; /** * The change in Y coordinate of the widget. */ deltaY: number; private _oldX; private _oldY; private _x; private _y; } } declare module phosphor.widgets { /** * An enum of layout orientations. */ enum Orientation { /** * Horizontal orientation. */ Horizontal = 0, /** * Vertical orientation. */ Vertical = 1, } } declare module phosphor.widgets { import Message = core.Message; /** * A message class for 'resize' messages. */ class ResizeMessage extends Message { /** * Construct a new resize message. */ constructor(oldWidth: number, oldHeight: number, width: number, height: number); /** * The previous width of the widget. */ oldWidth: number; /** * The previous height of the widget. */ oldHeight: number; /** * The current width of the widget. */ width: number; /** * The current height of the widget. */ height: number; /** * The change in width of the widget. */ deltaWidth: number; /** * The change in height of the widget. */ deltaHeight: number; private _oldWidth; private _oldHeight; private _width; private _height; } } declare module phosphor.widgets { /** * An enum of size policy values. * * A size policy controls how layouts interpret a widget's `sizeHint`. */ enum SizePolicy { /** * A policy indicating that the `sizeHint` is the only acceptable * size for the widget. */ Fixed = 0, /** * A bit flag indicating the widget can grow beyond `sizeHint`. */ GrowFlag = 1, /** * A bit flag indicating the widget can shrink below `sizeHint`. */ ShrinkFlag = 2, /** * A bit flag indicating the widget should expand beyond `sizeHint`. */ ExpandFlag = 4, /** * A bit flag indicating the `sizeHint` is ignored. */ IgnoreFlag = 8, /** * A policy indicating that the `sizeHint` is a minimum, but the * widget can be expanded if needed and still be useful. */ Minimum, /** * A policy indicating that the `sizeHint` is a maximum, but the * widget can be shrunk if needed and still be useful. */ Maximum, /** * A policy indicating that the `sizeHint` is preferred, but the * widget can grow or shrink if needed and still be useful. * * This is the default size policy. */ Preferred, /** * A policy indicating that `sizeHint` is reasonable, but the widget * can shrink if needed and still be useful. It can also make use of * extra space and should expand as much as possible. */ Expanding, /** * A policy indicating that `sizeHint` is a minimum. The widget can * make use of extra space and should expand as much as possible. */ MinimumExpanding, /** * A policy indicating the `sizeHint` is ignored. */ Ignored, } } declare module phosphor.widgets { /** * An enum of widget bit flags. * * Widget flags are used to control various low-level behaviors of * a widget. They are typically not used directly by user code. */ enum WidgetFlag { /** * The widget is attached to the DOM. */ IsAttached = 1, /** * The widget is explicitly hidden. */ IsHidden = 2, /** * The widget is visible. */ IsVisible = 4, /** * The widget has been disposed. */ IsDisposed = 8, /** * Changing the widget layout is disallowed. */ DisallowLayoutChange = 16, } } declare module phosphor.widgets { import IMessage = core.IMessage; import IMessageHandler = core.IMessageHandler; import IMessageFilter = core.IMessageFilter; import IDisposable = utility.IDisposable; import Size = utility.Size; /** * The base class of phosphor layouts. * * The Layout class does not define an interface for adding widgets to * the layout. A subclass should define that API in a manner suitable * for its intended use. */ class Layout implements IMessageFilter, IDisposable { /** * Construct a new layout. */ constructor(); /** * Dispose of the resources held by the layout. */ dispose(): void; /** * Get the parent widget of the layout. */ /** * Set the parent widget of the layout. * * The parent widget can only be set once, and is done automatically * when the layout is installed on a widget. This should not be set * directly by user code. */ parent: Widget; /** * Get the number of layout items in the layout. * * This must be implemented by a subclass. */ count: number; /** * Get the layout item at the given index. * * This must be implemented by a subclass. */ itemAt(index: number): ILayoutItem; /** * Remove and return the layout item at the given index. * * This must be implemented by a subclass. */ removeAt(index: number): ILayoutItem; /** * Compute the size hint for the layout. * * This must be implemented by a subclass. */ sizeHint(): Size; /** * Compute the minimum required size for the layout. * * This must be implemented by a subclass. */ minSize(): Size; /** * Compute the maximum allowed size for the layout. * * This must be implemented by a subclass. */ maxSize(): Size; /** * Get the widget at the given index. * * Returns `undefined` if there is no widget at the given index. */ widgetAt(index: number): Widget; /** * Get the index of the given widget or layout item. * * Returns -1 if the widget or item does not exist in the layout. */ indexOf(value: Widget | ILayoutItem): number; /** * Remove an item from the layout and return its index. * * Returns -1 if the item is not in the layout. */ remove(value: Widget | ILayoutItem): number; /** * Get the alignment for the given widget. * * Returns 0 if the widget is not found in the layout. */ alignment(widget: Widget): Alignment; /** * Set the alignment for the given widget. * * Returns true if the alignment was updated, false otherwise. */ setAlignment(widget: Widget, alignment: Alignment): boolean; /** * Invalidate the cached layout data and enqueue an update. * * This should be reimplemented by a subclass as needed. */ invalidate(): void; /** * Refresh the layout for the parent widget immediately. * * This is typically called automatically at the appropriate times. */ refresh(): void; /** * Filter a message sent to a message handler. * * This implements the `IMessageFilter` interface. */ filterMessage(handler: IMessageHandler, msg: IMessage): boolean; /** * Process a message dispatched to the parent widget. * * Subclasses may reimplement this method as needed. */ protected processParentMessage(msg: IMessage): void; /** * A method invoked when widget layout should be updated. * * The arguments are the content boundaries for the layout which are * already adjusted to account for the parent widget box sizing data. * * The default implementation of this method is a no-op. */ protected layout(x: number, y: number, width: number, height: number): void; /** * Ensure a child widget is parented to the layout's parent. * * This should be called by a subclass when adding a widget. */ protected ensureParent(widget: Widget): void; /** * Reparent the child widgets to the layout's parent. * * This is typically called automatically at the proper times. */ protected reparentChildWidgets(): void; private _parent; } } declare module phosphor.widgets { /** * A sizer object for the `layoutCalc` function. * * Instances of this class are used internally by the panel layouts * to implement their layout logic. User code will not typically use * this class directly. */ class LayoutSizer { /** * The size hint for the sizer. * * The sizer will be given this initial size subject to its bounds. */ sizeHint: number; /** * The minimum size of the sizer. * * The sizer will never be sized less than this value. * * Limits: [0, Infinity) && <= maxSize */ minSize: number; /** * The maximum size of the sizer. * * The sizer will never be sized greater than this value. * * Limits: [0, Infinity] && >= minSize */ maxSize: number; /** * The stretch factor for the sizer. * * This controls how much the sizer stretches relative to the other * sizers when layout space is distributed. A sizer with a stretch * factor of zero will only be resized after all stretch sizers * and expansive sizers have been sized to their limits. * * Limits: [0, Infinity) */ stretch: number; /** * Whether the sizer should consume extra space if available. * * Expansive sizers will absorb any remaining space after all * stretch sizers have been resized to their limits. */ expansive: boolean; /** * The computed size of the sizer. * * This value is the output of the algorithm. */ size: number; /** * An internal storage property for the layout algorithm. */ done: boolean; } /** * Distribute space among the given sizers. * * This distributes the given layout spacing among the sizers * according to the following algorithm: * * 1) Initialize the sizers's size to its size hint and compute * the sums for each of size hint, min size, and max size. * * 2) If the total size hint equals the layout space, return. * * 3) If the layout space is less than the total min size, * set all sizers to their min size and return. * * 4) If the layout space is greater than the total max size, * set all sizers to their max size and return. * * 5) If the layout space is less than the total size hint, * distribute the negative delta as follows: * * a) Shrink each sizer with a stretch factor greater than * zero by an amount proportional to the sum of stretch * factors and negative space. If the sizer reaches its * minimum size, remove it and its stretch factor from * the computation. * * b) If after adjusting all stretch sizers there remains * negative space, distribute it equally among sizers * with a stretch factor of zero. If a sizer reaches * its minimum size, remove it from the computation. * * 6) If the layout space is greater than the total size hint, * distribute the positive delta as follows: * * a) Expand each sizer with a stretch factor greater than * zero by an amount proportional to the sum of stretch * factors and positive space. If the sizer reaches its * maximum size, remove it and its stretch factor from * the computation. * * b) If after adjusting all stretch sizers there remains * positive space, distribute it equally among sizers * with the `expansive` flag set. If a sizer reaches * its maximum size, remove it from the computation. * * c) If after adjusting all stretch and expansive sizers * there remains positive space, distribute it equally * among sizers with a stretch factor of zero. If a sizer * reaches its maximum size, remove it from the computation. */ function layoutCalc(sizers: LayoutSizer[], space: number): void; } declare module phosphor.widgets { import Size = utility.Size; /** * A layout item which manages empty space. * * User code will not typically use this class directly. */ class SpacerItem implements ILayoutItem { /** * Construct a new spacer item. */ constructor(width: number, height: number, hPolicy: SizePolicy, vPolicy: SizePolicy); /** * Test whether the item manages a widget. */ isWidget: boolean; /** * Test whether the item manages empty space. */ isSpacer: boolean; /** * Test whether the item should be treated as hidden. */ isHidden: boolean; /** * The widget the item manages, if any. */ widget: Widget; /** * Get the alignment for the item in its layout cell. */ alignment: Alignment; /** * Test whether the item should be expanded horizontally. */ expandHorizontal: boolean; /** * Test Whether the item should be expanded vertically. */ expandVertical: boolean; /** * Change the sizing of the spacer item. * * The owner layout must be invalidated to reflect the change. */ setSizing(width: number, height: number, hPolicy: SizePolicy, vPolicy: SizePolicy): void; /** * Transpose the effective orientation of the spacer item. */ transpose(): void; /** * Invalidate the cached data for the item. */ invalidate(): void; /** * Compute the preferred size of the item. */ sizeHint(): Size; /** * Compute the minimum size of the item. */ minSize(): Size; /** * Compute the maximum size of the item. */ maxSize(): Size; /** * Set the geometry of the item using the given values. */ setGeometry(x: number, y: number, width: number, height: number): void; private _size; private _sizePolicy; } } declare module phosphor.widgets { import Size = utility.Size; /** * A layout item which manages a widget. * * User code will not typically use this class directly. */ class WidgetItem implements ILayoutItem { /** * Construct a new widget item. */ constructor(widget: Widget, alignment?: Alignment); /** * Test whether the item manages a widget. */ isWidget: boolean; /** * Test whether the item manages empty space. */ isSpacer: boolean; /** * Test whether the item should be treated as hidden. */ isHidden: boolean; /** * The widget the item manages, if any. */ widget: Widget; /** * Get the alignment for the item in its layout cell. */ /** * Set the alignment for the item in its layout cell. * * The owner layout must be invalidated to reflect the change. */ alignment: Alignment; /** * Test whether the item should be expanded horizontally. */ expandHorizontal: boolean; /** * Test Whether the item should be expanded vertically. */ expandVertical: boolean; /** * Invalidate the cached data for the item. */ invalidate(): void; /** * Compute the preferred size of the item. */ sizeHint(): Size; /** * Compute the minimum size of the item. */ minSize(): Size; /** * Compute the maximum size of the item. */ maxSize(): Size; /** * Set the geometry of the item using the given values. */ setGeometry(x: number, y: number, width: number, height: number): void; /** * Update the computed sizes for the widget item. */ private _updateSizes(); private _widget; private _alignment; private _origHint; private _sizeHint; private _minSize; private _maxSize; } } declare module phosphor.widgets { import Size = utility.Size; /** * A layout which arranges widgets in a row or column. */ class BoxLayout extends Layout { /** * Construct a new box layout. */ constructor(direction: Direction, spacing?: number); /** * Dispose of the resources held by the layout. */ dispose(): void; /** * Get the layout direction for the box layout. */ /** * Set the layout direction for the box layout. */ direction: Direction; /** * Get the inter-element fixed spacing for the box layout. */ /** * Set the inter-element fixed spacing for the box layout. */ spacing: number; /** * Get the number of layout items in the layout. */ count: number; /** * Get the layout item at the specified index. */ itemAt(index: number): ILayoutItem; /** * Remove and return the layout item at the specified index. */ removeAt(index: number): ILayoutItem; /** * Add a widget as the last item in the layout. * * If the widget already exists in the layout, it will be moved. * * Returns the index of the added widget. */ addWidget(widget: Widget, stretch?: number, alignment?: Alignment): number; /** * Insert a widget into the layout at the given index. * * If the widget already exists in the layout, it will be moved. * * Returns the index of the added widget. */ insertWidget(index: number, widget: Widget, stretch?: number, alignment?: Alignment): number; /** * Add a fixed amount of spacing to the end of the layout. * * Returns the index of the added space. */ addSpacing(size: number): number; /** * Insert a fixed amount of spacing at the given index. * * Returns the index of the added space. */ insertSpacing(index: number, size: number): number; /** * Add stretchable space to the end of the layout. * * Returns the index of the added space. */ addStretch(stretch: number): number; /** * Insert stretchable space at the given index. */ insertStretch(index: number, stretch: number): number; /** * Get the stretch factor for the given widget or index. * * Returns -1 if the given widget or index is invalid. */ stretch(which: Widget | number): number; /** * Set the stretch factor for the given widget or index. * * Returns true if the stretch was updated, false otherwise. */ setStretch(which: Widget | number, stretch: number): boolean; /** * Invalidate the cached layout data and enqueue an update. */ invalidate(): void; /** * Compute the preferred size of the layout. */ sizeHint(): Size; /** * Compute the minimum size of the layout. */ minSize(): Size; /** * Compute the maximum size of the layout. */ maxSize(): Size; /** * Update the geometry of the child layout items. */ protected layout(x: number, y: number, width: number, height: number): void; /** * Initialize the layout items and internal sizes for the layout. */ private _setupGeometry(); /** * Insert a layout item at the given index. * * Returns the index of the added item. */ private _insert(index, item, stretch); private _dirty; private _fixedSpace; private _lastSpaceIndex; private _minSize; private _maxSize; private _sizeHint; private _items; private _sizers; private _direction; private _spacing; } } declare module phosphor.widgets { import NodeBase = core.NodeBase; /** * A class which manages a handle node for a split panel. */ class SplitHandle extends NodeBase { /** * Create the DOM node for a split handle. */ static createNode(): HTMLElement; /** * Construct a new split handle. */ constructor(orientation: Orientation); /** * Get whether the handle is hidden. */ /** * Set whether the handle is hidden. */ hidden: boolean; /** * Get the orientation of the handle. */ /** * Set the orientation of the handle. */ orientation: Orientation; private _hidden; private _orientation; } } declare module phosphor.widgets { import Size = utility.Size; /** * A layout which arranges widgets in resizable sections. */ class SplitLayout extends Layout { /** * Construct a new split layout. */ constructor(orientation: Orientation); /** * Dispose of the resources held by the layout. */ dispose(): void; /** * Get the orientation of the split layout. */ /** * Set the orientation of the split layout. */ orientation: Orientation; /** * Get the size of the split handles. */ /** * Set the the size of the split handles. */ handleSize: number; /** * Get the number of layout items in the layout. */ count: number; /** * Get the normalized sizes of the items in the layout. */ sizes(): number[]; /** * Set the relative sizes for the split items. * * Extra values are ignored, too few will yield an undefined layout. */ setSizes(sizes: number[]): void; /** * Get the splitter handle at the given index. */ handleAt(index: number): SplitHandle; /** * Move the handle at the given index to the offset position. * * This will move the handle as close as possible to the given * offset position, without violating item size constraints. */ moveHandle(index: number, pos: number): void; /** * Get the layout item at the specified index. */ itemAt(index: number): ILayoutItem; /** * Remove and return the layout item at the specified index. */ removeAt(index: number): ILayoutItem; /** * Add a widget as the last item in the layout. * * If the widget already exists in the layout, it will be moved. * * Returns the index of the added widget. */ addWidget(widget: Widget, stretch?: number, alignment?: Alignment): number; /** * Insert a widget into the layout at the given index. * * If the widget already exists in the layout, it will be moved. * * Returns the index of the added widget. */ insertWidget(index: number, widget: Widget, stretch?: number, alignment?: Alignment): number; /** * Get the stretch factor for the given widget or index. * * Returns -1 if the given widget or index is invalid. */ stretch(which: Widget | number): number; /** * Set the stretch factor for the given widget or index. * * Returns true if the stretch was updated, false otherwise. */ setStretch(which: Widget | number, stretch: number): boolean; /** * Invalidate the cached layout data and enqueue an update. */ invalidate(): void; /** * Compute the preferred size of the layout. */ sizeHint(): Size; /** * Compute the minimum size of the layout. */ minSize(): Size; /** * Compute the maximum size of the layout. */ maxSize(): Size; /** * Update the geometry of the child layout items. */ protected layout(x: number, y: number, width: number, height: number): void; /** * Initialize the layout items and internal sizes for the layout. */ private _setupGeometry(); private _dirty; private _handleSize; private _fixedSpace; private _minSize; private _maxSize; private _sizeHint; private _items; private _sizers; private _orientation; } /** * A custom widget item used by a split layout. */ class SplitItem extends WidgetItem { /** * Construct a new split item. */ constructor(handle: SplitHandle, widget: Widget, alignment?: Alignment); /** * Get the split handle for the item. */ handle: SplitHandle; private _handle; } } declare module phosphor.widgets { import Signal = core.Signal; import Pair = utility.Pair; import Size = utility.Size; /** * A layout in which only one widget is visible at a time. * * User code is responsible for managing the current layout index. The * index defaults to -1, which means no widget will be shown. The index * must be set to a valid index in order for a widget to be displayed. * * If the current widget is removed, the current index is reset to -1. * * This layout will typically be used in conjunction with another * widget, such as a tab bar, which manipulates the layout index. */ class StackedLayout extends Layout { /** * A signal emitted when a widget is removed from the layout. */ static widgetRemoved: Signal<StackedLayout, Pair<number, Widget>>; /** * Construct a new stack layout. */ constructor(); /** * Dispose of the resources held by the layout. */ dispose(): void; /** * Get the current index of the layout. */ /** * Set the current index of the layout. */ currentIndex: number; /** * Get the current widget in the layout. */ /** * Set the current widget in the layout. */ currentWidget: Widget; /** * Get the number of layout items in the layout. */ count: number; /** * Get the layout item at the specified index. */ itemAt(index: number): ILayoutItem; /** * Remove and return the layout item at the specified index. */ removeAt(index: number): ILayoutItem; /** * Add a widget as the last item in the layout. * * If the widget already exists in the layout, it will be moved. * * Returns the index of the added widget. */ addWidget(widget: Widget, alignment?: Alignment): number; /** * Insert a widget into the layout at the given index. * * If the widget already exists in the layout, it will be moved. * * Returns the index of the added widget. */ insertWidget(index: number, widget: Widget, alignment?: Alignment): number; /** * Move a widget from one index to another. * * This method is more efficient for moving a widget than calling * `insertWidget` for an already added widget. It will not remove * the widget before moving it and will not emit `widgetRemoved`. * * Returns -1 if `fromIndex` is out of range. */ moveWidget(fromIndex: number, toIndex: number): number; /** * Invalidate the cached layout data and enqueue an update. */ invalidate(): void; /** * Compute the preferred size of the layout. */ sizeHint(): Size; /** * Compute the minimum size of the layout. */ minSize(): Size; /** * Compute the maximum size of the layout. */ maxSize(): Size; /** * Update the geometry of the child layout items. */ protected layout(x: number, y: number, width: number, height: number): void; /** * Initialize the layout items and internal sizes for the layout. */ private _setupGeometry(); private _dirty; private _sizeHint; private _minSize; private _maxSize; private _items; private _currentItem; } } declare module phosphor.widgets { import Queue = collections.Queue; import IMessage = core.IMessage; import IMessageHandler = core.IMessageHandler; import NodeBase = core.NodeBase; import Signal = core.Signal; import IBoxSizing = utility.IBoxSizing; import Size = utility.Size; /** * The base class of the Phosphor widget hierarchy. * * A widget wraps an absolutely positioned DOM node. It can act as a * container for child widgets which can be arranged with a Phosphor * layout manager, or it can act as a leaf control which manipulates * its DOM node directly. * * A root widget (a widget with no parent) can be mounted anywhere * in the DOM by calling its `attach` method and passing the DOM * node which should be used as the parent of the widget's node. */ class Widget extends NodeBase implements IMessageHandler { /** * A signal emitted when the widget is disposed. */ static disposed: Signal<Widget, void>; /** * Construct a new widget. */ constructor(); /** * Dispose of the widget and its descendants. */ dispose(): void; /** * Get the X position set for the widget. */ /** * Set the X position for the widget. * * This is equivalent to `move(x, this.y)`. */ x: number; /** * Get the Y position set for the widget. */ /** * Set the Y position for the widget. * * This is equivalent to `move(this.x, y)`. */ y: number; /** * Get the width set for the widget. */ /** * Set the width for the widget. * * This is equivalent to `resize(width, this.height)`. */ width: number; /** * Get the height set for the widget. */ /** * Set the height for the widget. * * This is equivalent to `resize(this.width, height)`. */ height: number; /** * Get the horizontal size policy for the widget. */ /** * Set the horizontal size policy for the widget. * * This is equivalent to `setSizePolicy(policy, this.verticalSizePolicy)`. */ horizontalSizePolicy: SizePolicy; /** * Get the vertical size policy for the widget. */ /** * Set the vertical size policy for the widget. * * This is equivalent to `setSizePolicy(this.horizontalPolicy, policy)`. */ verticalSizePolicy: SizePolicy; /** * Get the CSS box sizing for the widget. * * This method computes the data once, then caches it. The cached * data can be cleared by calling the `invalidateBoxSizing` method. */ boxSizing: IBoxSizing; /** * Test whether the widget's node is attached to the DOM. */ isAttached: boolean; /** * Test whether the widget has been disposed. */ isDisposed: boolean; /** * Test whether the widget is explicitly hidden. */ isHidden: boolean; /** * Test whether the widget is visible. * * A widget is visible under the following conditions: * - it is attached to the DOM * - it is not explicitly hidden * - it has no explicitly hidden ancestors */ isVisible: boolean; /** * Get the layout manager attached to the widget. * * Returns null if the widget has no layout manager. */ /** * Set the layout manager for the widget. * * A layout is single-use only. The current layout can be set to null * or to a new layout instance, but not to a layout which is already * installed on another widget. * * The current layout will be disposed and cannot be reused. */ layout: Layout; /** * Get the parent of the widget. * * Returns null if the widget has no parent. */ /** * Set the parent of the widget. * * Setting the parent to null will detach the widget from the DOM * and automatically remove it from the relevant layout manager. */ parent: Widget; /** * Get the number of children in the widget. */ childCount: number; /** * Get the child widget at the given index. * * Returns `undefined` if the index is out of range. */ childAt(index: number): Widget; /** * Test whether the given widget flag is set. */ testFlag(flag: WidgetFlag): boolean; /** * Set the given widget flag. */ setFlag(flag: WidgetFlag): void; /** * Clear the given widget flag. */ clearFlag(flag: WidgetFlag): void; /** * Make the widget visible to its parent. * * If the widget is not explicitly hidden, this is a no-op. */ show(): void; /** * Make the widget invisible to its parent. * * If the widget is already hidden, this is a no-op. */ hide(): void; /** * Show or hide the widget according to the given flag. */ setVisible(visible: boolean): void; /** * Close the widget by sending it a 'close' message. * * Subclasses should reimplement `onClose` to perform custom actions. */ close(): void; /** * Attach the widget's node to a host DOM element. * * The `fit` method can be called to resize the widget to fill its * host node. It should be called whenever the size of host node is * known to have changed. * * Only a root widget can be attached to a host node. */ attach(host: HTMLElement): void; /** * Detach the widget's node from the DOM. * * Only a root widget can be detached from its host node. */ detach(): void; /** * Resize the widget so that it fills its host node. * * Only a root widget can be fit to its host. * * If the size of the host node is known, it can be provided. This * will prevent a DOM geometry read and avoid a potential reflow. */ fit(width?: number, height?: number, box?: IBoxSizing): void; /** * Calculate the preferred size for the widget. * * This is used by Phosphor's layout machinery to compute the natural * space required for the widget and its children. A subclass which * provides leaf content should reimplement this method. * * The default implementation of this method delegates to the layout * manager if installed, otherwise it returns a zero size. */ sizeHint(): Size; /** * Calculate the preferred minimum size for the widget. * * This is used by Phosphor's layout machinery to compute the minimum * space required for the widget and its children. This is independent * of and subordinate to the minimum size specified in CSS. User code * will not typically interact with this method. * * The default implementation of this method delegates to the layout * manager if installed, otherwise it returns a zero size. */ minSizeHint(): Size; /** * Calculate the preferred maximum size for the widget. * * This is used by Phosphor's layout machinery to compute the maximum * space allowed for the widget and its children. This is independent * of and subordinate to the maximum size specified in CSS. User code * will not typically interact with this method. * * The default implementation of this method delegates to the layout * manager if installed, otherwise it returns an infinite size. */ maxSizeHint(): Size; /** * Invalidate the cached CSS box sizing for the widget. * * User code should invoke this method when it makes a change to the * node's style which changes its border, padding, or size limits. */ invalidateBoxSizing(): void; /** * Notify the layout system that the widget's geometry is dirty. * * This is typically called automatically at the proper times, but * a custom leaf widget should call this method when its size hint * changes so that the ancestor layout will refresh. * * If the `force` flag is false and the widget is explicitly hidden, * this is a no-op. The geometry will update automatically when the * widget is made visible. */ updateGeometry(force?: boolean): void; /** * Schedule an update for the widget. * * If the `immediate` flag is false (the default) the update will be * scheduled for the next cycle of the event loop. If `immediate` is * true, the widget will be updated immediately. Multiple pending * requests are collapsed into a single update. * * #### Notes * The semantics of an update are defined by a supporting widget. */ update(immediate?: boolean): void; /** * Move the widget to the specified X-Y coordinate. */ move(x: number, y: number): void; /** * Resize the widget to the specified width and height. */ resize(width: number, height: number): void; /** * Set the position and size of the widget. * * The size is clipped to the limits specified by the node's style. * * This method will send 'move' and 'resize' messages to the widget if * the new geometry changes the position or size of the widget's node. */ setGeometry(x: number, y: number, width: number, height: number): void; /** * Set the size policy for the widget. */ setSizePolicy(horizontal: SizePolicy, vertical: SizePolicy): void; /** * Process a message sent to the widget. * * This implements the IMessageHandler interface. * * Subclasses may reimplement this method as needed. */ processMessage(msg: IMessage): void; /** * Compress a message posted to the widget. * * This implements the IMessageHandler interface. * * Subclasses may reimplement this method as needed. */ compressMessage(msg: IMessage, pending: Queue<IMessage>): boolean; /** * A method invoked when a 'close' message is received. * * The default implementation sets the parent to null. */ protected onClose(msg: IMessage): void; /** * A method invoked when a 'child-added' message is received. * * The default implementation appends the child node to the DOM. */ protected onChildAdded(msg: ChildMessage): void; /** * A method invoked when a 'child-removed' message is received. * * The default implementation removes the child node from the DOM. */ protected onChildRemoved(msg: ChildMessage): void; /** * A method invoked when a 'move' message is received. * * The default implementation is a no-op. */ protected onMove(msg: MoveMessage): void; /** * A method invoked when a 'resize' message is received. * * The default implementation is a no-op. */ protected onResize(msg: ResizeMessage): void; /** * A method invoked on an 'update-request' message. * * The default implementation is a no-op. */ protected onUpdateRequest(msg: IMessage): void; /** * A method invoked when a 'before-show' message is received. * * The default implementation is a no-op. */ protected onBeforeShow(msg: IMessage): void; /** * A method invoked when an 'after-show' message is received. * * The default implementation is a no-op. */ protected onAfterShow(msg: IMessage): void; /** * A method invoked when a 'before-hide' message is received. * * The default implementation is a no-op. */ protected onBeforeHide(msg: IMessage): void; /** * A method invoked when an 'after-hide' message is received. * * The default implementation is a no-op. */ protected onAfterHide(msg: IMessage): void; /** * A method invoked when a 'before-attach' message is received. * * The default implementation is a no-op. */ protected onBeforeAttach(msg: IMessage): void; /** * A method invoked when an 'after-attach' message is received. * * The default implementation is a no-op. */ protected onAfterAttach(msg: IMessage): void; /** * A method invoked when a 'before-detach' message is received. * * The default implementation is a no-op. */ protected onBeforeDetach(msg: IMessage): void; /** * A method invoked when an 'after-detach' message is received. * * The default implementation is a no-op. */ protected onAfterDetach(msg: IMessage): void; private _x; private _y; private _width; private _height; private _wflags; private _layout; private _parent; private _children; private _boxSizing; private _sizePolicy; } } declare module phosphor.widgets { /** * A widget which delegates to a permanently installed layout. * * This is used as a base class for common panel widgets. */ class Panel extends Widget { /** * Construct a new panel. */ constructor(layout: Layout); /** * Get the number of items (widgets + spacers) in the panel. */ count: number; /** * Get the index of the given widget. * * Returns -1 if the widget is not found. */ indexOf(widget: Widget): number; /** * Get the widget at the given index. * * Returns `undefined` if there is no widget at the given index. */ widgetAt(index: number): Widget; /** * Get the alignment for the given widget. * * Returns 0 if the widget is not found in the panel. */ alignment(widget: Widget): Alignment; /** * Set the alignment for the given widget. * * Returns true if the alignment was updated, false otherwise. */ setAlignment(widget: Widget, alignment: Alignment): boolean; } } declare module phosphor.widgets { /** * A panel which arranges its children in a row or column. */ class BoxPanel extends Panel { /** * Construct a new box panel. */ constructor(direction?: Direction, spacing?: number); /** * Get the layout direction for the panel. */ /** * Set the layout direction for the panel. */ direction: Direction; /** * Get the inter-element fixed spacing for the panel. */ /** * Set the inter-element fixed spacing for the panel. */ spacing: number; /** * Add a child widget to the end of the panel. * * If the widget already exists in the panel, it will be moved. * * Returns the index of the added widget. */ addWidget(widget: Widget, stretch?: number, alignment?: Alignment): number; /** * Insert a child widget into the panel at the given index. * * If the widget already exists in the panel, it will be moved. * * Returns the index of the added widget. */ insertWidget(index: number, widget: Widget, stretch?: number, alignment?: Alignment): number; /** * Add a fixed amount of spacing to the end of the panel. * * Returns the index of the added space. */ addSpacing(size: number): number; /** * Insert a fixed amount of spacing at the given index. * * Returns the index of the added space. */ insertSpacing(index: number, size: number): number; /** * Add stretchable space to the end of the panel. * * Returns the index of the added space. */ addStretch(stretch: number): number; /** * Insert stretchable space at the given index. * * Returns the index of the added space. */ insertStretch(index: number, stretch: number): number; /** * Get the stretch factor for the given widget or index. * * Returns -1 if the given widget or index is invalid. */ stretch(which: Widget | number): number; /** * Set the stretch factor for the given widget or index. * * Returns true if the stretch was updated, false otherwise. */ setStretch(which: Widget | number, stretch: number): boolean; } } declare module phosphor.widgets { import IMessage = core.IMessage; /** * A panel which arranges its children into resizable sections. */ class SplitPanel extends Panel { /** * Construct a new split panel. */ constructor(orientation?: Orientation); /** * Dispose of the resources held by the panel. */ dispose(): void; /** * Get the orientation of the split panel. */ /** * Set the orientation of the split panel. */ orientation: Orientation; /** * Get the size of the split handles. */ /** * Set the the size of the split handles. */ handleSize: number; /** * Get the normalized sizes of the widgets in the split panel. */ sizes(): number[]; /** * Set the relative sizes for the split panel widgets. * * Extra values are ignored, too few will yield an undefined layout. */ setSizes(sizes: number[]): void; /** * Add a child widget to the end of the split panel. * * If the widget already exists in the panel, it will be moved. * * Returns the index of the added widget. */ addWidget(widget: Widget, stretch?: number, alignment?: Alignment): number; /** * Insert a child widget into the split panel at the given index. * * If the widget already exists in the panel, it will be moved. * * Returns the index of the added widget. */ insertWidget(index: number, widget: Widget, stretch?: number, alignment?: Alignment): number; /** * Get the stretch factor for the given widget or index. * * Returns -1 if the given widget or index is invalid. */ stretch(which: Widget | number): number; /** * Set the stretch factor for the given widget or index. * * Returns true if the stretch was updated, false otherwise. */ setStretch(which: Widget | number, stretch: number): boolean; /** * Handle the DOM events for the split panel. */ handleEvent(event: Event): void; /** * A method invoked after the node is attached to the DOM. */ protected onAfterAttach(msg: IMessage): void; /** * A method invoked after the node is detached from the DOM. */ protected onAfterDetach(msg: IMessage): void; /** * Handle the 'mousedown' event for the split panel. */ private _evtMouseDown(event); /** * Handle the 'mouseup' event for the split panel. */ private _evtMouseUp(event); /** * Handle the 'mousemove' event for the split panel. */ private _evtMouseMove(event); /** * Find the index of the handle which contains a target element. */ private _findHandle(target); /** * Release the mouse grab for the split panel. */ private _releaseMouse(); private _pressData; } } declare module phosphor.widgets { import Signal = core.Signal; import Pair = utility.Pair; /** * A panel where only one child widget is visible at a time. */ class StackedPanel extends Panel { /** * A signal emitted when a widget is removed from the panel. */ static widgetRemoved: Signal<StackedPanel, Pair<number, Widget>>; /** * Construct a new stacked panel. */ constructor(); /** * Get the current index of the panel. */ /** * Set the current index of the panel. */ currentIndex: number; /** * Get the current widget of the panel. */ /** * Set the current widget of the panel. */ currentWidget: Widget; /** * Add a child widget to the end of the panel. * * If the widget already exists in the panel, it will be moved. * * Returns the index of the added widget. */ addWidget(widget: Widget, alignment?: Alignment): number; /** * Insert a child widget into the panel at the given index. * * If the widget already exists in the panel, it will be moved. * * Returns the index of the added widget. */ insertWidget(index: number, widget: Widget, alignment?: Alignment): number; /** * Move a child widget from one index to another. * * This method is more efficient for moving a widget than calling * `insertWidget` for an already added widget. It will not remove * the widget before moving it and will not emit `widgetRemoved`. * * Returns -1 if `fromIndex` is out of range. */ moveWidget(fromIndex: number, toIndex: number): number; /** * Handle the `widgetRemoved` signal for the stacked layout. */ private _p_widgetRemoved(sender, args); } } declare module phosphor.widgets { /** * A widget which can be added to a DockArea. */ interface IDockWidget extends Widget { /** * The tab associated with the widget. */ tab: Tab; } /** * A widget which provides a flexible docking layout area for widgets. */ class DockArea extends Widget { /** * Construct a new dock area. */ constructor(); /** * Dispose of the resources held by the widget. */ dispose(): void; /** * Get the width of the tabs in the dock area. */ /** * Get the width of the tabs in the dock area. */ tabWidth: number; /** * Get the minimum tab width in pixels. */ /** * Set the minimum tab width in pixels. */ minTabWidth: number; /** * Get the tab overlap amount in pixels. */ /** * Set the tab overlap amount in pixels. */ tabOverlap: number; /** * Get the handle size of the dock splitters. */ /** * Set the handle size of the dock splitters. */ handleSize: number; /** * Add a widget to the dock area. * * The widget is positioned in the area according to the given dock * mode and reference widget. If the dock widget is already added to * the area, it will be moved to the new location. * * The default mode inserts the widget on the left side of the area. */ addWidget(widget: IDockWidget, mode?: DockMode, ref?: IDockWidget): void; /** * Handle the DOM events for the dock area. */ handleEvent(event: Event): void; /** * Handle the 'mousemove' event for the dock area. * * This is triggered on the document during a tab move operation. */ private _evtMouseMove(event); /** * Handle the 'mouseup' event for the dock area. * * This is triggered on the document during a tab move operation. */ private _evtMouseUp(event); /** * Add the widget to a new root dock panel along the given orientation. * * If the widget already exists in the area, it will be removed. */ private _addWidget(widget, orientation, after); /** * Add the dock widget as a new split panel next to the reference. * * If the reference does not exist in the area, this is a no-op. * * If the dock widget already exists in the area, it will be moved. */ private _splitWidget(widget, ref, orientation, after); /** * Split the panel with the given widget along the given orientation. * * If the widget already exists in the area, it will be moved. */ private _splitPanel(panel, widget, orientation, after); /** * Add the dock widget as a tab next to the reference. * * If the reference does not exist in the area, this is a no-op. * * If the dock widget already exists in the area, it will be moved. */ private _tabifyWidget(widget, ref, after); /** * Ensure the root splitter has the given orientation. * * If the current root has the given orientation, this is a no-op. * * If the root has <= 1 child, its orientation will be updated. * * Otherwise, a new root will be created with the proper orientation * and the current root will be added as the new root's first child. */ private _ensureRoot(orientation); /** * Create a new panel and setup the signal handlers. */ private _createPanel(); /** * Create a new dock splitter for the dock area. */ private _createSplitter(orientation); /** * Remove an empty dock panel from the hierarchy. * * This ensures that the hierarchy is kept consistent by merging an * ancestor splitter when it contains only a single child widget. */ private _removePanel(panel); /** * Abort the tab drag operation if one is in progress. */ private _abortDrag(); /** * Handle the `currentChanged` signal from a tab bar. */ private _p_currentChanged(sender, args); /** * Handle the `tabCloseRequested` signal from a tab bar. */ private _p_tabCloseRequested(sender, args); /** * Handle the `tabDetachRequested` signal from the tab bar. */ private _p_tabDetachRequested(sender, args); /** * Handle the `widgetRemoved` signal from a stack widget. */ private _p_widgetRemoved(sender, args); private _handleSize; private _tabWidth; private _tabOverlap; private _minTabWidth; private _ignoreRemoved; private _root; private _dragData; private _items; } } declare module phosphor.widgets { import IMessage = core.IMessage; /** * A widget which manages a virtually scrolling list of rows. * * This widget must be subclassed to be useful. A subclass should call * `[insert|remove|resize]Row` methods to specify the rows in the data * set. A subclass should also reimplement the methods `renderRow` and * `releaseRow`, which are called to render the visible row contents. */ class ListView extends Widget { /** * Construct a new list view. */ constructor(); /** * Get the total scrollable height of all rows in the list. */ scrollHeight: number; /** * Set the scroll position of the vertical scroll bar. */ protected setVerticalScrollPosition(value: number): void; /** * Get the total number of rows in the list. */ rowCount: number; /** * Get the index of the row at the given offset position. * * @param pos - The offset position of the row of interest. * * @returns The index of the row, or `-1` if `pos` is out of range. */ rowAt(pos: number): number; /** * Get the height of the row at the given index. * * @param row - The index of the row of interest. * * @returns The height of the row, or `-1` if `row` is out of range. */ rowHeight(row: number): number; /** * Get the scroll position of the row at the given index. * * @param row - The index of the row of interest. * * @returns The position of the row, or `-1` if `row` is out of range. */ rowPosition(row: number): number; /** * Insert new rows into the list. * * @param index - The index at which to insert the first row. If this * value is negative, it is taken as an offset from the end of the * list. The value is clamped to the range `[0, list.rowCount]`. * * @param count - The number of rows to insert. If this value is * `<= 0`, this method is a no-op. * * @param height - The height of each row. This value is clamped to * the range `[0, Infinity]`. */ insertRows(index: number, count: number, height: number): void; /** * Remove existing rows from the list. * * @param index - The index of the first row to remove. If this value * is negative, it is taken as an offset from the end of the list. * * @param count - The number of rows to remove. If this value is * `<= 0`, this method is a no-op. If any of the rows are out * of range, they will be ignored. */ removeRows(index: number, count: number): void; /** * Resize existing rows in the list. * * @param index - The index of the first row to resize. If this value * is negative, it is taken as an offset from the end of the list. * * @param count - The number of rows to resize. If this value is * `<= 0`, this method is a no-op. If any of the rows are out * of range, they will be ignored. * * @param height - The new height of each row. This value is clamped * to the range `[0, Infinity]`. */ resizeRows(index: number, count: number, height: number): void; /** * Render the roWw content for the given row index. * * @param index - The index of the row to be rendered. * * @param host - The node which which hosts the row content. * * #### Notes * This method is called automatically when the row is scrolled * into view. When the row scrolls out of view, the `releaseRow` * method will be called. * * User code should not manipulate the style or attributes of the * host. Only the child content of the host should be changed. * * The given host may be recycled, so if `releaseRow` does not clear * the child content, this method should be mindful that content for * an old row may be present in the host. * * Subclasses should reimplement this method. */ protected renderRow(index: number, host: HTMLElement): void; /** * Release the resources and content for the given row index. * * @param index - The index of the row to be released. * * @param host - The node which which hosts the row content. * * #### Notes * This method is called automatically when the row is scrolled * out of view. When the row scrolls into view, the `renderRow` * method will be called. * * User code should release an resources acquired for the row and * optionally remove the child content from the host. * * Subclasses should reimplement this method as needed. */ protected releaseRow(index: number, host: HTMLElement): void; /** * A method invoked on a 'resize' message. */ protected onResize(msg: ResizeMessage): void; /** * A method invoked on an 'update-request' message. */ protected onUpdateRequest(msg: IMessage): void; /** * */ private _layoutContent(); /** * Handle the `sliderMoved` signal from the horizontal scroll bar. */ private _hsb_sliderMoved(sender, value); /** * Handle the `sliderMoved` signal from the vertical scroll bar. */ private _vsb_sliderMoved(sender, value); private _canvas; private _corner; private _scrollWidth; private _hScrollBar; private _vScrollBar; private _visibleRows; private _sections; } } declare module phosphor.widgets { import Signal = core.Signal; /** * An options object for initializing a menu item. */ interface IMenuItemOptions { /** * The type of the menu item. */ type?: string; /** * The text for the menu item. */ text?: string; /** * The mnemonic for the menu item. */ mnemonic?: string; /** * The shortcut combo for the menu item. */ shortcut?: string; /** * Whether the menu item is enabled. */ enabled?: boolean; /** * Whether the menu item is visible. */ visible?: boolean; /** * Whether a 'check' type menu item is checked. */ checked?: boolean; /** * The submenu for the menu item. */ submenu?: Menu; /** * The extra class name to associate with the menu item. */ className?: string; } /** * An item which can be added to a menu or menu bar. */ class MenuItem { /** * A signal emitted when the state of the menu item is changed. */ static changed: Signal<MenuItem, void>; /** * A signal emitted when a `check` type menu item is toggled. */ static toggled: Signal<MenuItem, boolean>; /** * A signal emitted when the menu item is triggered. */ static triggered: Signal<MenuItem, boolean>; /** * Construct a new menu item. */ constructor(options?: IMenuItemOptions); /** * Get the type of the menu item: 'normal' | 'check' | 'separator'. */ /** * Set the type of the menu item: 'normal' | 'check' | 'separator'. */ type: string; /** * Get the text for the menu item. */ /** * Set the text for the menu item. */ text: string; /** * Get the mnemonic key for the menu item. */ /** * Set the mnemonic key for the menu item. */ mnemonic: string; /** * Get the shortcut key for the menu item (decoration only). */ /** * Set the shortcut key for the menu item (decoration only). */ shortcut: string; /** * Get whether the menu item is enabled. */ /** * Set whether the menu item is enabled. */ enabled: boolean; /** * Get whether the menu item is visible. */ /** * Set whether the menu item is visible. */ visible: boolean; /** * Get whether the 'check' type menu item is checked. */ /** * Set whether the 'check' type menu item is checked. */ checked: boolean; /** * Get the submenu for the menu item. */ /** * Set the submenu for the menu item. */ submenu: Menu; /** * Get the class name for the menu item. */ /** * Set the class name for the menu item. */ className: string; /** * Trigger the menu item. * * This will emit the `triggered` signal. * * If the item is a `check` type, it will also be toggled. */ trigger(): void; /** * Initialize the menu item from the given options object. */ private _initFrom(options); private _text; private _mnemonic; private _shortcut; private _className; private _enabled; private _visible; private _type; private _checked; private _submenu; } } declare module phosphor.widgets { import NodeBase = core.NodeBase; import Signal = core.Signal; /** * An object which displays menu items as a popup menu. */ class Menu extends NodeBase { /** * Create the DOM node for a menu. */ static createNode(): HTMLElement; /** * Find the root menu of a menu hierarchy. */ static rootMenu(menu: Menu): Menu; /** * Find the leaf menu of a menu hierarchy. */ static leafMenu(menu: Menu): Menu; /** * A signal emitted when the menu is closed. */ static closed: Signal<Menu, void>; /** * Construct a new menu. */ constructor(items?: MenuItem[]); /** * Dispose of the resources held by the menu. */ dispose(): void; /** * Get the parent menu of the menu. * * This will be null if the menu is not an open submenu. */ parentMenu: Menu; /** * Get the child menu of the menu. * * This will be null if the menu does not have an open submenu. */ childMenu: Menu; /** * Get the index of the active (highlighted) menu item. */ /** * Set the index of the active (highlighted) menu item. * * Only a non-separator item can be set as the active item. */ activeIndex: number; /** * Get the active (highlighted) menu item. */ /** * Set the active (highlighted) menu item. * * Only a non-separator item can be set as the active item. */ activeItem: MenuItem; /** * Get the number of menu items in the menu. */ count: number; /** * Get the menu item at the given index. */ itemAt(index: number): MenuItem; /** * Get the index of the given menu item. */ indexOf(item: MenuItem): number; /** * Add a menu item to the end of the menu. * * Returns the new index of the item. */ addItem(item: MenuItem): number; /** * Insert a menu item into the menu at the given index. * * Returns the new index of the item. */ insertItem(index: number, item: MenuItem): number; /** * Remove and return the menu item at the given index. */ removeAt(index: number): MenuItem; /** * Remove the given menu item from the menu. * * Returns the index of the removed item. */ removeItem(item: MenuItem): number; /** * Remove all menu items from the menu. */ clearItems(): void; /** * Activate the next non-separator menu item. * * This is equivalent to pressing the down arrow key. */ activateNextItem(): void; /** * Activate the previous non-separator menu item. * * This is equivalent to pressing the up arrow key. */ activatePreviousItem(): void; /** * Activate the next menu item with the given mnemonic key. * * This is equivalent to pressing the mnemonic key. */ activateMnemonicItem(key: string): void; /** * Open the submenu of the active menu item. * * This is equivalent to pressing the right arrow key. * * Returns true if the item was opened, false otherwise. */ openActiveItem(): boolean; /** * Trigger (or open) the active menu item. * * This is equivalent to pressing the enter key. * * Returns true if the item was triggered, false otherwise. */ triggerActiveItem(): boolean; /** * Popup the menu at the specified location. * * The menu will be opened at the given location unless it will not * fully fit on the screen. If it will not fit, it will be adjusted * to fit naturally on the screen. The last two optional parameters * control whether the provided coordinate value must be obeyed. * * When the menu is opened as a popup menu, it will handle all key * events related to menu navigation as well as closing the menu * when the mouse is pressed outside of the menu hierarchy. To * prevent these actions, use the 'open' method instead. */ popup(x: number, y: number, forceX?: boolean, forceY?: boolean): void; /** * Open the menu at the specified location. * * The menu will be opened at the given location unless it will not * fully fit on the screen. If it will not fit, it will be adjusted * to fit naturally on the screen. The last two optional parameters * control whether the provided coordinate value must be obeyed. * * When the menu is opened with this method, it will not handle key * events for navigation, nor will it close itself when the mouse is * pressed outside the menu hierarchy. This is useful when using the * menu from a menubar, where this menubar should handle these tasks. * Use the `popup` method for the alternative behavior. */ open(x: number, y: number, forceX?: boolean, forceY?: boolean): void; /** * Close the menu and remove its node from the DOM. */ close(): void; /** * Handle the DOM events for the menu. */ handleEvent(event: Event): void; /** * Create the DOM node for a MenuItem. * * This can be reimplemented to create custom menu item nodes. */ protected createItemNode(item: MenuItem): HTMLElement; /** * Initialize the DOM node for the given menu item. * * This method should be reimplemented if a subclass reimplements the * `createItemNode` method. It should initialize the node using the * given menu item. It will be called any time the item changes. */ protected initItemNode(item: MenuItem, node: HTMLElement): void; /** * A method invoked when a menu item is inserted into the menu. * * This method should be reimplemented if a subclass reimplements the * `createNode` method. It should insert the item node into the menu * at the specified location. */ protected insertItemNode(index: number, node: HTMLElement): void; /** * A method invoked when a menu item is removed from the menu. * * This method should be reimplemented if a subclass reimplements the * `createNode` method. It should remove the item node from the menu. */ protected removeItemNode(node: HTMLElement): void; /** * Handle the 'mouseenter' event for the menu. * * This event listener is attached to the child item nodes. */ private _evtMouseEnter(event); /** * Handle the 'mouseleave' event for the menu. * * This event listener is only attached to the menu node. */ private _evtMouseLeave(event); /** * Handle the 'mouseup' event for the menu. * * This event listener is attached to the menu node. */ private _evtMouseUp(event); /** * Handle the 'contextmenu' event for the menu. * * This event listener is attached to the menu node and disables * the default browser context menu. */ private _evtContextMenu(event); /** * Handle the 'mousedown' event for the menu. * * This event listener is attached to the document for a popup menu. */ private _evtMouseDown(event); /** * Handle the key down event for the menu. * * This event listener is attached to the document for a popup menu. */ private _evtKeyDown(event); /** * Handle the 'keypress' event for the menu. * * This event listener is attached to the document for a popup menu. */ private _evtKeyPress(event); /** * Set the active item index for the menu. * * This updates the class name of the relevant item nodes. */ private _setActiveIndex(index); /** * Synchronize the active item hierarchy starting with the parent. * * This ensures that the proper child items are activated for the * ancestor menu hierarchy and that any pending open or close * tasks are cleared. */ private _syncAncestors(); /** * Synchronize the active item with the item for the child menu. * * This ensures that the active item is the child menu item. */ private _syncChildItem(); /** * Open the menu item's submenu using the node for location. * * If the given item is already open, this is a no-op. * * Any pending open operation will be cancelled before opening * the menu or queueing the delayed task to open the menu. */ private _openChildMenu(item, node, delayed); /** * Open the menu as a child menu. */ private _openAsSubmenu(item); /** * Close the currently open child menu using a delayed task. * * If a task is pending or if there is no child menu, this is a no-op. */ private _closeChildMenu(); /** * Reset the state of the menu. * * This deactivates the current item and closes the child menu. */ private _reset(); /** * Remove the menu from its parent menu. */ private _removeFromParent(); /** * Cancel any pending child menu open task. */ private _cancelPendingOpen(); /** * Cancel any pending child menu close task. */ private _cancelPendingClose(); /** * Collapse neighboring visible separators. * * This force-hides select separator nodes such that there are never * multiple visible separator siblings. It also force-hides all * leading and trailing separator nodes. */ private _collapseSeparators(); /** * Handle the `changed` signal from a menu item. */ private _p_changed(sender); private _openTimer; private _closeTimer; private _activeIndex; private _parentMenu; private _childMenu; private _childItem; private _items; private _nodes; } } declare module phosphor.widgets { import IMessage = core.IMessage; import Size = utility.Size; /** * A leaf widget which displays menu items as a menu bar. */ class MenuBar extends Widget { /** * Create the DOM node for a menu bar. */ static createNode(): HTMLElement; /** * Construct a new menu bar. */ constructor(items?: MenuItem[]); /** * Dispose of the resources held by the panel. */ dispose(): void; /** * Get the child menu of the menu bar. * * This will be null if the menu bar does not have an open menu. */ childMenu: Menu; /** * Get the index of the active (highlighted) menu item. */ /** * Set the index of the active (highlighted) menu item. * * Only an enabled non-separator item can be set as the active item. */ activeIndex: number; /** * Get the active (highlighted) menu item. */ /** * Set the active (highlighted) menu item. * * Only an enabled non-separator item can be set as the active item. */ activeItem: MenuItem; /** * Get the number of menu items in the menu bar. */ count: number; /** * Get the menu item at the given index. */ itemAt(index: number): MenuItem; /** * Get the index of the given menu item. */ indexOf(item: MenuItem): number; /** * Add a menu item to the end of the menu bar. * * Returns the new index of the item. */ addItem(item: MenuItem): number; /** * Insert a menu item into the menu bar at the given index. * * Returns the new index of the item. */ insertItem(index: number, item: MenuItem): number; /** * Remove and return the menu item at the given index. */ removeAt(index: number): MenuItem; /** * Remove the given menu item from the menu bar. * * Returns the index of the removed item. */ removeItem(item: MenuItem): number; /** * Remove all menu items from the menu bar. */ clearItems(): void; /** * Activate the next non-separator menu item. * * This is equivalent to pressing the right arrow key. */ activateNextItem(): void; /** * Activate the previous non-separator menu item. * * This is equivalent to pressing the left arrow key. */ activatePreviousItem(): void; /** * Activate the next menu item with the given mnemonic key. * * This is equivalent to pressing the mnemonic key. */ activateMnemonicItem(key: string): void; /** * Open the submenu of the active menu item. * * This is equivalent to pressing the down arrow key. * * Returns true if the item was opened, false otherwise. */ openActiveItem(): boolean; /** * Compute the size hint for the menu bar. */ sizeHint(): Size; /** * Compute the minimum size hint for the menu bar. */ minSizeHint(): Size; /** * Handle the DOM events for the menu bar. */ handleEvent(event: Event): void; /** * Create the DOM node for a MenuItem. * * This can be reimplemented to create custom menu item nodes. */ protected createItemNode(item: MenuItem): HTMLElement; /** * Initialize the DOM node for the given menu item. * * This method should be reimplemented if a subclass reimplements the * `createItemNode` method. It should initialize the node using the * given menu item. It will be called any time the item changes. */ protected initItemNode(item: MenuItem, node: HTMLElement): void; /** * A method invoked when a menu item is inserted into the menu. * * This method should be reimplemented if a subclass reimplements the * `createNode` method. It should insert the item node into the menu * at the specified location. */ protected insertItemNode(index: number, node: HTMLElement): void; /** * A method invoked when a menu item is removed from the menu. * * This method should be reimplemented if a subclass reimplements the * `createNode` method. It should remove the item node from the menu. */ protected removeItemNode(node: HTMLElement): void; /** * A method invoked on the 'after-attach' message. */ protected onAfterAttach(msg: IMessage): void; /** * A method invoked on the 'after-detach' message. */ protected onAfterDetach(msg: IMessage): void; /** * Handle the 'mousedown' event for the menu bar. */ private _evtMouseDown(event); /** * Handle the 'mousemove' event for the menu bar. */ private _evtMouseMove(event); /** * Handle the 'mouseleave' event for the menu bar. */ private _evtMouseLeave(event); /** * Handle the 'keydown' event for the menu bar. */ private _evtKeyDown(event); /** * Handle the 'keypress' event for the menu bar. */ private _evtKeyPress(event); /** * Set the active item index for the menu bar. * * If the index points to an item, it is assumed to be selectable. * * This will take the appropriate action based on the menu bar state. */ private _setActiveIndex(index); /** * Open the menu item's submenu using the node for location. */ private _openChildMenu(menu, node); /** * Close the current child menu, if one exists. */ private _closeChildMenu(); /** * Set the state mode for the menu bar. * * This will update the menu bar event listeners accordingly. */ private _setState(state); /** * Update the event listeners for the inactive state. */ private _useInactiveListeners(); /** * Update the event listeners for the active and open states. */ private _useActiveListeners(); /** * Collapse neighboring visible separators. * * This force-hides select separator nodes such that there are never * multiple visible separator siblings. It also force-hides all any * leading and trailing separator nodes. */ private _collapseSeparators(); /** * Handle the `closed` signal from the child menu. */ private _p_closed(sender); /** * Handle the `changed` signal from a menu item. */ private _p_changed(sender); private _activeIndex; private _childMenu; private _items; private _nodes; private _state; } } declare module phosphor.widgets { import IMessage = core.IMessage; import Elem = virtualdom.Elem; /** * A leaf widget which renders its content using the virtual DOM. * * This widget is used to embed virtual DOM content into a widget * hierarchy. A subclass should reimplement the `render` method to * generate the content for the widget. It should also reimplement * the `sizeHint` method to return a reasonable natural size. */ class RenderWidget extends Widget { /** * Construct a new render widget. */ constructor(); /** * Dispose of the resources held by the widget. */ dispose(): void; /** * Get the current refs mapping for the widget. */ refs: any; /** * Process a message sent to the widget. */ processMessage(msg: IMessage): void; /** * Create the virtual DOM content for the widget. * * The rendered content is used to populate the widget's node. * * The default implementation returns `null`. */ protected render(): Elem | Elem[]; /** * A method invoked on an 'update-request' message. * * This renders the virtual DOM content into the widget's node. */ protected onUpdateRequest(msg: IMessage): void; /** * A method invoked on an 'after-attach' message. */ protected onAfterAttach(msg: IMessage): void; /** * A method invoked on a 'before-render' message. * * The default implementation is a no-op. */ protected onBeforeRender(msg: IMessage): void; /** * A method invoked on an 'after-render' message. * * The default implementation is a no-op. */ protected onAfterRender(msg: IMessage): void; private _refs; } } declare module phosphor.widgets { import IMessage = core.IMessage; import Signal = core.Signal; import Size = utility.Size; /** * A widget which provides a horizontal or vertical scroll bar. */ class ScrollBar extends Widget { /** * Create the DOM node for a scroll bar. */ static createNode(): HTMLElement; /** * A signal emitted when the user moves the scroll bar slider. * * The signal parameter is the current `value` of the scroll bar. * * #### Notes * This signal is not emitted when `value` is changed from code. */ static sliderMoved: Signal<ScrollBar, number>; /** * Construct a new scroll bar. * * @param orientation - The orientation of the scroll bar. */ constructor(orientation?: Orientation); /** * Get the orientation of the scroll bar. */ /** * Set the orientation of the scroll bar. */ orientation: Orientation; /** * Get the minimum value of the scroll bar. */ /** * Set the minimum value of the scroll bar. */ minimum: number; /** * Get the maximum value of the scroll bar. */ /** * Set the maximum value of the scroll bar. */ maximum: number; /** * Get the current value of the scroll bar. */ /** * Set the current value of the scroll bar. */ value: number; /** * Get the page size of the scroll bar. */ /** * Set the page size of the scroll bar. * * The page size controls the size of the slider control in relation * to the current scroll bar range. It should be set to a value which * represents a single "page" of content. This is the amount that the * slider will move when the user clicks inside the scroll bar track. */ pageSize: number; /** * Calculate the preferred size for the scroll bar. */ sizeHint(): Size; /** * Handle the DOM events for the scroll bar. */ handleEvent(event: Event): void; /** * A method invoked on an 'after-attach' message. */ protected onAfterAttach(msg: IMessage): void; /** * A method invoked on an 'after-detach' message. */ protected onAfterDetach(msg: IMessage): void; /** * A method invoked on a 'resize' message. */ protected onResize(msg: ResizeMessage): void; /** * A method invoked on an 'update-request' message. */ protected onUpdateRequest(msg: IMessage): void; /** * Handle the 'mousedown' event for the scroll bar. */ private _evtMouseDown(event); /** * Handle the 'mousemove' event for the scroll bar. */ private _evtMouseMove(event); /** * Handle the 'mouseup' event for the scroll bar. */ private _evtMouseUp(event); /** * Scroll to the given value expressed in scroll coordinates. * * The given value will be clamped to the scroll bar range. If the * adjusted value is different from the current value, the scroll * bar will be updated and the `sliderMoved` signal will be emitted. */ private _scrollTo(value); /** * Get the minimum size of the slider for the current orientation. * * This computes the value once and caches it, which ensures that * multiple calls to this method are quick. The cached value can * be cleared by setting the `_sliderMinSize` property to `-1`. */ private _getSliderMinSize(); private _value; private _minimum; private _maximum; private _pageSize; private _sliderMinSize; private _dragData; private _orientation; } } declare module phosphor.widgets { import NodeBase = core.NodeBase; /** * An object which manages a node for a tab bar. */ class Tab extends NodeBase { /** * Create the DOM node for a tab. */ static createNode(): HTMLElement; /** * Construct a new tab. */ constructor(text?: string); /** * Get the text for the tab. */ /** * Set the text for the tab. */ text: string; /** * Get whether the tab is selected. */ /** * Set whether the tab is selected. */ selected: boolean; /** * Get whether the tab is closable. */ /** * Set whether the tab is closable. */ closable: boolean; /** * Get the DOM node for the tab close icon. */ closeIconNode: HTMLElement; } } declare module phosphor.widgets { import IMessage = core.IMessage; import Signal = core.Signal; import Pair = utility.Pair; import Size = utility.Size; /** * The arguments object for the `tabDetachRequested` signal. */ interface ITabDetachArgs { /** * The tab of interest. */ tab: Tab; /** * The index of the tab. */ index: number; /** * The current mouse client X position. */ clientX: number; /** * The current mouse client Y position. */ clientY: number; } /** * The options object for initializing a tab bar. */ interface ITabBarOptions { /** * Wether the tabs are movable by the user. */ tabsMovable?: boolean; /** * The preferred tab width. * * Tabs will be sized to this width if possible, but never larger. */ tabWidth?: number; /** * The minimum tab width. * * Tabs will never be sized smaller than this amount. */ minTabWidth?: number; /** * The tab overlap amount. * * A positive value will cause neighboring tabs to overlap. * A negative value will insert empty space between tabs. */ tabOverlap?: number; } /** * A leaf widget which displays a row of tabs. */ class TabBar extends Widget { /** * Create the DOM node for a tab bar. */ static createNode(): HTMLElement; /** * A signal emitted when a tab is moved. */ static tabMoved: Signal<TabBar, Pair<number, number>>; /** * A signal emitted when the currently selected tab is changed. */ static currentChanged: Signal<TabBar, Pair<number, Tab>>; /** * A signal emitted when the user clicks a tab close icon. */ static tabCloseRequested: Signal<TabBar, Pair<number, Tab>>; /** * A signal emitted when a tab is dragged beyond the detach threshold. */ static tabDetachRequested: Signal<TabBar, ITabDetachArgs>; /** * Construct a new tab bar. */ constructor(options?: ITabBarOptions); dispose(): void; /** * Get the currently selected tab index. */ /** * Set the currently selected tab index. */ currentIndex: number; /** * Get the currently selected tab. */ /** * Set the currently selected tab. */ currentTab: Tab; /** * Get the previously selected tab. */ previousTab: Tab; /** * Get whether the tabs are movable by the user. */ /** * Set whether the tabs are movable by the user. */ tabsMovable: boolean; /** * Get the preferred tab width. * * Tabs will be sized to this width if possible, but never larger. */ /** * Set the preferred tab width. * * Tabs will be sized to this width if possible, but never larger. */ tabWidth: number; /** * Get the minimum tab width. * * Tabs will never be sized smaller than this amount. */ /** * Set the minimum tab width. * * Tabs will never be sized smaller than this amount. */ minTabWidth: number; /** * Get the tab overlap amount. * * A positive value will cause neighboring tabs to overlap. * A negative value will insert empty space between tabs. */ /** * Set the tab overlap amount. * * A positive value will cause neighboring tabs to overlap. * A negative value will insert empty space between tabs. */ tabOverlap: number; /** * Get the number of tabs in the tab bar. */ count: number; /** * Get the tab at the given index. */ tabAt(index: number): Tab; /** * Get the index of the given tab. */ indexOf(tab: Tab): number; /** * Add a tab to the end of the tab bar. * * Returns the index of the tab. */ addTab(tab: Tab): number; /** * Insert a tab into the tab bar at the given index. * * Returns the index of the tab. */ insertTab(index: number, tab: Tab): number; /** * Move a tab from one index to another. * * Returns the new tab index. */ moveTab(fromIndex: number, toIndex: number): number; /** * Remove and return the tab at the given index. * * Returns `undefined` if the index is out of range. */ removeAt(index: number): Tab; /** * Remove a tab from the tab bar and return its index. * * Returns -1 if the tab is not in the tab bar. */ removeTab(tab: Tab): number; /** * Remove all of the tabs from the tab bar. */ clearTabs(): void; /** * Add a tab to the tab bar at the given client X position. * * This method is intended for use by code which supports tear-off * tab interfaces. It will insert the tab at the specified location * without a transition and grab the mouse to continue the tab drag. * It assumes that the left mouse button is currently pressed. * * This is a no-op if the tab is already added to the tab bar. */ attachTab(tab: Tab, clientX: number): void; /** * Detach and return the tab at the given index. * * This method is intended for use by code which supports tear-off * tab interfaces. It will remove the tab at the specified index * without a transition. * * Returns `undefined` if the index is invalid. */ detachAt(index: number): Tab; /** * Compute the size hint for the tab bar. */ sizeHint(): Size; /** * Compute the minimum size hint for the tab bar. */ minSizeHint(): Size; /** * Handle the DOM events for the tab bar. */ handleEvent(event: Event): void; /** * Get the content node for the tab bar. */ protected contentNode: HTMLElement; /** * A method invoked on an 'after-attach' message. */ protected onAfterAttach(msg: IMessage): void; /** * A method invoked on an 'after-dettach' message. */ protected onAfterDetach(msg: IMessage): void; /** * A method invoked on a 'resize' message. */ protected onResize(msg: ResizeMessage): void; /** * A method invoked on an 'update-request' message. */ protected onUpdateRequest(msg: IMessage): void; /** * Handle the 'click' event for the tab bar. */ private _evtClick(event); /** * Handle the 'mousedown' event for the tab bar. */ private _evtMouseDown(event); /** * Handle the 'mousemove' event for the tab bar. */ private _evtMouseMove(event); /** * Handle the 'mouseup' event for the tab bar. */ private _evtMouseUp(event); /** * Release the current mouse grab for the tab bar. */ private _releaseMouse(); /** * Insert a new tab into the tab bar at the given index. * * This method assumes that the tab has not already been added. */ private _insertTab(index, tab, animate); /** * Move an item to a new index in the tab bar. * * Returns the new index of the tab, or -1. */ private _moveTab(fromIndex, toIndex); /** * Remove and return the tab at the given index. * * Returns `undefined` if the index is invalid. */ private _removeTab(index, animate); /** * Get the index of the tab which covers the given client position. * * Returns -1 if the client position does not intersect a tab. */ private _hitTest(clientX, clientY); /** * Compute the layout width of a tab. * * This computes a tab size as close as possible to the preferred * tab size, taking into account the minimum tab width, the current * tab bar width, and the tab overlap setting. */ private _tabLayoutWidth(); /** * Update the Z-indices of the tabs for the current tab order. */ private _updateTabZOrder(); /** * A helper function to execute an animated transition. * * This will add the transition class to the tab bar for the global * transition duration. The optional `onEnter` callback is invoked * immediately after the transition class is added. The optional * `onExit` callback will be invoked after the transition duration * has expired and the transition class is removed from the tab bar. * * If there is an active drag in progress, the transition class * will not be removed from the on exit. */ private _withTransition(onEnter?, onExit?); /** * Initialize the tab bar state from an options object. */ private _initFrom(options); private _tabWidth; private _tabOverlap; private _minTabWidth; private _tabs; private _tabsMovable; private _currentTab; private _previousTab; private _dragData; } } declare module phosphor.widgets { import Signal = core.Signal; import Pair = utility.Pair; /** * A widget which can be added to a TabPanel. */ interface ITabWidget extends Widget { /** * The tab associated with the widget. */ tab: Tab; } /** * A panel which provides a tabbed container for child widgets. * * The TabPanel provides a convenient combination of a TabBar and a * StackedPanel which allows the user to toggle between widgets by * selecting the tab associated with a widget. */ class TabPanel extends Widget { /** * A signal emitted when the current widget is changed. */ static currentChanged: Signal<TabPanel, Pair<number, Widget>>; /** * Construct a new tab panel. */ constructor(); /** * Dispose of the resources held by the panel. */ dispose(): void; /** * Get the index of the currently selected widget. */ /** * Set the index of the currently selected widget. */ currentIndex: number; /** * Get the currently selected widget. */ /** * Set the currently selected widget. */ currentWidget: Widget; /** * Get whether the tabs are movable by the user. */ /** * Set whether the tabs are movable by the user. */ tabsMovable: boolean; /** * Get the tab bar used by the panel. */ tabBar: TabBar; /** * Get the number of widgets in the panel. */ count: number; /** * Get the index of the given widget. */ indexOf(widget: Widget): number; /** * Get the widget at the given index. * * Returns `undefined` if there is no widget at the given index. */ widgetAt(index: number): Widget; /** * Add a tabbable widget to the end of the panel. * * If the widget already exists in the panel, it will be moved. * * Returns the index of the added widget. */ addWidget(widget: ITabWidget, alignment?: Alignment): number; /** * Insert a tabbable widget into the panel at the given index. * * If the widget already exists in the panel, it will be moved. * * Returns the index of the added widget. */ insertWidget(index: number, widget: ITabWidget, alignment?: Alignment): number; /** * Move a widget from one index to another. * * Returns the new index of the widget. */ moveWidget(fromIndex: number, toIndex: number): number; /** * Handle the `tabMoved` signal from the tab bar. */ private _p_tabMoved(sender, args); /** * Handle the `currentChanged` signal from the tab bar. */ private _p_currentChanged(sender, args); /** * Handle the `tabCloseRequested` signal from the tab bar. */ private _p_tabCloseRequested(sender, args); /** * Handle the `widgetRemoved` signal from the stacked panel. */ private _p_widgetRemoved(sender, args); private _tabBar; private _stackedPanel; } } declare module phosphor.shell { import IContainer = di.IContainer; /** * An object which represents an application plugin. * * A plugin is typically a module with an `initialize` function. */ interface IPlugin { /** * Initialize the plugin and register its content with the container. */ initialize(container: IContainer): void; } } declare module phosphor.shell { import Token = di.Token; /** * An object which asynchronously resolves and initializes plugins. */ interface IPluginList { /** * Add an array of plugins or plugin promises to the plugin list. * * When all plugins are resolved, the `initialize` method of each * plugin is called and the plugin is added to the list. * * Returns a promise which resolves when all plugins are added. */ add(plugins: (IPlugin | Promise<IPlugin>)[]): Promise<void>; /** * Invoke a callback for each resolved plugin in the list. */ forEach(callback: (plugin: IPlugin) => void): void; } /** * The interface token for IPluginList. */ var IPluginList: Token<IPluginList>; } declare module phosphor.shell { import Token = di.Token; import Alignment = widgets.Alignment; import MenuItem = widgets.MenuItem; import Widget = widgets.Widget; /** * An options object for adding a widget to a shell view. */ interface IWidgetOptions { /** * The layout rank for the widget. * * Widgets are arranged in ordered from lowest to highest rank * along the direction of layout. The default rank is `100`. */ rank?: number; /** * The layout stretch factor for the widget. * * The default stretch factor is determined by the layout. */ stretch?: number; /** * The layout alignment for the widget. * * The default stretch factor is determined by the layout. */ alignment?: Alignment; } /** * A widget which provides the top-level application shell. * * A shell view serves as the main UI container for an application. It * provides named areas to which plugins can add their content and it * also controls access to shared UI resources such as the menu bar. */ interface IShellView extends Widget { /** * Get the content areas names supported by the shell view. */ areas(): string[]; /** * Add a widget to the named content area. * * This method throws an exception if the named area is not supported. */ addWidget(area: string, widget: Widget, options?: IWidgetOptions): void; /** * Add a menu item to the menu bar. * * Items are ordered from lowest to highest rank. * * If the item already exists, its position will be updated. */ addMenuItem(item: MenuItem, rank?: number): void; /** * Remove a menu item from the menu bar. * * If the item does not exist, this is a no-op. */ removeMenuItem(item: MenuItem): void; } /** * The interface token for IShellView. */ var IShellView: Token<IShellView>; } declare module phosphor.shell { import Widget = widgets.Widget; /** * Enable auto-hiding for the given widget. * * When auto-hiding is enabled, the widget will be automatically hidden * when it has no visible children, and shown when it has at least one * visible child. */ function enableAutoHide(widget: Widget): void; /** * Disable auto-hiding for the given widget. * * This removes the effect of calling `enableAutoHide`. The current * visible state of the widget will not be changed by this method. */ function disableAutoHide(widget: Widget): void; } declare module phosphor.shell { import IContainer = di.IContainer; /** * A class which manages bootstrapping an application. * * An application will typically define its own Bootstrapper subclass * which overrides the necessary methods to customize the application. */ class Bootstrapper { /** * Construct a new bootstrapper. */ constructor(); /** * Get the dependency injection container for the application. * * This is created by the `createContainer` method. */ container: IContainer; /** * Get the plugin list for the application. * * This is created by the `createPluginList` method. */ pluginList: IPluginList; /** * Get the top-level shell view for the application. * * This is created by the `createShell` method. */ shell: IShellView; /** * Run the bootstrapper. * * This invokes the various bootstrap methods in the proper order * and updates the internal state of the bootstrapper. * * This method should not be reimplemented. */ run(): void; /** * Create the dependency injection container for the application. * * This can be reimplemented by subclasses as needed. * * The default implementation creates an instance of `Container`. */ protected createContainer(): IContainer; /** * Create the application plugin list. * * This can be reimplmented by subclasses as needed. * * The default implementation resolves an `IPluginList`. */ protected createPluginList(): IPluginList; /** * Create the application shell widget. * * This can be reimplemented by subclasses as needed. * * The default implementation resolves an `IShellView`. */ protected createShell(): IShellView; /** * Configure the application dependency injection container. * * This can be reimplemented by subclasses as needed. */ protected configureContainer(): void; /** * Configure the application plugins. * * Subclasses should reimplement this method to add the application * plugins to the plugin list. This should return a promise which * resolves once all plugins are initialized. * * The default implementation returns an empty resolved promise. */ protected configurePlugins(): Promise<void>; /** * Configure the application shell widget. * * This can be reimplemented by subclasses as needed. */ protected configureShell(): void; /** * Finalize the bootstrapping process. * * This is called after all plugins are resolved and intialized. * * It is the last method called in the bootstrapping process. * * This can be reimplemented by subclasses as needed. * * The default implementation attaches the shell widget to the DOM * using the "main" element or `document.body`, and adds a window * resize event handler which refits the shell on window resize. */ protected finalize(): void; private _shell; private _container; private _pluginList; } } declare module phosphor.shell { import Menu = widgets.Menu; import MenuBar = widgets.MenuBar; import MenuItem = widgets.MenuItem; /** * An object which manages items in a menu or menu bar. */ class MenuManager { /** * Construct a new menu manager. * * The provided menu should be empty. */ constructor(menu: Menu | MenuBar); /** * Add a menu item to the menu. * * Menu items are ordered from lowest to highest rank. The default * rank is `100`. If the item has already been added to the manager, * it will first be removed. */ addItem(item: MenuItem, rank?: number): void; /** * Remove a menu item from the menu. * * If the item has not been added to the manager, this is a no-op. */ removeItem(item: MenuItem): void; private _menu; private _ranks; } } declare module phosphor.shell { import IContainer = di.IContainer; /** * A concrete implementation of IPluginList. */ class PluginList implements IPluginList { /** * The injection dependencies for the plugin list. */ static $inject: di.Token<IContainer>[]; /** * Construct a new plugin list. */ constructor(container: IContainer); /** * Add an array of plugins or plugin promises to the plugin list. * * When all plugins are resolved, the `initialize` method of each * plugin is called and the plugin is added to the list. * * Returns a promise which resolves when all plugins are added. */ add(plugins: (IPlugin | Promise<IPlugin>)[]): Promise<void>; /** * Invoke the given callback for each resolved plugin in the list. */ forEach(callback: (plugin: IPlugin) => void): void; /** * Initialize a plugin and add it to the plugins list. */ private _addPlugin(plugin); private _container; private _plugins; } } declare module phosphor.shell { import ChildMessage = widgets.ChildMessage; import Direction = widgets.Direction; import Widget = widgets.Widget; /** * A content panel for a shell view. */ class ShellPanel extends Widget { /** * Construct a new shell view. */ constructor(direction: Direction); /** * Dispose of the resources held by the widget. */ dispose(): void; /** * Add a widget to the panel. */ addWidget(widget: Widget, options?: IWidgetOptions): void; /** * A method invoked when a 'child-removed' message is received. */ protected onChildRemoved(msg: ChildMessage): void; private _pairs; } } declare module phosphor.shell { import MenuItem = widgets.MenuItem; import Widget = widgets.Widget; /** * A concrete implementation of IShellView. */ class ShellView extends Widget implements IShellView { /** * Construct a new shell view. */ constructor(); /** * Get the content areas names supported by the shell view. */ areas(): string[]; /** * Add a widget to the named content area. * * This method throws an exception if the named area is not supported. */ addWidget(area: string, widget: Widget, options?: IWidgetOptions): void; /** * Add a menu item to the menu bar. * * Items are ordered from lowest to highest rank. * * If the item already exists, its position will be updated. */ addMenuItem(item: MenuItem, rank?: number): void; /** * Remove a menu item from the menu bar. * * If the item does not exist, this is a no-op. */ removeMenuItem(item: MenuItem): void; private _menuBar; private _topPanel; private _leftPanel; private _rightPanel; private _bottomPanel; private _centerPanel; private _menuManager; } }
{ "redpajama_set_name": "RedPajamaGithub" }
5,190
Round, strong snap-on lid ensures secure, stable stacking. All plastic construction will not rust, chip or peel. Resists dents. Tight-fitting with nesting handles to allow secure fit for side-by-side container use. Rounded corners and smooth contours for easy cleaning. Molded of engineered resins with seamless construction, the Huskee receptacle is a strong, long lasting receptacle used by virtually every industry. An added Bag Cinch (on 32 and 44 gallon sizes only) eliminates the need to tie knots in the polyliner to keep it secure around the receptacle rim. Lids sold separately. All-plastic, professional-grade construction will not rust, chip or peel and resists dents. Reinforced rims add strength and durability. Built-in handles allow easy, non-slip lifting and anti-jam nesting. Double-ribbed base increases stability and dragging capacity. USDA Meat & Poultry Equipment Group Listed, assists in complying with HACCP guidelines. Certified to NSF Std. #2 and Std. #21. CSFM approved when used as container/lid combo (2632/2637, 2643/2647, 2655/2657; lids and dollies sold separately).
{ "redpajama_set_name": "RedPajamaC4" }
457
.. post:: Dec 12, 2017 :tags: solfec-1.0, performance, optimization :author: Tomek .. _blog-solfec-pop-report-1: .. |POP1| raw:: html <div style="text-align:center"> <a href="../_static/reports/solfec-pop-report-1.pdf"> <img src="../_static/icons/solfec-pop1-icon.png" title="POP1" width="128" height="180" /> </a> </div> Solfec `POP <https://pop-coe.eu>`_ audit report =============================================== Solfec has been analysed by `POP <https://pop-coe.eu>`_ experts. The initial audit report is available for download: (...) |POP1| I would like to express my gratitude to All at `POP <https://pop-coe.eu>`_ who have contributed to making this possible:) In particular I would like to thank Nick Dingle who pursued this work from start to end. This report will potentially guide Solfec optimization in 2018.
{ "redpajama_set_name": "RedPajamaGithub" }
8,060
\section{Introduction} In this talk, manifolds, maps, group actions {\em e.\ t.\ c.} are all assumed to be of class $C^\infty$. Throughout the talk, $M$ stands for a closed $C^\infty$ manifold, and $G$ for a connected and simply connected Lie group. Denote by ${\mathcal A}^r$ the set of locally free right $G$-actions (of class $C^\infty$) endowed with the Whitney $C^r$-topology ($1\leq r\leq \infty$). An action $\varphi:M\times G \rightarrow M$ in ${\mathcal A}^r$ is said to be $C^r$ {\em locally rigid} if there exists a neighbourhood $\mathcal U$ of $\varphi$ in ${\mathcal A}^r$ such that any $\psi \in \mathcal U$ is smoothly conjugate to $\varphi$ by a diffeomorphism $F$ of $M$, up to an automorphism $A$ of $G$, {\em i.\ e.} \begin{equation} \label{e1} F(\varphi(x;g))=\psi(F(x);A(g)) \end{equation} for any $x\in M$ and $g\in G$. An action $\varphi$ is said to be {\em globally rigid} if (\ref{e1}) holds for any $\psi\in{\mathcal A}^r$. \bigskip Of course this is an extremely strong property. For example any flow (an ${\mathbb R}$-action) on a manifold $M$ other than $S^1$ cannot be $C^1$ locally rigid. This follows from Pugh's closing lemma in case the flow does not admit a periodic orbit. In the other case notice that the eigenvalues of the Poincar\'e map along a periodic orbit can be easily changed by a perturbation. However for other Lie groups, there exist examples of even globally rigid actions. Let $GA$ be the Lie group of the orientation preserving affine transformations on the real line. Let $A\in SL(2;{\mathbb Z})$ be a hyperbolic automorphism of the 2-torus and denote by ${\mathbb T}_A$ the mapping torus of $A$. Then the weak stable foliation of the suspension flow is the orbit foliation of a locally free $GA$ acion. This action is known to be globally rigid (\cite{GS,G}). There are other examples. Let $\Gamma$ be a Fuchsian triangle group. Then on the manifold $\Gamma\setminus PSL(2;{\mathbb R})$, a locally free $GA$-action is defined by the right action of the elements $$ \left[ \begin{array}{cc} e^{t/2} & x \\ 0 & e^{-t/2} \end{array} \right] . $$ The orbit foliation of this action is again a weak stable foliation of an Anosov flow. E. Ghys (\cite{G}) showed that this action is also globally rigid. The proofs of these facts consist of the studies of two independent phenomena. One is concerned about the $C^\infty$ rigidity of the orbit foliation, and the other is about the rigidity of the parametirization of the action. When A. Katok and Lewis (\cite{KL}) showed the $C^1$ local rigidity for certain ${\mathbb R}^n$-actions, the same strategy was taken. So let us devide the local rigidity into two parts. \begin{Definition} {\em An action $\varphi\in{\mathcal A}^r$ is said to be $C^r$ {\em locally orbit rigid} if there exists a neighbourhood $\mathcal U$ of $\varphi$ such that the orbit foliation ${\mathcal O}_\psi$ of any element $\psi\in \mathcal U$ is smoothly conjugate to the orbit foliation ${\mathcal O}_\varphi$ of $\varphi$ {\em i.\ e.} there exists a diffeomorphism $F$ of $M$ which sends each leaf of ${\mathcal O}_\psi$ to a leaf of ${\mathcal O}_\varphi$.} \end{Definition} \begin{Definition} {\em An action $\varphi\in {\mathcal A}^r$ is said to be {\em parameter rigid} if for any action $\psi\in {\mathcal A}^r$ such that ${\mathcal O}_\psi={\mathcal O}_\varphi$, there exist a diffeomorphism $F$ which preserves leaves of these identical foliation and an automorphism $A$ of $G$ such that (\ref{e1}) holds.} \end{Definition} The local version of parameter rigidity is not defined, simply because we have no intermediate example. In Sect.\ 2, 3 and 10, we will focus our attention on the parameter rigidity for abelian or solvable Lie group actions. \bigskip We will define the leafwise cohomology in Sect.\ 3 and discuss its close relation with the parameter rigidity when the group $G$ is abelian. After we introduced methods for the computation of the leafwise cohomology in Sect.\ 4, Sect.\ 5, 6, 8 and 9 are devoted to the computational results for various concrete foliations. In Sect.\ 10, we raise examples of parameter rigid solvable group actions. The final Sect.\ 11 is devoted to the relation of the leafwise cohomology to the problem of the existence of Riemannian metric for which all the leaves are minimal surfaces. \section{Regidity of flows} An ${\mathbb R}$-action $\varphi$ is what is usually called a flow, and is associated with the vector field $X$ given by $$ X_x=\frac{d}{dt}\vert_{t=0}\varphi^t(x). $$ An ${\mathbb R}$-action $\varphi$ is locally free if and only if $X$ is nonsingular. As we have mentioned in Sect.\ 1, there is no $C^1$ locally rigid flow unless the manifold is $S^1$. However there does exist a parameter rigid flow, which we shall explain below. Given a real number $\alpha\in{\mathbb R}$, define a Kroneker flow $\varphi_\alpha$ on the 2-torus $T^2$ by $$ \varphi^t_\alpha(x,y)=(x+\alpha t, y+t). $$ If the slope $\alpha$ is rational, then the flow is periodic {\em i.\ e.} $\varphi^q$ is the identity for some $q>0$. All the orbits are closed and their periods are the same. The flow can never be parameter rigid, since one can change the periods of closed orbits so that they are not identical. If $\alpha$ is irrational, then all the orbits are dense in $T^2$. It is also known that the flow is uniquely ergodic {\em i.\ e.} the $\varphi_\alpha$-invariant probability is unique. As for parameter rigidity, we have the following dichotomy. \begin{Proposition} \label{p1} The Kronecker flow $\varphi_\alpha$ is parameter rigid if and only if the slope $\alpha$ is badly approximable. \end{Proposition} \begin{Definition} {\em A real number $\alpha$ is said to be {\em badly approximable} if there exist $C>0$ and $\rho>0$ such that $$ \Vert k\alpha\Vert_{S^1}>C\vert k\vert^{-\rho}, \ \ \ \forall k \in {\mathbb Z}\setminus \{0\}, $$ where $\Vert \cdot \Vert_{S^1}$ denotes the distance to 0 of the projected image in $S^1={\mathbb R}/{\mathbb Z}$.} \end{Definition} The proof of Proposition \ref{p1} in one direction is in order. Assume $\alpha$ is badly approximable. Let $S^1$ be a circle in $T^2$ defined by $y=0$. $S^1$ is a global cross section for $\varphi_\alpha$ and the first return map is the rotation by $\alpha$, $R_\alpha$. Let $\psi$ be the flow obtained by reparametrization of $\varphi_\alpha$, {\em i.\ e.} ${\mathcal O} _\psi={\mathcal O}_{\varphi_\alpha}$. Let $f:S^1\rightarrow R$ be the first return time of $\psi$ for the cross section $S^1$; thus $\psi^{f(x)}(x)=R_\alpha(x)$. \medskip \noindent \textsc{Claim:} {\em There exist $g\in C^\infty(S^1)$ and $c\in{\mathbb R}$ such that $f=g\circ R_\alpha-g+c$.} \medskip Let us show first that Claim is sufficient to show the parameter rigidity of $\varphi_\alpha$. For this, define a global cross section $C$ to the flow $\psi$ by $$ C=\{ \psi^{-g(x)}(x)\mid x\in S^1\}. $$ Then we have $$ \psi^c(\psi^{-g(x)}(x))=\psi^{-g(R_\alpha(x))}(\psi^{f(x)}(x)) =\psi^{-g(R_\alpha(x))}(R_\alpha(x)). $$ This shows that the return time for the cross section $C$ is identically equal to $c$. Now it is easy to construct a diffeomorphism $F$ conjugating $\psi$ to $\varphi_\alpha$ up to time change $t\rightarrow ct$. ($F$ maps $C$ to $S^1$.) \medskip Let us turn to the proof of Claim. We shall show it for complex valued functions. A square integrable function $f\in L^2(S^1)$ can be expressed as $$ f=\sum_{k\in{\mathbb Z}}\hat f_k e^{2\pi i kt}, \ \ \ \hat f_k\in{\mathbb C}, \ \ \sum\vert \hat f_k\vert^2<\infty. $$ Notice that $f\in C^\infty(S^1)$ if and only if for any $r>0$, there exists $C_r>0$ such that $\vert \hat f_k\vert\vert k\vert^r<C_r$ for any $k\in Z$. Now the equation $f=g\circ R_\alpha - g+c$ can be read off as $$ \hat g_k=\hat f_k/(e^{2\pi i k \alpha}-1), \ \ \ c=\hat f_0, $$ where $\hat g_k$ is the Fourier coefficients of $g$. Since $\alpha$ is badly approximable and since $$ \vert e^{2\pi ik\alpha}-1\vert\geq C_1\Vert k\alpha\Vert_{S^1} $$ for some $C_1>0$, we have $$ \vert \hat g_k\vert \vert k\vert^r\leq C_1^{-1} \frac{\vert \hat f_k\vert\vert k \vert^r}{\Vert k\alpha\Vert_{S^1}}\leq C_2 \vert \hat f_k\vert \vert k\vert ^\rho\vert k \vert^r\leq C_3. $$ This shows the smoothness of $g$, and the proof of Claim is complete. We shall omit the proof of the other implication of Proposition \ref{p1}. \bigskip Badly approximability of the slope can be defined for Kronecker flows on higher dimensional torus, and these flows are also shown to be parameter rigid. They constitute all the known examples. For related topics, see \cite{AS,dS, LS}. Here is a criterion of the parameter rigidity of a flow, which will be useful for the study of dynamical properties of such flows. \begin{Proposition} \label{p2} The nonsingular flow $\varphi$ on $M$ given by a vector field $X$ is parameter rigid if and only if for any $f\in C^\infty(M)$, there exist $g\in C^\infty(M)$ and $c\in{\mathbb R}$ such that $f=X(g)+c$. \end{Proposition} Let us show the only if part of the proposition. (The other part is just by an analogous argument, using the integration instead of the differentiation.) Choose $f\in C^\infty(M)$. We are going to seek for $g$ and $c$ as in the proposition. It is no loss of generality to assume that $f$ is positive. Let $\psi$ be the flow defined by the vector field $(1/f)X$. Since $\psi$ and $\varphi$ has the same orbit foliation, there is a function $\tau:{\mathbb R}\times M \rightarrow {\mathbb R}$ such that $$ \varphi^t(x)=\psi^{\tau(t,x)}(x). $$ Take $\frac{d}{dt}\vert_{t=0}$ of both sides, and we get $$ \frac{d}{dt}\vert_{t=0}\tau(t,x)=f(x). $$ Now by the parameter rigidity of $\varphi$, there is a diffeomorphism $F$ and $c\in {\mathbb R}$ such that $\psi^{ct}(F(x))=F(\varphi^t(x))$. The diffeomorphism $F$ preserves the orbits, and can be written as $F(x)=\psi^{-g(x)}(x)$ for some $g\in C^\infty(M)$. We have \begin{gather*} \psi^{ct-g(x)}(x)=\psi^{-g(\varphi^t(x))}(\varphi^t(x)), \ \ \rm{ and \ thus} \\ \psi^{g(\varphi^t(x))-g(x)+ct}(x)=\varphi^t(x). \end{gather*} That is, $$ \tau(t,x)=g(\varphi^t(x))-g(x)+ct. $$ Taking $\frac{d}{dt}\vert_{t=0}$, we obtain $f=X(g)+c$, as is desired. \bigskip An important implication of this observation is: \medskip \begin{Corollary} \label{c1} A parameter rigid flow is uniquely ergodic, and it leaves smooth volume form invariant. \end{Corollary} Notice that a flow $\varphi$ is uniquely ergodic if and only if for any $C^\infty$ map $f$, the orbit average $$ \frac{1}{T}\int_0^Tf(\varphi^t(x)dt $$ converges to a constant function, uniformly on $x\in M$. Thus Propositon \ref{p2} immediately implies the unique ergodicity. For the latter statement, let ${\rm vol}$ be a Riemannian volume form on $M$. Take the Lie derivative: $ L_X({\rm vol})=f\cdot{\rm vol} $. By Proposition \ref{p2}, we have $$ L_X({\rm vol})=(X(g)+c){\rm vol}. $$ The integaration over $M$ shows that $c=0$. Thus we have $$ X(e^{-g}\cdot{\rm vol})=0, $$ {\em i.\ e.} $e^{-g}\cdot {\rm vol}$ is an invariant volume form. \bigskip However even among those flows which satisfy the necessary conditions of the previous corollary, no examples of parameter rigid flows are found except the linear flows on higher dimensional torus with badly approximable slopes. Here are two typical negative results in this direction. Let $F_\lambda: T^2 \rightarrow T^2$ be a diffeomorphism defined by $$ F_\lambda(x,y)=(x+y, y+\lambda), $$ where $\lambda$ is a real number, and let $\varphi_\lambda$ be the suspension flow. For irrational $\lambda$, the flow $\varphi_\lambda$ satisfies the conditions of Corollary \ref{c1}. However we have the following result found in \cite{K}. \begin{Theorem} \label{t1} For any real number $\lambda$, the flow $\varphi_\lambda$ is not parameter rigid. \end{Theorem} The other result is about the horocycle flows. Let us introduce them briefly. Let $M$ be the quotient $\Gamma\setminus SL(2;{\mathbb R})$ by a cocompact lattice $\Gamma$. On $M$ the right action of the one parameter subgroup $$ \{ \left[ \begin{array}{cc} 1 & t \\ 0 & 1\end{array} \right] \mid t\in{\mathbb R} \} $$ defines a flow, called {\em horocycle flow}. Horocycle flows are known to satisfy the conditions of Corollary \ref{c1} (\cite{F}). The following theorem is due to L. Fluminio and G. Forni (\cite{FF}). \begin{Theorem} \label{t2} The horocycle flow on a compact manifold $M$ is not parameter rigid. \end{Theorem} We will discuss these two theorems later in the next section after the leafwise cohomology of a foliation is introduced. \smallskip By the way, here is a very simple geometric proof of Theorem \ref{t2} when the manifold $M$ is not a rational homology sphere. Let us take a basis of the Lie algebra $\mathfrak{sl}(2,{\mathbb R})$ as follows. $$ Y=\frac{1}{2} \left[ \begin{array}{cc} 1 & \\ & -1 \end{array} \right] , \ \ S= \left[ \begin{array}{cc} & 1 \\ & \end{array} \right] , \ \ U= \left[ \begin{array}{cc} & \\ 1 & \end{array} \right] $$ These are left invariant vector fields on $SL(2;{\mathbb R})$ and induces vector fields on $M=\Gamma\setminus SL(2;{\mathbb R})$. The horocycle flow $\varphi$ is the one defined by the vector field $S$. Let us denote by $\eta$, $\sigma$ and $u$ the left invariant 1-forms on $SL(2;{\mathbb R})$ which are dual to $Y$, $S$ and $U$. They also induce 1-forms on $M$. Since the first Betti number of $M$ is nonzero, there is a closed 1-form $\omega$ such that the period map $$ [\omega]:\pi_1(M)\rightarrow {\mathbb R} $$ is nontrivial and takes value in ${\mathbb Z}$. Let us write $\omega$ as $$ \omega= f\sigma+*\eta+*u\ \ \ f,*\in C^\infty(M). $$ Assume for contradiction that $f=S(g)+c$. Let $\hat M$ be the cyclic covering of $M$ associated with the homomorphism $[\omega]$. Then the lift $\hat \omega$ of $\omega$ is exact and the primitive $\hat h\in C^\infty(\hat M)$ is proper. Denote by $\hat \varphi$ the lift of the horocycle flow $\varphi$ to $\hat M$. For any $x\in M$, any lift $\hat x$ of $x$, and any $T>0$, we have \begin{gather} \hat h(\hat\varphi^T(\hat x))-\hat h(\hat x) =\int_{\hat\varphi^{[0,T]}(\hat x)}\hat \omega =\int_{\varphi^{[0,T]}(x)}\omega =\int_0^T f(\varphi^t(x))dt \notag \\ =\int_0^T (S(g)(\varphi^t(x))+c)dt =g(\varphi^T(x))-g(x)+cT. \notag \end{gather} Now the lift of the horocycle flow $\hat \varphi$ has a dense orbit (Hedlund). Take $\hat x$ from a dense orbit. Assume $c\neq 0$. Then there exists a sequence $T_i\rightarrow\pm\infty$ such that $\hat \varphi^{T_i}(\hat x)\rightarrow \hat x$. This is a contradiction since the left hand side for $T_i$ tends to 0, while the right hand side tends to $\pm\infty$. Assume now $c=0$. Then since the function $\hat h$ is proper, there exists $T'_j$ such that the left hand side for $T'_j$ tends to $\pm\infty$. Again a contradiction. \smallskip Here is a conjecture by A. Katok (\cite{K}). \begin{Conjecture} An arbitrary parameter rigid flow is smoothly conjugate to a linear flow on the torus of badly approximable slope. \end{Conjecture} This conjecture is known to be true if the manifold has cup length equal to the dimension, or if the manifold is 3-dimensional and has nonvanishing Betti number. \section{Leafwise cohomology and parameter rigidity} In this section, we define the leafwise cohomology of foliations, and discuss its relationship with the parameter rigidity when the foliation is given by a locally free ${\mathbb R}^p$-action. Let $\mathcal F$ be a foliation on a manifold $N$, and denote by $T\mathcal F$ the tangent bundle of $\mathcal F$. A {\em leafwise $k$-form} $\omega$ is a $C^\infty$ cross section of the homomorphism bundle ${\rm Hom}(\bigwedge ^k T{\mathcal F};{\mathbb R})$. The space of leafwise $k$-forms is denoted by $\Omega^k({\mathcal F})$. Thus given $k$ vector fields $X_1$, $X_2$, $\cdots$, $X_k$ tangent to $\mathcal F$ {\em i.\ e.} smooth cross sections of $T\mathcal F$, and $\omega\in \Omega^k(\mathcal F)$, a smooth function $\omega(X_1, X_2, \cdots. X_k)$ is defined. The integrability condition for $T\mathcal F$ allows us to define the {\em leafwise exterior derivative} $$ d_\mathcal F: \Omega^k(\mathcal F)\rightarrow \Omega^{k+1}(\mathcal F) $$ just as the usual exterior derivative. For example, for $\omega\in \Omega^1(\mathcal F)$ we define $$ (d_\mathcal F \omega) (X_1,X_2)=X_1(\omega(X_2))-X_2(\omega(X_1))-\omega([X_1,X_2]). $$ Then $(\Omega(\mathcal F),d_\mathcal F)$ constitutes a cochain complex, whose cohomology is called the {\em leafwise cohomology} of $\mathcal F$, denoted by $H^*(\mathcal F)$. This cochain complex is not elliptic, and the leafwise cohomology can be infinite dimensional. \begin{Example} {\em The 0-dimensional leafwise cohomology $H^0(\mathcal F)$ coincides with the vector space formed by {\em basic functions} {\em i.\ e.} smooth functions on $M$, constant along the leaves. Thus if $\mathcal F$ admits a dense leaf, then $H^0(\mathcal F)\cong{\mathbb R}$.} \end{Example} \begin{Example} \label{ex1} {\em Let $N=L\times T$ and let $\mathcal F$ be the foliation on $N$ whose leaves are $L\times\{ t\}$, $t\in T$. Then we have} $$ H^k(\mathcal F)= H^k(L;C^\infty (T))=H^k(L;{\mathbb R})\otimes C^\infty(T). $$ \end{Example} The cochain space $\Omega^k(\mathcal F)$ is equipped with the Whitney $C^\infty$ topology, and the leafwise exterior derivative $d_\mathcal F$ is continuous. Thus the cocycle space ${\rm Ker}(d_\mathcal F)$ is closed. But the coboundary space ${\rm Im}(d_\mathcal F)$ is not necessarily closed. The quotient of the cocycle space by the closure of the coboundary space is called the {\em reduced leafwise cohomology} and is denoted by $\mathcal H^*(\mathcal F)$. J. \'Alvarez L\'opez and G. Hector (\cite{AH}) have given sufficient conditions for the foliations to have infinite dimensional reduced cohomology, and raised a lot of examples. Their examples are for the most part foliations with dense leaves, definitely not like Example \ref{ex1}. But in this talk, we are mainly interested in such a foliation for which the leafwise cohomology is finite dimensional. \bigskip There are two ways, important for us, to produce elements of the leafwise cohomology. First notice that the restriction map $$ r: {\rm Hom}(\bigwedge^*TM;{\mathbb R})\rightarrow{\rm Hom}(\bigwedge^*T\mathcal F;{\mathbb R}) $$ induces a cochain homomorphism (denoted by the same letter) $$ r:\Omega^*(M)\rightarrow \Omega^*(\mathcal F), $$ where $\Omega^*(M)$ denotes the de Rham complex of $M$. This induces a homomorphism of the cohomology groups $$ r_*: H^*(M;{\mathbb R}) \rightarrow H^*(\mathcal F). $$ The homomorphism $r_*$ is often nontrivial and yields elements of $H^*(\mathcal F)$. Secondly, suppose that the foliation $\mathcal F$ is given by a locally free right action of a Lie group $G$. Then by the differentiation, we get a Lie algebra homomorphism $\iota: \mathfrak g \rightarrow \mathcal X^\infty(\mathcal F)$, where $\mathfrak g=T_eG$ is identified with the Lie algebra of the left invariant vector fields on $G$, and $\mathcal X^\infty(\mathcal F)$ the Lie algebra of the vector fields of $M$ tangent to the foliation $\mathcal F$. Let $X_1,\cdots X_p$ be the basis of $\mathfrak g$. Then a leafwise $k$-form $\omega$ is completely determined by $\omega(\iota X_{i_1},\cdots, \iota X_{i_k})$ for $1\leq i_1 < \cdots < i_k\leq p$, since for each point $x\in M$ the tangent space $T_x(\mathcal F)$ is spanned by $(\iota X_1)_x, \cdots (\iota X_p)_x$. Thus given a left invariant $k$-form $$\omega:\mathfrak g \times\cdots\times \mathfrak g \rightarrow {\mathbb R},$$ a leafwise $k$-form $\iota \omega$ is defined by $$ \iota\omega(\iota X_{i_1},\cdots,\iota X_{i_k}) = \omega(X_{i_1},\cdots, X_{i_k}). $$ This induces a homomorphism $$\iota_*: H^*(\mathfrak g)\rightarrow H^*(\mathcal F).$$ \begin{Proposition}\label{p3} (1) The homomorphism $\iota_*: H^1(\mathfrak g)\rightarrow H^1(\mathcal F)$ is injective. (2) If $G={\mathbb R}^p$, then $\iota_*: H^i({\mathbb R}^p)\rightarrow H^i(\mathcal F)$ is injective for any $i\geq 0$. \end{Proposition} \begin{Remark} The cohomology of the abelian Lie algebra ${\mathbb R}^p$ is isomorphic to the exterior algebra of ${\mathbb R}^p$, and hence to the cohomology of the $p$-torus: $$ H^*({\mathbb R}^p)\cong \bigwedge^*{\mathbb R}^p\cong H^*(T^p;{\mathbb R}). $$ \end{Remark} \noindent Let us give a proof of Proposition \ref{p3}. Let $\xi_1,\cdots, \xi_r$ be the closed left invariant 1-forms whose classes form a basis of $H^1(\mathfrak g)$. They are of course linearly independent in the dual space $\mathfrak g^*$ of $\mathfrak g$. Therefore there exist elements $X_1,\cdots, X_r$ of $\mathfrak g$ such that $\xi_i(X_j)=\delta_{ij}$. Assume $$ a_1\iota\xi_1+\cdots+a_r\iota\xi_r=d_\mathcal Ff $$ for $a_i\in{\mathbb R}$ and $f\in C^\infty(M)$. Let $\gamma_T:[0,T]\rightarrow M$ be an integral curve of the vector field $\sum_ia_i\iota X_i$. Then we have $$ f(\gamma_T(T))-f(\gamma_T(0))=\int_{\gamma_T}\sum_i a_i\iota\xi_i =T\sum_i a_i^2. $$ Since $T$ can be arbitrarily large and the left hand side is bounded, all the coefficients $a_i$'s must vanish. This shows that the classes of $\iota\xi_i$ are linearly independent in $H^1(\mathcal F)$. The proof for the second part is basically similar and use the Stokes theorem on an embedding of the rectangle $[0,T]\times\cdots\times [0,T]$. \bigskip By Proposition \ref{p3}, if $\mathcal F$ is the orbit foliation of a locally free ${\mathbb R}^p$ action, then we have $\dim H^1(\mathcal F)\geq p$. The following proposition relates the leafwise cohomology of the orbit foliation to the parameter rigidity of the action. \begin{Proposition} \label{p4} A locally free effective ${\mathbb R}^p$-action is parameter rigid if and only if its orbit foliation $\mathcal F$ satisfies $\dim H^1(\mathcal F)= p$. \end{Proposition} An action is said to be effective if the isotropy subgroup of some point of the manifold is trivial. The proof for $p=1$ is in order. Let $X$ be the vector field defining a nonsingular flow $\varphi$. Define a leafwise 1-form $\omega$ by $\omega(X)=1$. An arbitrary leafwise 1-form (which is always closed by the dimension reason) is written as $f\omega$ for some $f\in C^\infty(M)$. Given $g\in \Omega^0(\mathcal F)=C^\infty(M)$, notice that $(d_\mathcal F g)(X)=X(g)$, and thus $d_\mathcal F g=X(g)\omega$. Therefore $\dim H^1(\mathcal F)=1$ if and only if for any $f\omega$, there exist $g\in C^\infty(M)$ and $c\in{\mathbb R}$ such that $$ f\omega=X(g)\omega +c\omega, $$ which is equivalent to the parameter rigidity of the flow $\varphi$ by Proposition \ref{p2}. The proof for $p\geq 2$ is found in \cite{MM}. \smallskip Now let us return to the flows in Theorems \ref{t1} and \ref{t2}. In fact what is proven respectively by A. Katok, and L. Flaminio and G. Forni are much stronger than stated there. \begin{Theorem} Let $\mathcal F_\lambda$ be the orbit foliation of the flow $\varphi_\lambda$ in Theorem \ref{t1}. Then the leafwise cohomology $H^1(\mathcal F_\lambda)$ is infinite dimensional. Moreover if $\lambda$ is badly approximable, then we have ${\mathcal H}^1(\mathcal F_\lambda)=H^1(\mathcal F_\lambda)$, {\em i.\ e.} the space of the coboundaries is closed. \end{Theorem} \smallskip \begin{Theorem} Let $\mathcal F$ be the orbit foliation of the horocycle flow. Then $H^1(\mathcal F)$ is infinite dimensional and we have $H^1(\mathcal F)=\mathcal H^1(\mathcal F)$. \end{Theorem} \section{How to compute leafwise cohomology} Here we will show some methods to compute the leafwise cohomology of a foliation. Let $\pi: M \rightarrow B$ be a {\em foliated bundle} {\em i.\ e.} a fiber bundle equipped with a foliation $\mathcal F$ on $M$ which is transverse to each fiber. Thus the dimension of the leaves of $\mathcal F$ is greater than or equal to the dimension of the base $B$. An important class of foliated bundes is obtainded by a construction called suspension. Let $(F,\mathcal G)$ be a foliated manifold. Denote by ${\rm Diff}(F, \mathcal G)$ the group of diffeomorphisms of $F$ which leaves the foliation $\mathcal G$ invariant. Let $h:\Gamma\rightarrow {\rm Diff}(F, \mathcal G)$ be a homomorphism from a group $\Gamma$. Let $B$ be a manifold such that $\pi_1(B) \cong \Gamma$. Then a foliated manifold $(M,\mathcal F)$ called the {\em suspension} of $h$ is defined as follows. On the product $F\times\widetilde B$, where $\widetilde B$ stands for the universal covering of $B$, there is defined a foliation $\widetilde{\mathcal F}$ whose leaves are $L\times \widetilde B$, where $L$ is a leaf of $\mathcal G$. Consider the diagonal action of $\Gamma$ on $F \times\widetilde B$, on the first factor through $h$ and on the second by deck transformation. This action clearly preserves the foliation $\widetilde{\mathcal F}$ and as the quotient we have a foliated manifold $(M, \mathcal F)$. The following fundamental result is due to A. El Kacimi and A. Tihami (\cite{ET}). \begin{Theorem} \label{t3} For the suspension foliation, there is a spectral sequence such that $$ E^{p,q}_2=H^p(B; H^q(\mathcal G)) $$ which converges to $H^{p+q}(\mathcal F)$, where $H^q(\mathcal G)$ is a system of local coefficents on which $\Gamma=\pi_1(B)$ acts through the homomorphism $h$. \end{Theorem} This shows for example that if $H^q(\mathcal G)$ is finite dimensional for any $0\leq q \leq n$, then the leafwise cohomology $H^n(\mathcal F)$ is finite dimensional. \smallskip Let us consider a special case where the foliation $\mathcal G$ on the fiber is a point foliation. In this case we call $\mathcal F$ the {\em suspension of a point foliation} by a homomorphism $h:\Gamma\rightarrow {\rm Diff}(F)$. We have $H^k(\mathcal G)=0$ unless $k=0$. Thus the spectral sequence of Theorem \ref{t3} collapses and we have: \begin {Corollary} \label{c2} If $\mathcal F$ is the suspension of a point foliation by a homomorphism $h:\Gamma=\pi_1(B)\rightarrow {\rm Diff}(F)$ and if $\widetilde B$ is contractible, then we have: $$ H^p(\mathcal F)=H^p(\Gamma; C^\infty(F)), $$ for any $p\geq 0$, where $\Gamma$ acts on $C^\infty(F)$ through the homomorphism $h: \Gamma\rightarrow {\rm Diff}(F)$. \end{Corollary} \bigskip Here is another way for computing the leafwise cohomology, completely different from the above, due to A. Haefliger (\cite{H}). \begin{Theorem} \label{t5} Let $\mathcal F$ be the suspension of a point foliation by a homomorphism $h:\Gamma\rightarrow {\rm Diff}(F)$. Then there is an isomorphism $$ \int_{\mathcal F}:H^{{\rm dim}\mathcal F}(\mathcal F) \rightarrow H_0(\Gamma, C^\infty(F)). $$ \end{Theorem} The group $H_0(\Gamma, C^\infty(F))$ is by definition the quotient space of $C^\infty(F)$ by the subspace spanned by the elements $f\circ h(\gamma) -f$ for $f\in C^\infty(F)$ and $\gamma\in \Gamma$. In sections below, we shall show computational results for some concrete foliations. \section{Linear foliations} Let us consider the suspension foliation of a point foliation, where the group $\Gamma$ is ${\mathbb Z}^p$, the fiber $F$ is $T^q$, and the homomorphism $h$ is given by $$ h:{\mathbb Z}^p\rightarrow T^q \subset {\rm Diff}(T^q), $$ where $T^q$ is to be the group of the translations of $T^q$. Let $B$ be a real valued $p\times q$ matrix. \begin{Definition} {\em The matrix $B$ is called {\em badly approximable} if there exist $C>0$ and $\rho>0$ such that for any $k\in {\mathbb Z}^q\setminus\{0\}$, we have} $$ \Vert Bk \Vert_{T^p}\geq C\vert k \vert^{-\rho}. $$ \end{Definition} Given a matrix $B$, a homomorphism $$h_B:{\mathbb Z}^p\rightarrow {\rm Diff}(T^q)$$ is defined by $$ h_B(n)(x)=x+nB. $$ As the suspension of $h_B$ over the base manifold $T^p$, we get a linear foliation $\mathcal F_B$ on $T^{p+q}$. The matrix $B$ is called the {\em slope matrix} of the foliation $\mathcal F_B$. \begin{Theorem}{\bf \cite{AS}} \label{t4} If the slope matrix $B$ is badly approximable, then the homomorphism $$ \iota_*: H^i({\mathbb R}^p)\rightarrow H^i(\mathcal F_B) $$ is an isomorphism for any $i\geq 0$. \end{Theorem} Recalling the definition of the homomorphism $\iota_*$, we get the following corollary, which will be useful in Sect.\ 11. \begin{Corollary} \label{c3} Under the same assumption as above, the homomorphism $$ r_*: H^i(T^{p+q})\rightarrow H^i(\mathcal F_B) $$ is a surjection for any $i\geq 0$. \end{Corollary} As is easily shown the foliation $\mathcal F_B$ is the orbit foliation of an ${\mathbb R}^p$ action. Since $H^1(\mathcal F_B)\cong {\mathbb R}^p$, this action is parameter rigid if the action is effective. In fact a bit wider class of ${\mathbb R}^p$-actions for which $\iota_*$ is an isomorphism are found in \cite{Lu}. \section{Orbit foliation of transversely hyperbolic ${\mathbb R}^p$ actions} Abundant examples of $C^1$ locally rigid (hence parameter rigid) ${\mathbb R}^p$-actions are presented by A. Katok and others (\cite{K, HK, KL,KS1,KS2}). Here let us mention only one type among them. Let us denote by $Aff_+(T^{p+1})$ the group of the orientation preserving affine transformations of $T^{p+1}$, with respect to the standard affine structure of $T^{p+1}$. Let us consider a homomorphism $$ h: {\mathbb Z}^p\rightarrow Aff_+(T^{p+1}) $$ with the following property; \smallskip \noindent (*) {\em The derivative $h_*:{\mathbb Z}^p\rightarrow SL(p+1;{\mathbb Z})$ is injective and the image is generated by hyperbolic elements.} \smallskip In this case, the image $h_*({\mathbb Z}^p)$ is shown to be simultaneously diagonalizable in $SL(p+1;{\mathbb R})$. \begin{Theorem} {\bf \cite{KL}} If $p\geq 2$, the cohomology $H^1({\mathbb Z}^p; C^\infty(T^{p+1}))$ associated to $h$ above is isomorphic to ${\mathbb Z}^p$. \end{Theorem} The suspension foliation $\mathcal F_h$ of $h$ over $T^p$ is the orbit foliation of an ${\mathbb R}^p$ action $\varphi_h$. The above theorem implies that $H^1(\mathcal F_h) \cong{\mathbb R}^p$, via Corollary \ref{c2}. That is, by Proposition \ref{p4}, this action is parameter rigid. Moreover it is shown to be $C^1$ locally rigid (\cite{KL}). \medskip As for the higher cohomology group, however, this foliation does not exhibit such rigid property as the foliation $\mathcal F_B$ does in Theorem \ref{t4}. \begin{Proposition} \label{p5} For $p\geq 1$, the top dimensional cohomology $H^p(\mathcal F_h)$ of the foliation $\mathcal F_h$ is infinite dimensional and we have $\mathcal H^p(\mathcal F_h) =H^p(\mathcal F_h)$. \end{Proposition} The proof uses Theorem \ref{t5}. For $p=1$ this result is classical. For the related topics for Anosov flows, see \cite{L,GK,dLMM}. \bigskip Let us state a rigidity result about hyperbolic ${\mathbb R}^p$ actions, which is global in nature. An ${\mathbb R}^p$ action $\varphi$ on a closed $(2p+1)$-dimensional manifold $M$ is called {\em split hyperbolic} if there is a continuous splitting of the tangent bundle $$ TM=T{\mathbb R}^p\oplus E_1\oplus\cdots\oplus E_{p+1}, $$ where $T{\mathbb R}^p$ is the tangent bundle of the orbit foliation and each $E_i$ is a 1-dimensional subbundle invariant under the differential of the action. Furtheremore we assume that there exist $\xi_1,\cdots, \xi_{p+1}\in{\mathbb R}^p$ such that the flow $\varphi(\cdot,t\xi_i)$ is expanding along $E_i$ and contracting along $E_j$ ($j\neq i$). \begin{Theorem} {\bf \cite{M}} A split hyperbolic ${\mathbb R}^p$ action is $C^\infty$ conjugate to the suspension action $\varphi_h$ of some affine representation $$ h:{\mathbb Z}^p\rightarrow Aff_+(T^{p+1}) $$ with the property (*), up to an automorphism of ${\mathbb R}^p$. \end{Theorem} \section{K\"unneth formula} We shall interrupt the computation of the leafwise cohomology and state a general theorem, which has an interesting application for the parameter rigidity of ${\mathbb R}^n$ actions. A. El Kacimi and A. Tihami (\cite{ET}) followed the arguments of R. Bott and L. W. Tu (\cite{BT}) in the framework of leafwise forms, to obtain {\em e.\ g.} the Mayer-Vietoris theorem or the spectral sequence theorem (Theorem \ref{t3}). One can further pursue this line to obtain the following K\"unneth formula for the leafwise cohomology. Let $\mathcal F$ (resp.\ $\mathcal G$) be a foliation on a manifold $M$ (resp.\ $N$). Then on the product manifold $M\times N$, products of leaves of $\mathcal F$ and $\mathcal G$ form a foliation called the {\em product foliation}, denoted by $\mathcal F\times \mathcal G$. \begin{Theorem} \label{12} Assume $\dim H^j(\mathcal G)<\infty$ for $0\leq j \leq k$. Then we have an isomorphism: $$ \sum_{i+j=k}H^i(\mathcal F)\otimes H^j(\mathcal G)\cong H^k(\mathcal F\times \mathcal G). $$ \end{Theorem} Here is an immediate corollary concerning ${\mathbb R}^n$ actions.. Given two actions $$ \varphi:M\times{\mathbb R}^p\rightarrow M \ \ {\rm and} \ \ \psi:N\times{\mathbb R}^q\rightarrow N, $$ an ${\mathbb R}^{p+q}$ action $\varphi\times\psi$ on $M\times N$ called the {\em product action} is defined by $$ (\varphi\times\psi)((x,y),(s,t))=(\varphi(x,s),\psi(y,t)), $$ where $x\in M$, $y\in N$, $s\in {\mathbb R}^p$ and $t\in{\mathbb R}^q$. \begin{Theorem} Let $M$ and $N$ be closed manifolds. Assume that $\varphi$ and $\psi$ are parameter rigid actions of connected abelian Lie groups and that the product action $\varphi\times\psi$ is effective. Then $\varphi\times\psi$ is parameter rigid. \end{Theorem} For example the products of the linear actions of Sect.\ 5 and the transversely hyperbolic actions of Sect.\ 6 can be parameter rigid. It seems that this theorem is difficult to prove without resorting to an algebraic topological argument. Now in the next two sections, we will be back to the computation of the leafwise cohomology. \section{The weak stable foliation of the suspension Anosov flow} Let $\mathcal W^s$ be the weak stable foliation of the suspension flow of a hyperbolic toral automorphism $A: T^n\rightarrow T^n$. Let $\mathcal V^s$ be the linear foliation on $T^n$ whose leaves are parallel translations of the stable eigenspace $E^s$. The automorphism $A$ leaves $\mathcal V^s$ invariant, and as is well known the slope matrix of the linear foliation $\mathcal V^s$ is badly approximable. By Theorem \ref{t4} we have $$ H^*(\mathcal V^s)\cong H^*({\mathbb R}^p)\cong\bigwedge^*{\mathbb R}^p, $$ where $p$ denotes the dimension of the foliation $\mathcal V^s$. The foliation $\mathcal W^s$ in question is the suspension of $(T^n, \mathcal V^s)$ by a homomorphism $h:{\mathbb Z}\rightarrow {\rm Diff}(T^n,\mathcal V^s)$ given by $h(1)=A$. In the case of foliated bundles over $S^1$, Theorem \ref{t3} gives rise to the Wang exact sequence; $$ H^{k-1}(\mathcal V^s) \rightarrow H^{k-1}(\mathcal V^s) \rightarrow H^k(\mathcal W^s) \rightarrow H^k(\mathcal V^s) \rightarrow H^k(\mathcal V^s). $$ The first and the last arrows are $A^*-{\rm Id}$. Notice that $A^*:H^i(\mathcal V^s)\rightarrow H^i(\mathcal V^s)$ is the $i$-th exterior product of $A\vert_{E^s}$, under the identification given by $\iota_*$: $\bigwedge^i E^s\cong H^i({\mathbb R}^p) \cong H^i(\mathcal V^s)$. Thus we get: \begin{Proposition} \label{pa1} $$ H^i(\mathcal W^s)={\mathbb R} \ {\rm for} \ i=0,1, \ \ {\rm and} \ \ H^i(\mathcal W^s)=0 \ {\rm for} \ i\geq 2. $$ \end{Proposition} We shall return to this result in Sect.\ 11. \section{Stable foliations of geodesic flows} There are foliations for which neither Corollary \ref{c2} nor Theorem \ref{t5} apply but still we can compute the leafwise cohomology by a geometric method. Let $M=\Gamma\setminus {\rm SL}(2;{\mathbb R})$ where $\Gamma$ is a cocompact lattice and let $\mathcal F^s$ be the foliation defined by the action of the subgroup $$ \{ \left[ \begin{array}{cc} e^{t/2} & x \\ 0 & e^{-t/2}\end{array} \right] \mid t,x\in{\mathbb R} \}. $$ This subgroup is isormorphic to the Lie group $GA$ of the orientation preserving affine action of the real line and we have $H^1(\mathfrak g\mathfrak a)\cong{\mathbb R}$. The foliation $\mathcal F^s$ is the weak stable foliation of an Anosov flow. \begin{Theorem} \label{t6} The homomorphism $$ (r_*,\iota_*): H^1(M;{\mathbb R})\oplus{\mathbb R}\rightarrow H^1(\mathcal F^s) $$ is an isomorphism. \end{Theorem} Since there are many \lq\lq leafwise 1-currents" given by closed orbits of the Anosov flow, it is not difficult to show that $(r_*,\iota_*)$ is injective. To show the surjectivity, we use the following lemma. \begin{Lemma} Given a $C^\infty$ function $k$, the equation \begin{equation} \label{e2} k=Y(g)+g \end{equation} has a $C^\infty$ solution $g$ if and only if there exists a $C^\infty$ function $l$ fulfilling $$ S(k)=Y(l). $$ \end{Lemma} Here $Y$, $S$ and $U$ are the vector fields on $M$ induced by the action of the elements of the Lie algebra ${\mathfrak sl}(2;{\mathbb R})$; $$ Y=\frac{1}{2} \left[ \begin{array}{cc} 1 & 0 \\ 0 & 1\end{array} \right] , \ \ S= \left[ \begin{array}{cc} 0 & 1 \\ 0 & 0\end{array} \right] , \ \ U= \left[ \begin{array}{cc} 0 & 0 \\ 1 & 0 \end{array} \right] . $$ The integration along the orbit of the $Y$-flow from $t=-\infty$ gives a continuous solution $g$ of (\ref{e2}), which is $C^\infty$ along $Y$ and $U$ directions. The condition $S(k)=Y(l)$ transforms the difference of $g$ between nearby two points on an $S$-leaf to the sum of the difference of the images of these points by time $-T$ of the $Y$-flow and the integration of $k$ along this long $S$-orbit. Then the unique ergodicity of $S$-flow (\cite{F}) ensures that $g$ is $C^\infty$ along the $S$-direction. \medskip Here is also a result about 2-dimensional cohomology, which is a translation of a result of A. Haefliger found in \cite{H}. An application of Theorem \ref{t5}. \begin{Theorem} \label{t7} The homomorphism $r_*: H^2(M;{\mathbb R})\rightarrow \mathcal H^2(\mathcal F^s)$ is an isomorphism. \end{Theorem} Unfortunately the above theorem is only about the reduced leafwise cohomology $\mathcal H^2(\mathcal F^s)$. The honest leafwise cohomology $H^2(\mathcal F^s)$ is not known. We will be back to this problem in Sect.\ 11. \section{Parameter rigidity of certain solvable Lie group actions} First of all let us state a criterion for the parameter rigidity of the action of a general Lie group, which takes form of a nonlinear equation if the Lie group is nonabelian. Let $\varphi:M\times G\rightarrow M$ be a locally free action of a connected and simply connected Lie group $G$ with Lie algebra $\mathfrak g$. Denote by $\mathcal F$ the orbit foliation. As is explained in Sect.\ 3, the vector field $\iota(X) \in T\mathcal F$ is defined for each $X\in\mathfrak g$. A $\mathfrak g$-valued leafwise 1-form $\omega_0$ associted with the action $\varphi$ is defined by $$ \omega_0(\iota(X))=X. $$ It satisfies $$ d_{\mathcal F}\omega_0+[\omega_0\wedge\omega_0]=0, $$ where $[\omega_0\wedge\omega_0]$ is a leafwise 2-form defined by $$ [\omega_0\wedge\omega_0](X,Y)=[\omega_0(X),\omega_0(Y)]. $$ \begin{Proposition} \label{p6} Assume the action $\varphi$ is effective. The action $\varphi$ is parameter rigid if for any $\mathfrak g$-valued leafwise 1-form $\omega$ such that $$ d_{\mathcal F}\omega+[\omega\wedge\omega]=0, $$ there exist an endomorphism $\Phi$ of $G$ and a smooth map $b: M\rightarrow G$ such that $$ \omega=b^{-1}\Phi_*(\omega_0)b+b^{-1}db. $$ \end{Proposition} As an application let us consider the foliation of Sect.\ 8. Computation based on the result of Theorem \ref{t6} leads to an alternative proof of the following theorem by E. Ghys (\cite{G}). \begin{Theorem} \label{11} The action of the Lie group $GA$ in Sect.\ 8 is parameter rigid, if the manifold $M$ is a rational homology sphere. \end{Theorem} E. Ghys also showed that if the manifold $M$ has nonvanishing first Betti number, then the acion of $GA$ is parameter rigid among those actions which preserve the volume form. Our method using the leafwise cohomology just yields the same conclusion. Nothing more, except we can show that the sufficient condition of Proposition \ref{p6} are not satisfied in this case. So the question of the parameter rigidity of the $GA$-actions for 3-manifolds with nonvanishing first Betti number is still open. \medskip Let us raise other examples. Let $A$ be a hyperbolic automorphism of the torus $T^n$ ($n\geq 2$) and let $\mathcal W^s$ be the weak stable foliation of the suspension flow. By Proposition \ref{pa1}, we have $H^1(\mathcal W^s)\cong{\mathbb R}$. If the matrix $A$ has no negative eigenvalues of absolute value smaller than 1, then the foliation $\mathcal W^s$ is the orbit foliation of a locally free action of a two step solvable group $G$. \begin{Theorem} {\bf \cite{MM}} If the characteristic polynominal of $A$ is irreducible over ${\mathbb Q}$, then the $G$ action is parameter rigid. \end{Theorem} Together with the rigidity result of the orbit foliations established by A. El Kacimi and M. Nicolau (\cite{EN}), we obtain the following. \begin{Theorem} If furthermore all the eigenvalues of $A$ are positive, then the $G$ action is $C^\infty$ rigid. \end{Theorem} \section{Minimizable foliation} A foliation $\mathcal F$ on a manifold $M$ is called {\em minimizable} if there is a Riemannian metric on $M$ for which all the leaves of $\mathcal F$ are minimal surfaces. \begin{Proposition} A foliation $\mathcal F$ on the total space $E$ of a fiber bundle $\pi:E\rightarrow B$ transverse to each fiber and of complementary dimension is minimizable. \end{Proposition} In fact a Riemannian metric on $B$ can be lifted to a leafwise Riemannian metric of $\mathcal F$ and extended to a Riemannian metric of $E$ in such a way that each fiber is orthogonal to each leaf. Clearly any leaf is totally geodesic for this metric. Thus most of the examples of foliations so far listed are minimizable. However there is an exception. \begin{Proposition} Horocycle flows on closed 3-manifolds are not minimizable. \end{Proposition} In fact a foliation having a positive holonomy invariant measure which is the boundary of an invariant 1-current is not minimizable (\cite{S}). Here is a criterion for the minimizability due to H. Rummler and D. Sullivan (\cite{R,S}). Assume all the foliations in this section are oriented. \begin{Theorem} \label{13} Let $g_0$ be a leafwise Riemannian metric of a $p$-dimensional foliation $\mathcal F$. It extends to a Riemannian metric of the whole manifold $M$ for which all the leaves are minimal surfaces if and only if the leafwise volume form $\omega_0$ induced by $g_0$ extends to a form $\omega$ of $M$ such that $$ d\omega(\xi_1,\cdots,\xi_{p+1})=0 $$ whenever the first $p$ of the vector fields $\xi_i$'s are tangent to the leaves. \end{Theorem} Now we call a foliation $\mathcal F$ {\em totally minimizable} if any leafwise Riemannian metric extends to a Riemannian metric for which all the leaves are minimal. \begin{Corollary} \label{14} A $p$-dimensional foliation $\mathcal F$ on $M$ is totally minimizable if the homomorphism $$ r_*:H^p(M;{\mathbb R})\rightarrow H^p(\mathcal F) $$ is surjective. If ${\rm codim}\mathcal F=1$, then the converse is also true. \end{Corollary} In fact if $r_*$ is surjective, then the leafwise volume form $\omega_0$ of any leafwise Riemannian metric can be expressed as $$ \omega_0=r(\omega)+d_{\mathcal F}(\eta_0), $$ for a closed $p$-form $\omega$ and a leafwise $(p-1)$-form $\eta_0$. But since $r:\Omega^{p-1}(M)\rightarrow\Omega^{p-1}(\mathcal F)$ is surjective, we have $\eta_0=r(\eta)$ for some $(p-1)$-form $\eta$. It follows then that $$ \omega_0=r(\omega+d\eta), $$ for a closed $p$-form $\omega+d\eta$, whence the criterion of Theorem \ref{13} is satisfied. To show the converse statement for codimension one foliation, notice first of all that since $\dim(M)=p+1$, the condition for the $(p+1)$-form $d\omega$ in Theorem \ref{13} is equivalent to saying that $d\omega=0$. Next notice that any leafwise $p$-form is the difference of the leafwise volume forms of two leafwise Riemannian metrics. \medskip As applications, Corollary \ref{c3} implies that the linear foliations on the torus with badly approximable slope matrices are totally minimizable. Also the foliation $\mathcal W^s$ of Sect.\ 8. is totally minimizable by Proposition \ref{pa1}. \medskip A foliation $\mathcal F$ is said to be {\em almost totally minimizable} if any leafwise Riemannian metric is approximated arbitrarily close in the $C^\infty$ topology by the restriction of Riemannian metrics for which all the leaves are minimal. One example of such foliations are $p$-dimensional linear foliations $\mathcal F$ on the torus $T^n$ whose leaves are all dense. This is a consequence of the surgectivity of the map $r_*:H^p(T^n)\rightarrow \mathcal H^p(\mathcal F)$. This result is best possible if the slope matrix of the foliation $\mathcal F$ is not badly approximable. (Otherwise $\mathcal F$ is totally minimizable, as we mentioned above.) Likewise for the foliation $\mathcal F^s$ of Sect.\ 9, the homomorphism $r_*: H^2(M;{\mathbb R})\rightarrow \mathcal H^2(\mathcal F^s)$ is an isomorphism (Theorem \ref{t7}). This implies that the foliation $\mathcal F^s$ is almost totally minimizable (\cite{H,HL}). Unlike the previous example of linear flows, we do not know if this is best possible or not. It is known that the subspaces $\{Y(f)\vert f\in C^\infty(M)\}$ and $\{S(f)\vert f\in C^\infty(M)\}$ are closed in $C^\infty(M)$ (\cite{GK} or Proposition \ref{p5}, and \cite{FF} or Theorem \ref{t2}). The problem is equivalent to deciding if the sum of these two subspaces is closed.
{ "redpajama_set_name": "RedPajamaArXiv" }
8,828
This is a Hands-On LinkedIn Masterclass. In a morning, you will develop a truly dynamic and targeted profile page which attracts the right people to you and your business. You will learn the robust marketing strategies the experts use to build business and personal brands on LinkedIn – specifically targeted for you. You'll gain a thorough understanding of the LinkedIn Landscape and the insider tips and tricks to make LinkedIn work for you and your business. So, you'll need a laptop and a power cable! We'll also be spending some time clarifying you, your business, your targets, your offerings, keywords and relevancy. Just to make sure you're clear about it before you dive into LinkedIn content/strategy creation and to ensure your profile jumps out of important searches. A powerful business-to-business marketing tool will be yours, making use of all the multi faceted tools available in the LinkedIn world. As an addition, Carol will also run an interactive Personal Branding Workshop as part of the morning. This workshop has been run to great acclaim in London and NYC with Entrepreneurs and Executives alike (rrp $650). We all need to clearly understand who we are and to craft that story into a valuable Personal Brand. You will craft your Personal Brand Manifesto, Values and Relevancy – All ready to communicate that value to your network on LinkedIn. Owner/managers, sole traders, professionals who are somewhat familiar with the LinkedIn landscape but who are not getting the results they want from their time online. Founded in 2003, Redstorm.ie is a strategic marketing, branding, business development and social media agency. We make sure you go to market with the right message, aimed at the right people to make your business the best it can be. With a reputation for innovative marketing, Redstorm is also in demand throughout the entrepreneurial community for business mentoring, personal branding and reputation development, email marketing, graphics, online design and development. The company works closely with young brands, SMEs and established blue chip companies but specialises in successfully developing smaller owner-managed businesses. Launched in 2012 by Carol O'Kelly of Redstorm to offer individuals and companies powerful Personal Profiles and Dynamic Company Pages together with personalised strategies and in-depth training to deliver truly amazing business results. For More LinkedInToSuccess Information Click Here.
{ "redpajama_set_name": "RedPajamaC4" }
9,538
\section{Introduction} \label{sec:intro} The ATA is a "Large Number of Small Dishes" (LNSD) interferometric array located in Northern California at the Hat Creek Radio Observatory (HCRO) of the University of California, Berkeley. The telescope is designed to be highly effective for commensal surveys of conventional radio astronomy projects and SETI (Search for Extra-Terrestrial Intelligence) targets at centimeter wavelengths, and currently consists of 42 6-meter dishes with continuous frequency coverage over 0.5--10 GHz \citep{2009IEEEP..97.1438W, 2010ApJ...710.1462W}. The ATA has a wide field of view (4.7 deg$^2$ at 1.43 GHz), which allows for rapid surveying of large areas of the sky. Since the point-source sensitivity of wide-field surveys requiring multiple pointings is proportional to $ND$ (as opposed to the total collecting area $ND^2$), where $N$ is the number of dishes and $D$ is the dish diameter, the LNSD design was the natural choice for the ATA \citep{1993ARA&A..31..297S}. Since the ATA is a wide-field survey instrument, the construction of mosaics---large images created by stitching together snapshots from individual pointings---is of prime importance. In order to account for the attenuation of sources with distance from the center of the primary beam (i.e. the pointing center), and to correct for this effect when mosaicking the images, we must know the shape of the telescope's primary beam. The results of not properly characterizing the beam can be devastating. \citet{1993A&A...271..697C} discuss the effects of poor beam characterization on image fidelity, noting that deviations from the primary beam model of a telescope should be small down to or below the $\sim$7\% level. \citet{SKA_Memo_103} show that if the actual primary beam pattern deviates from the canonical pattern by just a few percent, the image fidelity can be reduced by more than two orders of magnitude. Our goal is to self consistently measure the FWHM with science data, which allows us to monitor the beam shape in real time and at the current observing frequency. While work such as the holography mapping study described in \citet{Harp:ATA_beam_holography} is invaluable as a thorough initial calibration of the beam shape of the telescope, it is time-consuming, and cannot be repeated regularly. Additionally, holography mapping is performed by training the telescope on strong satellite emission, which may be at a frequency different from that being used for observations. The real-time calibration work we present here is complementary to such detailed studies. \citet{Welch:ATA_memo_66} predicted the gain of the ATA antennas to be \begin{equation} G(\theta) \propto \left[ \frac{J_{\textrm{1}}\left[ \left( 6\pi / \lambda \right) \sin \theta \right]}{\left( 6\pi / \lambda \right) \sin \theta} + 25.40 \, \frac{J_{\textrm{2.9}}\left[ \left( 6\pi / \lambda \right) \sin \theta \right]}{\left( \left( 6\pi / \lambda \right) \sin \theta \right)^{2.9}} \right]^2 \\ \,\, , \label{eqn:bessel_beam} \end{equation} \noindent where $\theta$ is the angular distance from the pointing center. Furthermore, the beam can be approximated by a symmetric Gaussian of the form \begin{equation} G(\theta) \propto \exp{\left[-4 \ln 2 \, \left(\frac{\theta}{\Theta_{1/2}}\right)^2\right]} \,\, , \label{eqn:gauss_beam} \end{equation} \noindent where $\Theta_{1/2}$ is the theoretical full width at half maximum (FWHM) of the Gaussian beam. Both the beam from Eqn. \ref{eqn:bessel_beam} and the Gaussian beam approximation from Eqn. \ref{eqn:gauss_beam} are plotted in Figure \ref{fig:welch_vs_gauss}, along with the residual between them. The residual peaks at 2.5\% at a gain of less than 10\%; the beam shapes differ by less than 0.5\% inside the beam's half-power points. These small differences suggest that the Gaussian approximation from Eqn. \ref{eqn:gauss_beam} is an acceptable alternative to the more complicated beam shape from Eqn. \ref{eqn:bessel_beam}. \begin{figure*}[hbt!] \begin{center} \plottwo{f1.eps}{f2.eps} \caption{The beam shape from \citet{Welch:ATA_memo_66} and the Gaussian beam approximation (left), and the residual gain after taking the difference between the Gaussian approximation and the Welch beam (right). The plotted beams correspond to the PiGSS frequency of 3.14 GHz.} \label{fig:welch_vs_gauss} \end{center} \end{figure*} Scaling the predicted $\Theta_{1/2}$ with frequency in units of GHz gives \begin{equation} \Theta_{1/2} = \frac{\Theta_0}{f(\textrm{GHz})} \,\, , \label{eqn:FWHM} \end{equation} \noindent where the canonical value of $\Theta_0$ is 3.50$^\circ$. Equation \ref{eqn:FWHM} gives us an expected FWHM of the mean primary beam of the ATA (the average of the primary beams of each dish) of $2.45^{\circ}$ at the ATATS frequency of 1.43 GHz \citep{2010ApJ...719...45C}, and $1.11^{\circ}$ at the PiGSS frequency of 3.14 GHz \citep{2010arXiv1009.4443B}. The actual shape of the beam may not match this prediction, however. In order to mosaic the large numbers of snapshots successfully, we must properly characterize the beam. In $\S$\ref{sec:method}, we explain our two methods for characterizing the FWHM of the telescope's mean primary beam, after which, in $\S$\ref{sec:data}, we describe the data to which we applied our methods. We then report our results in $\S$\ref{sec:results}, and we conclude in $\S$\ref{sec:ska} with a discussion of a simulation that applies our methods to simulated data of future telescopes such as the expanded, 350-dish ATA and the 3000-dish SKA (SKA-3000). \section{Description of Methods} \label{sec:method} As pictured in Fig. \ref{fig:pointings}, pointings used in an ATA mosaic overlap significantly, having been arranged to approximate a hexagonal close-packed grid. The distances between pointing centers are determined by Nyquist sampling, and the convergence toward the poles of lines of constant RA has been accounted for. This is a typical pointing grid used in many all-sky surveys with the ATA and other telescopes. \begin{figure} \begin{center} \plotone{f3.eps} \caption{An illustration of seven overlapping PiGSS pointings. The crosses are the pointing centers, the solid circles denote the primary beam's half-power radius, and the dotted circles denote twice the half-power radius. This hexagonal close-packed arrangement of pointings is typical of other all-sky surveys, including ATATS.} \label{fig:pointings} \end{center} \end{figure} Sources can appear in different locations within the beam in several adjacent, overlapping pointings. Bright sources ($\sim$1 Jy) are sometimes detectable in as many as six or seven adjacent pointings, depending on where in the primary beam they fall in each pointing. Dimmer sources tend only to be detected in two or three pointings. We use the multiple appearances of each source to constrain the beam's FWHM by comparing the flux densities of the source in adjacent pointings. To find matching pairs, we compare each detected source with every other source, declaring a match when the difference between the two sources' reported positions is less than the typical pointing error of one arc minute. We accumulate 4,304 matched pairs in the ATATS data, and 824 pairs in the PiGSS data. After matching sources, we attempt to constrain the beam's FWHM using two methods of parameter fitting. This method assumes that the sky is stationary on the time scale of observations. Transient and variable sources, therefore, will reduce the accuracy of the overall result. Transient sources --- defined as those that appear in a single pointing --- can be rejected on the absence of a source match in another and will then have a minimal effect as long as source confusion is not important. Variable sources present a more complex problem. It is likely that strongly variable sources can be rejected with a technique such as median filtering. But sources with moderate variability on the timescale of the observations will be difficult to distinguish from distortions in the primary beam shape. Fortunately, the number of variable sources is a relatively small fraction (less than 1\% at mJy sensitivity) of the total number of radio sources \citep{2007ApJ...666..346B,2010ApJ...719...45C,2010arXiv1009.4443B}. We must also emphasize that the true coordinates for the primary beam are (Az, El), while these measurements give results for celestial coordinates (RA, DEC). A more sophisticated model would require translating (RA, DEC) to (Az, El), especially if we wanted to work with long tracks of data. Our current method is appropriate for situations where the beam is circularly symmetric, and when working with the snapshot observations typical of high-cadence surveys such as ATATS and PiGSS. \subsection{Method 1: two-point Gaussian fitting} \label{sec:two_point} Assuming only a radial sensitivity dependence within the telescope's primary beam, we can calculate the FWHM of a Gaussian that we fit to each pair of matched sources. We represent the measured flux densities in the following way: \begin{align} S_i &= S_{\textrm{true}} \, G(\theta_i) \label{eqn:S_i} \,\, , \end{align} \noindent where $S_{\textrm{true}}$ is the absolute flux density of the source (unknown to us); $S_i$ is the observed flux density of a source in a given pointing; $\theta_i$ is the distance of the source from its respective pointing center; and $G(\theta)$ is the gain of the telescope as a function of the distance from the pointing center. If we assume the gain is a circular Gaussian with a given standard deviation $\sigma$, then the observed flux densities are \begin{align} S_i &= S_{\textrm{true}} \, \exp{\left(- \frac{\theta_i^2}{2 \sigma^2}\right)} \label{eqn:S_i_gauss} \,\, . \end{align} Solving for $\Theta_{1/2}$ for a given pair of sources gives \begin{equation} \Theta_{1/2} = \sqrt \frac{4 \ln{2} \, (\theta_2^2 - \theta_1^2)}{\log \, (S_1/S_2)} \label{eqn:r_FWHM} \,\, . \end{equation} Our analytical method for calculating FWHM values using Equation \ref{eqn:r_FWHM} breaks down under two circumstances: when $S_1/S_2 \approx 1$ (which causes us to divide by zero), and when $\theta_1/\theta_2 \approx 1$ (which results in a FWHM of zero). (These two cases are essentially the same, since when $\theta_1 \approx \theta_2$, it follows that $S_1 \approx S_2$. This is assuming a symmetric primary beam, and assuming that the source has a constant flux density and hasn't been mismatched.) This is unfortunate, because the very places where Equation \ref{eqn:r_FWHM} breaks down are where we would expect the largest number of pairs to be detected: that is, where the source appears roughly the same distance from each pointing center and is not attenuated too much in either pointing. The advantages of this method are that it calculates a FWHM measurement for each pair of matches; for a purely Gaussian beam shape, the analytical solution for the FWHM is simple to calculate; and the method's accuracy should increase as the number of observed sources is increased. The disadvantages, however, also become apparent in our discussion above. \subsection{Method 2: $\chi^2$ minimization} \label{sec:chi2} Instead of solving for a separate FWHM for each flux density pair, this approach allows us to correct all of the data at once with one best-fit FWHM. We correct the measured flux densities of each pair of matched sources to their (presumed) true values by multiplying by the inverse of the gain, which is defined according to Equation \ref{eqn:gauss_beam}, and depends on the primary beam's FWHM. To arrive at the best-fit FWHM value, we assume a FWHM for the beam, correct all of the flux density pairs using that FWHM, and calculate the reduced-$\chi^2$ ($\chi^2_\nu$) using the following formula: \begin{equation} \chi^2_\nu = \frac{1}{\nu} \sum \limits_{i = 0}^N \frac{ \left( S_{1,\textrm{true},i} - S_{2,\textrm{true},i} \right)^2 }{ \Delta S_{1,i}^2 + \Delta S_{2,i}^2 } \end{equation} \noindent where $\nu$ is the number of degrees of freedom, $N$ is the number of matched pairs, $S_{1,\textrm{true},i}$ and $S_{2,\textrm{true},i}$ are the corrected flux densities, and $\Delta S_{1,i}^2$ and $\Delta S_{2,i}^2$ are the uncertainties in flux density. An important advantage of this method is that it, unlike the two-point method, it uses all of the data to determine the FWHM of the primary beam. Additionally, we can use this method to fit any arbitrarily complex beam shape, not just simple shapes like the purely Gaussian shape $G(\theta)$ that we have assumed above. For example, the method could easily be extended to fit other parameters such as the beam's ellipticity and angle on the sky. \section{Description of Data} \label{sec:data} \subsection{ATATS} \label{sec:data:ATATS} We use both methods described above to determine a value for the FWHM for the primary beam of the ATA, using data from the ATA Twenty-centimeter survey \citep[ATATS; ][]{2010ApJ...719...45C}. ATATS is a multi-epoch, 690 deg$^2$ survey at 1.43 GHz, and is designed to search for transients as well as to verify the capabilities of the ATA to form large mosaics. ATATS is centered on the $\sim$10 deg$^2$ Bo\"{o}tes deep field \citep{1999ASPC..191..111J}. The data were reduced using a software suite developed for reduction of ATA data, RAPID \citep[Rapid Automated Processing and Imaging of Data;][]{2009AAS...21460106K}. RAPID calls MIRIAD \citep{1995adass...4..433S} tasks using C shell scripts, and performs RFI excision, visibility calibration, phase self-calibration, and amplitude flagging. The images were deconvolved using the MIRIAD task "clean". The number of iterations was set using an "intelligent clean" algorithm implemented by RAPID. The flux densities of point sources in the field, and the measured RMS noise, are used to calculate the appropriate number of clean components to clean down to the $3 \sigma$ level. At this stage, RAPID checks for the presence of point sources in the residual image, and if any are found, the number of clean iterations is iteratively increased until the residual images are consistent with noise. The sources we used in our analysis were 5623 sources from a catalog created by running the MIRIAD task SFIND on maps of individual pointings from ATATS Epoch 12, taken on 2009 April 3 \citep{2010ApJ...719...45C}. Each of the 253 pointings is a snapshot with one minute of integration time. The overlapping of the individual pointings, as described in $\S$\ref{sec:method} and depicted in Fig. \ref{fig:pointings}, allowed us to detect the same source in several different snapshots. These data were taken as part of a pilot study; ongoing improvements to the array and to the data analysis routines are resulting in continuing enhancements in image quality and data consistency. \subsection{PiGSS} \label{sec:data:PiGSS} The Pi Gigahertz Sky Survey \citep[PiGSS;][]{2010arXiv1009.4443B} is a radio continuum survey at 3.14 GHz, which observes the North Galactic Cap and other selected 10 deg$^2$ fields. These data were processed using methods similar to those used on the ATATS data; the images are restored with a circular synthesized beam of 100" FWHM. The data used in our analysis come from the individual images comprising a seven-pointing mosaic of the Bo\"{o}tes deep field. These images were obtained from 75 daily observations, each of which included between two and six snapshots of each pointing, providing very good coverage of the $(u,v)$ plane. Maps of each pointing were produced with a size of $4.26^{\circ}$ on a side, much larger than the primary beam FWHM of $\sim$$1.1^{\circ}$. A total of 672 sources were identified in the individual pointings using the MIRIAD task SFIND. \section{Results} \label{sec:results} \subsection{Two-point method} Fig. \ref{fig:FWHM_hist} shows histograms of FWHM values calculated using the two-point method on the ATATS and PiGSS data. We truncate the horizontal axis at a FWHM of $12^{\circ}$ for ATATS and $4^{\circ}$ for PiGSS, but the tail of large FWHM values continues as a result of the breakdown of Equation \ref{eqn:r_FWHM} as described in $\S$\ref{sec:two_point}. While the distributions of FWHM values pictured in Fig. \ref{fig:FWHM_hist} are strongly peaked, they are not symmetric. We therefore estimate the FWHM by taking the median of our results, and finding the extremes that encompass 68.3\% of our data. We find that the mean FWHMs are $2.29 \pm 0.01^\circ$ for the ATATS data and $1.10 \pm 0.01^\circ$ degrees for the PiGSS data. \begin{figure*}[hbt!] \begin{center} \plottwo{f4.eps}{f5.eps} \caption{A histogram of the FWHM values calculated using the two-point method on ATATS data (left) and PiGSS data (right).} \label{fig:FWHM_hist} \end{center} \end{figure*} \subsection{$\chi^2$ minimization} \label{sec:results:chi2} If the assumption of a radial, Gaussian beam is correct, the values we calculate for $S_{1,\textrm{true}}$ and $S_{2,\textrm{true}}$ should be the same (and if our overall flux calibration is correct, should be equal to the true source flux density). Fig. \ref{fig:s1s2_ATATS} shows $S_1$ vs. $S_2$ for both the uncorrected and corrected ATATS data. Fig. \ref{fig:s1s2_PiGSS} shows the equivalent plots for the PiGSS data. \begin{figure*}[hbt!] \begin{center} \plottwo{f6.eps}{f7.eps} \caption{$S_1$ vs. $S_2$ for identical ATATS sources, prior to (left) and after (right) correcting for the Gaussian beam attenuation using the best-fit (minimum $\chi^2$) value for the FWHM. The appearance of clusters of points with the same flux density in either the vertical or horizontal direction results from the fact that some sources appeared in more than two pointings: to accumulate the maximum possible number of two-point matches, we match each appearance of a source with every other appearance.} \label{fig:s1s2_ATATS} \end{center} \end{figure*} \begin{figure*}[hbt!] \begin{center} \plottwo{f8.eps}{f9.eps} \caption{$S_1$ vs. $S_2$ for identical PIGSS sources, prior to (left) and after (right) correcting for the Gaussian beam attenuation.} \label{fig:s1s2_PiGSS} \end{center} \end{figure*} Fig. \ref{fig:chi2} shows a plot of $\chi^2$ as a function of FWHM for both ATATS and PiGSS. We had 4,303 and 823 degrees of freedom in our one-parameter fits for ATATS and PiGSS, respectively. The minimal $\chi^2_\nu$ values for the fits are quite large: for the ATATS data the value is $\sim$21, and for PiGSS the value is $\sim$10. This is not due to the differences between the two models from \citet{Welch:ATA_memo_66}, expressed in Equations \ref{eqn:bessel_beam} and \ref{eqn:gauss_beam}: after performing a $\chi^2$ analysis that corrected the flux densities using the beam shape from Equation \ref{eqn:bessel_beam}, we calculated similar values for $\chi^2_\nu$ for both ATATS and PiGSS. The large values of $\chi^2_\nu$ are due to a combination of systematic underestimation of uncertainties in flux density, the fact that the beam is not a perfect circular Gaussian \citep{Harp:ATA_beam_holography}, and the fact that there are probably a few mismatched sources. This value could be reduced by fitting a more complex beam shape that includes beam ellipticity and beam angle, which neither Equation \ref{eqn:bessel_beam} nor Equation \ref{eqn:gauss_beam} took into account. \begin{figure*}[hbt!] \begin{center} \plottwo{f10.eps}{f11.eps} \caption{$\chi^2_\nu$ vs. the FWHM value used to correct the ATATS and PiGSS data. The uncertainties have been scaled up so that the curves both achieve a minimum of one.} \label{fig:chi2} \end{center} \end{figure*} After correcting the data and performing a $\chi^2$ minimization as described in $\S$\ref{sec:chi2}, we arrive at a best-fit FWHM value of $2.39 \pm 0.04^{\circ}$ for the ATATS data, and $1.10 \pm 0.01^{\circ}$ for the PiGSS data. Fig. \ref{fig:FWHM_theo_meas} compares our results with the expression for expected FWHM, given in Equation \ref{eqn:FWHM}. Clearly we are seeing a slightly narrower beam width than the width predicted by \ref{eqn:FWHM}. The bias of a few percent is probably due to a combination of systematic errors including imperfect understanding of the ATA antennas, the inadequacy of the Gaussian beam assumption, and other losses that have a radial effect. \begin{figure*}[hbt!] \begin{center} \plotone{f12.eps} \caption{The primary beam's FWHM $\Theta_{1/2}$ vs. observing frequency, shown over the relevant portion of the ATA's 0.5--10 GHz frequency range. Points on the solid line are the expected values from Equation \ref{eqn:FWHM}, and the two large points are the FWHM values that we calculated using the $\chi^2$ method, as reported in $\S$\ref{sec:results:chi2}.} \label{fig:FWHM_theo_meas} \end{center} \end{figure*} \section{Simulation: ATA-350 and SKA} \label{sec:ska} Here we use a simulation to investigate the dependence of the accuracy of the telescope's FWHM on antenna number. As the number of antennas in an array increases, both the sensitivity of the array and the number of detectable sources increase. Both of these factors allow us to measure the FWHM of the telescope's mean primary beam more accurately as the number of dishes increases. We assume each simulated array has a System Equivalent Flux Density, or SEFD, of $\sim$6000 (the SEFD of the ATA-42; see Equation \ref{eqn:radiometer}), a bandwidth $\Delta \nu$ of 200 MHz, and consists of identical 6.1 m antennas. We generate simulated sources by assuming snapshot observations with an integration time $\tau$ of 1 minute, an observing frequency of 3.14 GHz (the same as the PiGSS data), and a power-law distribution of source density as a function of flux density \citep{Galactic_radio_astronomy}: \begin{equation} \frac{dN}{dS} \propto S^{-2} \,\, . \label{eqn:dN_dS} \end{equation} Assuming the power-law distribution of source density from Equation \ref{eqn:dN_dS}, we arrive at the number of sources per steradian theoretically observable by a telescope sensitive to a given RMS flux density: \begin{equation} \frac{N}{\Delta \Omega} = \frac{N_0 S_0^2}{\Delta S} \,\, , \label{eqn:source_density} \end{equation} \noindent where $N$ is the number of detectable sources, $\Delta \Omega$ is the solid angle subtended by the telescope's field of view, $N_0 = 3 \times 10^6$ Jy$^{-1}$ ster$^{-1}$, $S_0 = 0.01$ Jy ($N_0$ and $S_0$ are both derived from the plot of source count vs. flux density at 1.4 GHz on p. 651 of \citet{Galactic_radio_astronomy}), and $\Delta S$ is the RMS flux density of the observation, which is dictated by the radiometer equation: \begin{equation} \Delta S = \frac{2 k T_{sys}}{A_{eff}\sqrt{N_A\left(N_A - 1\right) \tau \Delta \nu}} \,\, , \label{eqn:radiometer} \end{equation} \noindent where $T_{sys}$ is the system temperature, $N_A$ is the number of antennas, $\tau$ is the integration time, and $\Delta \nu$ is the bandwidth. The term $(2kT_{sys} \, / \, A_{eff})$ is also known as the SEFD. (Note that the actual source count distribution as a function of flux is more complicated, and is only proportional to $S^{-2}$ over the $\sim$1--1000 mJy range of fluxes detected in the PiGSS survey.) The RMS noise should decrease with an increasing number of antennas. This fact, combined with the increasing number sources that will be detectable as RMS decreases, should result in better estimations of the beam's FWHM using the $\chi^2$ fitting method we describe in \ref{sec:chi2}. To test our prediction, we simulate datasets from telescopes with an increasing number of dishes, to which we then apply our $\chi^2$ fitting method in the same way that we fit the real ATATS and PiGSS data. We assume that the arrays in our simulations are not confusion limited. We simulate observations from seven different arrays with numbers of antennas ranging from 42 to 2688 in powers of two. For each of the seven arrays, we generate and analyze 1,000 different datasets. For each simulated dataset, we generate a field of the appropriate number of sources by distributing them randomly throughout a 12.6 deg$^2$ field identical to the seven-pointing PiGSS field shown in Fig. \ref{fig:pointings}. We then add Gaussian noise with a mean equal to the RMS of each source's flux density. After distributing the sources across the field, we "observe" all of the sources in each of the seven pointings, where the observed flux density of the source is equal to the intrinsic flux density scaled down by the gain as a function of distance from the pointing center. As we have throughout this work, we assume the primary beam is a circular Gaussian with a FWHM equal to 1.10$^\circ$, which we calculated in $\S$\ref{sec:results:chi2} after analyzing the PiGSS data. We eliminate any observed sources whose fluxes have been scaled down to less than the RMS, and we only count 5$\sigma$ sources as detections. After accumulating the lists of sources in each of the seven pointings, we use the same procedure that we use in $\S$\ref{sec:chi2} to determine the best-fit FWHM of the primary beam and its uncertainty. We find that as the number of dishes increases, the uncertainty in the primary beam's FWHM decreases like a power law with an index of $\sim$1 (see Fig. \ref{fig:simulation}). The first data point, corresponding the ATA-42, reports a FWHM uncertainty of 0.03$^{\circ}$, which is consistent to within a factor of three with the results from the PiGSS data reported in $\S$\ref{sec:results:chi2}. As expected, our results return a median FWHM equal to 1.10$^\circ$, which is equal to the value we used when we simulated the data; and each simulation returns a $\chi^2_\nu$ value near 1, which is reasonable since we haven't introduced any systematic errors into our calculations. \begin{figure} \begin{center} \plotone{f13.eps} \caption{The percentage uncertainty in the FWHM of the telescope's primary beam as a function of antenna number. The solid line is a power law fit to the simulation results, and has an index of 1.} \label{fig:simulation} \end{center} \end{figure} The decreasing error in the calculated FWHM of the beam with increasing dish number will be important for future telescopes with large numbers of dishes. For example, with the SKA-3000 \citep{SKA_memo_100}, one will be able to characterize the primary beam much better by using images taken with a fraction of the integration time characteristic of the above ATA-42 observations. Extrapolating the power law in Figure \ref{fig:simulation} to an array with 3000 antennas, we can see that in the absence of systematic errors one could estimate the FWHM of the SKA-3000 to within 0.02\%. \section{Conclusions} While consistent with our $\chi^2$ minimization results, the method of calculating the beam's FWHM using the two-point method has systematic problems, including the fact that the best flux density-distance pairs lead to the least reliable FWHM values. We also find the $\chi^2$ minimization to be superior to the two-point method because of its lack of systematic problems, its ability to use all of our data in the fit, and its compatibility with more complex models. Overall, both our analysis of real ATA data and our simulation confirm that the theoretical FWHM values from \citet{Welch:ATA_memo_66} are reasonable, as they are consistent with our results at the frequencies of both the ATATS and PiGSS surveys. The theoretical values are also consistent with the results from radio holography \citep{Harp:ATA_beam_holography} and off-axis measurement of point sources \citep{Macmahon:ATA_memo_83}. The results of our simulation, which calculates the uncertainty in the FWHM of the primary beams of telescopes with different numbers of dishes, will be important for the primary-beam characterization of future LNSD telescopes such as the ATA-350 and the SKA. The dramatically increased number of sources detectable by these telescopes will allow much better constraint of beam properties, thus improving the accuracy and fidelity of mosaicked images. \citet{1993A&A...271..697C} note that in the absence of systematic errors, one can achieve a dynamic range in a mosaicked image of $\sim$3,000 and a fidelity index of $\sim$150 by knowing the primary beam to an RMS error of $\sim$1\%. We can measure the beam shape of the ATA to within a tenth of a percent, suggesting that we have the potential to achieve extremely high dynamic ranges and fidelity indices in ATA mosaics. An extension of our model could be developed to allow fitting not only of the beam's FWHM, but also of its ellipticity and its angle on the sky. Additional effects such as spillover from the ground, mechanical deformation of the dish, frequency and baseline dependence of the beam, and time variability of sources are surely factors to be considered; however, most of these are probably relatively minor effects when compared with the effect of using a simple, Gaussian model for a beam that we know is non-Gaussian at some level. Regardless, all of these effects should be taken into consideration in future primary beam studies on telescopes such as the ATA-350 the SKA, and other radio interferometers. The authors would like to acknowledge the generous support of the Paul G. Allen Family Foundation, who have provided major support for design, construction, and operations of the ATA. Contributions from Nathan Myhrvold, Xilinx Corporation, Sun Microsystems, and other private donors have been instrumental in supporting the ATA. The ATA has been supported by contributions from the US Naval Observatory in addition to National Science Foundation grants AST-050690, AST-0838268, and AST-0909245. We would also like to acknowledge the advice and guidance of Dick Plambeck, Mel Wright, Mike McCourt, Jonathan Pober, Adam Morgan, James McBride, and the members of the Berkeley Radio Astronomy Lab in the preparation of this paper. CLHH is supported by a UC Berkeley Chancellor's Fellowship and an NSF Graduate Fellowship. \bibliographystyle{apj}
{ "redpajama_set_name": "RedPajamaArXiv" }
1,123
Anton Ludvig Faye, född 23 oktober 1845 i Skien, död 30 april 1916 i Kristiania, var en norsk läkare och medicinhistoriker; son till Frans Christian Faye. Faye blev student 1862 och candidatus medicinæ 1869. Han vistades följande år i utlandet för att studera obstetrik, blev medicine doktor 1875 vid Kristiania universitet på avhandlingen Undersøgelser over nyfødte børns ernæringsforhold. Samma år blev han förste underläkare vid barnbördshuset, inträdde i arméns sanitetskår, där han avancerade till chef och fick överstes grad samt började hålla mycket eftersökta föreläsningar över medicinens historia vid universitetet. Dessa intressen behöll under återstoden av sitt liv. Faye författade talrika avhandlingar inom obstetrik och gynekologi, men han är främst känd för sina medicinhistoriska skrifter. Hans studier behandlade särskilt forntidens och medeltidens läkekonst. Bibliografi (i urval) Om den sorte død (1880) Hospitaler og milde stiftelser i Norge i middelalderen (1882) Forhold og skikke vedrørende svangerskab og fødsel hos de gamle nordboere (1886) Grundtræk af anatomiens historie (I-II, 1904-05) Om syfilis' epidemiske optræden i Europa i slutningen af 15. aarhundrede, og de ældste forfatteres vidnesbyrd om samme (1909) Källor Norska läkare inom obstetrik och gynekologi Medicinhistoriker Militärläkare Norska läkare under 1800-talet Norska läkare under 1900-talet Personer från Skien Födda 1845 Avlidna 1916 Män Salmonsens Alumner från universitetet i Oslo
{ "redpajama_set_name": "RedPajamaWikipedia" }
4,633
Poetry, Drama & Criticism > Plays & playscripts Five Plays: Ivanov, The Seagull, Uncle Vanya, Three Sisters, and The Cherry Orchard - Oxford World's Classics (Paperback) Anton Chekhov (author), Ronald Hingley (translator) This volume contains English translations of: Ivanov, The Seagull, Uncle Vanya, Three Sisters, and The Cherry Orchard, with a new Introduction by Ronald Hingley. ABOUT THE SERIES: For over 100 years Oxford World's Classics has made available the widest range of literature from around the globe. Each affordable volume reflects Oxford's commitment to scholarship, providing the most accurate text plus a wealth of other valuable features, including expert introductions by leading authorities, helpful notes to clarify the text, up-to-date bibliographies for further study, and much more. Much Ado About Nothing: The Oxford Shakespeare Deirdre Osborne The Playboy of the Western World J.M. Synge The Tempest: The Oxford Shakespeare Plays Unpleasant
{ "redpajama_set_name": "RedPajamaCommonCrawl" }
439
{"url":"https:\/\/www.physicsforums.com\/threads\/alternative-proof-to-show-any-integer-multiplied-with-0-is-0.735961\/","text":"# Alternative Proof to show any integer multiplied with 0 is 0\n\n1. ### Seydlitz\n\n263\nIn his book, Spivak did the proof by using the distributive property of integer. I am wondering if this, I think, simpler proof will also work. I want to show that ##a \\cdot 0 = 0## for all ##a## using only the very basic property (no negative multiplication yet).\n\nFor all ##a \\in \\mathbb{Z}##, ##a+0=a##.\n\nWe just multiply ##a## again to get ##a^2+(a \\cdot 0) = a^2##. Then it follows ##a \\cdot 0 = 0##. (I remove ##a^2## by adding the additive inverse of it on both side)\n\n2. ### jgens\n\n1,621\nThat is essentially the same proof as the one given in Spivak. I have no idea what simplification you think it affords.\n\n3. ### Seydlitz\n\n263\nI'm glad then that it's the same. Because I thought it's fallacious because I haven't showed if the integers are closed with multiplication, and Spivak's proof is the more appropriate one.\n\n4. ### jgens\n\n1,621\nClosure is not necessary in this argument.\n\n1 person likes this.\nKnow someone interested in this topic? Share a link to this question via email, Google+, Twitter, or Facebook\n\nHave something to add?\nDraft saved Draft deleted","date":"2015-04-27 17:14:55","metadata":"{\"extraction_info\": {\"found_math\": false, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.9890308976173401, \"perplexity\": 1775.7581011961574}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.3, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2015-18\/segments\/1429246659254.83\/warc\/CC-MAIN-20150417045739-00175-ip-10-235-10-82.ec2.internal.warc.gz\"}"}
null
null
Q: How to change "shipping information" label in magento while registration and checkout process I want to change "Billing Information" label text to "Shipping and Billing Information". I tried using Mage_Checkout.csv but this didn't help. Kindly suggest the solution! Thank you! A: Use the translation file translate.csv in your theme. For demonstration purposes, I will use the default theme in the default package (app/design/frontend/default/default). You may apply the steps below to your custom theme. How to change the label using the translation file: * *Open app/design/frontend/default/default/locale/en_US/translate.csv *Add a new line: "Billing Information","Shipping and Billing Information" *Verify that your Store View uses the correct locale ("en_US"). Log in to the Magento backend and navigate to System > Configuration > General > General > Tab "Locale Options". The "Locale" has to be set to "English (United States)" (either by directly setting it for the particular Store View or by inheriting from the Website / Default configuration). *Verify that your Store View uses the default/default directory. This can be set in System > Configuration > General > Design. By default, "default/default" is used. *Refresh or deactivate the cache. *Navigate to the checkout page. The label text now should be "Shipping and Billing Information". How to change the text only for Mage_Checkout texts: * *If you want to change "Billing Information" only in these places where the checkout translation helper is used, you can modify the line in translate.csv like this: "Mage_Checkout::Billing Information","Shipping and Billing Information"
{ "redpajama_set_name": "RedPajamaStackExchange" }
2,807
Powerhouse Performances Each of the weekend's three Grade 1 stakes races was won with a fast, powerful and dominant performance. Rail Trip and Gio Ponti assumed leadership of their older-male divisions in victory, and Game Face ran the race of her life to join the discussion of who the nation's best filly sprinter might be: Rail Trip's Hollywood Gold Cup victory was the breakout performance of the year among an otherwise subpar group of older main-track males. His three-length victory was good for a Beyer of 111, the highest of the year on a synthetic track and one which has been equalled in Grade 1 route company this year only by the 111's earned by Quality Road in the Florida Derby and Rachel Alexandra in the Mother Goose. Big figures often go hand-in-hand with perfect trips, and Rail Trip certainly had one: Sitting second behind the mild pace of a lone, likely-to-stop leader in Tres Borrachos. Still, it was a stronger and faster performance than any turned in this year in comparable races such as the Donn, Santa Anita Handicap, Met Mile or Stephen Foster. Gio Ponti joined Rachel Alexndra as the nation's only three-time Grade 1 winner this year with his victory in the Man o'War Saturday, where he was more impressive than his 1 3/4-length margin of victory over Musketier might suggest. Gio Ponti was wide on both turns and stuck behind a dawdling pace, but appears to have a push-button turn of foot and mowed down the leader when asked. He has now turned in sharp turf Beyers of 104 (Kilroe Mile), 107 (Manhattan) and 105 (Man o'War) while winning three straight Grade 1 races and moving up from 8 to 10 to 11 furlongs. Unless a legitimate Group 1 killer from Europe shows up in Chicago next month, he's the favorite for the Arlington Million. Game Face ran by far the fastest of the four graded stakes on Calder's Summit of Speed card Saturday, winning the G1 Princess Rooney by 6 3/4 lengths. Her time of 1:10.74 may look pedestrian, but not in comparison to those recorded in victory by First Passage (1:11.22 in the Azalea) and the males Eaton's Gift (1:11.25 in the Smile) and Not For Silver (111.91 in the Carry Back). Game Face's task was made easier by the scratch of Indian Blessing and the absence of Informed Decision, who still has to be considered the division's leader off two Grade 1 victories in Kentucky. Informed Decision skipped the Princess Rooney to stay on synthetics and run a week earlier in the Chicago Handicap at Arlington. ---There's a one-day $63,720 pick-6 carryover into Wednesday's card at Belmont, the second in three straight days where the Belmont finale was won by a very long longshot: Slick Wheelie ($97.00) on Friday, Skyebay ($96.50) on Saturday, and Kaz Dear ($55.00) on Sunday. The common thread? All three nightcaps were turf sprints. ---TicketMaker, the new tool in DRF Formulator that constructs multirace tickets based on your A-B-C designations, is now available as part of all Formulator cards and plans through the end of July. (After that, it becomes a part of Enhanced or Deluxe cards only.) Please let us know what you think of it and share any suggestions for improving it in future versions.
{ "redpajama_set_name": "RedPajamaCommonCrawl" }
2,458
Q: JavaScript PayPal Variable Price I'm working on a ecommerce-type plugin for my website and I'm using PayPal to deal with the transactions. So I followed the guide to create a "Buy Now" button on the website and I got the form that works great: <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id"> .... However I just have a question in terms of how I can tweak this plugin: I have variables that contain the price of the items on my website so something like var price1 = 10; and these variables automatically change themselves based on changes I make on my website. (I'm using Firebase as the backend for this). So I wanted to know if it was possible to have the prices for each item updated automatically on PayPal directly with JavaScript or some API (like Firebase or Parse). Thanks in advance :)
{ "redpajama_set_name": "RedPajamaStackExchange" }
8,579
Irish Channel 2818 Laurel St Returns With More Photos, Asking $799K By April Siese Oct 7, 2014, 1:15pm CDT 2818 Laurel St has certainly cleaned up its act. When we last caught up with the spacious three bedroom, its listing boasted "over 3,000 hours" of renovations and a seriously strange master bedroom selfie. Its asking price just ten months ago was $770K, though its appraised value was $100K lower. After removing 2818 Laurel St from the market in July, it returned just a month later asking $795K, followed by a $100K increase, before changing its price yet again to $799K. So, has this tumultuous listing changed much this year? Holy crap, there are the bathroom shots we asked for, along with some major changes — like the fact that this listing is now a two bedroom with four bathrooms total. Just because we asked to see y'all's bathroom doesn't mean we were expecting a reno straight out of the "Dear John" episode of Rocko's Modern Life. 2818 Laurel St still offers the same stellar, spacious amenities like a two car garage, massive yard, and rear building, though the latter needs renovation. Its owner has apparently also tacked on nearly every appliance you could ever need, including a wine cooler. And don't even get us started on the master bedroom — its 700+ square footage is bigger than some apartments. So, is 2818 Laurel St finally worth it? Only time, and an eager buyer, will tell. · For $770K, This Irish Channel 3-Bedroom Could Be All Yours [Curbed NOLA] · 2818 Laurel St [Trulia]
{ "redpajama_set_name": "RedPajamaCommonCrawl" }
8,343
<?php /** * Device design themes accordion block * * @category Mage * @package Mage_XmlConnect * @author Magento Core Team <core@magentocommerce.com> */ class Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design_Accordion_Themes extends Mage_XmlConnect_Block_Adminhtml_Mobile_Widget_Form { /** * Getter for accordion item title * * @return string */ public function getTitle() { return $this->__('Color Themes'); } /** * Getter for accordion item is open flag * * @return bool */ public function getIsOpen() { return true; } /** * Add theme field * * @return Mage_XmlConnect_Block_Adminhtml_Mobile_Widget_Form */ protected function _prepareForm() { $form = new Varien_Data_Form(); $fieldset = $form->addFieldset('field_colors', array()); $this->_addElementTypes($fieldset); $fieldset->addField('theme', 'theme', array( 'name' => 'theme', 'themes' => Mage::helper('xmlconnect/theme')->getAllThemes(), )); $form->setValues(Mage::helper('xmlconnect')->getApplication()->getFormData()); $this->setForm($form); return parent::_prepareForm(); } }
{ "redpajama_set_name": "RedPajamaGithub" }
683
## Inhaltsverzeichnis 1. Ägyptens Hochkultur 2. Vorwort 3. Ägypten 4. Stufenpyramide 5. Ägyptische Zahlschrift 6. Gizeh 7. Sphinx 8. Eindrücke von Ägypten 9. Rotes Meer 10. Nil 11. Schriftzeichen einer Kulturepoche 12. Landwirtschaft im alten Ägypten 13. Schlusswort 14. Impressum # Ägyptens Hochkultur Kultureinblicke von Alexander Paukner # Vorwort Sehr verehrter Leser, im folgenden e-Book möchte ich Ihnen einen Einblick, in die geschichtsträchtige Kultur von Ägypten geben. Sie werden einige Ausführungen, zu den Bauwerken und der Kultur dieses Landes erhalten und ich hoffe sehr, das ich Sie angenehm informiere. Die Kultur eines Landes ist auch immer eine Identifikation, ein Baustein auf welchen sich, die moderne Zivilisation begründet. In Ägypten findet man moderne und Geschichte in einer einzigartigen Weise vor. Nehmen Sie sich Zeit, das umfassende dieser Kultur auf sich wirken zu lassen. In besonderer Weise, spiegelt sich die Zeitgeschichte und das Wissen dieser Kultur, vor allem in seinen überdauernden Bauwerken wieder. Nicht zuletzt ist die Cheops Pyramide in Gizeh, das letzte erhaltene Bauwerk, der sieben Weltwunder der Antike. Dieses ist ein Beleg dafür, das die Zeitgeschichte ein wichtiger Bestandteil, dieses Landes ist. Die Strände und das Rote Meer, welches in Jahr Millionen verschwunden sein wird, weil sich die Erdplatten verschieben, ist ein Teil der Menschheitsgeschichte und die Wiege einer Hochkultur, die Jahrtausende alt ist. Ich wünsche Ihnen, ein angenehmes Lese Vergnügen und vielleicht bereisen Sie dieses wunderbare Land. Bei allen Ihren Vorhaben wünsche ich Ihnen alles Gute und danke Ihnen, das Sie sich für ein E-Book, von mir entschieden haben. # Ägypten Das Land Ägypten, liegt im nordöstlichen Afrika. Offiziell wird Ägypten als Arabische Republik Ägypten bezeichnet und hat über 87 Millionen Einwohner, auf einer Fläche von über einer Millionen Quadratkilometer. Überwiegend besteht das Land aus Wüste. Ungefähr 90% ist Wüstenlandschaft, im Vergleich zu Deutschland ist Ägypten sechs Mal so groß. Kairo ist die Hauptstadt dieses Afrikanischen Landes und eines der bevölkerungsreichsten Städte, der Erde. Ägypten hat als interkontinentaler Staat, eine Landbrücke vom größeren afrikanischen Teil nach Asien, den Sinai. Diese Halbinsel, wird im Allgemeinen zum asiatischen Kontinent gezählt. Durch die hohe Bevölkerungszahl, hat Ägypten eine enorme politische und kulturelle Ausstrahlung, in der arabischen und islamischen Welt. Aber auch in der Geschichte der Zivilisation der Menschheit, hatte es eine große Bedeutung, wovon viele Ausgrabungen und antike architektonische Sehenswürdigkeiten zeugen. In Ägypten entstand bereits um 3000 vor Christus, mit dem Alten Ägypten, eine der frühen Hochkulturen der Alten Welt. Vor allem das Land am Nil, erlebte nach der Pharaonen-Zeit eine wechselvolle Geschichte, von vielen Fremdherrschaften, bis es 1922 wieder seine Selbständigkeit erlangte. Aber auch jetzt endeten die Machtkämpfe um Ägypten nicht, sie gingen im Inneren weiter. Im 21.Jahrhundert erfassten die Proteste, des Arabischen Frühlings auch Ägypten, was 2012 abermals einen der in der Vergangenheit, häufigen Regierungswechsel erzeugte. Einige Grunddaten dieses Landes sind beispielsweise, das die Amtssprache Arabisch ist, die Staatsform ist eine Republik und das Regierungssystem, ist eine Militärregierung. Die übliche Währung dieses Landes, ist das Ägyptische Pfund. Um näher auf die Geographie dieses Landes einzugehen, sollte man wissen, das Ägyptens Territorium grob gesehen eine fast quadratische Form hat und sich an den nördlichen Wendekreis streift. Das Staatsgebiet lässt sich in sieben naturräumliche Einheiten untergliedern, beispielsweise Unterägypten nördlich von Kairo, die westlich des Nils gelegene Libysche Wüste, sowie die östlich des Nils gelegene Arabische Wüste. Auf der Sinai-Halbinsel, erhebt sich der Dschabal Katrina (Katharinenberg) der mit 2637 Meter der höchste Berg Ägyptens ist. Ein weiteres Bauwerk, das aus der Neuzeit Ägyptens stammt, ist der Sueskanal der 162 Kilometer lang ist und eine Verbindung zwischen Roten Meer und Mittelmeer darstellt. Ägypten liegt innerhalb des nordafrikanischen Trockengürtels und hat sehr wenig Niederschläge, sowie beträchtliche saisonale wie tägliche Temperaturschwankungen. In vielen Moscheen werden Regenschauer angebetet bzw. herbeigebetet, dieses ist im Glauben sehr weit verbreitet und die Gläubigen danken nach Regenschauern, für den erteilten Wassersegen. Die natürliche Vegetation ist wegen der geringen Niederschläge, wie auch der intensiven Agraischen Nutzung des Niltals stark eingeschränkt. Die Wüste ist fast völlig vegetationslos, vereinzelt wachsen Tamarisken, Akazien und Dornsträucher, in der Wüstensteppe auch Hartgräser. Entlang dem Nilufer gruppieren sich Nilakazien, Dattelpalmen und Johannisbrotbäume, sowie eingeführte Kasuarinen. Typisch für das Nil Delta sind Lotuspflaumen, Bambusrohr und Schilfgewächse. Leider gibt es mitlerweile, die im Altertum kultivierten Papyrusstauden kaum noch. In Ägypten sind ein Großteil der Bevölkerung etwa 91% , die Nachkommen der alten Ägypter. Im Süden beispielsweise sind etwa 140.000 Nubier ansässig, daneben gibt es etwa 70.000 arabische Beduinen, welche nomadisch in den Wüsten des Landes leben. Ferner leben in der Wüste östlich des Nils, auch Bedscha-sprachige Nomaden. Im Norden Ägyptens leben darüber hinaus auch Italiener, Türken, Abchasen und Briten. Die einst florierenden griechischen und jüdischen Gemeinden sind nahezu verschwunden, nur eine kleine Zahl verblieb in Ägypten, jedoch besuchen viele ägyptische Juden das Land für religiöse Ereignisse und für den Tourismus, noch heute finden sich in Kairo und Alexandria viele archäologische historische jüdische Stätten. Die Religionen die in Ägypten vorherrschen, setzten sich aus Muslime, Christen, Juden und anderen Religionsgemeinschaften zusammen. Aus den ersten Vordynastien in der Zeit bis 3150 v.Chr. entstanden das alte Reich 2216 v.Chr. das mittlere Reich um 1793 v.Chr. sowie das Neue Reich 1075 v. Chr. bis zur griechisch-römischen Zeit um 395 v.Chr. Um nur einige Zeit Epochen aufzuzählen. Ägypten war auch unter britischer Kontrolle. Insbesondere beim Bau des Sueskanals und der damit verbundenen Sueskrise, konnte nur mit Hilfe von Interventionen der UN, diese Krise beigelegt werden. Ägypten war in neuerer Zeit, etwa bei der Verstaatlichung der Sueskanal-Gesellschaft 1956, Ziel von militärischen Eingriffen Israels, Großbritanniens und Frankreichs. Um noch einen Einblick in die politischen Zusammenhänge zu geben, so ist das Parlament welches aus dem Rat des Volkes mit 454 Mitgliedern besteht und von denen 444 alle fünf Jahre gewählt werden, eine Form von Demokratie. Parteien sind beispielsweise die Freiheits- und Gerechtigkeitspartie (Muslimbrüder) sowie die einst regierende Nationaldemokratische Partei (NDP), die liberale Neue Wafd-Partei und der linke Ägyptische Block. Es gibt ebenfalls eine Sitzverteilung, die nächsten Parlamentswahlen sind für 2015 angesetzt. Die Streitkräfte Ägyptens werden als die stärkste Militärmacht auf dem afrikanischen Kontinent angesehen und rechtfertigen den Status einer Regionalmacht im Nahen Osten. Das Militärbudget (2010) betrug 2,4 Milliarden US-Dollar, wobei rund 1,3 Milliarden durch die Militärhilfe aus den USA finanziert wurde. Ägypten hat 27 Gouvernements, der jeweils im Ministerrang steht. Zu Ägyptens sozialer Lage kann man sagen, das alle Arbeitnehmer sozialversichert sind, es gibt Kranken-, Alters und Invalidenversicherungen, die jedoch nur geringe Grundabsicherungen übernehmen. In Ägypten herrscht allgemeine Schulpflicht. Das derzeitige Schulsystem wurde 1952 eingeführt. Die Zerrissenheit der politischen Landschaft, scheint wirtschaftliche Reformen zu verzögern. Somit ist die Wirtschaft und damit der Wohlstand dieses Landes, das einst eine Sozialistische Planwirtschaft hatte und ab den 1970er Jahren unter Präsident Anwar as-Sadat liberalisiert und nach Außen geöffnet wurde, auf Landwirtschaft und den Dienstleistungssektor im Großteil angewiesen. Im speziellen ist der Tourismus eine Einnahmequelle für die Bevölkerung, doch auch die Industrie, trägt ihren Beitrag zum Bruttoinlandsprodukt bei. Ägypten nimmt vom Pro-Kopf-Einkommen im afrikanischen Vergleich eine mittlere Position ein. Die landwirtschaftliche Nutzfläche, die rund 3% der Staatsfläche beträgt, ist auf das Niltal und das Nildelta, sowie einige Oasen begrenzt. Die Bauern bewirtschaften das Land mit teilweise jahrtausendealten Anbau- und Bewässerungsmethoden. Die Bewässerungsmethoden am Nil, wurden jedoch ab Ende des 19.Jahrhundets von Überschwemmungsbassins, auf eine ganzjährige Bewässerung durch Kanalisation umgestellt. Die ältesten Gewerbezweige in Ägypten sind die Verarbeitung von Baumwolle, Zucker und anderen Agrarprodukten. Später kamen Zement-, Düngemittel-, Eisen-, Stahl- und Aluminiumerzeugung, Elektro- und chemisch-pharmazeutische Industrie, Erdölverarbeitung sowie Maschinen- und Fahrzeugbau. Der bedeutendste Bodenschatz ist das Erdöl, das vor allem im Golf von Sues, in der Kattaransenke und auf der Sinai-Halbinsel gefördert wird. Die Außenhandel Bilanz ist schon seit Jahren defizitär. So hält Ägypten Außenhandelsbeziehungen beispielsweise mit Italien, USA, Vereinigtes Königreich, Deutschland und Spanien. Es werden Brennstoffe und technische Öle, sowie beispielsweise Nahrungsmittel exportiert. In der Kulturgeschichte von Ägypten die bis zu 6000 Jahre zurück reicht, findet man die ersten Zivilisationen und eine stabile Kultur die spätere Kulturen in Europa und im Nahen Osten beeinflussten. Im weiteren Kapiteln dieses Buches möchte ich Einblicke in das alte Ägypten vermitteln, sowie deren Kultur näher beleuchten. Ein wichtiger Aspekt ist mit Sicherheit der Nil, der in seinen Überschwemmungszeiten zur Fruchtbarkeit Ägyptens beigetragen hat. Aus diesen Zeiten stammt auch der Ausdruck, das Ägypten eine Kornkammer ist. Um auch das kulinarische hervorzuheben, ist es auch gut zu wissen, das die Weizenerzeugnisse dieses Landes einen sehr besonderen Geschmack haben und die Süßspeisen im speziellen das Gebäck, das wohl schmeckende ist, was man sich vorstellen kann. Mit allen diesen Fakten über dieses Land, lässt sich der persönliche Eindruck durch nichts ersetzen. Die Kultur von Jahrtausenden und dies auch noch gut erhalten, scheint die Zeiten zu überdauern und weiterhin Geschichte, zu erzählen und uns neue Rätsel aufzugeben. So wird die Kultur durch neue Ausgrabungen und Forschungen immer wieder erweitert und um einige Antworten bereichert. # Stufenpyramide Der Begriff Stufenpyramide bezeichnet ein pyramidenartiges Bauwerk, mit stufenförmiger Kubatur. Solche Bauten wurden in zahlreichen Kulturen, zu unterschiedlichen Zeiten entwickelt und gehen auf ganz unterschiedliche Vorbilder zurück. Sie dienten entweder als Tempel oder als Grabbau, wobei diese beiden Aspekte aber teilweise auch verschmelzen konnten. Die Ägyptischen Stufenpyramiden, beispielsweise die Djoser-Pyramide entstand um 2650 v.Chr. in Sakkara und ist die erste Stufenpyramide der Welt. Der Bau war ursprünglich als quadratische Mastaba geplant, wurde dann aber in mehreren Bauphasen, zu einer vierstufigen und schließlich zu einer sechsstufigen, rechteckigen Pyramide erweitert. Mit Snofru setzte eine Wende im Pyramidenbau ein, so wurde nach der ersten Pyramide in Meidum zunächst als Stufenpyramide, die königlichen Grabbauten von nun an mit einer glatten Fassade versehen. Die letzten in Ägypten errichteten Stufenpyramiden, sind die beiden Königinnenpyramiden, die Pharao Mykerinos neben seinem eigenen Grabmal errichten ließ, sowie die Neferirkare-Pyramide, die in ihrer ersten Bauphase als Stufenpyramide erbaut und später umgebaut wurde. # Ägyptische Zahlschrift Die ägyptische Zahlschrift ist seit Anfang des 3.Jahrhundert v. Chr. eine bezeugende hieroglyphische Zahlschrift. Mit dieser Form der Schrift, die zumeist auch in Stein gehauen wurde beispielsweise in der Tempelanlage in Luxor zu finden, wurden positive rationale Zahlen additiv geschrieben. In ihrer Weiterentwicklung, zur hieratischen Zahlschrift traten ab Mitte des 3.Jahrtausend an die Stelle dieser Zahlenhieroglyphen hieratische Kursivzeichen, mit einer Vereinfachung des Prinzips additiver Zeichenwiederholung. Nachfolgend sehen sie bis heute erhaltene Zahlenschriften, aus dem alten Ägypten. Die Ägypter benutzten ein dezimales Zahlensystem, in dem es für jede Zehnerpotenz von 1 bis 1.000.000 ein eigenes Zeichen gab. Eine beliebige natürliche Zahl schrieb man mit möglichst großen, der Größe nach geordneten Zehnerpotenzen, die man jeweils so oft angab, bis man mit deren Gesamtsumme die Zahl erhielt. Die Aussprache der Zahlen kann heute nur teilweise rekonstruiert werden, da in Inschriften meist nur die Zahlzeichen erscheinen, so ist nicht mit Sicherheit bekannt wie Zehner und Einer kombiniert ausgesprochen wurden. Die wichtigsten Zahlen lauten: wa 1; senu 2; chemet 3; fedu 4; diu 5; seresu 6; sefech 7; chemenu 8; pesedj 9; medj 10; schet 100. Um die Division vollständig durchführen zu können, verwendeten die Ägypter gemeine Brüche natürlicher Zahlen, die sie durch Summen von Stammbrüchen, d.h. Brüche mit dem Zähler 1, sowie vom Bruch 2/3 darstellten. Die Brüche gingen ursprünglich auf kleinere Maßeinheiten zurück. Stammbrüche mit Zweierpotenzen von 2 bis 64 im Nenner konnten als Elemente des Udjat Auges geschrieben werden. Die einzelnen Teile des Udjat-Auges entsprachen auch den jeweiligen Bruchteilen des ägyptischen Scheffels (Heqat, ca. 4,8 Liter). Ihre Summe ergibt 63/64, das fehlende 1/64 ließ angeblich der Gott Thot verschwinden. Zur Vereinfachung der Bruchrechnung legten die Ägypter Tabellen von Stammbruchzerlegungen allgemeiner Brüche an und benutzten Hilfszahlen, die den Zählern der heutigen Bruchrechnung entsprachen. Für den alltäglichen Gebrauch waren die Hieroglyphen jedoch zu umständlich zu schreiben, so trat neben sie schon ab Mitte des 3.Jahrtausends als ihre vereinfachte Form, die hieratische Schrift. Durch den Wegfall der Zeichenwiederholung ließ sich auf diese Weise, eine vierstellige Zahl als Folge von maximal vier hieratischen Zahlenzeichen statt maximal 36 hieroglyphischen Zeichen schreiben. Ab der Mitte des 7. Jahrhunderts v.Chr. fand eine weitere Vereinfachung zur demotischen Schrift statt. In Gebrauch blieben die hieratischen und die demotischen Zahlenzeichen, bis sie in hellenistischer Zeit, durch die griechischen Zahlen abgelöst wurden. # Gizeh Gizeh ist mit 3,3 Millionen Einwohnern, die drittgrößte Stadt Ägyptens und Hauptstadt des Gouvernements al-Dschiza (el-Giza). Sie bildet mit Kairo eine Metropolregion mit über 16 Millionen Einwohnern. Gizeh liegt am Westufer des Nils, etwa 20 Kilometer südwestlich der Innenstadt Kairos. Das Siedlungsgebiet beider Städte, geht unmittelbar ineinander über. Bekannt ist die Stadt für das Gizeh-Plateau, mit seinen altägyptischen Königsgräbern, Pyramiden und Tempeln, einschließlich der Sphinx und der Großen Pyramide von Gizeh auch Cheops-Pyramide genannt. Bemerkenswert ist, das die Cheops-Pyramide über der Stadt Kairo liegt bzw. inmitten eines Plateau. Ihr zu Füssen findet man die Sphinx, die als Wächter für dieses Bauwerk fungiert. Als die Cheops-Pyramide fertiggestellt wurde, war diese außen glatt und erstrahlte in heller weißer Farbe. Das Bauwerk ist eines der sieben Weltwunder der Antike und war zu seiner Zeit, das höchste gebaute Bauwerk. Bis heute ranken sich Spekulationen, über die Bauweise der alten Ägypter, im speziellen über die Bewältigung des Transportes der Steinquader. Ein Beleg für die Bauweise der alten Ägypter möchte ich Ihnen im folgenden Bild verdeutlichen. Mit einer erhaltenen Baulichen Konstruktion (Lehm-Rampe), aus dem alten Ägypten, diese findet man in Luxor und Sie könnte ein Beleg für die Bauweise der Ägypter sein. So sehen Sie eine Art Rampe wie sie die Ägypter verwendeten um Steine zu schichten. Dieses Bild stammt von der Tempelanlage in Luxor und zeigt einen unvollendeten Turm, der demnach von einem der letzten Pharaonen des alten Ägypten errichtet wurde. Seit dem 27. Juni 1989 ist Los Angeles in den Vereinigten Staaten eine Partnerstadt von Gizeh. Weitere Partnerstädte sind Rinkeby in Schweden und Bandar Seri Begawan in Brunei. Das wirklich beeindruckende an Gizeh ist, das sich die Pyramiden über Kairo erheben und wenn man sie bestaunen darf so ist es, als blicken tausende Jahre auf einen herab. Die Ägypter haben den Boden und somit das Plateu so ausgewählt, das dieses in ein bestimmtes Sternenbild passt. Auch sind die verzweigten Gänge im inneren der Pyramide Bestandteil von Sagen und Legenden, um die Menschheitsgeschichte. In vielerlei Hinsicht wurde mit diesem Bauwerk Geschichte gebaut und für die Ewigkeit erhalten. Um das Leben nach dem Tod für den Pharao, so angenehm wie möglich zu gestalten, wurden Grabbeigaben vorgenommen. So herrschte der Pharao für sein Volk im Jenseits weiter und sorgte im Totenreich für das wohl seiner Untertanen. Der Weg in das Totenreich, war der wichtigste Weg den ein Pharao zu gehen hatte und somit war die Bedeutung von Grabstätten eine andauernde ewigliche Sinnmäßigkeit im alten Ägypten. Auch sind die Grabstätten und somit die Todtenkammern, durch ein ausgeklügeltes System, vor Grabräubern geschützt worden. Um die Pyramide auf einer Ebene bauen zu können, bediente man sich eines Wassergrabens, aus welchen man am Wasserstand ablesen konnte, ob eine Ebene Fläche vorhanden war. Die Ägypter bauten für die Ewigkeit und dies mit Steinquadern und mit Hilfe der Mathematik. Flächenberechnungen und Statik fanden schon tausend Jahre vor Christus, seinen Ursprung in Ägypten. Auch die damaligen Arbeitsbedingungen eines solchen Bauwerkes sind Geschichtsträchtig. So sind die Arbeiter mit allem versorgt worden, um Höchstleistungen zu vollbringen. Ärztliche Versorgung war schon damals gewährleistet. Auch lässt sich aus Funden von Siedlungen rund um die Bauwerke ableiten, das Generationen an solchen Bauwerken gearbeitet haben und das bereits in dieser Zeitepoche komplexe Arbeitsregelungen vorhanden waren. Sehen Sie nun Eindrücke aus Gizeh, das mit seiner tausendjährigen Geschichte ein Stück Weltgeschichte ist. Gizeh hat genau wie Kairo eine überproportionale Bevölkerungszunahme zu bewältigen. Lange Zeit hat man den wilden Slumbildungen am Rande der Stadt tatenlos zugesehen, bis die Bedrängung der antiken Pyramiden eine Umkehr erzwang. Das wüstenhafte Umfeld um die Pyramiden, ist heute vor weiterer Besiedlung geschützt, dafür hat man einige Kilometer nördlich ein über hundert Quadratkilometer großes Neubaugebiet mit dem Namen Stadt des 6.Oktobers ausgewiesen, das die Vollbelegung für über eine Million Einwohner Raum bietet. Gizeh ist an die zahlreichen Straßenverbindungen und Eisenbahnlinien entlang des Nils angebunden. So wäre noch zu erwähnen, das in Ägyptens Hauptstadt Kairo sechs Spurige Autobahnen, durch die Stadt führen und der Verkehr meist stockend läuft, auf Grund der vielen Autos, die zumeist den hohen Temperaturen ausgesetzt sind. Gerade wenn man durch Wüstenstrecken fährt und stundenlang keine Anhalte Möglichkeit hat, ist man bei einer Autopanne meist auf sich allein gestellt. Deshalb immer mit Reiseführern Ausflüge unternehmen. Es ist sehr wichtig Ortskenntnisse zu haben und immer ausreichend Wasser bei sich zu führen. Ägypten besteht zum Großteil aus Wüsten und längeren bebauten Wüstenstrecken, die die einzelnen Städte verbinden. Im großen und ganzen ist die Wasserversorgung in Ägypten auf Grund des fehlen von Trinkwasser darauf ausgerichtet, das sich die Bevölkerung mit gekauften Wasserflaschen versorgen muss um kochen zu können. Das Klima im allgemeinen ist in manchen Gegenden so gestaltet, das es in gewissen Gegenden in Ägypten seit Jahren nicht mehr geregnet hat. Wenn Regen fällt, dann nur kurz und dieses wird in Gebeten in Moscheen herbeigesehnt. Landestypisch ist es auch das mehrmals am Tag durch Lautsprecher gebetet wird. So sind 90% der Einwohner Ägyptens bekennende Muslime. In Ägypten nennt sich dies sunnitischer Islam. Traditionell ist das Freitagsgebet, bei welchem die Arbeit niedergelegt wird und in den zahlreichen Moscheen gebetet wird. # Sphinx Eine ägyptische Sphinx ist eine Statue eines männlichen Löwen zumeist mit einem Menschen Kopf. Daneben waren auch Widder-, Falken- und Sperberköpfe gebräuchlich. Am bekanntesten ist die Große Sphinx von Gizeh. Bei anderen Völkern des Altertums wurden ähnliche Mischwesen dargestellt, so bei den Phönikern, Hethitern, Assyrern und insbesondere bei den Griechen. Das Wort Sphinx kommt möglicherweise vom griechischen sphingo. Im Altägyptischen bedeutet schesep auch "lebendiges Abbild" oder im ägyptischen spanch "das, was das Leben empfängt". Grundsätzlich ist in der Grammatik das grammatische Geschlecht (Genus) vom natürlichen Geschlecht (Sexus) zu unterscheiden, beispielsweise kann auch ein maskulines ("männliches") Wort ein weibliches Wesen bezeichnen. Sphinx war bei den Griechen ursprünglich der Name der Tochter von Typhon und Echidna. Später wurde Sphinx als eigenständiges Substantiv mit femininem ("weiblichen") Geschlecht gebraucht. Es ist ebenfalls ein Stück Ägyptische Geschichte, das die einzelnen Skulpturen aus den einzelnen Zeit Epochen geschlechtlos dargestellt wurden. So lässt sich im Ägyptischen Museum in Kairo eine Vielzahl von Statuen erkennen, in welchen das Geschlecht nicht zugeordnet werden kann. Einen Beleg hierfür findet man auch in der Tempelanlage von Luxor, welche die älteste bekannte Hauptstadt der Weltgeschichte war. In der Jahrtausende alten Geschichte der Ägypter, ist die Tempelanlage Luxor (Karnak-Tempel) ein umfassendes Gesamtbauwerk, welches die unterschiedlichen Dynastien, der Ägyptischen Herrschaft beinhaltet. Im Karnak-Tempel findet man noch eine Reihe von Widder-Sphingen vor, welche die Ägypter auch "Hu" nannten. Der heutige Name basiert auf der Legende der griechischen Sphinx, die vorbeikommende Reisende stets erwürgte, wenn diese das von ihr gestellte Rätsel nicht lösen konnten. Die berühmteste Sphinx ist die 20 Meter hohe und 73,5 Meter lange Große Sphinx von Gizeh, die am Westufer des Nils errichtet wurde. Wann und von wem die Sphinx von Gizeh errichtet wurde, ist auch heute noch ein Rätsel. Die gängigste Meinung ist, dass die Sphinx in der 4.Dynastie, ca. 2700 - 2600 v.Chr. entweder von Pharao Cheops oder dessen Sohn Chephren gebaut wurde, wobei Cheops favorisiert wird. Diese These stützt sich auf die Erwähnung ihrer Namen auf einer Steinplatte, welche zwischen den Vorderpfoten der Sphinx gefunden wurde. In weiteren Erwägungen zum Bau der Sphinx wird ebenfalls vermutet, das es sich um einen riesigen Steinquader handelte, den man die Form einer Sphinx gab. Es gibt auch Vermutungen, in welchen die Errichtung der Sphinx, in das Jahr 10.500 v. Chr. vordatiert wurde, jedoch wird dies von Ägyptologen in aller Regel zurückgewiesen. In vielerlei Hinsicht, ist die Sphinx als Wächter des Plateu mit der Cheops-Pyramide zu sehen und in mancher Anschauung, wird dies auch so verstanden. Jedoch ist es die Geschichte, die uns lehrt neues zu entdecken und Rätsel der Zeit zu lösen. So waren es die Sabier, eine um das 12. Jahrhundert untergegangene Religionsgemeinschaft, die den Kopf der Sphinx angebetet hatte. Jedoch verschwand beginnend mit der islamischen Zeit im 7.Jahrhundert, das Verständnis für die pharaonische Gedankenwelt. So wurden Geschichten um die muslimischen Propheten, zum Mittelpunkt der Traditionen. Die Kultur der Totenbücher die Rieten der Balsamierung und die Wiederkehr ins Jenseits sind alles Bestandteil der Pharaonischen Gedankenwelt gewesen. Auch die Anbetung der Sonne und vielerlei weitere Aspekte aus dem Tempelkult, sind Geschichtsverständnisse aus der Pharaonenzeit und somit der herrschenden Dynastien gewesen. # Eindrücke von Ägypten Ägyptisches Museum in Kairo Abu Simbel, das seit 1979 auf der Weltkulturerbeliste der UNESCO steht. Als Erinnerung an Nefertari und dessen große königliche Gemahlin. Sie erheben sich heute, nach der Versetzung in den 1960er Jahren, auf einer Insel im Nassersee. Das heute griechisch-orthodoxe Katharinenkloster im Sinai in Ägypten, wurde zwischen 548 und 565 gegründet und ist das älteste immer noch bewohnte Kloster des Christentums. Es liegt am Fuße des Berg Sinai (Mosesberg). Hier befand sich der Überlieferung nach, der brennende Dornbusch, in dem sich Gott Mose offenbarte. Ein Obilisk ist ein freistehender, hoher, sich nach oben verjüngender monolithischer Steinpfeiler (Stele), der eine pyramidenförmige Spitze hat. Ägyptologen bezeichnen Obiliken auch als Tehen-Pfeiler. Obilisken haben ein Gewicht bis zu 500 Tonnen und wurden meißt aus einem einzigen Stein herausgehauen. Für die Verarbeitung und Aufstellung solcher riesigen Steinpfeiler verwendeten die Ägypter, Flaschenzüge und Holzkeile. Die Beschriftung mit Hieroglyphen erfolgte meißt zu Ehren von Pharaonen. Auf Obilisken lassen sich auch Königskartuschen finden, in welchen ausschließlich Thronnamen und Eigennamen eines Königs eingeschrieben wurden. Hervorgegangen ist die Kartusche aus dem Schen-Ring, der für ewig währenden Schutz stand. Dieses Schriftzeichen, war bereits während der 1.Dynastie von "König Den" in Gebrauch. Eine Tempelbauanlage in Ägypten. # Rotes Meer Das Rote Meer ist einfach wunderbar. Es hat eine sehr hohe Artenvielfalt. Das Rote Meer bedeutet, übersetzt Erythraeisches Meer, in der römischen Antike wurde es unter diesem Namen bekannt. Bei der Namensgebung, wurden Himmelsrichtungen in Verbindung mit Ihrer Bedeutung als Farbe verwendet. So steht "Südsee" für Rotes Meer. Während beispielsweise die "Nordsee" , als "Schwarzes Meer" bezeichnet wird. Seinen jetzigen Zustand erreichte das Rote Meer, erst vor 5000 Jahren. Beim Roten Meer handelt es sich um ein Nebenmeer, des Indischen Ozeans. Das Meer ist 2604 Meter tief und 2240 Kilometer lang. Der Rauminhalt des Meeres beträgt 200.000 km³, die Oberfläche etwa 438.000 km² bei einer durchschnittlichen Wassertiefe von 538m. Um Ihnen einige Fisch Arten zu nennen, so findet man im Roten Meer z.B. Igelfische, Kugelfische, Spinner-Delfin, Muränen und natürlich viele Variationen von Muscheln. Korallenriffe bedürfen unser aller Unterstützung, deshalb sollte die Natur geachtet und respektiert werden und am besten so naturbelassen angesehen werden, wie möglich. Beim Schnorcheln findet man einen guten Ausgleich zur Kultur und kann die Unterwasserwelt betrachten, die stets eine Überraschung bereit hält. # Nil Der Nil ist die Lebensader von Ägypten. Er bescherte den Ägyptern immer reichlich Ernte, wenn er über die Ufer trat. In Luxor ist der Nil einen Kilometer breit. Die Bauern betreiben an seinen Ufern Landwirtschaft. So findet man viele Plantagen mit Weizen am Ufer entlang. Ägypten ist immer eine Reise wert. Vor allem die Kultur ist beeindruckend. Sehr alt und bestens erhalten. Eine Reise nach Kairo ist auch empfehlenswert, um die Pyramiden zu sehen. Auch ist das Ägyptische Museum, immer einen Ausflug wert. Die Märkte in Kairo sind wunderbar und exotisch. Lassen sie sich von diesem Land verzaubern und auf eine Kultur Reise nehmen. In Ägypten ist Kultur Geschichte und Gegenwart zugleich, das macht es so interessant. Der Nil ist übrigens mit 6852 Kilometern Länge vor dem Amazonas, der längste Fluss der Erde. Vom Victoriasee aus verbleiben noch rund 5960 Kilometer Fließweg, von Khartum, wo der Blaue Nil in den Weißen Nil fließt, rund 3090 Kilometer und von der Landesgrenze von Sudan/Ägypten bis zur Mündung noch rund 1510 Kilometer. Der Nil entspringt in den Bergen von Ruanda und Burundi, durchfließt dann Tansania, Uganda den Südsudan und den Sudan, bevor er in Ägypten in das Mittelmeer mündet. Der Nil erhält das meiste Wasser, aus den wechselfeuchten Tropen Ostafrikas und zu einem geringen Teil, aus dem immerfeuchten Tropen Mittelafrikas und durchquert dann als einziger Fluss der Erde vollständig einen der beiden subtropischen Trockengürtel, der hier zudem die größte Wüste der Erde, die Sahara, hervorgebracht hat. Die besonderen Eigenheiten des Flusses ließen an seinen Ufern, eine der frühesten Hochkulturen entstehen. Auch heute noch ist der Nil für Ägypten, von entscheidender wirtschaftlicher Bedeutung. # Schriftzeichen einer Kulturepoche Die Hieroglyphen Schrift ist eine unspezifische Bezeichnung für Schriften, welche sich aus Zeichen von schematischen Bildern zusammensetzen. Sehen Sie nun einige Bilder von Hieroglyphen. Unter anderem sind diese Zeichen auch in Stein gehauen. Sie schildern beispielsweise Ereignisse wieder, oder verherrlichen die Herrschaft eines Pharaos. In der Antike erfüllte Papyrus eine ähnliche Funktion wie heute Papier. Papyrus wurde aus der Papyruspflanze hergestellt. Die zur Gattung der Zypergräser gehört. Diese Pflanzen wurden bis zu 3 Meter hoch. Die Herstellung des Beschreibstoffs Payrus beschreibt im 1 Jahrhundert n. Chr. Plinius der Ältere im 13. Buch seiner Naturgeschichte. Das Mark des Pflanzenstängels wird in bis zu 4 Zentimeter breite Streifen geschnitten, die leicht überlappend aneinandergelegt werden. Zwei einander kreuzweise überlagernde Schichten dieser Streifen, werden zu einem festen Blatt gepresst und geklopft, das von der Klebekraft des stärkehaltigen Pflanzensafts zusammengehalten wird. Dann wird die "Platte" getrocknet. Danach kann man den Papyrus bemalen oder beschreiben. Auf folgenden Bild sehen sie den Säulentempel vom Karnak-Tempel in Luxor. Die Inschriften sind tausende Jahre alt, jedoch sind diese bis zum heutigen Tag farbig. Hierfür verwendeten die Ägypter verschiedende farbige Steine, welche sie mit anderen Flüssigkeiten vermengten. So erhielten sie Farben, die sie mehrmals auf den Stein auftrugen und welcher bis heute, in dieser Ausdrucksstärke erkennbar sind. # Landwirtschaft im alten Ägypten Auf den fruchtbaren Böden des Niltals wurden hauptsächlich Getreidearten, wie Gerste und Emmerweizen angebaut und noch in nachchristlicher Zeit galt Ägypten als Kornkammer des römischen Reiches. Mitte Oktober bis Anfang November erfolgte die Aussaat. In den Monaten April/ bis Mai holte man dann die Ernte ein und lagerte diese in Speichern. Schreiber führten Buch über den erwirtschafteten Ertrag und die Beträge für Emmerweizen wurden mit roter Tinte notiert, die für Gerste mit schwarzer Tinte. Außerdem gab es noch Anbauflächen, die eine intensive Gartenwirtschaft ermöglichten. Diese Gärten wurden durch Kanäle schachbrettartig bewässert und verschiedene Sorten von Obst und Gemüse z.B. Zwiebeln, Lauch, Knoblauch sowie verschiedene Gewürze wie Kümmel und Koriander und ölhaltige Gewächse wie Sesam wurden hier angebaut. Der fruchtbare Schlamm des Nils, ermöglichte diese reichen Ernten. Überall im Land gab es Kanäle und Brunnen, und bereits während der 3.Dynastie wurde bei Memphis eine erste größere Talsperre errichtet, um den Abfluss des Hochwassers zu verlangsamen. Dieser Damm wies einst eine Länge von 106 Metern und eine Höhe von 11 Metern auf und kann heute noch nachgewiesen werden. In die Natur wurde stets behutsam eingegriffen, um ökologische Katastrophen zu vermeiden. # Schlusswort Lieber Leser ich danke Ihnen für Ihre Zeit und möchte gerne mit folgenden Worten dieses Buch beschließen. "Es ist der Spiegel der Zeit, in welchen man blickt. Für Momente geweiht in Schönheit, so weit man blicken mag. Ist Staunen, Ehrfurcht ein Stein gemaltes Meer, das ewig seine Gründe schöpft aus wahrhaftigen Zeiten." Ein Land mit dieser Vielfältigen Kultur, schöpft noch heute aus den Quellen der Zeit, welche geblieben sind und ich muss ehrlich sagen, das die Faszination Ägypten lebt. © 2015 Alexander Paukner Alle Rechte vorbehalten. ISBN: 9783735732767 Herstellung und Verlag: BoD - Books on Demand, Norderstedt
{ "redpajama_set_name": "RedPajamaBook" }
8,500
package main import ( "fmt" "os" "time" "github.com/bndr/gopencils" "github.com/briandowns/spinner" "github.com/codegangsta/cli" "github.com/kennygrant/sanitize" "github.com/mgutz/ansi" ) // Struct to hold target proces entity data type entityStruct struct { Id int Name string Description string StartDate string EndDate string CreateDate string ResourceType string Effort float32 Iteration struct { Id int Name string } Release struct { Id int Name string } Team struct { Id int Name string } EntityState struct { Id int Name string } } // Ansi console decorators var errorDecorator = ansi.ColorFunc("white:red") var worningDecorator = ansi.ColorFunc("black:yellow") var boldDecorator = ansi.ColorFunc("white+b") var preloader = spinner.New(spinner.CharSets[9], 100*time.Millisecond) // Get entity data from target process RESTful service func getEntity(id string, username string, password string, url string, entityType string, resp *entityStruct) (*entityStruct, error) { auth := gopencils.BasicAuth{Username: username, Password: password} api := gopencils.Api(url, &auth) querystring := map[string]string{"format": "json"} preloader.Prefix = "Fetching data:" preloader.Start() _, err := api.Res(entityType, resp).Id(id).Get(querystring) preloader.Stop() return resp, err } // Check if username and password flags are provided or env variables exist func checkGlobalFlags(c *cli.Context) { if c.GlobalString("username") == "" || c.GlobalString("password") == "" || c.GlobalString("url") == "" { fmt.Println(errorDecorator("Please provide username, password and url flags!")) os.Exit(0) } } func displayEntity(entity *entityStruct, err error, template string) { // If there is error in response display error if err != nil { fmt.Println(errorDecorator(err.Error())) os.Exit(0) } // If there is no entity data display No entity message if entity.Id == 0 { fmt.Println(worningDecorator("Entity not found!")) os.Exit(0) } // Display appropriate entity template switch template { case "s": fmt.Println(boldDecorator(entity.Name)) fmt.Println(entity.ResourceType, " | ", entity.Effort, "p", " | ", entity.EntityState.Name) case "m": { fmt.Println(boldDecorator(entity.Name)) fmt.Println(entity.ResourceType, " | ", entity.Effort, "p", " | ", entity.EntityState.Name) } case "l": { fmt.Println(boldDecorator(entity.Name), " | ", entity.Iteration.Name) fmt.Println(entity.ResourceType, " | ", entity.Effort, "p", " | ", entity.EntityState.Name) fmt.Println(sanitize.HTML(entity.Description)) } } } func main() { // Define cli app app := cli.NewApp() app.Name = "Target Process cli tool" app.Author = "Ivan Padavic @ipadavic" app.Version = "0.1.0" // Define app flags app.Flags = []cli.Flag{ cli.StringFlag{ Name: "username, u", Usage: "Username for target process Basic Auth", EnvVar: "TPCLI_USERNAME", }, cli.StringFlag{ Name: "password, p", Usage: "Password for target process Basic Auth", EnvVar: "TPCLI_PASSWORD", }, cli.StringFlag{ Name: "url", Usage: "Base url for your target process app rest api (custom or tpondemand)", EnvVar: "TPCLI_URL", }, } // Define response holder response := &entityStruct{} commandsTemplateFlag := []cli.Flag{ cli.StringFlag{ Name: "template, t", Usage: "Template for displaying entity data [s, m, l]", Value: "s", }, } app.Commands = []cli.Command{ { Name: "bug", Aliases: []string{"b"}, Usage: "Get bug information", Flags: commandsTemplateFlag, Action: func(c *cli.Context) { checkGlobalFlags(c) resp, err := getEntity( c.Args().First(), c.GlobalString("username"), c.GlobalString("password"), c.GlobalString("url"), "Bugs", response) displayEntity(resp, err, c.String("template")) }, }, { Name: "story", Aliases: []string{"s"}, Usage: "Get user story information", Flags: commandsTemplateFlag, Action: func(c *cli.Context) { checkGlobalFlags(c) resp, err := getEntity( c.Args().First(), c.GlobalString("username"), c.GlobalString("password"), c.GlobalString("url"), "UserStories", response) displayEntity(resp, err, c.String("template")) }, }, { Name: "task", Aliases: []string{"t"}, Usage: "Get task information", Flags: commandsTemplateFlag, Action: func(c *cli.Context) { checkGlobalFlags(c) resp, err := getEntity( c.Args().First(), c.GlobalString("username"), c.GlobalString("password"), c.GlobalString("url"), "Tasks", response) displayEntity(resp, err, c.String("template")) }, }, } app.Run(os.Args) }
{ "redpajama_set_name": "RedPajamaGithub" }
447
{"url":"https:\/\/socratic.org\/questions\/an-equilibrium-mixture-in-a-vessel-of-capacity-of-100l-contains-1mol-of-n-2-2mol","text":"# An equilibrium mixture in a vessel of capacity \"100 L\" contains 1 mole of \"N\"_2, 2 moles of \"O\"_2, and 3 of \"NO\". No.of moles of \"O\"_2 to be added so that, at new equilibrium, the concentration of \"NO\" is found to be \"0.04 mol\/L\"?\n\nJan 14, 2018\n\n$\\frac{101}{18}$ ${\\text{moles O}}_{2}$\n\n#### Explanation:\n\nThe first thing that you need to do here is to calculate the equilibrium constant of the reaction at this particular temperature.\n\nYou know that\n\n${\\text{O\"_ (2(g)) + \"N\"_ (2(g)) rightleftharpoons 2\"NO}}_{2 \\left(g\\right)}$\n\nFor this reaction, the equilibrium constant, ${K}_{c}$, is equal to\n\n${K}_{c} = \\left(\\left[{\\text{NO\"]^2)\/([\"O\"_2] * [\"N}}_{2}\\right]\\right)$\n\nThe equilibrium concentrations of the three chemical species will be\n\n[\"O\"_2] = \"2 moles\"\/\"100 L\" = \"0.02 M\"\n\n[\"N\"_2] = \"1 mole\"\/\"100 L\" = \"0.01 M\"\n\n[\"NO\"] = \"3 moles\"\/\"100 L\" = \"0.03 M\"\n\nThis means that you have--I'll leave the expression of the equilibrium constant without added units!\n\n${K}_{c} = {\\left(0.03\\right)}^{2} \/ \\left(0.02 \\cdot 0.01\\right)$\n\n${K}_{c} = \\frac{{3}^{2} \\cdot \\textcolor{red}{\\cancel{\\textcolor{b l a c k}{\\frac{1}{100} ^ 2}}}}{{2}^{2} \\cdot \\textcolor{red}{\\cancel{\\textcolor{b l a c k}{\\frac{1}{100}}}} \\cdot 1 \\cdot \\textcolor{red}{\\cancel{\\textcolor{b l a c k}{\\frac{1}{100}}}}}$\n\n${K}_{c} = \\frac{9}{2}$\n\nNow, you know that after some oxygen gas is added to the reaction vessel, the equilibrium concentration of nitrogen oxide is equal to\n\n[\"NO\"]_\"new\" = \"0.04 M\"\n\nThe balanced chemical equation tells you that in order for the reaction to produce $1$ mole of nitrogen oxide, it must consume $\\frac{1}{2}$ moles of oxygen gas and $\\frac{1}{2}$ moles of nitrogen gas.\n\nThis means that in order for the concentration of nitrogen oxide to increase by\n\n$\\text{0.04 M \" - \" 0.03 M\" = \"0.01 M}$\n\nthe concentrations of nitrogen gas and of oxygen gas must decrease by $\\frac{1}{2} \\cdot \\text{0.01 M}$. Since you didn't add any nitrogen gas to the reaction vessel, you can say that the new equilibrium concentration of nitrogen gas will be\n\n[\"N\"_ 2]_ \"new\" = [\"N\"_ 2] - 1\/2 * \"0.01 M\"\n\n[\"N\"_ 2]_ \"new\" = \"0.01 M\" - 1\/2 * \"0.01 M\"\n\n[\"N\"_ 2]_ \"new\" = \"0.005 M\"\n\nNext, use the expression of the equilibrium constant to find the new equilibrium concentration of oxygen gas\n\n$\\left[\\text{O\"_ 2]_ \"new\" = ([\"NO\"]_ \"new\"^2)\/(K_c * [\"N\"_ 2]_ \"new}\\right)$\n\n[\"O\"_ 2]_ \"new\" = (0.04)^2\/(9\/2 * 0.005) = 16\/225\n\nThis means that, when the new equilibrium is established, you have\n\n[\"O\"_ 2]_ \"new\" = 16\/225 quad \"M\"\n\nUse the fact that in order for the new equilibrium to be established, the reaction consumed $\\frac{1}{2} \\cdot \\text{0.01 M}$ of oxygen gas to find the concentration of oxygen gas after you increased the number of moles of this reactant,\n\n[\"O\"_ 2]_\"increased\" = 16\/225 quad \"M\" + 1\/2 * \"0.01 M\"\n\n[\"O\"_ 2]_ \"increased\" = 137\/1800 quad \"M\"\n\nThis means that the concentration of oxygen gas increased by\n\nDelta_( [\"O\"_ 2]) = 137\/1800 quad \"M\" - \"0.02 M\"\n\nDelta_ ([\"O\"_ 2]) = 101\/1800 quad \"M\"\n\nFinally, to find the number of moles of oxygen gas added to the reaction vessel, use the volume of the vessel\n\n100 color(red)(cancel(color(black)(\"L\"))) * (101\/1800 quad \"moles O\"_2)\/(1color(red)(cancel(color(black)(\"L\")))) = 101\/18 quad \"moles O\"_2\n\nYou should round this off to one significant figure to get\n\n$\\text{moles of O\"_2 ~~ \"6 moles}$\n\nbut I'll leave the answer in fraction form.","date":"2019-12-13 05:55:04","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 30, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 1, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.6112242341041565, \"perplexity\": 2602.3160527167256}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2019-51\/segments\/1575540548544.83\/warc\/CC-MAIN-20191213043650-20191213071650-00147.warc.gz\"}"}
null
null
This essay was the culmination of research in primary and secondary sources in the sociological and cultural history of Belfast. It represents the first scholarly essay to investigate the history of a community of native Irish speakers from Omeath, Co.Louth that settled, from the mid-nineteenth century onwards, in the Smithfield market area of Belfast where they worked as fish and fruit sellers. Besides examining the evidence of census returns, street directories and gravestone inscriptions to map out the geographical and chronological location of the Fadgies, the essay explores the very considerable influence that this community had on a key figure in the Northern revival, Seán Mac Maoláin. A final key consideration of this essay is the insight afforded into the attitudes of native Irish speakers to the urban revival of the language. This essay formed the basis of a TG4 commissioned TV documentary written and presented by the author entitled 'Scéal na Fadgies.
{ "redpajama_set_name": "RedPajamaC4" }
9,793
{"url":"https:\/\/matheducators.stackexchange.com\/questions\/15297\/math-lessons-with-two-parts-and-a-combination","text":"# Math Lessons with Two Parts and a Combination\n\nThis is fairly open ended, so I understand if people consider this to be off-topic.\n\nI'm interested in creating math lessons where two groups each learn how to use a different simple math skill, and then the groups are combined and challenged with problem types that require both skills.\n\nHere's a simple example:\n\nGroup A would learn the definition of factorial and run some easy factorial problems.\n\nGroup B would learn that if you have certain fractions (like $$\\frac{8 \\cdot 15}{5}$$) it's easier to cancel first and then multiply.\n\nCombined Groups form with a mix of people from both groups A and B. They are given problems like evaluating $$\\frac{10!}{8!}$$ where having both skills makes running the problem pretty easy.\n\nIs there a specific name for this sort of collaborative learning? What are some fun\/interesting problems to run in this way?\n\n\u2022 This sounds something like a \"jigsaw\" activity. Feb 27, 2019 at 2:38\n\u2022 I have done a few things like this in different ways. For example, in a combinatorics course I had one group work with Stirling numbers of the first kind and another with Stirling numbers of the second kind. The groups then swapped explanations and were assigned some identities to prove that had both kinds of Stirling numbers. Feb 27, 2019 at 2:47\n\u2022 @RustyCore Can you please explain why you believe that \"project-based groupwork\" (which is a very broad category which contains the method suggested in the current question as an element) is \"bad pedagogy\"? The scholarly work that I have seen on the topic is all neutral to positive. Feb 28, 2019 at 13:38\n\u2022 FYI: My plan isn't to use this as my sole method of teaching. After teaching math and physics to adult learners for 15 years, I'm shifting to high school. This means teaching credential classes. In one of those classes, our instructor has asked us to try out different strategies and get out of our comfort zone. The problem is, while most of these strategies are great for humanities classes, they are not a good fit for math. Mar 3, 2019 at 20:45\n\nThis sounds something like a \"Jigsaw\" activity (1), (2), (3). The basic idea is as follows:\n\n1. Divide your students into groups of equal size; say, four students in each group. For specificity, lets label these groups $$A$$, $$B$$, $$C$$, and so on. Don't actually have them get into these groups yet. In each group, assign each student to a different task, say tasks $$\\alpha$$, $$\\beta$$, $$\\gamma$$, $$\\delta$$.\n2. Have the students work individually to learn the task which they were assigned. Give them some specific instructions and some relatively simple or straight-forward problems to complete in order to become familiar with their given task.\n3. Have all of the students who have been assigned to the same task collaborate with each other in an \"expert group\" to master that particular task. That is, put all of the $$\\alpha$$'s together into a group, and have them learn the thing that they need to learn. Same with the $$\\beta$$'s, $$\\gamma$$'s, $$\\delta$$'s, etc. For example, you might have one group learn about Pascal's triangle, another group think about combinations, a third consider expressions of the type $$(a+b)^n$$, and so on. Give the group more complicated tasks (within the area that they are meant to master) to complete together.\n4. After a reasonable amount of time has passed, have the students get into the original groups $$A$$, $$B$$, $$C$$, etc. Give these groups a task which requires the expert knowledge obtained by each member of the group. For example, ask them to prove the binomial theorem.\n\nThere is a nice diagram on the page linked as (3), above:\n\nThe links I gave above give quite a bit more detail, but they seem to be more geared towards an elementary audience and reading comprehension-style exercises. However, I am sure that a reasonably clever instructor could figure out how to make it more mathy. ;)\n\n\u2022 To prevent that all $\\alpha$s rely on one good student of this expert group, it might be advisable to insert 1.5: Have everyone work on their own on the given task, and only then compare\/merge their work in the expert groups. Feb 27, 2019 at 11:48\n\u2022 @Jasper Indeed. Honestly, the first thing that came to mind when I saw this question was \"Think Pair Share,\" but that isn't quite the right idea (though it is another useful strategy). I'll revise my answer. Feb 27, 2019 at 13:18\n\u2022 It is funny you mentioned the Binomial theorem. That is exactly the context in which I have done this in the past! It worked out quite well. Students were amazed to discover that such (on the surface) distinct questions lead to the same sequence of numbers. Feb 28, 2019 at 16:57\n\nI did something like a jigsaw activity in an undergraduate 300-level topics in combinatorics course. I split the class into two groups, and each was assigned a reading and several exercises related to Stirling numbers. One group worked with Stirling numbers of the first kind and the other group worked with Stirling numbers of the second kind. The next class, the two groups split in half and matched with half of the other group. Each of these mixed groups took turns presenting their material (within the mixed group), and then the two mixed groups were given another assignment including proofs of identities involving both kinds of Stirling numbers.\n\nI also use similar strategies in an undergraduate exploration\/discovery-based math course, but in a more informal way, as the course is completely student-driven. In that course, if I find a student struggling to prove something, instead of giving them a hint, I'll find another student not already busy, give them an idea (which is a hint for the first student), and then suggest they work together. In that class, I spent most of my in-class time looking for opportunities to facilitate things like this.","date":"2022-06-30 22:01:45","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 17, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.6809174418449402, \"perplexity\": 502.3785874252662}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2022-27\/segments\/1656103915196.47\/warc\/CC-MAIN-20220630213820-20220701003820-00451.warc.gz\"}"}
null
null
Q: AutoLayOut - set UITableView height according to BannerView height I am using adBanner in my application which is at bottom of the screen and I am using tableview in my application. I have established "Horizontal spacing" relation between adBannerView and tableview. Now my problem is before loading the advertisement in adBannerView I can see white space at the bottom of the screen but I want that my tableview cover that space before loading adBannerView and when adBannerView is loaded then my tableview should move up 50 pixels. How can I achieve this? Any idea? A: I think, you have adBanner of height 50 pixels. Set tableview's bottom space to adBanner 0 and don't set its height. Then set height for adBanner and create its constraint's property which should be initially 0 so your tableview will use that space initially. When adBannerView is loaded then set adBannerView height property 50, so tableview will automatically shift up. It may help A: Set Tablview's bottom space to supreview 0 with top space, leading space and trailing space constraint. And modifiy ad banner delegate like this it will give required output. IN viewDidLoad Adbanner view alpha = 0.0 -(void)bannerViewDidLoadAd:(ADBannerView *)banner{ NSLog(@"Ad Banner did load ad."); CGFloat height = [UIScreen mainScreen].bounds.size.height; CGRect frame = self.viewForSource.frame; frame.size.height = height-50; self.viewForSource.frame = frame; // Show the ad banner. [UIView animateWithDuration:0.5 animations:^{ self.adBanner.alpha = 1.0; }]; } -(void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error{ NSLog(@"Unable to show ads. Error: %@", [error localizedDescription]); CGFloat height = [UIScreen mainScreen].bounds.size.height; CGRect frame = self.viewForSource.frame; frame.size.height = height; self.viewForSource.frame = frame; // Hide the ad banner. [UIView animateWithDuration:0.5 animations:^{ self.adBanner.alpha = 0.0; }]; }
{ "redpajama_set_name": "RedPajamaStackExchange" }
7,672
Кевин Майкъл Ръд () е 26-ият министър-председател на Австралия и федерален лидер на лявоцентристката Австралийска лейбъристка партия. Под неговото ръководство партията печели изборите на 24 ноември 2007 г. срещу коалиционното правителство на министър-председателя Джон Хауърд. Правителството на Ръд встъпва в длъжност на 3 декември 2007 г. Ранни години Кевин Ръд е роден в Намбур, Куинсланд и израства в кравеферма близо до Еумунди, Куинсланд. Ръд придобива любовта си към коне и стрелбата по глинени мишени от фермерския живот. Баща му умира, когато Ръд е на 11 години и семейството в затруднено положение е принудено да напусне фермата. Ръд се присъединява към Австралийската лейбъристка партия през 1972 г. Той живее на пансион в училището Марист Колидж Ашгроув в Бризбейн, а по-късно учи в щатската гимназия в Нарбур. Ръд завършва с отличие Австралийския национален университет в Канбера, специалност Изучаване на Азия (Asian Studies). Той специализира китайски език и китайска история, овладява мандарин и придобива китайски псевдоним Лу Кеуен (陸克文). По време на следването си Ръд почиства дома на политическия коментатор Лори Оукс, за да печели пари. През 1980 г. той продължава да учи китаистика в Националния тайвански нормален университет в Тайпе, Тайван. През 1981 г. Ръд се жени за Терез Райн, която срещнал на събрание на Австралийското студентско християнско движение. Те имат три деца: Джесика (р. 1984 г.), Никълъс (р. 1986 г.) и Маркъс (р. 1993 г.) Навлизане в политиката През 1981 г. Ръд започва работа в министерството на външните работи на Австралия и работи там до 1988 г. Повечето време той прекарва заедно със съпругата си в Стокхолм, Швеция и Пекин, Китай, където работи в австралийските посолства. Завръщайки се през 1988 г. в Австралия, той е назначен за началник на кабинета на водача на лейбъристката опозиция в Куинсланд, Уейн Гос. Лейбъристката партия печели щатските избори през 1992 г. и Ръд е назначен за генерален директор на правителствения офис, което го прави най-властния бюрократ в Куинсланд. Той контролира различни реформи, включително развитието на национална програма за преподаване на чужди езици в училищата, включваща изучаване на азиатски езици и култури. По това време Ръд е подложен на сърдечна операция за подмяна на аортната клапа. След като правителството на Гос губи изборите през 1994 г. Ръд е назначен за старши консултант за Китай от счетоводната фирма KPMG Australia. През 1998 г. е избран за представител в Австралийския парламент на избирателния район Грифит. Изборите през 2001 г. отново са спечелени от коалицията на премиера Хауард, а Ръд е назначен за министър на външните работи в сянка от лейбъристката опозиция. След посещение във Великобритания и срещи с британски политици Ръд заявява, че Саддам Хюсеин без съмнение притежава оръжия за масово унищожение и е в нарушение на резолюциите на Съвета за сигурност на ООН. След свалянето на режима на Саддам Хюсеин обаче Ръд критикува правителството на консервативния министър-председател Джон Хауард заради политиката му в подкрепа на администрацията на Джордж У. Буш, но продължава да изказва подкрепа за съюза между САЩ и Австралия. На 4 декември 2006 г. Кевин Ръд е избран за водач на Лейбъристката партия с 49 гласа срещу 39 за дотогавашния водач Ким Бийзли. На 21 октомври 2007 г. Ръд се представя силно в телевизионен дебат срещу министър-председателя Джон Хауард. Министър-председател Вечерта на 24 ноември 2007 г. водачът на Либералната партия на Австралия и консервативен министър-председател Джон Хауърд признава изборното си поражение. На 3 декември Кевин Ръд е въведен в длъжност министър-председател от генерал-губернатора на Австралия ген.-м. Майкъл Джефри. Вицепремиер и министър на образованието в новия кабинет става заместничката на Ръд в Лейбъристката партия Джулия Гилард. За пръв път в 106-годишната история на австралийските правителства жена заема толкова висок пост. Ръд е първият министър-председател, не споменал британския монарх (Елизабет II) в клетвата си за встъпване в длъжност. Въпреки че е републиканец обаче Ръд е отбелязал, че неуспешният референдум за обявяване на република от 1999 г. скоро няма да бъде повторен. Според проучванията на общественото мнение от 1993 г. насам мнозинство от австралийците подкрепят обявяване на република, но референдумът от 1999 г. се проваля, защото е предложено президентът да се избира от парламента, а не от народа. Глобално затопляне Първото действие на новия министър-председател е да подпише инструмента за ратификация на Протокола от Киото за борба с глобалното затопляне. Планът на Ръд, представен през ноември 2007 г. предвижда Австралия да получава 20% от енергията си от възобновими източници до 2020 г. Извинение за откраднатите поколения На 13 февруари 2008 г. Ръд изпълнява предизборно обещание като се извинява на австралийските аборигени за "откраднатите поколения" (деца, отнети от родители им от австралийската държава между 1869 и 1969 г. Извинението е добре прието, а критиките са най-вече отправени към отказа на правителството да осигури финансови компенсации за жертвите. Външна политика Ръд подкрепя независимостта на Косово от Сърбия и на 19 февруари 2008 г. Австралия признава независимостта на Косово Международна обиколка През март 2008 г. Ръд започва 17-дневна международна обиколка, по време на която се среща с правителствени ръководители от Европа, САЩ и Китай, включително президента на САЩ Джордж Уокър Буш и президентските кандидати Джон МакКейн и Хилари Клинтън, разговаря с Барак Обама и се среща с кралица Елизабет II и китайския президент Ху Дзинтао. На срещата си с президента Буш Ръд защитава плановете си за изтегляне на австралийските войски от Ирак. Ръд обаче подкрепя присъствието на австралийски войски в Афганистан. Той изнася лекция пред студенти в Пекинския университет на мандарин, но е критикуван от китайското правителство заради забележките му относно нарушаването на човешките права в Тибет. Имиграция Според Мелбърнския център за търсещи убежище до май 2008 г. министерството за имиграцията и гражданството е отхвърлило 41 от 42-те молби за убежище на чужденци или 97,6%, по-голям процент от предишното консервативно правителство. Според отговорния министър Крис Еванс, процентът на отхвърлените е 77. Ислямски училища През ноември 2007 г., Ръд подкрепя кампания, противопоставяща се на изграждането на ислямско училище за 1200 ученика в градчето Камдън, на 65 км югозападно от Сидни, след като протестите срещу плана за училището са получили отразяване в национални и международни медиии, посочвайки липсата на адекватна инфраструктура като причина. Политика към бездомните В края на януари 2008 г. Ръд обявява финансиране за бездомници, включително $ 150 млн. за приюти. Бележки Външни препратки Уебсайт на министър-председателя на Австралия Кевин Ръд в MySpace Австралийски политици Министър-председатели Министри на външните работи Външна политика на Австралия
{ "redpajama_set_name": "RedPajamaWikipedia" }
5,924
Senator Winston may refer to: Fountain Winston (1793–1834), Mississippi State Senate Francis D. Winston (1857–1941), North Carolina State Senate
{ "redpajama_set_name": "RedPajamaWikipedia" }
3,502
Timok Cove ( , IPA:  ) é uma enseada de 580 m de largura, recuando por 400 m na costa norte de ilha Rugedi, na costa oeste da Península de Byers, na ilha de Livingston, nas Ilhas Shetland do Sul, Antártica, e entrou a oeste de Ponto Simitli . A enseada é "nomeada após o rio Timok no noroeste da Bulgária". Localização Timok Cove localiza-se no . Mapeamento britânico em 1968, espanhol em 1992 e búlgaro em 2009. Mapas Península Byers, Ilha Livingston. Mapa topográfico em escala 1: 25000. Madri: Serviço Geográfico do Exército, 1992. LL Ivanov. Antártica: Ilhas Livinston e Greenwich, Robert, Snow e Smith. Escala 1: 120000 mapa topográfico. Troyan: Fundação Manfred Wörner, 2009. Banco de dados digital antártico (ADD). Escala 1: 250000 mapa topográfico da Antártica. Comitê Científico de Pesquisa Antártica (SCAR), 1993–2016. Notas Referências Timok Cove. Gazeta composta de SCAR da Antártica Gazetteer antártico búlgaro. Comissão Antártica de nomes de lugares . (detalhes em búlgaro, dados básicos em inglês) links externos Timok Cove. Imagem de satélite Copernix Bulgária na Antártida
{ "redpajama_set_name": "RedPajamaWikipedia" }
6,929
title: Amazon FSx Integration tags: [integrations list] permalink: amazon_fsx.html summary: Learn about the Wavefront Amazon FSx Integration. --- ## Amazon Web Services Integration The Amazon Web Services integration is full-featured implementation offering pre-defined dashboards and alert conditions and is fully configurable. ### Dashboards Wavefront provides Amazon Web Services overview dashboards **Summary**, **Pricing**, and **Billing** and the service-specific dashboards for the following products: - AWS: ALB - AWS: API Gateway - AWS: Auto Scaling - AWS: CloudFront - AWS: Cloud Search - AWS: CloudTrail - AWS: DMS - AWS: Direct Connect - AWS: DynamoDB - AWS: EBS - AWS: EC2 - AWS: ECS (cAdvisor) - AWS: ECS - AWS: ECS (Fargate) - AWS: EFS - AWS: ELB - AWS: EMR - AWS: Elastic Beanstalk - AWS: ElastiCache - AWS: Elasticsearch - AWS: Elastic Transcoder - AWS: FSx - AWS: IoT Core - AWS: IAM Access Key Age - AWS: Kinesis Data Stream - AWS: Kinesis Firehose - AWS: KMS - AWS: Lambda - AWS: OpsWorks - AWS: RDS - AWS: Redshift - AWS: Route53 - AWS: S3 - AWS: SNS - AWS: SQS #### Summary Dashboard <p>From the Summary dashboard you can easily navigate to all other AWS dashboards.</p> {% include image.md src="images/db_aws_summary.png" width="80" %} ### Alerts The Amazon Web Services integration dashboards contains pre-defined alert conditions embedded as queries in charts contained in the dashboards. For example: {% include image.md src="images/alert_condition.png" width="30" %} To create the alert, click the **Create Alert** link under the query and configure the [alert properties](https://docs.wavefront.com/alerts_manage.html) (notification targets, condition checking frequency, etc.). ### Metrics Configuration Wavefront ingests Amazon Web Services metrics using the CloudWatch, CloudTrail, and AWS service APIs. For details on the metrics and how to configure ingestion, see [AWS Metrics Integration](https://docs.wavefront.com/integrations_aws_metrics.html). ### Metrics Information You can see the information about the metrics and dimensions which are published to CloudWatch via different AWS services on the [AWS CloudWatch metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html) doc site. Click a link below to see the detailed metrics information per service: - [AWS EC2](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/viewing_metrics_with_cloudwatch.html) - [AWS S3](https://docs.aws.amazon.com/AmazonS3/latest/userguide/metrics-dimensions.html) - [AWS SQS](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-available-cloudwatch-metrics.html) - [AWS EBS](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cloudwatch_ebs.html#ebs-metrics) - [AWS ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cloudwatch-metrics.html) - [AWS ELB](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-cloudwatch-metrics.html) - [AWS SNS](https://docs.aws.amazon.com/sns/latest/dg/sns-monitoring-using-cloudwatch.html) - [AWS DMS](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Monitoring.html#CHAP_Monitoring.Metrics) - [AWS Lambda](https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics.html#monitoring-metrics-console) - [AWS Redshift](https://docs.aws.amazon.com/redshift/latest/mgmt/metrics-listing.html) - [AWS Auto Scaling](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-monitoring.html) - [AWS API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-metrics-and-dimensions.html) - [AWS Kinesis Firehose](https://docs.aws.amazon.com/firehose/latest/dev/monitoring-with-cloudwatch-metrics.html) - [AWS DynamoDB](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/metrics-dimensions.html) ## Amazon Web Services Integrations ### Add an Amazon Cloud Integration Setting up an Amazon cloud integration requires establishing a trust relationship between Amazon and Tanzu Observability by Wavefront. You start by granting Tanzu Observability [read-only access to your Amazon account](https://docs.wavefront.com/integrations_aws_overview.html#give-read-only-access-to-your-amazon-account-and-get-the-role-arn) or by giving [limited access](https://docs.wavefront.com/integrations_aws_overview.html#giving-limited-access). Then, you register the integration by providing the necessary information. See [AWS Integration Overview](https://docs.wavefront.com/integrations_aws_overview.html) for information about setting up and managing the AWS Cloud integration. <h2>Alerts</h2> <ul><li markdown="span"><b>EC2 Instance CPU Usage Too High</b>:Alert reports when the EC2 instance CPU utilization constantly exceeds the defined limit.</li><li markdown="span"><b>EC2 Instance Status Check Failed</b>:Alert reports when the EC2 status check constantly fails.</li></ul> |Metric Name|Description| | :--- | :--- | |aws.fsx.compressionratio.*| The ratio of compressed storage usage to uncompressed storage usage on the OpenZFS file system.<br>Statistics: average, maximum, minimum, samplecount, sum| |aws.fsx.datareadbytes.*| The number of bytes for read operations on the FSx file system.<br>Statistics: average, maximum, minimum, samplecount, sum| |aws.fsx.datareadoperations.*| The number of read operations on the FSx file system.<br>Statistics: average, maximum, minimum, samplecount, sum| |aws.fsx.datawritebytes.*| The number of bytes for write operations on the FSx file system.<br>Statistics: average, maximum, minimum, samplecount, sum| |aws.fsx.datawriteoperations.*| The number of write operations on the FSx file system.<br>Statistics: average, maximum, minimum, samplecount, sum| |aws.fsx.freedatastoragecapacity.*| The amount of available storage capacity on Lustre file system.<br>Statistics: average, maximum, minimum, samplecount, sum| |aws.fsx.freestoragecapacity.*| The number of bytes of storage capacity on Windows File Server file system.<br>Statistics: average, minimum| |aws.fsx.logicaldatastored.*| The total number of bytes of logical data stored on the NetApp ONTAP file system, on both the primary (SSD) tier and the capacity pool tier.<br>Statistics: average, maximum, minimum| |aws.fsx.metadataoperations.*| The number of metadata operations on the Lustre, Windows File Server, and NetApp ONTAP file systems.<br>Statistics: average, maximum, minimum, samplecount, sum| |aws.fsx.nfsbadcalls.*| The number of calls rejected by NFS server Remote Procedure Call (RPC) mechanism on the OpenZFS file system.<br>Statistics: average, maximum, minimum, samplecount, sum| |aws.fsx.storagecapacity.*| The total storage capacity on the OpenZFS file system, equal to the sum of used and available storage capacity.<br>Statistics: average, maximum, minimum, samplecount, sum| |aws.fsx.storageused.*| The total number of bytes of physical data stored on the NetApp ONTAP file system.<br>Statistics: average, maximum, minimum| |aws.fsx.usedstoragecapacity.*| The amount of storage used on the OpenZFS file system.<br>Statistics: average, maximum, minimum, samplecount, sum| |aws.fsx.filesused.*| The number of files (or inodes) used on the NetApp ONTAP volume.<br>Statistics: average, maximum, minimum| |aws.fsx.filescapacity.*| The total number of inodes that can be created on the NetApp ONTAP volume.<br>Statistics: maximum| |aws.fsx.physicaldiskusage.*| The amount of storage physically occupied by the Lustre file system data (compressed).<br>Statistics: average, maximum, minimum, samplecount, sum| |aws.fsx.logicaldiskusage.*| The amount of logical data stored (uncompressed) stored on the Lustre file system.<br>Statistics: average, maximum, minimum, samplecount, sum|
{ "redpajama_set_name": "RedPajamaGithub" }
8,664
Polycarpe, en grec polykarpos (beaucoup de fruits), né vers 70 et mort (brûlé vif) en 155 ou en 167, était un disciple direct de l'apôtre Jean et second évêque de Smyrne, aujourd'hui Izmir en Turquie. Mort martyr pour la foi, ce saint et Père apostolique est commémoré le 23 février selon le Martyrologe romain. Données biographiques D'après Pionios, un prêtre et martyr du , Polycarpe serait originaire de l'Empire parthe (Perse antique) avant d'être amené jeune garçon à Smyrne par des marchands qui le vendent à une femme noble, nommée Callista. Cette généreuse chrétienne l'élève dans la foi. Héritier des biens de sa mère adoptive, Polycarpe les utilise pour mener une vie chaste, se perfectionner dans la connaissance des Écritures et s'avancer dans la pratique de la piété en prenant soin des malades, des infirmes et des vieillards. Il a plusieurs visions et accomplit certains miracles. Un peu plus tard, il reçoit le diaconat des mains du premier évêque de Smyrne, Boucolos, qui l'attache à son église et lui demande peu avant sa mort de prendre sa suite. De prêtre, il est promu évêque entre 113 et 117, et il remplit les fonctions de son ministère de manière tout apostolique durant une cinquantaine d'années. Polycarpe est un disciple de l'apôtre Jean qui, d'après la tradition, se serait établi vers la fin de sa vie à Éphèse après son exil sur l'île de Patmos, et dont il aurait été libéré après la mort de Domitien. D'après Irénée de Lyon, qui fut l'un des élèves de Polycarpe, ce dernier a connu directement l'apôtre. Outre des entretiens avec lui et un encouragement à devenir évêque, il l'aurait accompagné lors d'un voyage apostolique. Il devient l'un des évêques les plus influents et les plus estimés de son temps, à tel point qu'en 154 il est choisi comme représentant des Églises d'Asie puis envoyé à Rome vers 160 pour discuter avec le pape Anicet de plusieurs points de divergence dont la date de Pâques, déjà sujette à tension entre les chrétiens d'Orient et d'Occident. Ils se séparent sans accord mais « dans l'amitié ». Polycarpe combat de nombreuses sectes jugées hérétiques, en particulier certains gnostiques et notamment Marcion. Il accueille en sa ville de Smyrne l'évêque d'Antioche, Ignace, condamné ad bestias dans les arènes de Rome. Les deux évêques deviennent amis et Ignace d'Antioche lui écrit de Troas une lettre le remerciant de son accueil et lui demandant d'envoyer des missionnaires affermir sa communauté dans la foi chrétienne. D'Antioche, il lui en envoie une autre restée dans les annales, dans laquelle il écrit : « Que votre baptême demeure comme votre bouclier, la foi comme votre casque, la charité comme votre lance, la patience comme votre armure. » Lorsqu'éclate la persécution commandée par l'empereur et philosophe Marc Aurèle, Polycarpe est très âgé. Il tient tête au proconsul qui l'interroge. Il est brûlé vif en 155 ou 167. Dans sa Lettre à Florinus, Irénée de Lyon le reconnaît comme étant celui dont il a reçu la foi et la tradition johannique. L'Église de Smyrne a raconté en quelles circonstances Polycarpe et ses compagnons endurèrent le martyre dans L'Épître des chrétiens de l'Église de Smyrne aux autres églises, l'un des plus anciens mémoriaux de la littérature chrétienne. Pour répondre à la demande de nombreux Philippiens, Polycarpe fait parvenir à l'Église de Philippes des lettres d'Ignace d'Antioche qu'il accompagne d'une lettre d'exhortation personnelle inspirée des épitres de Pierre et de Paul, de Jean et de Clément de Rome. C'est vraisemblablement grâce à Polycarpe que le corpus des sept lettres d'Ignace, qui ont circulé dans les communautés d'Asie mineure, a été conservé. Martyre de saint Polycarpe Le récit antique donne : Date de sa mort Eusèbe de Césarée date sa mort de 166-167, sous le règne de Marc Aurèle. D'autres datations ont été proposées qui sont comprises entre 155 et 169. Certains commentateurs évoquent même 177. Pour certains critiques, ces indications paraissent correspondre à l'année 155. En effet, il n'existe aucune autre date au où puissent coïncider un samedi (sabbat), un (septième jour avant les calendes de mars) et le deuxième jour d'un mois lunaire (le 2 de Xanthique) ; de plus, de bons arguments montrent que Statius Quadratus était très probablement proconsul en 155. Polycarpe aurait donc été baptisé en 69, avant la ruine de Jérusalem. Toutefois, cette date de 155 présente une difficulté, Marc-Aurèle ayant régné de 161 à 180. Selon les Mémoires pour servir à l'Histoire Ecclésiastique des Six premiers siècles de Louis-Sébastien Le Nain de Tillemont page 305 ce "grand sabbat" est la veille de Pâques, et une lecture possible est le des calendes d'avril, ce qui donne comme date le . Mais le même auteur souligne la difficulté d'accorder le 2 d'un mois lunaire et la veille de Pâques, qui tombe un 14 selon le calendrier juif (mais sans doute pas en usage chez les Chrétiens de ce temps). Postérité Très vite après le martyre de Polycarpe, l'Église de Smyrne confie à un fidèle nommé Marcianus le soin de rédiger un récit circonstancié des faits pour l'envoyer à l'Église de Philomélium en Phrygie qui s'interrogeait sur les circonstances de sa mort. Sous le titre de Passio Polycarpi, le texte, qui fait un parallèle avec le martyre de Jésus-Christ, se diffuse ensuite à toutes les communautés chrétiennes des alentours. Un autre homme, Gaius, rédige un témoignage basé sur les souvenirs de saint Irénée de Lyon qui a connu Polycarpe et qui l'estimait beaucoup. Plus tard, à Corinthe, un certain Isocrate (ou Socrate) rédige une compilation des deux dont va s'inspirer le prêtre Pionios pour la rédaction de son livre Vita Polycarpi. La figure apostolique de Polycarpe et sa Passio vont jouer un rôle essentiel dans l'évolution de la littérature martyrologique associées à la première et la deuxième génération de disciplies. Gustave Flaubert, en grand pourfendeur de la bêtise, le célébrait ou l'invoquait à chaque fois qu'un spectacle de la vie moderne le heurtait particulièrement, le citant souvent dans sa correspondance, et fêtant chaque année son anniversaire avec ses amis, prétexte à d'amples libations. Reliques D'après les récits, voulant se préserver d'un culte éventuel voué à l'évêque Polycarpe, les autorités romaines refusent de céder les restes de son corps aux fidèles qui désirent les récupérer. Certains Juifs arguant même avec ironie qu'ils seraient capable de le préférer au Ressuscité. Cependant, le garde en faction accepte de leur céder, soit par regret d'avoir participer au supplice, soit par admiration vis-à-vis du courage exemplaire du vieil homme, ou les deux. Les chrétiens déposent alors dans un lieu secret et consacré les os calcinés du saint et décident d'une inscription en son honneur : . C'est ainsi qu'ils prirent l'habitude de venir se recueillir à son souvenir, et chaque année célébrer sa mort. Apparaît alors, en cette seconde moitié du le culte des reliques vécu en assemblée, principalement à la date anniversaire du martyre. Il n'y a pas là de superstition, mais du respect, de l'admiration, le désir de conserver tout ce qu'il reste de l'homme martyrisé, les cendres, le sang versé, même les instruments du martyre. Le courage de Polycarpe frappa beaucoup les païens eux-mêmes et l'autorité romaine arrêta pour un temps les supplices. Le nom de Polycarpe resta célèbre à Smyrne et son martyr contribua à servir d'exemple de la différence qu'il y a à faire entre adoration (réservée à Dieu, latrie) et vénération (des saints et des reliques, dulie). À partir de cette période, les chrétiens de l'Église primitive vont considérer qu'il est profitable de prier, puis de se faire enterrer à proximité de ces corps privilégiés pour tirer parti de la communion des saints. C'est l'origine première des basiliques construites généralement sur d'anciennes zones funéraires, à la périphérie des villes antiques, puis abritant des reliques. Églises Saint-Polycarpe Bibliographie Œuvre Clavis Patrum Græcorum 1040-1042 Polycarpe de Smyrne, Lettres aux Philippiens. Anonymes hagiographiques, Martyre de Polycarpe. Ignace d'Antioche, Lettre aux Éphésiens... Lettre à Polycarpe, trad. Pierre Thomas Camelot, Cerf, coll. "Sources chrétiennes" (Textes grecs, n° 10 bis), 1945, 4° éd. 2007. Les Écrits des Pères apostoliques, Cerf, 2001. Lettre aux Philippiens, in Premiers écrits chrétiens, dir. B. Pouderon, J.-M. Salamito, V. Zarini, La Pléiade, NRF, Gallimard, . Lettre aux Philippiens, édition bilingue sur patristique.org : s'y trouve aussi le récit du martyre de Polycarpe et une introduction à ces documents. Études Source : Martyre de saint Polycarpe (vers 160), trad. du grec Cécile Bost-Pouderon : Premiers écrits chrétiens, Gallimard, coll. "La Pléiade", 2016, . Victor Saxer : « L'authenticité du Martyre de Polycarpe : Bilan de 25 ans de critique », dans Mélanges de l'École Française de Rome (Série Antiquité), Rome, 1982, vol. 94, n° 2, Boudewijn Dehandschutter, Polycarpiana. Studies on Martyrdom and Persecution in Early Christianity, Louvain, Presses de l'Université de Louvain, 2007. Atti e passioni dei martiri, introd. di A.A.R. Bastiaensen, testo critico e comm. a c. di A.A.R. Bastiaensen, A. Hilhorst, G.A.A. Kortekaas, A.P. Orbán, M.M. van Assendelft, tradd. di G. Chiarini, G.A.A. Kortekaas, G. Lanata, S. Ronchey, xlix-615 pp., Milano, Mondadori/Fondazione Lorenzo Valla, 1987 Notes et références Voir aussi Articles connexes martyre Smyrne Johanniens Liens externes Saint Polycarpe, Catholic Encyclopedia. Présentation de saint Polycarpe, évêque de Smyrne et martyr, Infos sur le saint du jour - Vatican News Récit du martyre de saint Polycarpe, Patristique.org Saint Polycarpe : l'ange de l'Église de Smyrne et l'apôtre des Gaules, livre de l'abbé Octave Mirzan (1893), BnF Gallica Saint catholique et orthodoxe du IIe siècle Saint catholique et orthodoxe byzantin Saint grec Métropolite de Smyrne Pères apostoliques Condamné à mort exécuté au bûcher Personne brûlée vive par intolérance religieuse Chrétien martyr dans le Moyen Orient antique Chrétien martyr au IIe siècle Persécution des chrétiens sous l'Empire romain Théologien chrétien du IIe siècle
{ "redpajama_set_name": "RedPajamaWikipedia" }
8,640
namespace os { // Same as SkSamplingOptions struct struct Sampling { enum class Filter { Nearest, Linear }; enum class Mipmap { None, Nearest, Linear }; struct Cubic { float B, C; static constexpr Cubic Mitchell() { return { 1/3.0f, 1/3.0f }; } static constexpr Cubic CatmullRom() { return { 0.0f, 1/2.0f }; } }; bool useCubic = false; Cubic cubic = { 0, 0 }; Filter filter = Filter::Nearest; Mipmap mipmap = Mipmap::None; Sampling() = default; Sampling(const Sampling&) = default; Sampling& operator=(const Sampling&) = default; Sampling(Filter f, Mipmap m = Mipmap::None) : filter(f), mipmap(m) { } Sampling(Cubic c) : useCubic(true), cubic(c) { } }; } // namespace os #pragma pop_macro("None") #endif
{ "redpajama_set_name": "RedPajamaGithub" }
2,510
// // PRAlbumViewController.m // PRSlideViewExample // // Created by Elethom Hunter on 8/5/14. // Copyright (c) 2014 Project Rhinestone. All rights reserved. // #import "PRAlbumViewController.h" #import "PRSlideView.h" #import "PRAlbumPage.h" @interface PRAlbumViewController () <PRSlideViewDelegate, PRSlideViewDataSource> @property (nonatomic, strong) NSArray *albumData; @property (nonatomic, weak) PRSlideView *slideView; @property (nonatomic, weak) UILabel *titleLabel; @end @implementation PRAlbumViewController #pragma mark - Life cycle - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // Custom initialization } return self; } - (void)viewDidLoad { [super viewDidLoad]; self.albumData = @[@"Gorillaz", @"G-Sides", @"Laika Come Home", @"Demon Days", @"D-Sides (Special Edition)", @"Plastic Beach", @"The Fall", @"The Singles Collection 2001-2011"]; CGRect bounds = self.view.bounds; PRSlideView *slideView = [[PRSlideView alloc] initWithFrame:bounds]; slideView.delegate = self; slideView.dataSource = self; slideView.infiniteScrollingEnabled = YES; [slideView registerClass:PRAlbumPage.class forPageReuseIdentifier:NSStringFromClass(PRAlbumPage.class)]; slideView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight); self.slideView = slideView; [self.view addSubview:slideView]; CGFloat titleHeight = 44.f; UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMinX(bounds), CGRectGetMaxY(bounds) - titleHeight, CGRectGetWidth(bounds), titleHeight)]; titleLabel.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin); titleLabel.textAlignment = NSTextAlignmentCenter; titleLabel.backgroundColor = [UIColor colorWithWhite:0 alpha:.6f]; titleLabel.textColor = [UIColor whiteColor]; self.titleLabel = titleLabel; [self.view addSubview:titleLabel]; } - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; [self.slideView reloadData]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } /* #pragma mark - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { // Get the new view controller using [segue destinationViewController]. // Pass the selected object to the new view controller. } */ #pragma mark - PRSlideViewDelegate - (void)slideView:(PRSlideView *)slideView didScrollToPageAtIndex:(NSInteger)index { self.titleLabel.text = self.albumData[index]; } - (void)slideView:(PRSlideView *)slideView didClickPageAtIndex:(NSInteger)index { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"You clicked an album" message:self.albumData[index] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert show]; } #pragma mark - PRSlideViewDataSource - (NSInteger)numberOfPagesInSlideView:(PRSlideView *)slideView { return self.albumData.count; } - (PRSlideViewPage *)slideView:(PRSlideView *)slideView pageAtIndex:(NSInteger)index { PRAlbumPage *page = [slideView dequeueReusablePageWithIdentifier:NSStringFromClass(PRAlbumPage.class) forIndex:index]; NSString *imageName = [self.albumData[index] stringByAppendingPathExtension:@"jpg"]; page.coverImageView.image = [UIImage imageNamed:imageName]; return page; } @end
{ "redpajama_set_name": "RedPajamaGithub" }
4,537
Home » In the News » Page 3 In the News: The Providence Journal covers Richard Jenkins' visit to The United From The Providence Journal – July 20, 2018 Richard Jenkins: 'Shape of Water' rekindled his love of movies By Andy Smith / Journal Arts Writer WESTERLY, R.I. — "It was like heaven to me to do that story," said actor… In the News: United Theatre capital campaign announcement from The Westerly Sun From The Westerly Sun – June 27, 2018 United Theatre announces $7 million capital campaign to complete renovations By Nancy Burns-Fusaro / Sun staff writer WESTERLY — The movie theater where many memories were made has taken another step closer… #4 A First For the Region: The United will provide Westerly with its first year-round venue for jazz, classical, opera, ballet, modern dance and popular music; it's only centrally located gallery for visual artists; its first multi-screen art house cinema; flexible education space; and Westerly's first comprehensive, professional community music school.
{ "redpajama_set_name": "RedPajamaCommonCrawl" }
4,264
This is what the revolving door and entry way looked like when we arrived on the job site, before we did any metal cleaning and restoration work. The appearance of the metal work in this entry way is dramatically improved with our professional metal refinishing services. In this BEFORE image, it's easy to see exactly where people put their hands as they passed through the revolving door. Notice the discoloration of the metal. With our metal refinishing services, this revolving door looks brand new again. A sixteen story, red brick New York City co-op built in 1925 has a three story limestone base with a gorgeous canopied entrance featuring a revolving door. The revolving door had deteriorated with time and use, and was badly in need of restoration. Apartments in this building are very high end. The soiled, pitted, and deteriorated metal was giving tenants and their guests a bad first impression. We used special cleaning solutions formulated specifically for dissolving the dirt and grime that adheres to metal surfaces, and then we refinished the metal to its original soft honed finish. The co-op property manager was very pleased with the results. Call (914) 423-4600 or contact us online for a FREE estimate on metal cleaning and restoration or any of our other services throughout the greater New York City area.
{ "redpajama_set_name": "RedPajamaC4" }
9,140