text:
ER Tubules Mark Sites of Mitochondrial Division
Jonathan R. Friedman1,
Laura L. Lackner2,
Matthew West1,
Jared R. DiBenedetto1,
Jodi Nunnari2,
Gia K. Voeltz1,*
1Department of Molecular, Cellular, and Developmental Biology, University of Colorado, Boulder, CO 80309, USA.
2Department of Molecular and Cellular Biology, University of California, Davis, CA 95616, USA.
↵*To whom correspondence should be addressed. E-mail: gia.voeltz{at}colorado.edu
Science 21 Oct 2011:
Jonathan R. Friedman
Department of Molecular, Cellular, and Developmental Biology, University of Colorado, Boulder, CO 80309, USA.
Laura L. Lackner
Department of Molecular and Cellular Biology, University of California, Davis, CA 95616, USA.
Jared R. DiBenedetto
Jodi Nunnari
Gia K. Voeltz
For correspondence: gia.voeltz@colorado.edu
Mitochondrial structure and distribution are regulated by division and fusion events. Mitochondrial division is regulated by Dnm1/Drp1, a dynamin-related protein that forms helices around mitochondria to mediate fission. Little is known about what determines sites of mitochondrial fission within the mitochondrial network. The endoplasmic reticulum (ER) and mitochondria exhibit tightly coupled dynamics and have extensive contacts. We tested whether ER plays a role in mitochondrial division. We found that mitochondrial division occurred at positions where ER tubules contacted mitochondria and mediated constriction before Drp1 recruitment. Thus, ER tubules may play an active role in defining the position of mitochondrial division sites.
Regulation of mitochondrial division is critical to normal cellular function; excess division is linked to numerous diseases, including neurodegeneration and diabetes (1, 2). The central player in mitochondrial division is the highly conserved dynamin-related protein (Drp1 in mammals, Dnm1 in yeast), which belongs to a family of large guanosine triphosphatases (GTPases) that self-assemble to regulate membrane structure (3). Division dynamins are likely to work by oligomerizing in a GTP-dependent manner into helices that wrap around mitochondria; locally controlled assembly-stimulated GTP hydrolysis is thought to provide the mechanochemical force that completes fission of the outer and inner membranes (4). There are additional proteins required for mitochondrial division, such as the outer membrane protein Mff (mitochondrial fission factor), which is present only in mammals (5). Although general mechanisms exist for recruiting Dnm1 or Drp1 to mitochondria, it is not known whether there are specific sites on mitochondria that are marked for division (6). Furthermore, both Dnm1 and Drp1 oligomerize into helices that are much smaller than the diameter of mitochondria (Dnm1 helices have reported mean diameters of 109 nm in yeast and 129 nm in vitro), suggesting that Dnm1 (Drp1)–independent mitochondrial constriction may be needed to facilitate mitochondrial division (4, 6–9).
Contact sites exist between mitochondria and the endoplasmic reticulum (ER) and are important for phospholipid synthesis and calcium signaling [for review, see (10)]. Based on recent data, there are likely several types of molecular bridges that mediate these contacts, such as the ERMES complex identified in yeast and the mitochondrial fusion protein mitofusin 2 (Mfn2) in mammalian cells (11, 12). These physical contacts are persistent and maintained under dynamic conditions (13), suggesting that the ER-mitochondrial interface is vital for function. We have used electron microscopy (EM) and tomography to analyze the three-dimensional (3D) structure of contacts between the ER and mitochondria in the yeast Saccharomyces cerevisiae. We observed the high-resolution (~4 nm) structure and 3D models of four ER-mitochondrial contacts taken from two cells (Fig. 1A). In these examples, the ER was wrapped around mitochondria to varying degrees. In two of the four examples, the ER almost completely circumscribed the mitochondrial outer membrane, and mitochondria were constricted at the point of contact (mitochondrial diameter 138 nm and 146 nm circumscribed versus 215 nm and 193 nm uncircumscribed at ER contact) (Fig. 1A; fig. S1, A and B; and movies S1 and S2). These data suggest that ER tubules associate with and may mediate mitochondrial constriction sites.
Mitochondrial constriction and division occurs at ER-mitochondrial contacts in yeast. (A) The 3D models (left images) of ER (green) and mitochondria (purple) at contact domains were imaged by EM and tomography of high-pressure frozen yeast cells. Middle images are 2D tomographs of contact sites (second column, ER drawn in green) and the corresponding 3D models of each (third column). Contact, marked in red, is defined as regions where the ER membrane comes within 30 nm of the mitochondrial membrane, and ribosomes are excluded (third column). Right schematics demonstrate the percentage of the mitochondrial circumference that makes contact with the ER membrane [red is contact, white is not (19)]. The diameter of each mitochondrion at positions of ER contact is shown. Regions where the mitochondria are constricted (models a and c) have a high percent of ER wrapping. Additional EM tomographs and analysis of constrictions are shown in fig. S1, A and B. (B) Time-lapse images of yeast cells expressing mito-dsRed and GFP-HDEL (ER). A single focal plane is shown. Arrows and arrowheads indicate sites of mitochondrial division. A corresponding z-series is shown in fig. S1C. Scale bars indicate, in (A), 200 nm; (B), 2 μm.
We thus examined the role of ER in mitochondrial division by using fluorescence microscopy in live yeast cells transformed with an ER marker (GFP-HDEL) and mito-dsRed to image the behavior of ER and mitochondria simultaneously over time. The vast majority of mitochondrial division events were spatially linked to sites of ER-mitochondrial contact (87%, n = 112 from 281 cells) (Fig. 1B). ER tubules crossed over (Fig. 1B, yellow arrows) and wrapped around mitochondria (Fig. 1B, white arrows, and fig. S1C). At ER-mitochondrial contact sites, mitochondrial constriction followed by mitochondrial division was observed (Fig. 1B).
We next tested whether ER plays a similar role in mammalian mitochondrial division by using fluorescence microscopy of live Cos-7 cells transiently transfected with fluorescent markers for ER (GFP-Sec61β) and mitochondria (mito-dsRed). We imaged regions of the cell periphery where contacts between the mitochondria and ER were well resolved and observed that mitochondrial division events predominantly occurred at sites of contact between ER and mitochondria (94%, n = 32 from 23 cells) (Fig. 2, fig. S2A, and movies S3 and S4). Furthermore, the majority of events (88%) were sites of ER tubules crossing over the mitochondria, suggesting that the structural context of the interaction is important. The frequency of ER-associated mitochondrial division is much higher than would be predicted on the basis of the area of mitochondria covered by crossing ER tubules as determined by colocalization of mitochondrial and ER markers (fig. S2B).
Mitochondrial division occurs at ER-mitochondrial contact sites in mammalian cells. (A to D) Four examples of mitochondrial division over time courses shown in Cos-7 cells expressing GFP-Sec61β (ER) and mito-dsRed. The site of mitochondrial division (white arrows) and the position of the newly formed mitochondrial ends (yellow arrows) are shown. Additional examples are included in fig. S2A. Scale bars, 1 μm.
Thus, in both yeast and mammalian cells, ER tubules are at mitochondrial division sites and may be involved in mitochondrial constriction during this process. Next, we asked whether mitochondrial division occurs in yeast cells that have substantially reduced levels of tubules because of the absence of the membrane shaping proteins Rtns and Yop1 (14, 15). By using both EM and fluorescence microscopic analyses, we observed that, in regions of mutant cells in which ER tubules were dramatically reduced, short ER tubules extended out of the massive ER cisternae and associated with mitochondrial constrictions and division events (fig. S3). Thus, ER tubules are a consistent feature of ER contact at mitochondrial constrictions, even under conditions where most tubules are depleted. Furthermore, Rtns and Yop1 are dispensable for the biogenesis of the ER tubules that associate with mitochondrial division events.
To ask whether ER-associated division events are spatially linked to the mitochondrial division machinery, we determined the relationship of ER-mitochondrial contacts to the division dynamins Dnm1 and Drp1. Dnm1 and Drp1 assemble into punctate structures at steady state, and a subset of these structures are found on mitochondria and at mitochondrial division sites (6, 16, 17). We imaged live yeast transformed with Dnm1-mCherry, mito–cyan fluorescent protein (CFP), and GFP-HDEL (ER) and observed that a large percentage of Dnm1 punctae were at sites of mitochondrial-ER contact (46%, n = 225). These Dnm1 punctae could be observed at sites where ER tubule crossover and mitochondrial division occurred (Fig. 3A). In Cos-7 cells transiently transfected with GFP-Sec61β (ER), mito–blue fluorescent protein (BFP), and mCherry-Drp1, we observed that the majority of Drp1 punctae stably associated with mitochondria and localized to ER-mitochondrial contacts over time (Fig. 3, B to D, and movie S5). Furthermore, a subset of Drp1 at these contacts was associated with a mitochondrial constriction site (78%, excluding punctae localized to mitochondrial tips, n = 50). The mitochondrial constrictions marked by Drp1 punctae were always either at ER tubule crossovers (81%) or adjacent to them (19%) (Fig. 3E and fig. S4). Together, the localization of the mitochondrial division dynamins in yeast and mammalian cells to regions of ER-mitochondrial contacts and the observations that these regions are associated with constricted mitochondria and subsequent division indicate a direct role of the ER in the process of mitochondrial division.
Dnm1- and Drp1-mediated mitochondrial division occurs at ER contact sites. (A) Time-lapse images of wild-type yeast cells expressing mito-CFP, GFP-HDEL (ER), and Dnm1-mCherry. A single focal plane is shown. Arrows indicate the site of mitochondrial division, which is marked by both ER-mitochondria contact and Dnm1. (B) Merged image of a live Cos-7 cell expressing GFP-Sec61β (ER), mito-BFP, and mCherry-Drp1. (C) Examples of cells as in (B) that show that Drp1 punctae maintain colocalization with positions of ER-mitochondrial contact over time. White arrows indicate Drp1 punctae that maintain contact with both the ER and mitochondria. Yellow arrows indicate a rare example of Drp1 that does not contact the ER. (D) The percentage of mitochondrial Drp1 punctae that colocalize with the ER membrane over a 2-min time course. (E) Examples of mitochondrial constrictions at ER contact sites marked by Drp1. Left-hand images show Cos-7 cells expressing mito-EGFP, BFP-KDEL (ER), and mCherry-Drp1, merged as indicated. Right graphs are line scans drawn through the mitochondria and show the relative fluorescence intensity of mitochondria (green), ER (blue), and Drp1 (red) along its length. White arrows at constrictions on images correspond to black arrows shown on the line scan. Additional examples are shown in fig. S4. Scale bars for (A), (C), and (E), 1 μm; (B), 5 μm.
Mff is a mammalian-specific mitochondrial outer membrane protein required for mitochondrial localization of Drp1 and division (5, 18). Drp1 and Mff colocalize in punctate structures on mitochondria, and Mff punctae persist in cells where Drp1 expression is reduced by RNAi (18). Thus, Mff punctae may mark the future sites of mitochondrial division before Drp1 recruitment (18). In Cos-7 cells transiently transfected with GFP-Mff, mCherry-Drp1, and mito-BFP, we observed that Mff circumscribed and localized to punctae on mitochondria, the majority of which colocalized with Drp1 (fig. S5, A to C). To test whether Mff punctae localize to ER contacts independently of Drp1, we depleted Drp1 from Cos-7 cells with small interfering RNA (siRNA) and cotransfected these cells with GFP-Mff, mito-dsRed, and BFP-KDEL (ER). Drp1 was substantially depleted in Drp1 RNA interference (RNAi) cells in comparison with the control cells (Fig. 4B). Selective depletion of Drp1 was further supported by the aberrant and elongated mitochondrial morphology in Drp1 RNAi cells (Fig. 4A and fig. S5D). As expected (18), in Drp1-depleted cells, Mff punctae localized to mitochondria (Fig. 4A). We asked whether mitochondria were constricted at Mff punctae in the absence of Drp1, and if so, whether these sites localized to ER contacts. Of the 25 constrictions we resolved, 16 were at an ER crossover (64%), and another 4 were adjacent to an ER tubule crossing (16%) (Fig. 4, A and C, and fig. S6). Thus, Mff localizes in a Drp1-independent manner to mitochondrial constrictions at sites of ER contact. We next asked whether the ER localizes to regions of mitochondrial constriction in the absence of Mff. Cos-7 cells were depleted of Mff by siRNA and cotransfected with GFP-Sec61β (ER) and mito-dsRed. As expected, mitochondrial morphology was elongated in these cells (Fig. 4, B and D, and fig. S5E). In cells depleted of Mff, we observed mitochondrial constriction at sites of ER contact, indicating that ER-mitochondrial contacts form and mark positions of mitochondrial constriction independently of both Mff and Drp1 recruitment (Fig. 4D).
The ER localizes to mitochondrial constrictions before Drp1 and Mff recruitment. (A) Examples of mitochondrial constrictions at ER contacts marked by Mff in Cos-7 cells depleted of Drp1. Left and center images show these cells expressing mito-dsRed, BFP-KDEL (ER), and GFP-Mff, merged as indicated. Right graphs are line scans drawn through the mitochondria and show the relative fluorescence intensity of mitochondria (red), ER (blue), and Mff (green) along their length. White arrow positions at constrictions correspond to black arrows on the line scan. Additional examples are shown in fig. S6. (B) Western blots with antibody against Drp1 (top) or Mff (bottom) and GAPDH demonstrate depletion of Drp1 in lysates from cells transfected with siRNA against Drp1 [as in (A)] or Mff [as in (D)] compared with control RNAi cells. (C) The number of Mff-localized mitochondrial constrictions in Drp1-depleted cells that colocalize with ER tubules, from 23 cells. (D) As in (A), for cells depleted of Mff and expressing GFP-Sec61β (ER; green on line scan) and mito-dsRed (red on line scan). Scale bars for (A) and (D) large left images, 5 μm; (A) and (D) smaller center images, 1 μm.
Here, we have shown that ER-mitochondrial contacts are a conserved feature of mitochondrial division. We envision two ways that ER contact might directly regulate mitochondrial division: (i) ER proteins intimately participate in division, and/or (ii) ER tubules physically wrap around and constrict mitochondria to a diameter comparable to Dnm1 and Drp1 helices to facilitate their recruitment and assembly to complete fission (fig. S9). The latter is attractive given that the diameter of Dnm1 helices (~110 to 130 nm) is considerably narrower than that of mitochondria and is quite similar to the diameter of constricted mitochondria at ER tubule contacts (138 nm and 146 nm) (4, 6–9). Regardless of the exact mechanism, the ER appears to mark the division site and is likely to be an active participant in this process, because it remains in contact with the mitochondria through the entire fission event. Many human diseases are associated with excessive mitochondrial division, raising the intriguing possibility that these diseases could involve an alteration of ER-mitochondrial contacts.
www.sciencemag.org/cgi/content/full/science.1207385/DC1
SOM Text
References (20–29)
Movies S1 to S5
D. H. Cho,
T. Nakamura,
S. A. Lipton
, Mitochondrial dynamics in cell death and neurodegeneration. Cell. Mol. Life Sci. 67, 3435 (2010). doi:10.1007/s00018-010-0435-2 pmid:20577776
Y. Yoon,
C. A. Galloway,
B. S. Jhun,
T. Yu
, Mitochondrial dynamics in diabetes. Antioxid. Redox Signal. 14, 439 (2011). doi:10.1089/ars.2010.3286 pmid:20518704
L. L. Lackner,
J. M. Nunnari
, The molecular mechanism and cellular functions of mitochondrial division. Biochim. Biophys. Acta 1792, 1138 (2009). pmid:19100831
E. Ingerman
., Dnm1 forms spirals that are structurally tailored to fit mitochondria. J. Cell Biol. 170, 1021 (2005). doi:10.1083/jcb.200506078 pmid:16186251
S. Gandre-Babbe,
A. M. van der Bliek
, The novel tail-anchored membrane protein Mff controls mitochondrial and peroxisomal fission in mammalian cells. Mol. Biol. Cell 19, 2402 (2008). doi:10.1091/mbc.E07-12-1287 pmid:18353969
A. Legesse-Miller,
R. H. Massol,
T. Kirchhausen
, Constriction and Dnm1p recruitment are distinct processes in mitochondrial fission. Mol. Biol. Cell 14, 1953 (2003). doi:10.1091/mbc.E02-10-0657 pmid:12802067
A. M. Labrousse,
M. D. Zappaterra,
D. A. Rube,
, C. elegans dynamin-related protein DRP-1 controls severing of the mitochondrial outer membrane. Mol. Cell 4, 815 (1999). doi:10.1016/S1097-2765(00)80391-3 pmid:10619028
K. R. Pitts,
M. A. McNiven
, Mammalian dynamin-like protein DLP1 tubulates membranes. Mol. Biol. Cell 12, 2894 (2001). pmid:11553726
J. A. Mears
., Conformational changes in Dnm1 support a contractile mechanism for mitochondrial fission. Nat. Struct. Mol. Biol. 18, 20 (2011). doi:10.1038/nsmb.1949 pmid:21170049
O. M. de Brito,
L. Scorrano
, An intimate liaison: Spatial organization of the endoplasmic reticulum-mitochondria relationship. EMBO J. 29, 2715 (2010). doi:10.1038/emboj.2010.177 pmid:20717141
, Mitofusin 2 tethers endoplasmic reticulum to mitochondria. Nature 456, 605 (2008). doi:10.1038/nature07534 pmid:19052620
B. Kornmann
., An ER-mitochondria tethering complex revealed by a synthetic biology screen. Science 325, 477 (2009); 10.1126/science.1175088. doi:10.1126/science.1175088 pmid:19556461
J. R. Friedman,
B. M. Webster,
D. N. Mastronarde,
K. J. Verhey,
G. K. Voeltz
, ER sliding dynamics and ER-mitochondrial contacts occur on acetylated microtubules. J. Cell Biol. 190, 363 (2010). doi:10.1083/jcb.200911024 pmid:20696706
M. West,
N. Zurek,
A. Hoenger,
, A 3D analysis of yeast ER structure reveals how ER domains are organized by membrane curvature. J. Cell Biol. 193, 333 (2011). doi:10.1083/jcb.201011039 pmid:21502358
G. K. Voeltz,
W. A. Prinz,
Y. Shibata,
J. M. Rist,
T. A. Rapoport
, A class of membrane proteins shaping the tubular endoplasmic reticulum. Cell 124, 573 (2006). doi:10.1016/j.cell.2005.11.047 pmid:16469703
H. Sesaki,
R. E. Jensen
, Division versus fusion: Dnm1p and Fzo1p antagonistically regulate mitochondrial shape. J. Cell Biol. 147, 699 (1999). doi:10.1083/jcb.147.4.699 pmid:10562274
E. Smirnova,
L. Griparic,
D. L. Shurland,
, Dynamin-related protein Drp1 is required for mitochondrial division in mammalian cells. Mol. Biol. Cell 12, 2245 (2001). pmid:11514614
H. Otera
., Mff is an essential factor for mitochondrial recruitment of Drp1 during mitochondrial fission in mammalian cells. J. Cell Biol. 191, 1141 (2010). doi:10.1083/jcb.201007152 pmid:21149567
K. Naylor
., Mdv1 interacts with assembled dnm1 to promote mitochondrial division. J. Biol. Chem. 281, 2177 (2006). doi:10.1074/jbc.M507943200 pmid:16272155
J. S. Horner,
J. Nunnari
, Mechanistic analysis of a dynamin effector. Science 325, 874 (2009). doi:10.1126/science.1176921 pmid:19679814
O. W. Rossanese
., A role for actin, Cdc1p, and Myo2p in the inheritance of late Golgi elements in Saccharomyces cerevisiae. J. Cell Biol. 153, 47 (2001). doi:10.1083/jcb.153.1.47 pmid:11285273
W. A. Prinz
., Mutants affecting the structure of the cortical endoplasmic reticulum in Saccharomyces cerevisiae. J. Cell Biol. 150, 461 (2000). doi:10.1083/jcb.150.3.461 pmid:10931860
B. Westermann,
W. Neupert
, Mitochondria-targeted green fluorescent proteins: Convenient tools for the study of organelle biogenesis in Saccharomyces cerevisiae. Yeast 16, 1421 (2000). doi:10.1002/1097-0061(200011)16:15<1421::AID-YEA624>3.0.CO;2-U pmid:11054823
J. R. Kremer,
J. R. McIntosh
, Computer visualization of three-dimensional image data using IMOD. J. Struct. Biol. 116, 71 (1996). doi:10.1006/jsbi.1996.0013 pmid:8742726
Z. Song,
M. Ghochani,
J. M. McCaffery,
T. G. Frey,
D. C. Chan
, Mitofusins and OPA1 mediate sequential steps in mitochondrial membrane fusion. Mol. Biol. Cell 20, 3525 (2009). doi:10.1091/mbc.E09-03-0252 pmid:19477917
Y. Shibata
., The reticulon and DP1/Yop1p proteins form immobile oligomers in the tubular endoplasmic reticulum. J. Biol. Chem. 283, 18892 (2008). doi:10.1074/jbc.M800986200 pmid:18442980
L. Sparks,
G. Voeltz
, Reticulon short hairpin transmembrane domains are used to shape ER tubules. Traffic 12, 28 (2011). doi:10.1111/j.1600-0854.2010.01134.x pmid:20955502
K. Yasukawa
., Mitofusin 2 inhibits mitochondrial antiviral signaling. Sci. Signal. 2, ra47 (2009). doi:10.1126/scisignal.2000287 pmid:19690333
Acknowledgments: This work is supported by NIH grant R01 GM083977 and a Searle Scholar award (to G.K.V.), NIH training grant GM08759 (to J.R.F.), NIH grant R01 GM062942 and an American Heart Innovative Research Grant (to J.N.), and grants from the Biological Sciences Initiative (BURST grant) and the Undergraduate Research Opportunity Program at the University of Colorado (to J.R.D.). We thank the Boulder 3D Electron Microscopy facility for shared equipment and helpful suggestions.
You are going to email the following ER Tubules Mark Sites of Mitochondrial Division
By Jonathan R. Friedman, Laura L. Lackner, Matthew West, Jared R. DiBenedetto, Jodi Nunnari, Gia K. Voeltz
Science 21 Oct 2011 : 358-362
Mitochondrial division occurs at positions where endoplasmic reticulum tubules contact mitochondria and mediate constriction.


6 Points to Remember while Traveling.
1.) Find out the Truth for yourself.
If a fellow traveler tells you about their experience visiting a place, hostel, excursion, or something to do, take it with an open mind and filtered lens. You will only know the truth once you experience it for yourself. Too many times someone had told me so and so is a bad city there is nothing to do there, and then I go and discover it is one of my favourite places! Listen to them fully and then put your own rationality into it and find out the truth for yourself!
Let go of time, seasons, worry and fear. When you let go you are able to not think about the past and memories you once had. You will stop thinking about the future planning and organizing. You will find that when you let go of all, you fall into the present and there infinity exists because there is no longer time. When this happens everything will flow, people, places to stay, food to eat, everything will fall into place. Easier said than done, but just do it!
3.) Always Carry Toilet Paper, Always.
4.) Take up a new Talent.
You are never too young or too old to start something new or learn something new. From language to bracelet making, to guitar playing to cooking to traveling just do it! But its wonderful to pick a hobby/talent that you can easily do while traveling because there is so much down time. Waiting for buses, hanging out with down time because you are tired, or just laying hanging out on the beach, something accessible. Traveling makes you have time for these talents that in a "normal routine life" you may not have time for! Oh and it takes a little bit of commitment too but all is possible.
5.) Learn how to to Cook Healthy Local Food.
Travel with spices and food so that you have no excuse to cook healthy. Maybe a little curry, coriander, pepper flakes, mustard seeds, garlic and or favourite cooking ingredients. Healthy means good food for the body and for the mind, there is no excuse to be eating out all the time and not eating healthy when you travel. The local food also makes this exercise more fun because you can experiment.
I always try and cook local of course, which sometimes is hard in places that are hard to grow fruits and veggies but local is the most important. There are always bug convenient supermarkets that have everything you could possibly want in one place, but many of these stores put small shops that are run by local families out of business. So I would encourage travelers to get comfortable knocking on their neighbors gate and asking if they sell cheese or who does, so that they buy straight from the people and not from the big stores!
You can learn a new language and interact with local people. Hitchhiking provides a free way to travel and a cultural experience as well. Go to gas stations and ask people by knocking on their windows. This way you can look into their eyes and decide if you want to get in the car. And you are more likely to get a ride by asking first and not just with your thumb. Say you don't have the courage or you are traveling alone? No worries because many people will say no to you, so you will have a lot of practice and can learn patience and new people skills! My travels were much brighter because of Hitching.
I was fortunate enough to sail throughout the Chilean channels for a second time. The sailboat was called "Imvubu" (significance is a hippopotamus in Zulu). It's a 54 foot South African steel boat that was only launched 5 years ago.
Owner Ralf Dominick offered my friend Jimmy and I positions to crew in exchange for food and lessons in sailing.
Ocean waves escalate up and repel down…up and down, up and down. 54 ft steel vessel "Imvubu" handles the waters with ease.
Swells swimming in from the open ocean push us to 1.9 knots and gusts of 45 knots against the currents and winds. Up and down. I feel thankful I don't get seasick.
Patagonia is breathtakingly beautiful, with waters tinted a pale glacier green and mountains soaring and diving into the sea with mossy patches and happy green trees.
My favourite part of sailing is when we are not moving. Anchored in a cove. This is the best part.
One can hear all around the nature untouched and vibrant. The thick smell of the trees dancing with the shoreline. The sea mixing with the heavy winds creating a whimsical misty spray that follows the design of the erratic shifting winds.
The sounds are chilling as birds voices echo throughout the forests and the stillness of the bays and coves consume one with purity of the air and open sky. If your lucky you can see pockets in clouds with striking stars in all their radiance and beauty with sometimes their only chance to say hello.
Weather changes quickly and the cove is alive. Alive with chaotic calmness as this change is frequent and can send the boat dancing with the clanky anchor chain.
Sailing is not as romantic as one may believe.
Sailing takes a toll on your body as energy used to maintain balance is sucked away and one can feel helpless and useless at times. Sleeping becomes a routine in the daytime and eating becomes a highlight. The romance lies in the seam of the nighttime and the assurance in being sewed back together in the stillness.
I learned a new language while sailing. New manoeuvres, parts and functions of a sailboat. Not only that but the importance of wind direction, strength, wind angle, and interaction with the boat. Navigation, meteorology, currents, cloud patterns, and air all play a vital role. You must be constantly aware yet the slow pace of the boat makes you want to drift to sleep. It's quite the difficult balancing act.
5 am or 6 am we wake up and anywhere from 6 pm to 11 we arrive to a cove to anchor for the night. Dinner, a drink and off to sleep. It's become routine but almost mundane. No sailing is not as romantic as they say.
45-80 Nautical miles a day, 8, 10 and sometimes 12 hour days.
Coffee and tea become quite the treat, as it takes time to make such a thing. When you have a warm cup and are in the crispy wet conditions it can warm a heart and body right up!
Try cooking in conditions with open water swells and strong winds blowing. It takes 3-4 times to make anything.
Overall, I don't get along with sailing too well. I think I prefer meeting new people, walking and exploring.
Don't get me wrong, it's been a wonderful experience but I think I was made for a different lifestyle.
Meanwhile feeling grateful and appreciative for the openness and willingness the sailing world provided for me. There are always lessons to be learned in every experience.
Here is a look inside of the boat!
Sailing around Cabo de Hornos, Cape Horn.
Rivers of ink tell the tale of Cabo de hornos, Cape Horn with silent witness of tragedies, victories and illusions. Modern boats, strong tides and weather forecast help present day sailors to round the infamous rock in relative tranquility. The way there can be long and tough with thousands of miles of rough waters and shifting winds, faraway harbors and far from the trades with easy routes. The barren and windswept rock is one of the highest symbols of mans challenge to the unknown.
Here is the city of Ushuaia, Argentina from the sailboat.
Again I found myself on yacht Northanger, about to embark on a 7 day sailing adventure with the goal of sailing around Cape Horn, the most Southern tip of South America and known to many as the true "the end of the world". Many explorers and adventurers have died while trying to round it throughout the last and now boats have more technology and weather knowledge to be able to easier predict the forecast.
On January 22 Captain Greg and I met up with clients at 8:00am at the docks with luggage. We proceeded to check out of Ushuaia, Argentina to head to Puerto Williams, Chile. This requires a bit of paperwork and passports. Five hours worth of sailing through the Beagle Canal and we reaches Puerto Williams and had to check the Chilean Armada.
This took a little while so we decided to stay in Puerto Williams for the night.
On January 23 we left early at 5:30 am into the Beagle Canal and sailed till 8 pm. This was the first time I felt sick but when you are heading into fierce winds only moving sometimes 2 or 3 knots against huge swells I've never experienced before. Didn't ever get sick but definitely the pounding pressure hour after hour made me feel crazy. You literally always have to keep a hand on something otherwise you can really hurt yourself. On deck we had a harness and were clipped onto a line because the deck is slippery and the weather unpredictable.
This part also had a passage with no land. I prefer the coast but this sailing day was different than all I knew.
We eventually anchored in Caleta Martial, which was the most strong I have ever experienced wind in my life. Apparently in the cove it got up to 60 mph and around the horn the same day to 80 mph. The wind was so strong it was creating whitecaps only 100 meters off shore where the wind was blowing from behind the mountains. The boat next to us in the cove "commitment" actually has their anchor drag about midnight and were sent into a 5-6 mayhem trying to keep the boat safe in unbelievable winds. If the anchor drags you could potentially be thrown into rocks or roll. It's also hard to navigate as the wind makes it hard to breathe and the winds create a white mist making it hard to see. Boy was the wind impressive that night and made me really respect it. Northanger was on a night watch in case the anchor was to drag. Scary stuff you have to be super careful.
The wind has a fierce potent punch with unbelievable noises. However the energy I found to be cleansing and healing the land. This is a different world here.
The next day, January 25 I felt a little seasick over the big swells that later much longer than the waves I was used to. We went around the horn this day and it was rather calm wind-wise with huge swells from the wind the night before. Rounding the horn was a great experience but not as incredible for me as some thee places in the channel. The clients we were with enjoyed it and was essentially why some of them came to Patagonia. But for me, they were rather barren, sharp rocks, and not a lot d beauty. Nonetheless I feel super grateful for the experience. We found a different cove to anchor that night.
The next day January 26 we took it easy and went for a hike and met the little armada post which had a Chilean family and a pet king penguin. The children were super cute and it was good for me to speak Spanish again after two weeks of English. The hike was gorgeous and the cove made for a great place to relax.
The next morning January 27 we left on a 50 km sail for Puerto Williams. Had some wind against us and we had to stop in a cove for lunch and wait for it to die down a bit. We made it to Puerto Williams about 7 at night.
We headed for Ushuaia Argentina with a 5 hour sail and competed the full circle.
In Patagonia for the most part there are charter boats which offer tourists and visitors a chance to experience the area and they get paid for taking them. Then there are private boats that typically are travellers themselves maybe making a first time trip to Antarctica or sailing around the world. It makes for lovely conversations on the docks and you meet about every type of person. This is one if my favourite parts of sailing, making these relationships.
Boat rocking cradle-like in sea of tranquility. The sea comes with a switch to an instant storm with gusts of wind and rain. There is a battlefield of albatross attacking seals and wind blowing waves forcing the sailboat dead into the wind at a standstill. Coves, bays, channels and passages lined beautifully with jagged mountains varying in colour, shape and snowfall. As nighttime falls, it gently grips me into a deep healing sleep as the neon black sky light up the stars to shine enough for vision.
Life is all around and untouched by humans leaving a pure sense of energy and peaceful reflection.
Stillness, rivers talking, full moon glowing and tiny droplets of aguaditas steaming my face gracefully playing with my sensations. Crispy cold fresh air yet I am warm as I am swarmed with a deep sense of connection. These glimpses of untouched land give me a sense what explorers must have felt when they first chartered these untameable waters. Fierce joy in the wind, music in its touch, twirling, spiralling, and running through my mind and entire body. It is cleansing.
Time lasts for eternity yet creeps into existence as the sky changes from dirty pink electric sherbet to soft jet navy lined with a twist of light blue.
We sailed from Punta Arenas, Chile to Puerto Williams, Chile, through the stretch of Magellanes and Beagle Canal on the boat called "Northanger". Northanger is a 54 foot Damien II, lifting keel, steel ketch New Zealand owned.
The strait of Magallanes is "the stretch links the pacific and Atlantic ocean through an S-Shaped 310 miles cut through the South American continent. It's waters give access to countless channels, inlets, and bays, a unique feature of the area. The stretch is a feature cut in the Andean Range, the vertebrae backbone of the S.A. Continent. Deep cuts were created by result of the last ice age 20,000 years ago, with effects still lasting another 10,000 years. Before the area was covered a huge ice cap more than 1,000 meters thick in places countered on the cordillera Darwin. From here a long series ice tongues spread in all directions downwards into the ocean giving birth to the wide and deep glacial valleys and rolling hills of Patagonia. The big last change happened 15,000 years ago when the ice caps began to melt, there were tons of sediments, rocks and deposits shifting the land into Tierra del Fuego. As time passed and water eroded the natural forming dams and opened the valley to ocean waters thus creating the large Tierra del Fuego." (Rolfo and Ardrizzi).
My journey started before the water, while the boat was still on land in Punta Arenas which is about 116,000 in population, pretty industrial. I worked a couple weeks preparing the boat, cleaning and making the boat come to life after 8 months of sitting in the ship yard. The boat was located 8 km outside of town so we did a lot of hitchhiking back and fourth.
Here is Duncan and Renee who helped prepare the boat with us. They were visiting form Newfounladn, Canada and had some time to spare to help! We enjoyed making food and drinking coffee together. I am glad they joined the journey.
The Armada or "navy" of Chile is quite controlling and specific about sailing on the waters and makes all boats fill out paper work and check in everyday via radio. You must go to the port captain to get cleared to leave and once stamped you have to wait for approval. This became quite the process.
Finally on January 11th we moved the boat from from its cradle with the big boat moving machine (never found out the proper name for it) and ready to be moved into the water. We had one more night until it was going to happen.
There I met Eduardo had a tiny machine linked around his neck that he loved being in control of. He was telling me to stay in Chile and work with him at the ship yard, I passed.
We went "provisioning" which means getting all food and things necessary for sailing a week. Lots of fresh fruits and vegetables and cans. There is one thing for sure since being on Northanger and its that I had never ever been hungry. We eat delicious vegetarian food and are always trying new recipes and eating together. I've really come to appreciate and love the simple act of eating a meal with others. It doesn't take too much time but the quality of life improves and you are in charge of what is put into your body. I've been vegetarian for almost a year now and since then, I love to cook!
On January 12th we launched the boat into the water at night, 10:30 pm from the cradle with a big rope and greased planks as Eduardo and his team pushed it off the stand and shot it into the water as we all stood on deck. Eduardo shouted to me a couple time to stay with him in Punta arenas saying "no te vayas!" Which means, ¨don't go!¨ Funny. Greg had his friends in the dinghy the whole process ready to dive or help out in case anything happened.
We anchored in the port Punta Arenas and I have to admit the boat transformed into a different creature as it slide into the water. The waterline surprised me the most, as it was within reach of the deck. I was surrounded by water on all sides and willingly forced into a subtle back and forth motion that gives me sea legs when I go to land. The hatch that we had to go through to get to the galley reminded me of the TV series ¨Lost¨ everytime. Could not get over it. Above was my bunk!
On January 13 there was wind, wind and more wind; I had never seen wind in Punta Arenas like that. We took the dinghy to land and can't believe how the strong breeze can make one fall over into your Neighbor and not have enough time to say excuse me because you are trying to not be blown away. The navy closed the ports because it was so strong but this didn't make sense as outside of the ports were much safer for us to be in then in. In this time I learned how to tie some knots- clove hitch, stopper knots and the bowline. We ultimately decided to wait another day before heading south.
On January 14 at we motored to Cabo Froward against the wind to almost a stand still and had to turn around as it was too rough. We anchored at Sani Ciedro in Aguila Bahia (Eagle bay). The bay was named after Louis Antoine de Bougainville after her ship "L Algile". We encountered three Israeli guys on the beach who flagged us down. They were on the well known Cabo Froward trek and needed help because own guy was super sick. Wasn't much we could do but I think they thought we were going to rescue them or something.
On January 15 what a windy night! We waited till the wind was to doe down by visiting the lighthouse where I had previously been before. There we met the beautiful couple living there that made us coffee and big doughnut type treats. Rosita even put my name in one of them!
My friend Marcello radioed us to give us a weather report and say hello as he sailed past us in the strait. The boating/sailing world is surprisingly small and can be a comforting place where other boats soon become friends and you look after each one another.
We went for a hike through the muddy forest and onto beaches lines with whale bones showing remnant of a processing plant for whale oil. The plant was open from 1906-1907 and just in that year killed over 449 whales.
We took off at 5:30 pm and sailed through San Pedro Canal. Mind you here it is summer so the light starts at 4am and lasts till sometimes 11:39 pm. The canal is named after Pedro Sarmientro de gamble who sailed his ship called "our mother of waiting" in 1580. We put out our first shorelines to the beach around trees in the most calm water I have seen yet. We anchored in "Caltea Cluedo¨ a large long bay on Isla Clarence opposite of Isla seabrook and we collected water from a waterfall in the cove via practicing driving the zodiac.
I practiced driving the zodiac going fast and reversing as a brake when you get to a certain spot and holding it long enough for someone to tie a line. This has become one of my highlights of sailing. I got to take it out to get water from the waterfall near by!
We went for a hike later that night, it was raining but it was beautiful! Saw the lake where the waterfall came from and this is where I wrote the entry for the blog. If I had to chose a favorite spot this would of been it.
On January 16 it was the birthday of one of the woman on the boat, Renee. We made a pancake, plantain and fruit smoothie breakfast while along the way sailing. We did have to motor a bit because there was no wind at all, leaving a reflection of the landscape on the water mirror like. Above is a shot of the sky on the water and below is the panoramic view we had, just like a calm lake.
Sailing is turning out to be much more tranquil and slow paced than I imagine. The boat only goes 3-7 knots an hour so you're not flying any means. It forces you to be present and really take in the scenery. Sometimes you can see a mountain and and hour later still be staring at the same range and horizon. I can't imagine what it's like to sail in the middle of the ocean without the landscape. The land you greet sailing really for me is one of the best parts. We sailed through San Pedro passage and Canal Acwalisnan (Paso o Ryan).
On our arrival to the cove where we were to anchor there were. 1, then 2, 4, 6, 8 dolphins that played with us dancing and moving friskily through the jetting water off the boat. They are called ¨Peale¨ Dolphins.
On January 17 we sailed all day 10am to 10pm.There were dolphins all the day again this type is called a Peale dolphin which are known to be slow and quite playful with the boat. Grey with a white underside. Oh how I love the dolphins! We had dinner late and on the way I made lentil burgers with honey Dijon mustard!
We anchored at Caltea Laguna (Lake Cove) with again, shorelines. This day I learned how to the steering works on the boat, practicing zig zags and circles getting a feel for it.
On January 18 we were in the Beagle Canal, full on 7am-5pm sailing day. The Cordillera Darwin Mountains show signs of the once melting ice cap through fingers of glaciers. The range towers to the North at elevation of 2,000 meters (6,574 ft). Rivers, ice crumbling into the sea and electric neon pastel glaciers named Roncagli, Bove, llaha, and Frances.
You could see storms roll in far away and when the catch up with you how the energy changes and becomes alive. I learned how to take down the anchor and at night we anchored in Caleta Olla (Wave Cove).
On January 19th we left at 10am from the cove and came out into the beagle canal. Passes through the town of Ushuaia where we saw cars and planes for the first time in a week. East winds and sails were up. I learned how to drive while putting a sail up, timing it into the wind and holding it while the sail rises. I learned how to make some homemade bread!
20 miles later and we arrived in Puerto Williams that had a nice yacht club with bar and maybe 20 sailboats. Met lovely people and got to stretch my legs! I never thought I would of made it this far south, let alone in a Sailboat. Its been a special experaince. You can also see the picture above is of a little Seal friend. There were many of them who met the boat along the way, so curious.
Below you can see the view of Puerto Williams from us pulling in, it is super small. The mountain range is called ¨Navarino de los dientes¨ and is a well known trek you can do for a couple of days.
What a stunning journey. Couldn't of asked for a better trip! It was full of beauty, challenges, new experiences, and constant lessons to be learned. I feel super grateful to Greg and Northanger for letting me come along. It created a reality I didn't know to exist and I feel fortunate.
I want to give credit to a book I received tons of information from that was on board of Northanger called "Patagonia Tierra del Fuego" by Mariolina Rolfo and Giorgio Ardrizzi. I paraphrase a lot of their information in this post but it's a phenomenal book about the channels. If it wasn't for their book I wouldn't of been able to understand all the history of Tierra del Fuego or the specifics to each anchoring.
Fierce windy breezes, stratus clouds moving rapidly, crispy cold air with glimpses and sprinkles or rain, glimpses of sunshine with dolphins prancing in and out of the water, the sound of banging tools and buzzing machines. The start of the Sailing season in Punta Arenas. We are preparing.
I am currently in the thick of the sailing summer season which starts right around Christmas and tappers off around March. Early January is when most of the prime time weather kicks in for many trips to Antarctica. Summer is in the air, yet with the weather we have here in Patagonia, you would never know it.
The boat I have been working in is called "Northanger" (above, and we are about to put it in the water in 2 days) owned by pair Greg Landreth (New Zealand) and Kerri Pashuk (Ontario, Canada). For this trip Greg with be the Captain while Kerri is on their other boat called Saoirse. She is currently sailing in the from the Bahamas down to Punta Arenas. Her blog is great, she blogs about cooking and apparently she makes some delicious brownies. I can not wait to meet her. You can check out both of their websites, the couple has been around these waters for a long time and have tons of knowledge and experience. I have a lot to learn from them.
Above is more or less what we will set off to do. Puerto Williams is actually the Southern most city of South America which is lower than Ushuaia. The Cabo de Hornos, Cape Horn, is a trip we will make twice after Williams. You are looking at the most Southern tip of South America. The lower part where you see a big line, is the border. Argentina is to the right and Chile to the left. Ironically you can not cross from Southern Argentina to Northern Argentina without crossing through Chile. The roads in between the borders are also all dirt filled windy pothole roads. They have quite the history and relationship but more on that later.
We will be setting sail from Punta arenas, Chile – and making our way trough glaciers, Magellan straight, into the beagle canal to Puerto Williams.
The 7 day trip and a fully hands on experience. I will be setting off with a couple Rene and Duncan from Newfoundland, Canada as well. I also found a friend to come along from Germany! It is looking like a good trip. It will be my first long sailing trip!
We have less than 4 days before heading out onto the Magellan to go 7 days to Puerto Williams. So far most of my tasks on Northanger have involved cleaning the bilge (the part of the underneath side of the boat, filled with grease and water), cooking delicious veggie meals, revarnishing the food drawers, and helping out with miscellaneous tasks.
As an introduction when I first arrived to Punta Arenas to the Magellan and Patagonian waters, my friend Jimmy (Missouri, USA) who I met at Erratic Rock introduced me to a wonderful man Marcello who took us on quite the adventure. We took a zodiac boat right out into the straight of Magellan that took 8 hours on a zodiac going against the currents and around the most Southern Tip famously called "Cabo Froward".
The destination was an island called Carlos Tercero where Marcello had an organization called "Whale sound". Pretty amazing Organization that's works on the preservation and continuation of the families of whales who migrate to the Carlos Terceo waters to feed before going back up the pacific coast to Colombia to breed. They have identified over 150 consistent whales that keep coming back every yet. They can tell what whale is which by the fin and the marks on the tail. They have a whole binder filled with 150 whales and names and identification pictures. Then it took us another 6 hours back to Punta Arenas, but fortunately with the winds.
Marcello bravely makes the Punta Arenas zodiac journey twice a week. He was generous to let us go with him and experience the process. It was a wonderful introduction and I can confidently say my body took quite the beating from that trip.
Working on a boat is quite the process and ironically reminds me of painting (like everything in my life does). The process and lifestyle of sailing are much apart of sailing as the actual water experience.
Like painting, when you want to paint a picture, for example a rose; there is also a lengthy process. Buying paints, cutting wood, stretching the canvas, preparing work space, mixing colors, creating a vibrant work space, setting up the picture and then finally you paint the background that takes hours and you learn that painting the rose only takes 1 minute. It's all about process and steps to get to the final piece. That is what is so beautiful about art, sailing and life.
We are constantly in a process of changing, growing and learning. A process that will never stop. The more we think about life once we finish that rose, once we get a perfect job, or once we become the perfect person, then we lose sight of what life is all about.
We are only here in the moment, and that's the life we are creating. Tomorrow and next year will come when they come so why not focus on this moment instead?
Process is important, and what I believe defines a persons. I want to see people for who they are in the moment and not by the outcome of who or what they become but rather by how they got there.
One of my not favorite questions to ask people (preferably older people) is what was your first job? I love the question, and it's one that I think people get more excited about then if you ask them what they do right now. Why do we have to be nostalgic about something we want to be doing, or dreaming of? The reality is that we can all be making it come true right now. If you can dream it, you can manifest it.
With tangible analogies like sailing and painting a flower, I am able to see this representation of the way that I want to live my life. It's not slow, it's present. It's not fast, it's absorbent and meaningful. It's not comparable, it's just unique and has its own breathe.
I have learned so much from this sailing world already I can't wait to actually get out on the water. However now I will work. And the work and wait will be just as fabulous as when we start to sail.
Where: Punta Arenas, a buzzing city that is just four hours south of Puerto Natales on the Magellan Straight in Patagonia, Chile. Filled with cruises, sailboats, murals, sculpture, wildlife and high pitch windy shores.
I found a homey Chilean restaurant called ¨La Marmita¨ which means the cooking pits owned by Lorena and Alfredo.They immediately took warmly to me and this was the first time as well that I was marketing myself in person as opposed to using email.I told them I would be around for two weeks, showed them my images of my work on my phone, and told them for food and money we could do an exchange. 3 days later and I got a call from them saying that they would love me to paint a border around a blackboard for them. I agreed, seemed reasonably small and after I took a look at their vegetarian menu we had a deal.
The exchange: 10 hours of work for $60USD, and meals from the restaurant (included desserts, juices, and coffee). I ended up taking showers there and using their WIFI as well because I was camping or staying on a sailboat and did not have an access to those luxuries!
What: A mural border around a ¨to be¨ chalkboard which will showcase the specials for the day. My instructions were limited and the direction was rather free. Lorena said she wanted a colorful border with birds and flowers and that she trusted me. I love when clients trust me, it makes for such better work. She gave me a lot of space, and freedom to do what I needed to do. Very accommodating.
What I learned: Never take for granted the love and support someone gives you. Accept kindness and let love in. The couple really made me feel at home. They always told me to treat the restaurant like my own house, made me lunches with their 9 year old son an just treated me with love and respect. I learned how to accept all of it and be present with them every time I was at the restaurant. Acceptance.
A new mural in Puerto Natales, Chile and it is my first piece in this beautiful country. It also marks the start of something special for my mural making path. I tried spray paint for the first time and on a car for my first time as well. I had a lot of chances and time to experiment with the new medium. But first a little about Puerto Natales because the energy of the city really inspired and influenced the way I painted the car.
Puerto Natales, Chile is where the sunsets at 11:30pm for the start of summer begins here. The mysterious glimpses of light disappear not too long after 12:30pm. The crisp air looms wisely amongst the mountains that are landscaped over a cold windy lake. Here the tony black and neon birds play and flutter together.
The town is small. The people here know each other and you are never too far away from meeting another adventure seeker. Beyond the super touristy mask of Natales and away from the boardwalk or Main Street is a lifestyle of tranquility, oozing with peace, long gorgeous trekking, rock climbing and a clean energy.
Where: Erratic Rock Hostel, owned by Bill native of Salem, Oregon who has lived in Natales 15 years. The hostel has simply a wonderful vibe, homey energy as the Erratic family definitely knows how to make a person feel welcomed. With a limitless supply of classic movies on VHS, a cozy gas fireplaces, homemade bread and peanut butter, Sunday brunches and a wonderful network of interns who work and commit to helping out in the hostel for a couple months a year make the place a unique home that just happens to be a hostel. It's a special place.
Here is everyone that volunteers and helps out at the hostel, we took a lovely bike ride against the wind near the coast. Just stunning views, good people, and the outdoors. While my stay at Erratic Rock we went biking, I learned how to crochete, and we never went without an empty stomach or cup of black coffee.
Side note, I was able to paint a guitar while staying the the hostel as well for a friend. Here is a little peek.
I was super nervous to start painting, more nervous than I have ever been to start a piece just simply because it was a new medium and a new canvas. Here you can see the hesitation, and just me learning how to use a can. But I knew that I had to keep moving with the piece and not think too much! Here above is when I first just started the piece and I washing the car on the side walk. The police were upset and came to tell me to move the car and wash it in the river. Go figure.
The story of how I got the van gig: I was renting gear for the Torres del Pine trek at Base Camp which is a rental store just next to Erratic. It is actually owned by Paul, Bill's younger brother. So the rental store wast open at 10am on a Saturday so I had to wait for them to open.
I was walking away from the rental shop when I saw a friend I had made in Puerto Madryn, Argentina. He waved and signalled me to come into the hostel. The first thing I was greeted with was the manager Julie, also from Oregon who said "Want a cup of coffee? You can't have a real Sunday morning without black coffee." I immediately was intrigued. Well after 1 hour of playing cards and chatting with one of the employees, Ruth, she mentioned that they had just bought a van needed someone to paint it. I volunteered immediately and made plans to stay at Erratic after my 5 day trek into the national park. It was seemingly simple and effortless. !
Accommodation: Mural in exchange for a bed, food and rental gear. I rented quite a few things from the owners brother, Paul, next door called "Base Camp". It is a great little business: a bar and rental store which is super successful and a nice pairing to his brothers hostel.
What I learned: How to use spray paint, and more importantly how to use it effectively in the Patagonia wind. What an experience. Because the wind was so strong and it rained quite a bit it was quite the challenge or maybe an excuse to stay longer. The first couple of layers were hard as I was experimenting and getting used to the medium. Once I got rolling and more comfortable it was fast, so much faster than painting and in a different. The concepts of color, content and design are the same, but the process is different and there were shortcuts and tricks I learned.
At first, I kept wanting to put my fingers on the car and change the outcome but the paint dries almost immediately and this was hard to get used to. I realized how much I love using my hands. This is why I like painting so much. The paint brushes and the way the bristols move.
Anyways, with spray you just use a finger, nothing more. Maybe some stencils if you want. Literally my pointer finger and my thumb on my right hand were super sore after the third day painting. Pretty crazy to think that's what created the whole piece. Just my finger!
Length of time: Almost 2 weeks including 5 days where I went trekking through Patagonia to get experience. I painted maybe 2-3 hours every other day or so. I will return to Erratic for Christmas. My second Christmas away from home and today marks the first day of Sumer here in Southern Patagonia in Chile and Argentina. Pretty crazy how South I am!
After I painted the van, and ironically on my last night we got to take the van out (me and some of the volunteers) to go camping. We ended up driving to Lake Sofia, about 45 minutes out of town and I got to sleep in the car. I was so happy that I was able to get into the car, and experaince the van outside of Puerto Natales and on the road. What a gift!
I feel super fortunate for the experiance. I love all the people that I have met from Erratic and feel super special to be apart of the family there in Puerto and for those friends who live all over the world. Thank you Erratic and watch out for more spray painting murals coming soon! I even went back to Erratic Rock for Christmas. Merry Christmas everyone!


text:
Collector Bits: Mischief Makers
A wildly under appreciated game for the N64, Mischief Makers will forever be a staple among my retro game collection. During a time that saw the vast majority of game developers transitioning to full 3d games, true sidescrollers became a bit of a rarity on the N64. But during this time dominated by the discovery of 3d, a 2D gem was created.
The plot is simple: A loony scientist by the name of Professor Theo and his robotic maid, Marina, have just landed on the planet Clancer, which is inhabited by a race called the Clannad. The professor is captured by the emperor and it's now up to you, Marina, to save your creator. Pretty straight forward.
The game was developed by Treasure (who also brought us Gunstar Heroes for the Sega Genesis) and published by Enix in 1997. It was originally released in Japan a few months before the NA release under the title Yuke Yuke!! Trouble Makers. By early 1998, Mischief Makers was released to all regions. Riddled mixed reviews and mediocre gameplay ratings, the game quickly became an extremely underrated title with a small, but very devoted fan base. It's not an incredibly rare game and can be easily found on Amazon, but the value has seen a spike in value from $10 up to around $15 loose in the past couple years.
You will find that Mischief Makers does nothing ground breaking or breathtaking, but it does most everything right. A very solid release and one of only a few sidescrollers for the N64. This game has been one of my favorites since it was released and is a true gem for the Nintendo 64.
Pricing 2015
Loose:
CIB:
Desirability:
Labels: Collector Bits , N64

redpajama_set_name: RedPajamaCommonCrawl


text:
<?php
session_start();    // init session
if (isset($_SESSION['role']))
{
    header("Location:".$_SESSION['role']."_index.php");  // logged in, redirect
    exit();
}
?>
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Knowledge-Based Prescription System</title>

    <link href="css/bootstrap.min.css" rel="stylesheet">

    <link href="css/stylish-portfolio.css" rel="stylesheet">

    <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
    <link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">

Knowledge-Based Prescription System

Select Your Role and Log In

            I am a doctor
            I am an admin

                    <form class="login-form" method="post" action="login.php">

Doctor Login

                        <input type="hidden" name="role" value="doctor" />
                        <?php
                            if (isset($_GET["doctor_fail"])) {
                                echo '<input type="text" name="username" placeholder="failed! username again."/>';
                                echo '<input type="password" name="password" placeholder="failed! password again."/>';
                            }
                            else {
                                echo '<input type="text" name="username" placeholder="username"/>';
                                echo '<input type="password" name="password" placeholder="password"/>';
                            }
                        ?>
                        <button>login</button>
                    </form>

                    <form class="login-form" method="post" action="login.php">

Admin Login

                        <input type="hidden" name="role" value="admin" />
                        <?php
                        if (isset($_GET["admin_fail"])) {
                            echo '<input type="text" name="username" placeholder="failed! username again."/>';
                            echo '<input type="password" name="password" placeholder="failed! password again."/>';
                        }
                        else {
                            echo '<input type="text" name="username" placeholder="username"/>';
                            echo '<input type="password" name="password" placeholder="password"/>';
                        }
                        ?>
                        <button>login</button>
                    </form>

Knowledge-Based Prescription System

Yet Another Database Group
Xivid, Nil, Tony

 +86 13029990587

  kbps@vivid.name

Copyright © 2016
Yet Another Database Group

redpajama_set_name: RedPajamaGithub


1 So these three men ceased to answer Job, because he was v righteous in his own eyes. 2 Then Elihu the son of Barachel w the Buzite, of the family of Ram, burned with anger. He burned with anger at Job because he justified himself x rather than God. 3 He burned with anger also at Job's three friends because they had found no answer, although they had y declared Job to be in the wrong. 4 Now Elihu had waited to speak to Job because they were older than he. 5 And when Elihu saw that there was no answer in the mouth of these three men, he burned with anger.
b the breath of the Almighty, that makes him c understand.
like new f wineskins ready to burst.
Uz his firstborn, Buz his brother, Kemuel the father of Aram.
For Job has said, 'I am in the right, and God has taken away my right.
If you are pure and upright, surely then he will rouse himself for you and restore your rightful habitation.
Neither is new wine put into old wineskins. If it is, the skins burst and the wine is spilled and the skins are destroyed. But new wine is put into fresh wineskins, and so both are preserved.


Awaken To The Healer Within has come at this time to assist in opening the understanding of who the true Healer is and where true healing comes from. It empowers the reader to receive and integrate a healing at all levels of their being. Taking the mystery out of disease, it brings forth the simplicity of healing and takes the philosophies being taught by many, putting them into a workable form that may be practically applied in our life.
Awaken To The Healer Within guides you on a gentle and beautiful journey in understanding your relationship to the world and those around you. It is a bridge to assist you in opening your consciousness and to allow you to move beyond the Healing to bring forth our gifts to the world.
Awaken To The Healer Within (320 pages) is more than just a book; it is Healing Tool, empowering readers to heal themselves. You are lovingly guide through a Healing as you become aware of your purpose and face life with new determination, empowerment and inner strength. As you let go of old fears and judgments, you move into Unconditional Love of self and others. Are you ready to heal all aspects of your being, reverse physical degeneration and move into an expression of joy and Unconditional Love? Are you willing to call forth the perfection of your identity, reclaim your abundance and prosperity, and step free of the Shadow of Fear? Do you choose to reclaim your free-will choice? Then this book may hold the answer you have been waiting for.
Among the many things you will experience in your journey are letting go of the recurring thought patterns, freeing your Divine thoughts, understanding creative manifestation, healing the child within, and increasing the life potential in every part of your being. As you begin to feel the presence of your angels and become aware that miracles are everyday occurrences, life will never be the same.
The Master said, "Ask and you shall receive." The Vibration of every thought, no matter how insignificant will resonate throughout every part of your Being, and throughout the Universe.
"It is a very moving book, I love it. I found much truth within, and I am using the information to help me personally with my own healing. I am recommending it in my workshops."


text:
The Daily Wave: Supporters Culture; The Sky Is Falling!
Through four games, are the Rapids sticking to fans expectations? Are they doing better or worse? Is everybody over-reacting? The season is not yet a month old, so lets everybody calm down.
By rockycoors Mar 27, 2013, 8:00am MDT
Share All sharing options for: The Daily Wave: Supporters Culture; The Sky Is Falling!
The Daily Wave is a slice of opinion from a Burgundy Wave contributor, released every weekday morning.
Read on twitter during last Saturdays game against the L.A. Galaxy: "Pablo should retire!, Hinchey should be fired!, Kroenke should sell the team to be competitive!"
I don't agree with any of these viewpoints. But what's important is that people have the right to give them. I believe that there is a part of the media that should expose these panic-spreading fanatics so that others can learn and be smarter about where they should direct their ire. Jerry Springer, Maury Povich, and Steve Wilkos are the best examples of exaggerated scenarios of show business. Their message comes across as celebrating the dregs of society but in reality, at least for some people, it's a scared straight day-time television that you hope never happens to you. In my mind they are doing a public service and if you want to go on one of these shows then I only hope they offer therapy along with paternity tests. In the spirit of Steve Wilkos I'm going to give some tough love to the Rapids fans that are overreacting to the first four matches of the season.
Sure Colorado has only picked up a point out of a possible 12 but remember the Rapids are without Edson Buddle, Pablo Mastroeni, Jaime Castrillon, Matt Pickens, Diego Calderon, Martin Rivero, Jamie Smith, and will be without Drew Moor this weekend against the Portland Timbers because of a red card. Pareja is hamstrung by the players he has left to use on the roster. We should feel lucky that the Rapids have been competitive in all of our matches this year for the simple fact that there are more players in the trainers room than the practice field. So lets not overreact about this.
When Colorado gets their players healthy they will have a totally different team. Although I believe Dillon Powers has earned a spot. I've seen the Rapids in person three times so far this year and he does a lot that the camera doesn't catch. Powers has proven to me that he belongs in the first team and proves the first round pick worthy. Powers is the unsung reason why the Rapids have contended in their matches. Go back and watch the Real Salt Lake game. Powers neutralized Kyle Beckerman. When was the last time the Rapids made him a non-factor? The other reason is the goal-keeping of Clint Irwin. Sure the Rapids have a pace of scoring one goal every other game. But they are a one dimensional team at the moment with their best chances coming off a counter attack with DeShorn Brown using his speed to get behind the defense.
Which brings me back to Pablo. He's 36 years old. He's coming off a major injury(concussion). The rehab for a concussion is to do nothing. Having post-concussion syndrome is tough. Standing up can cause symptoms to appear.
Every closed head injury is different. That's why some people bounce back in a week and some take a year. But if you haven't had a game situation for close to a year you are probably going to pick up some nagging injuries. It's evident just watching this team that they play better with Pablo on the field. He was the captain when the Rapids won the MLS Cup. So maybe we can cut him some slack if he wants to play the twilight of his career helping lead and build the Rapids for years to come. So let's stop over-reacting. It's four games in the season. Panic shouldn't be spread just yet. Ask yourself what your expectations were a month ago and now.
Please reserve judgement until Pareja gets his full team. Make quick hysterical decisions and you could end up on Jerry Springer, or worse, Scared Straight where you get to be on television scaring children by yelling at them to not make the same mistake you did and asking them if they want to live in prison. Even Josh McDaniels got more time than the current Colorado Rapids regime. Let's not overreact.


text:
package com.intellij.psi;

/**
 * THIS CLASS WAS GENERATED AUTOMATICALLY WITH StubGen BASED ON IDEA BINARIES
 * DON'T MODIFY IT MANUALLY!

 * @author Alexander Kochurov (alexander.kochurov@maxifier.com)
 */
public interface PsiMember extends PsiModifierListOwner, NavigatablePsiElement {
     PsiClass getContainingClass();

}


text:
Love of trashy films linked with above-average intelligence, study says
Fans of trashy films are also more likely to enjoy arthouse cinema
Friday 5 August 2016
Preferring Mega Shark versus Crocosaurus to Citizen Kane doesn't make you a cultural retrograde – it actually suggests you have above-average education and a preference for arthouse cinema.
That's according to a study by the Max Planck Institute for Empirical Aesthetics. Researchers used online surveys to study regular consumers of trashy films and work out why people seemed to enjoy films that really didn't seem to be that good at all.
Sharknado is the archetypal trashy film with all the trappings of its genre: low budget, a nonsensical plot and huge splashings of blood and guts. That film, alongside Plan 9 from Outer Space and The Toxic Avenger, was the most mentioned by the study's participants.
"To such viewers, trash films appear as an interesting and welcome deviation from the mainstream fare," said Keyvan Sarkhosh who co-authored the study. "We are dealing here with an audience with above-average education, which one could describe as 'cultural omnivores'. Such viewers are interested in a broad spectrum of art and media across the traditional boundaries of high and popular culture."
The study, which is the first major empirical investigation into trashy films and their audience, found that viewers often found an 'ironic enjoyment' in watching films that are derided by critics and actively sought out films which they themselves described as "cheap" or "trash". It seems that its mostly men who are happy to subject themselves to sub-par cinema, though, almost 90 per cent of the participants in the study were men.
Researchers also found that trashy film fans were more likely to also have an appreciation of arthouse or 'highbrow' cinema. To go full 'culture omnivore,' then, try pairing Lesbian Vampire Killers with Mulholland Dr.
Monday briefing: We're in the midst of the hottest five years ever recorded
The UK says it loves immigrants. Will immigrants believe it?
By Gian Volpicelli
Does the BCG vaccine work against coronavirus? We just don't know
Google and IBM's supremacy spat misses the big quantum picture
By Tom Simonite


text:
Home » Bare-acts » Income-tax Act 1961-2017 (Chapter – XVI Special Provisions Applicable to Firms)
Income-tax Act 1961-2017 (Chapter – XVI Special Provisions Applicable to Firms)
by B&B Associates | Dec 6, 2017 | 0 comments
Chapter I|Chapter II|Chapter III|Chapter IV|Chapter V|Chapter VI|Chapter VIA|Chapter VII|Chapter VIII|Chapter IX|Chapter X|Chapter X-A|Chapter XI – Chapter XII|Chapter XII-A|Chapter XII-B|Chapter XII-BA|Chapter XII-BB|Chapter XII-BC|Chapter XII-C|Chapter XII-D|Chapter XII-DA|Chapter XII-E|Chapter XII-EA|Chapter XII-EB|Chapter XII-F|Chapter XII-FA|Chapter XII-FB|Chapter XII-G|Chapter XII-H|Chapter XIII|Chapter XIV|Chapter XIV-A|Chapter XIV-B|Chapter XV|Chapter XVI|Chapter XVII|Chapter XVIII|Chapter XIX|Chapter XIX-A|Chapter XIX-B|Chapter XX|Chapter XX-A|Chapter XX-B|Chapter XX-C|Chapter XXI|Chapter XXII|Chapter XXIIB|Chapter – XXIII
CHAPTER XVI
SPECIAL PROVISIONS APPLICABLE TO FIRMS
A.—Assessment of firms
182. Assessment of registered firms.
[Omitted by the Finance Act, 1992, w.e.f. 1-4-1993.]
183. Assessment of unregistered firms.
184. Assessment as a firm.
(1) A firm shall be assessed as a firm for the purposes of this Act, if—
(i) the partnership is evidenced by an instrument ; and
(ii) the individual shares of the partners are specified in that instrument.
(2) A certified copy of the instrument of partnership referred to in sub-section (1) shall accompany the return of income of the firm of the previous year relevant to the assessment year commencing on or after the 1st day of April, 1993 in respect of which assessment as a firm is first sought.
Explanation.—For the purposes of this sub-section, the copy of the instrument of partnership shall be certified in writing by all the partners (not being minors) or, where the return is made after the dissolution of the firm, by all persons (not being minors) who were partners in the firm immediately before its dissolution and by the legal representative of any such partner who is deceased.
(3) Where a firm is assessed as such for any assessment year, it shall be assessed in the same capacity for every subsequent year if there is no change in the constitution of the firm or the shares of the partners as evidenced by the instrument of partnership on the basis of which the assessment as a firm was first sought.
(4) Where any such change had taken place in the previous year, the firm shall furnish a certified copy of the revised instrument of partnership along with the return of income19 for the assessment year relevant to such previous year and all the provisions of this section shall apply accordingly.
(5) Notwithstanding anything contained in any other provision of this Act, where, in respect of any assessment year, there is on the part of a firm any such failure as is mentioned in section 144, the firm shall be so assessed that no deduction by way of any payment of interest, salary, bonus, commission or remuneration, by whatever name called, made by such firm to any partner of such firm shall be allowed in computing the income chargeable under the head "Profits and gains of business or profession" and such interest, salary, bonus, commission or remuneration shall not be chargeable to income-tax under clause (v) of section 28.
185. Assessment when section 184 not complied with.
Notwithstanding anything contained in any other provision of this Act, where a firm does not comply with the provisions of section 184 for any assessment year, the firm shall be so assessed that no deduction by way of any payment of interest, salary, bonus, commission or remuneration, by whatever name called, made by such firm to any partner of such firm shall be allowed in computing the income chargeable under the head "Profits and gains of business or profession" and such interest, salary, bonus, commission or remuneration shall not be chargeable to income-tax under clause (v) of section 28.
C.—Changes in constitution, succession and dissolution
187. Change in constitution of a firm.
(1) Where at the time of making an assessment under section 143 or section 144 it is found that a change has occurred in the constitution of a firm, the assessment shall be made on the firm as constituted at the time of making the assessment.
(2) For the purposes of this section, there is a change in the constitution of the firm—
(a) if one or more of the partners cease to be partners or one or more new partners are admitted, in such circumstances that one or more of the persons who were partners of the firm before the change continue as partner or partners after the change ; or
(b) where all the partners continue with a change in their respective shares or in the shares of some of them :
Provided that nothing contained in clause (a) shall apply to a case where the firm is dissolved on the death of any of its partners.
188. Succession of one firm by another firm.
Where a firm carrying on a business or profession is succeeded by another firm, and the case is not one covered by section 187, separate assessments shall be made on the predecessor firm and the successor firm in accordance with the provisions of section 170.
188A. Joint and several liability of partners for tax payable by firm.
Every person who was, during the previous year, a partner of a firm, and the legal representative of any such person who is deceased, shall be jointly and severally liable along with the firm for the amount of tax, penalty or other sum payable by the firm for the assessment year to which such previous year is relevant, and all the provisions of this Act, so far as may be, shall apply to the assessment of such tax or imposition or levy of such penalty or other sum.
189. Firm dissolved or business discontinued.
(1) Where any business or profession carried on by a firm has been discontinued or where a firm is dissolved, the Assessing Officer shall make an assessment of the total income of the firm as if no such discontinuance or dissolution had taken place, and all the provisions of this Act, including the provisions relating to the levy of a penalty or any other sum chargeable under any provision of this Act, shall apply, so far as may be, to such assessment.
(2) Without prejudice to the generality of the foregoing sub-section, if the Assessing Officer or the Commissioner (Appeals) in the course of any proceeding under this Act in respect of any such firm as is referred to in that sub-section is satisfied that the firm was guilty of any of the acts specified in Chapter XXI, he may impose or direct the imposition of a penalty in accordance with the provisions of that Chapter.
(3) Every person who was at the time of such discontinuance or dissolution a partner of the firm, and the legal representative of any such person who is deceased, shall be jointly and severally liable for the amount of tax, penalty or other sum payable, and all the provisions of this Act, so far as may be, shall apply to any such assessment or imposition of penalty or other sum.
Explanation.—[Omitted by the Finance Act, 1992, w.e.f. 1-4-1993.]
(4) Where such discontinuance or dissolution takes place after any proceedings in respect of an assessment year have commenced, the proceedings may be continued against the person referred to in sub-section (3) from the stage at which the proceedings stood at the time of such discontinuance or dissolution, and all the provisions of this Act shall, so far as may be, apply accordingly.
(5) Nothing in this section shall affect the provisions of sub-section (6) of section 159.
189A. Provisions applicable to past assessments of firms.
In relation to the assessment of any firm and its partners for the assessment year commencing on the 1st day of April, 1992, or any earlier assessment year, the provisions of this Chapter as they stood immediately before the 1st day of April, 1993, shall continue to apply.
Next Chapter XVII
Previous Chapter XV
Related Bare Acts
The Central Goods and Services Tax (CGST) Act 2017
Income-tax Act 1961-2017 (Chapter – XXIII Miscellaneous)
Income-tax Act 1961-2017 (Chapter X – Special Provisions Relating to Avoidance of Tax)
Income-tax Act 1961-2017 (Chapter XIV-B Special Procedure For Assessment Of Search Cases)
Income-tax Act 1961-2017 (Chapter XII-A Special Provisions Relating to Certain Incomes of Non-reside ...
Income-tax Act 1961-2017 (Chapter XIX-A Settlement of Cases)
Income-tax Act 1961-2017 (Chapter VII – Incomes Forming Part of Total Income on Which no Incom ...
Income-tax Act 1961-2017 (Chapter VIII – Rebates and Reliefs)
Income-tax Act 1961-2017 (Chapter XII-D Special Provisions Relating to Tax on Distributed Profits of ...
Income-tax Act 1961-2017 (Chapter – XIII Income-tax Authorities)
Corporate Trade Law
Court Marriage Registration
Industrial Projects & Infrastructure Law
Land/ Property Law
Service/ Employment Law


My kids love to snack. When they are at home they need 11 AM snack & something crunchy to go with lunch. Since they are having it more often I always look for healthier option. My kids love nuts. This one is no exception. It is so fast and healthy so what are you waiting for?
Wash and soak chickpeas. Drain soaked chickpeas.
Boil enough water with salt. Add drained chickpeas and cook for about 12-15 minutes. Don't over cook. Cook till you are able to cut with knife. Drain the extra water.
Gosh, love those spicy cute pieces.
Looks very tempting, healthy and yummy..
I'll keep on munching these spicy baked channa..
Wow..these look very tempting Veena. Wish i can taste some right away.


text:
'God met us at Anglicans Ablaze' conference, says South African priest
By Bellah Zulu
The Rev. Trevor Pearce talks to delegates at the conference. Photo: Bellah Zulu/ACNS
[Anglican Communion News Service] An Anglican priest from South Africa has described the Anglicans Ablaze conference as "well worth doing and exceeding our expectations" adding "God came and met us and did more than anything we could have hoped for."
In an interview with ACNS, the Rev. Trevor Pearce, conference coordinator and director of Growing the Church (GtC), said: "We thank God for bringing us together in one conference and for the unity despite our different cultures, languages and worship styles."
The Anglicans Ablaze conference brought together about 2,000 delegates from 18 countries and 43 dioceses from Southern Africa and other parts of the world, for five days of prayer and sharing from July 2-5.
A special Listening Team headed by Bishop of Swaziland Ellinah Wamukoya had the major task of praying, listening and sharing what God was saying throughout the whole conference.
On the final day of the conference, Wamukoya said that God had revealed to them the "need to go out to the fringes to share the Gospel" including the need for "the church and Anglican leaders ourselves to be transformed."
Young people showed up in large numbers and played a major role throughout the whole conference. They were challenged by various speakers on the need to rise up and help bring about transformation in the church and society.
A young Anglican and board member of Growing the Church (GtC) Khozi Khoza said, "God is raising up an army with Joshua's anointing. If God is going to bring about transformation in our society, it will be through the church because it's God's solution to the systematic problems plaguing our nation."
Her brief but spirited preaching was well received by conference delegates. Some participants said her sermon was confirmation that young Anglicans are capable of contributing significantly to the growth of the church.
New Zealand Church Mission Society leader Steve Maina also shared his final thoughts and emphasized the need to evangelize. "We need to move from the mountain top and go practice in the valley what God has been saying to us," he said. "We cannot just go back home and continue doing things the way we used to."
He added: "It's time to…go into circulation and share what we have. We're too stuck in our structures but the love of God demands an urgent response from us."
At the end of the conference, a number of delegates, particularly young people, committed their lives to Christ after an invitation to do so. They were welcomed and advised on how they can grow in their Christian life.
The conference was hosted by the Anglican Church of Southern Africa (ACSA), one of the largest and most diverse provinces on the continent, covering seven countries with many different languages, cultures and race groups.


text:
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

/**
 * @param {DialogType} dialogType
 * @param {!VolumeManagerWrapper} volumeManager
 * @param {!FileManagerUI} ui
 * @param {!MetadataModel} metadataModel
 * @param {!DirectoryModel} directoryModel
 * @param {!FileSelectionHandler} selectionHandler
 * @param {!MetadataUpdateController} metadataUpdateController
 * @constructor
 * @struct
 */
function TaskController(
    dialogType, volumeManager, ui, metadataModel, directoryModel,
    selectionHandler, metadataUpdateController) {
  /**
   * @private {DialogType}
   * @const
   */
  this.dialogType_ = dialogType;

  /**
   * @private {!VolumeManagerWrapper}
   * @const
   */
  this.volumeManager_ = volumeManager;

  /**
   * @private {!FileManagerUI}
   * @const
   */
  this.ui_ = ui;

  /**
   * @private {!MetadataModel}
   * @const
   */
  this.metadataModel_ = metadataModel;

  /**
   * @private {!DirectoryModel}
   * @const
   */
  this.directoryModel_ = directoryModel;

  /**
   * @private {!FileSelectionHandler}
   * @const
   */
  this.selectionHandler_ = selectionHandler;

  /**
   * @type {!MetadataUpdateController}
   * @const
   * @private
   */
  this.metadataUpdateController_ = metadataUpdateController;

  /**
   * @private {boolean}
   */
  this.canExecuteDefaultTask_ = false;

  /**
   * @private {boolean}
   */
  this.canExecuteMoreActions_ = false;

  /**
   * @private {!cr.ui.Command}
   * @const
   */
  this.defaultTaskCommand_ = assertInstanceof(
      document.querySelector('#default-task'), cr.ui.Command);

  /**
   * More actions command that uses #open-with as selector due to the open-with
   * command used previously for the same task.
   * @private {!cr.ui.Command}
   * @const
   */
  this.moreActionsCommand_ =
      assertInstanceof(document.querySelector('#open-with'), cr.ui.Command);

  /**
   * @private {Promise<!FileTasks>}
   */
  this.tasks_ = null;

  ui.taskMenuButton.addEventListener(
      'select', this.onTaskItemClicked_.bind(this));
  this.selectionHandler_.addEventListener(
      FileSelectionHandler.EventType.CHANGE,
      this.onSelectionChanged_.bind(this));
  this.selectionHandler_.addEventListener(
      FileSelectionHandler.EventType.CHANGE_THROTTLED,
      this.onSelectionChangeThrottled_.bind(this));
}

/**
 * Cached the temporary disabled task item. Used inside
 * FileSelectionHandler.createTemporaryDisabledTaskItem_().
 * @type {Object}
 * @private
 */
TaskController.cachedDisabledTaskItem_ = null;

/**
 * Create the temporary disabled task item.
 * @return {Object} Created disabled item.
 * @private
 */
TaskController.createTemporaryDisabledTaskItem_ = function() {
  if (!TaskController.cachedDisabledTaskItem_) {
    TaskController.cachedDisabledTaskItem_ = {
      title: str('TASK_OPEN'),
      disabled: true,
      taskId: null
    };
  }

  return TaskController.cachedDisabledTaskItem_;
};

/**
 * Task combobox handler.
 *
 * @param {Object} event Event containing task which was clicked.
 * @private
 */
TaskController.prototype.onTaskItemClicked_ = function(event) {
  this.getFileTasks()
    .then(function(tasks) {
      switch (event.item.type) {
        case FileTasks.TaskMenuButtonItemType.ShowMenu:
          this.ui_.taskMenuButton.showMenu(false);
          break;
        case FileTasks.TaskMenuButtonItemType.RunTask:
          tasks.execute(event.item.task.taskId);
          break;
        case FileTasks.TaskMenuButtonItemType.ChangeDefaultTask:
          var selection = this.selectionHandler_.selection;
          var extensions = [];

          for (var i = 0; i < selection.entries.length; i++) {
            var match = /\.(\w+)$/g.exec(selection.entries[i].toURL());
            if (match) {
              var ext = match[1].toUpperCase();
              if (extensions.indexOf(ext) == -1) {
                extensions.push(ext);
              }
            }
          }

          var format = '';

          if (extensions.length == 1) {
            format = extensions[0];
          }

          // Change default was clicked. We should open "change default" dialog.
          tasks.showTaskPicker(
              this.ui_.defaultTaskPicker,
              loadTimeData.getString('CHANGE_DEFAULT_MENU_ITEM'),
              strf('CHANGE_DEFAULT_CAPTION', format),
              this.changeDefaultTask_.bind(this, selection),
              true);
          break;
        default:
          assertNotReached('Unknown task.');
      }
    }.bind(this))
    .catch(function(error) {
      if (error)
        console.error(error.stack || error);
    });
};

/**
 * Sets the given task as default, when this task is applicable.
 *
 * @param {!FileSelection} selection File selection.
 * @param {Object} task Task to set as default.
 * @private
 */
TaskController.prototype.changeDefaultTask_ = function(selection, task) {
  var entries = selection.entries;

  Promise.all(entries.map((entry) => this.getMimeType_(entry))).then(function(
      mimeTypes) {
    chrome.fileManagerPrivate.setDefaultTask(
        task.taskId,
        entries,
        mimeTypes,
        util.checkAPIError);
    this.metadataUpdateController_.refreshCurrentDirectoryMetadata();

    // Update task menu button unless the task button was updated other
    // selection.
    if (this.selectionHandler_.selection === selection) {
      this.tasks_ = null;
      this.getFileTasks()
          .then(function(tasks) {
            tasks.display(this.ui_.taskMenuButton);
          }.bind(this))
          .catch(function(error) {
            if (error)
              console.error(error.stack || error);
          });
    }
    this.selectionHandler_.onFileSelectionChanged();
  }.bind(this));
};

/**
 * Executes default task.
 */
TaskController.prototype.executeDefaultTask = function() {
  this.getFileTasks()
      .then(function(tasks) {
        tasks.execute(this.ui_.fileContextMenu.defaultTaskMenuItem.taskId);
      }.bind(this))
      .catch(function(error) {
        if (error)
          console.error(error.stack || error);
      });
};

/**
 * Get MIME type for an entry. This method first tries to obtain the MIME type
 * from metadata. If it fails, this falls back to obtain the MIME type from its
 * content or name.
 *
 * @param {!Entry} entry An entry to obtain its mime type.
 * @return {!Promise}
 * @private
 */
TaskController.prototype.getMimeType_ = function(entry) {
  return this.metadataModel_.get([entry], ['contentMimeType']).then(
      function(properties) {
        if (properties[0].contentMimeType)
          return properties[0].contentMimeType;
        return new Promise(function(fulfill, reject) {
          chrome.fileManagerPrivate.getMimeType(
              entry, function(mimeType) {
                if (!chrome.runtime.lastError)
                  fulfill(mimeType);
                else
                  reject(chrome.runtime.lastError);
              });
        });
      });
};

/**
 * Handles change of selection and clears context menu.
 * @private
 */
TaskController.prototype.onSelectionChanged_ = function() {
  this.tasks_ = null;
  var selection = this.selectionHandler_.selection;
  // Caller of update context menu task items.
  // FileSelectionHandler.EventType.CHANGE
  if (this.dialogType_ === DialogType.FULL_PAGE &&
      (selection.directoryCount > 0 || selection.fileCount > 0)) {
    // Show disabled items for position calculation of the menu. They will be
    // overridden in this.updateFileSelectionAsync().
    this.updateContextMenuTaskItems_(
        [TaskController.createTemporaryDisabledTaskItem_()]);
  } else {
    // Update context menu.
    this.updateContextMenuTaskItems_([]);
  }
};

/**
 * Handles change of selection asynchronously and updates context menu.
 * @private
 */
TaskController.prototype.onSelectionChangeThrottled_ = function() {
  var selection = this.selectionHandler_.selection;
  if (this.dialogType_ === DialogType.FULL_PAGE &&
      (selection.directoryCount > 0 || selection.fileCount > 0)) {
    this.getFileTasks()
        .then(function(tasks) {
          tasks.display(this.ui_.taskMenuButton);
          this.updateContextMenuTaskItems_(tasks.getTaskItems());
        }.bind(this))
        .catch(function(error) {
          if (error)
            console.error(error.stack || error);
        });
  } else {
    this.ui_.taskMenuButton.hidden = true;
  }
}

/**
 * @return {!Promise<!FileTasks>}
 * @public
 */
TaskController.prototype.getFileTasks = function() {
  if (this.tasks_)
    return this.tasks_;

  var selection = this.selectionHandler_.selection;
  return selection.computeAdditional(this.metadataModel_).then(
      function() {
        if (this.selectionHandler_.selection !== selection)
          return Promise.reject();
        return FileTasks.create(
            this.volumeManager_, this.metadataModel_, this.directoryModel_,
            this.ui_, selection.entries, assert(selection.mimeTypes)).
            then(function(tasks) {
              if (this.selectionHandler_.selection !== selection)
                return Promise.reject();
              return tasks;
            }.bind(this));
      }.bind(this));
};

/**
 * Returns whether default task command can be executed or not.
 * @return {boolean} True if default task command is executable.
 */
TaskController.prototype.canExecuteDefaultTask = function() {
  return this.canExecuteDefaultTask_;
};

/**
 * Returns whether open with command can be executed or not.
 * @return {boolean} True if open with command is executable.
 */
TaskController.prototype.canExecuteMoreActions = function() {
  return this.canExecuteMoreActions_;
};

/**
 * Updates tasks menu item to match passed task items.
 *
 * @param {!Array<!Object>} items List of items.
 * @private
 */
TaskController.prototype.updateContextMenuTaskItems_ = function(items) {
  // Always show a default item in case at least one task is available, even
  // if there is no corresponding default task (i.e. the available task is
  // a generic handler).
  if (items.length >= 1) {
    var defaultTask = FileTasks.getDefaultTask(
        items, items[0] /* task to use in case of no default */);

    if (defaultTask.iconType) {
      this.ui_.fileContextMenu.defaultTaskMenuItem.style.backgroundImage = '';
      this.ui_.fileContextMenu.defaultTaskMenuItem.setAttribute(
          'file-type-icon', defaultTask.iconType);
    } else if (defaultTask.iconUrl) {
      this.ui_.fileContextMenu.defaultTaskMenuItem.style.backgroundImage =
          'url(' + defaultTask.iconUrl + ')';
    } else {
      this.ui_.fileContextMenu.defaultTaskMenuItem.style.backgroundImage = '';
    }

    this.ui_.fileContextMenu.defaultTaskMenuItem.label =
        defaultTask.taskId === FileTasks.ZIP_UNPACKER_TASK_ID ?
        str('TASK_OPEN') : defaultTask.title;
    this.ui_.fileContextMenu.defaultTaskMenuItem.disabled =
        !!defaultTask.disabled;
    this.ui_.fileContextMenu.defaultTaskMenuItem.taskId = defaultTask.taskId;
  }

  this.canExecuteDefaultTask_ = items.length >= 1;
  this.defaultTaskCommand_.canExecuteChange(this.ui_.listContainer.element);

  this.canExecuteMoreActions_ = items.length > 1;
  this.moreActionsCommand_.canExecuteChange(this.ui_.listContainer.element);

  this.ui_.fileContextMenu.tasksSeparator.hidden = items.length === 0;
};

/**
 * @param {FileEntry} entry
 */
TaskController.prototype.executeEntryTask = function(entry) {
  this.metadataModel_.get([entry], ['contentMimeType']).then(
      function(props) {
        FileTasks.create(
            this.volumeManager_, this.metadataModel_, this.directoryModel_,
            this.ui_, [entry], [props[0].contentMimeType || null])
            .then(function(tasks) {
              tasks.executeDefault();
            });
      }.bind(this));
};