text:
Last updated: June 1st, 2021.
At Tiny Land, our top priority is to protect the health and well-being of our team, our customers, and their families, while maintaining a high level of service that lives up to our promise.
Our distribution centers remain open during this time period and we continue to ship out your orders every day, 7 days a week. Our carrier partners, UPS, USPS and DHL, continue to pick up and deliver orders every day as normal.
We have put in place an enhanced safety protocol at our distribution centers, therefore, your order may take a little longer than normal to be delivered. We thank you for your patience and understanding during this difficult time.
Our friendly customer experience team remains available to assist you with any questions or concerns 7 days a week, from 8 am to 8 pm (Eastern Standard Time). Please feel free to reach us by email at customer_care@tinylandus.com.


After a rough, long week most of the kids and I found ourselves in Naples. With a little time to kill. At almost sunset. Near the beach. With a cloudless sky.
Those kids didn't get a vote. Mama steered that car straight for the nearest beach. And it was the best medicine. It always is.
On a nearly empty beach we sat, we played, they climbed, they made friends, we watched a wedding, they got wet, we looked, we took pictures, we closed our eyes and listened, I soaked in the tranquility and felt the stress leave my soul, and in awe we watched God paint the sky.
As we left one of the children asked if we could do this every week. Maybe we must.


text: Q: cursor moves one space to the left redux form react native So I am having a problem with redux form and the cursor moving one position to the left when typing from the middle of the word. What can I do to resolve this issue?

redpajama_set_name: RedPajamaStackExchange


Compared to January 2014, the average weekly rent for one bedroom properties has risen by 3% (from $305 to $314), two bedroom by 4.2% (from $377 to $393), three bedroom by 4.4% (from $460 to $480), four bedroom by 3.6% (from $585 to $606) and five or more bedroom by 7.3% (from $708 to $760).
The three bedroom property average has increased by $20 in the past 12 months - a change of 4.4% (from $460 per week to $480).
Central Auckland still receives the highest rent for one, two, three and five + bedroom properties. The Eastern Suburbs have the highest average rent for four bedroom properties.
Rental prices for five + bedroom properties in the Eastern Suburbs have increased by more than any other group - from an average of $967, to an average of $1105 - an increase of 14.3%.
Franklin Manukau remains the cheapest area, across all property sizes, with average rent ranging from $271 for one bedroom properties, to $586 for five + bedroom properties. This is 32% less than the highest average rent for one bedroom properties (in Central Auckland), and 113% less than the highest average rent for five + bedroom properties (again in Central Auckland).
Source:Barfoot & Thompson new and current tenancies as at 1 February 2015, compared to new and current tenancies as at 1 February 2014. Excludes Northland and Commercial. Suburbs with less than four tenancies not included.


By Mail: If you send a letter, make sure to give your name, address, and social insurance number and which tax year you want to adjust.
IMPORTANT: Send your current year return separately from any request to change a return for another year.
It may take longer if CRA is requesting more information or your request is sent in spring or summer.
Want to receive a tax reminder?
Complete form below, and here's to a perfect 2017 tax season!
Add me to the tax reminder list!
https://www.hrsbs.ca/wp-content/uploads/2015/08/HR_site_logo.png 0 0 Homeroom Team https://www.hrsbs.ca/wp-content/uploads/2015/08/HR_site_logo.png Homeroom Team2017-01-26 14:00:292017-01-26 21:59:13How do you change your filed tax return?
So you think you can claim that expense?
What if you don't have all your tax slips? What happens if you miss the deadline to file your income tax return?


text:
Twin Cities Daily Planet (https://www.tcdailyplanet.net/beauty-and-beastly-first-act/)
Beauty and the Beastly First Act
By Kathleen Willard (Critical Review) | March 13, 2015
Beauty and the Beast is a tale as old as time, a beloved Disney movie, and a huge family attraction. On opening night, the Orpheum's lobby was packed with people about as tall as my hips. Having been enchanted by a production of Beauty and the Beast at the Ordway a few years ago, I walked into this one with high expectations and a low gaze so as not to run anyone over.
The first musical number is an upbeat introduction by the title's "Beauty", Belle, to the little town in which she resides. The first thing I noticed was that I could not hear her. Perhaps the lead actress had a cold? As more and more characters' voices came into play, I came to a different conclusion: there was something very wrong with the sound.
The entire first act sounded as if it was playing on an old-fashioned TV set from across a football field. Had I not already known the plot, it would have been difficult to follow along. Spoken lines were difficult to make out, and during musical numbers, no matter how many voices sang, their volume remained low. In addition to being simply annoying, the faraway tinny tones hosted an audience disconnect from any feelings the actors were attempting to portray.
This production of Beauty and the Beast tries out new humor that differentiates it from the Disney movie–and for the most part falls flat on its face. Act One in particular was riddled with physical pratfalls so painfully choreographed that it looked as though the actors were repeatedly throwing themselves to the ground for no apparent reason. Sexual innuendos were scripted for the adults in the audience, played up to the extent that I found them physically repulsive. Where creative staging could have been invoked, there were instead streamers, flashing lights, human-size bottles of champagne, and other pointers to an enormous budget.
Though overrelied upon, the set design was undeniably impressive, using sheer layers of cloth and images of twisted trees to bring us into a foreboding forest, and a minimal yet multipurposed metallic staircase to represent the Beast's enchanted castle, among other locations. The costumes seamlessly transformed actors into living, breathing household objects, and brought classic Disney characters to life. Each of the actors' character physicalizations were distinct and on point, which is especially important if your character is a grumpy grandfather clock or a charismatic French candelabra.
In Act Two, the sound quality and volume was miraculously bettered, allowing the audience closer
proximity to the melodies of Beauty and the Beast. Actors became more energized, additive humor less overtly prevalent. Belle (Jillian Butterfield) and the Beast (Ryan Everett Wood) truly began to fall in love, and their chemistry was charming, genuine and palpable all the way from the back of the theatre.
Unfortunately, Act Two's recovery does not make up for the easily tuned out Act One. The audio mishap may have been a one-time issue, but if so a one-time issue that should not have been present by opening night. If your child is looking for a healthy dose of magic, bringing them to Beauty and the Beast at the Orpheum may be the right choice. But if you're looking for a magical time for all ages, simply stay at home and watch the movie instead.
dudleyvoigt

redpajama_set_name: RedPajamaCommonCrawl


I like collecting small denomination banknotes. China used to have the most beautiful money in the world with evocative pictures of the ethnic minorities and before that, classic socialist themes like women marching with shovels in the fields, but now all the newer notes have pictures of Mao and that's it. Anyway, all the money together in this photo is worth about $10. I always get a little nervous when I fly home from a trip and I have to explain to U.S. customs what I am doing with a shoebox full of money.
My hostel in Beijing was in an area of musical instrument stores, and not only that, it was normal to see people playing drums, trumpets, guitars, violins and saxophones in front of their shops. The guy on the right played "Dust in the Wind" when I passed by and the other guy, Metallica. How would you like to be in charge of the advertising jingle for this bus company?
One morning in Beijing I walked outside and at first glance thought to myself, "It snowed!" But at second glance I saw it was dirt. 300,000 tons of dirt had settled on Beijing overnight, the newspaper reported. (I measured only 283,000 tons.) Spring is the worst time to visit Beijing, the air is so horrible. I was still coughing weeks after I came home.
Donkey is pretty delicious--I had two of these sandwiches, thank you. It is gamey like venison but not rough like dog. (Ruff!) The real treat was in how filthy the restaurant was. In its defense, though, I don't know how you keep anything clean with 300,000 tons of dirt falling from the sky.
Some of my friends are disturbed by this photo, so I have blacked out my eyes. Maybe they will forget it is me. Actually, this is my culinary stunt double. No relation.
There are many down-and-out people in the big cities. The ones scavenging are quite clever. As they go through the trash they carry mirrors to look in spots they can't see directly. Lots of smart people in China. In front of the Forbidden City, feeling very Chinese, very patriotic.
I was the only one on the Great Wall in this section, Huanghua.
It was fantastic despite the haze.
Near the Great Wall at Huanghua.
I was hitchhiking in a lonely spot and came across this guy on his ride.
Across the street from Tiananmen square.
Exhibit A: How to take a beautiful building and ugly it up.
Walking in the hutongs (alleyways) is one of my favorite things to do. Such life! The first time I felt a little funny traipsing through as if I was roaming around someone's backyard, but these alleys are public thoroughfares and the fact that it's quieter and less trafficked make them a nice way to get around.
In this photo I stumbled upon a street dumpling stall and FEASTED amongst the locals. I wish this photo captured hutong life better. I am a little shy with my camera sometimes when I am alone. Young Kent Foster would have gotten the perfect shot.
Go back to Page 1 of the photos.


text:
María Teresa Roca de Togores y  Pérez del Pulgar, marquise de Beniel, née à Saint-Jean-de-Luz en 1905 et morte à Madrid en 1989, est une poétesse espagnole du  du mouvement moderniste.

Biographie
Née dans une famille d'aristocrates, petite-fille de l'écrivain Mariano Roca de Togores, elle consacre sa carrière à la littérature. Artiste d'avant-garde, elle collabore notamment à Blanco y Negro, où elle publie des poèmes et des récits biographiques de personnalités comme Álvaro de Luna.

Elle fréquente les mêmes salons littéraires que Ernestina de Champourcin, et publie en même temps que Cristina Arteaga et Concha Méndez : entre 1923 et 1926, cette irruption de femmes dans la littérature est une surprise dans les cercles littéraires de l'époque.

En 1935, à Ávila, elle publie Romances del sur, où l'on retrouve l'influence du García Lorca de Romancero gitano.

En 1946, elle apparaît dans l'Antología de poetas españoles contemporáneos en lengua castellana, qui comprend seulement onze femmes (et ), publiée par César González Ruano.

Postérité
En 2010, son œuvre est incluse par Pepa Merlo dans Peces en la tierra (Fondation José Manuel Lara), une anthologie poétique des artistes les plus connues de la fin du  à la guerre d'Espagne.

Références

Liens externes

Écrivain espagnol du XXe siècle
Naissance à Saint-Jean-de-Luz
Décès à Madrid
Poétesse espagnole
Femme de lettres espagnole

redpajama_set_name: RedPajamaWikipedia


text:
A unique meeting place of art
Association of Friends
Current & future exhibitions
11.2 – 15.4 2018
I'll darn well draw the soul!
I'll darn well draw the soul! This is the title of the spring exhibition at the Nordic Watercolour Museum. The original works behind the popular Swedish children's books about Alfons Åberg, known in English as Alfie Atkins, and Bill och Bolla by Gunilla Bergström are presented here for the first time in an art museum.
Gunilla Bergström has been one of Sweden's leading picture book creators through the years. "I'll darn well draw the soul!" This audacious thought was the beginning of some 40 children's books with unforgettable characters who she still writes and illustrates to this day. But without comparison, it is Alfons Åberg who has become the most famous of Gunilla Bergström's figures.
For the first time ever, original works by Gunilla Bergström are presented in a museum setting. With the spring exhibition at the Nordic Watercolour Museum, we return to the origins of the books by presenting the originals with impressions of the artist's unique craftsmanship. Gunilla Bergström used collage as a narrative element in her works long before digital technology became common in the art of illustration. She built up her images with cut-out fabric scraps, wallpaper samples, pieces of ribbon and more. The collages are then combined with drawn images. All figures have distinct black outlines that enclose their bodies and create volume.
The exhibition is about both the form and content of Gunilla Bergström's creations. With a singular colour palette, precise lines and expert compositions, she shapes credible environments, placing her figures in a daily life that we can easily recognise. The questions asked are existential and applicable at all ages. Isolation. Fear. Vulnerability. The various facets of friendship. The unexpected complications of family life. The universal principles of happiness. Internal and external life. Appreciating the little things. These form the foundation of Gunilla Bergström's imagery. The books about Alfons Åberg have been translated into some thirty languages and comprise the majority of Gunilla Bergström's production. In parallel with images from these books, selected artistic works are presented, such as the story of Bill and Bolla.
One of the most important parts of the Nordic Watercolour Museum's activities is tracking the creation of picture books in the Nordic region. Presenting one of our most beloved and internationally recognised picture book artists is both an honour and a matter of course. 2017 was also a double anniversary year – Alfons Åberg turned 45 years old and Gunilla Bergström celebrated her 75th birthday.
Gunilla Bergström - I'll darn well draw the soul! NAMF66-2_2018 from Nordiska Akvarellmuseet on Vimeo.
Gunilla Bergström was born in 1942 in Gothenburg. She grew up in an artistic home and in 1966 she graduated with a degree in journalism. Among other places, she worked at Dagens Nyheter and Aftonbladet. In 1975 she began her career as an author and illustrator full time. Bergström debuted with the book Mias pappa flyttar (Mia's Dad is Moving) (1971). Her picture books about Alfons Åberg – a preschool boy who lives with his single father – became a success in Sweden and internationally. Gunilla Bergström has also dramatized many of her stories for the theatre and written numerous children's songs together with Georg Riedel and others. She has also worked with set design and puppetry.
Aktuella utställningar
27.9 2020 – 25.4 2021
From Sketch to Tapestry
The Nordic Watercolor Museum's solo exhibition with watercolours, drawings and textile works by Andreas Eriksson has been extended until 25.4 2021. The presentation highlights the complex, time-consuming creative process from idea to expression, from sketch to weave.
Lars Lerin & Bruno Liljefors
One of the vital elements in Lerin's diverse creative portfolio is pictures of animals. With technical skill and a heartfelt passion for the humblest of creatures, Lerin depicts small birds, field mice and hares. The sensitive watercolours by Lars Lerin are shown alongside several studies by wildlife painter Bruno Liljefors. The exhibition was on display during the summer of 2000 and has been extended.
Maria Nordin
The Body's Fragile Shell
The human body is the starting-point for Maria Nordin's creation. Her art depicts the body as the literal human shell, but also as a container for everything that is individual within us. The exhibition presents Maria Nordin's latest paintings, which show the shell and surface, but is about making the invisible, visible. The exhibition was on display during the summer of 2000 and has been extended.
Topography – from the Museum Collection
On display in Thordénrummet
Through art, we track a terrain where emotions and impressions have been visualised and structured onto the receptive watercolour paper, as if it were a topographical map. The external and internal unite.
Hilding Linnqvist
Part of Hilding Linnqvist's artistic nature was to have his sketchbook, pencil, ink and watercolours always at the ready. He was constantly sketching and drawing.
9.5 – 12.9 2021
A major exhibition of the artist Friedensreich Hundertwasser will open at the Nordic Watercolour Museum on 9 May next year. Hundertwasser is one of the most famous international artists of the post-war period contributing with his unique and very personal style, centring on the spiral.
Tel. +46 304-60 00 80


text:
Portfolio management Stocks
As markets gyrate, help clients understand historic returns
By Craig L. Israelsen March 25, 2020, 12:31 p.m. EDT 4 Min Read
The dramatic turbulence of the markets so far in 2020 is undoubtedly upsetting to clients. While volatility is expected, the schizophrenic swings of the past several months are atypical, as is the situation of dealing with a global pandemic.
However, understanding the size and variation in average returns among a variety of asset classes might help provide some perspective for anxious clients. To that end, it is useful to examine the monthly returns of 12 core asset classes over the past 22 years, from Jan. 1, 1998, through Dec. 31, 2019.
As shown in the table "On average," large-cap U.S. stock, represented by the S&P 500, has had monthly returns that range from -0.66% to 1.97%. The best two months over the past 22 years have been March and April. We see the same pattern among midcap U.S. stocks — the best returns have been in March and April as well. Small-cap U.S. stocks, as represented by the S&P Smallcap 600, tend to have their best returns in December, with April not far behind.
Non-U.S. stock (both in developed and emerging foreign countries) follows the same pattern as small-cap U.S. stock, where we see the best returns in April and December.
Global real estate is a spring bloomer as well, with an average return of 2.62% in April and 2.39% in March. Natural resources stocks (as represented by the S&P North American Natural Resources Index) follow the same spring pattern, with April posting an average return of 3.57%, followed by March with a 3.03% return. All returns shown in the table are gross returns and have not been adjusted for inflation or taxes.
Commodities have struggled over the past two decades, as seen by the 22-year average annualized return of 3.40%. However, commodities tend to perform well in February and April.
So far in 2020 the overall picture is extremely rough. As shown in the table, January 2020 was a tough month for nearly every so-called engine asset class. Large-cap U.S. stock, for example, had a return of -0.04%, while midcap U.S. stock had a return of -2.61%. Natural resources and commodities were hardest hit, with returns of -8.26% and -8.68% respectively.
The only engine asset class with a positive return in January 2020 was global real estate. Among the four portfolio brakes, January 2020 was a banner month when compared against their 22-year averages. For instance, U.S. bonds average a monthly return of 0.41%, but in January 2020, the return was 1.92%.
In a single word: 'Crunch'
Now to February 2020. In a single word: Crunch. All eight engine asset classes had huge losses. The four brake asset classes had above average returns, except for cash, which was slightly below the average monthly return of 0.16%.
March 2020 is obviously breaking the historical pattern. As of March 23, the S&P 500 is down roughly 23% since Feb 28. Certainly, that is an epic departure from the average March return of just under +2%.
Also shown in the table is the worst single-month return for each asset class over the 22-year period. For example, large-cap U.S. stock had a return of -16.79%. Guess when? October 2008. Global real estate lost over 30% in a single month — also in October 2008. The losses we are experiencing now are dramatic, but we have seen similar losses before. And we recovered.
It's clear in the table that the eight asset classes representing the engines of performance in a portfolio are subject to negative monthly returns. In the case of large and midcap U.S. stock, the average returns in August and September have been negative over the past 22 years. Small-cap U.S. stock tends to have negative monthly returns 1/3 of the time on a monthly basis. Non-U.S. developed stock (the MSCI EAFE Index) has produced negative monthly returns in five out of 12 months since 1998.
The other portion of the 12-asset portfolio is composed of four fixed-income asset classes: U.S. aggregate bonds, U.S. TIPS, non-U.S. bonds and cash. The returns of these four portfolio brakes tend to be highest in January and August — which is very convenient, because six of the eight portfolio engines have produced negative returns (on average) in August. Also worth noting is that the four fixed-income asset classes do not produce negative monthly returns on average, with the slight exception of non-U.S. bonds in the month of October.
The data shows growth assets in a portfolio tend to have their best performance in the spring — specifically March and April.
Finally, we see that a 12-asset portfolio produced — on average — positive monthly returns in nine out of 12 months. The exceptions were an average return of -0.06% in May, a return of -0.23% in August and an average return of -0.03% in September. The best two months for a broadly diversified portfolio over the past 22 years have been in March and April. Not far behind is December, with an average return of 1.34%. Even a broadly diversified portfolio is subject to an uncomfortable monthly loss, as noted by the -16.60 return that occurred in October of 2008. That type of loss is clearly unusual, and clients need to see it for what it is — an aberration.
Overall, it's clear that the growth assets in a portfolio tend to have their best performance in the spring — specifically March and April. Fixed-income portfolio ingredients tend to perform better in August, and a broadly diversified portfolio tends to produce its best returns in the spring, and again in December.
If, however, the spring of 2020 doesn't follow the historical pattern of returns, we can point to some rather extraordinary circumstances — most notably the economic disruption caused by the COVID-19 virus. But in the meantime, the price of large-cap U.S. stock has been reset to the start of 2017, or even back to the spring of 2016 in the case of midcap and small-cap U.S. stock. If your clients wish they had invested back then, they may have a second chance now.
Craig L. Israelsen
Executive-in-Residence, Utah Valley University
Portfolio management Stocks Volatility Retirement income Retirement planning Fixed income Client communications Coronavirus


text:
Sustainability, Energy and Environment Community
Steering Partners
Federal Partners
ACT on CLIMATE
SEEC Café
Bartlett Center
Chemical Inventory Program
CU Green Labs
Center for the Study of Origins (CSO)
What is the study of origins?
In every department of every university the goal of research and teaching is understanding. We understand a thing when we can explain it. Explanations come in different kinds, however. The most familiar sorts of explanation are those that draw upon or attempt a universal theory couched in general principles, the paradigms of which are found in theoretical physics. In a great many cases, however, the understanding we seek cannot be framed as a universal theory but is instead fundamentally historical in nature. In these cases, we seek to explain not through general principles but through an understanding of origins.
Why CU-Boulder?
CSO is part of the campus-wide Grand Challenge Initiative (GCI). GCI includes projects in Earth and space science, which are two of CU's areas of greatest strength, as well as the study of origins. The origins project is unique in its inclusiveness, however. While connecting with important issues in Earth and space science, such as historical explanations for changes in Earth's climate over the past 500 years and the fate of the ancient Martian ocean, CSO brings together researchers from the social sciences and humanities, as well as the natural sciences, to investigate an underappreciated but important issue, namely, the diversity, nature and justification of hypotheses and theories about the past and how they inform our understanding of the present and the future.
The Center for the Study of Origins (CSO) fosters interdisciplinary investigations into specific topics on origins and transdisciplinary research into the general nature (structure, justification, and function) of theories of origins, including ways in which they are used to understand the present and envision the future.
CU Science Discovery
CU Science Discovery is a science education outreach program of the University of Colorado Boulder's Division of Continuing Education. Founded in 1983 to heighten young students' interest in science, CU Science Discovery coordinates an array of programs that connect K-12 students and teachers to current CU science. Each program utilizes CU scientific expertise, equipment, resources and graduate or undergraduate students in order to provide K-12 students and teachers with unique, experiential learning STEM experiences. All programs are designed to be highly interactive and relevant, in order to engage students in the scientific process while connecting them to the science and technology present in their everyday lives.
Through hands-on summer camps and after-school classes, homeschool classes, teacher workshops, school programs, and community outreach events, Science Discovery impacts approximately 30,000 students, teachers and community members throughout Colorado each year.
CU Science Discovery's mission is to heighten interest and increase literacy in science, technology, engineering and math (STEM) by providing hands-on experiences that connect students and teachers to current CU science. Science Discovery capitalizes on CU Boulder's scientific resources, facilities and expertise to excite students about STEM, expose them to a variety of STEM careers and professionals and inspire a future generation of scientists and engineers.
Governors' Climate and Forests Task Force (GCF)
The Governors' Climate and Forests Task Force (GCF) is a unique subnational collaboration between 35 states and provinces from Brazil, Colombia, Indonesia, Ivory Coast, Mexico, Nigeria, Peru, Spain, and the United States. The GCF seeks to advance jurisdictional programs designed to promote low emissions rural development and reduced emissions from deforestation and land use (REDD+) and link these activities with emerging greenhouse gas (GHG) compliance regimes and other pay-for-performance opportunities. More than 25% of the world's tropical forests are in GCF states and provinces, including more than 75% of Brazil's and more than half of Indonesia's. The GCF includes states and provinces that are leading the way in building comprehensive, jurisdiction-wide approaches to low emissions development and REDD+ as well as the only jurisdiction in the world (California) that is considering provisions that would recognize offsets from REDD+ as part of its GHG compliance system.
The GCF focuses on all aspects of the effort to reduce emissions from deforestation and establish lasting frameworks for low emissions development. It facilitates the exchange of experiences and lessons learned across leading states and provinces; synchronizes efforts across these jurisdictions to develop policies and programs that provide realistic pathways to forest-maintaining rural development; supports processes for multi-stakeholder participation and engagement; and seeks financing for jurisdictional programs from a range of sources, including pay-for-performance public finance, emerging carbon markets, and ongoing efforts to de-carbonize agro-food supply chains.
The overarching rationale of the GCF is that any successful effort to address the complex relationship between forests, land use, and climate change requires multiple efforts at multiple levels of governance, and that state and provincial governments, together with their civil society partners, are among the most important actors in building viable programs for low emissions rural development. The GCF was therefore conceived as an effort to leverage the fact that certain states and provinces around the world are in a position to be early movers in the effort to build robust jurisdictional programs for REDD+ and low emissions development, thereby bolstering overall momentum for the issue and enhancing national and international efforts to demonstrate how this can work in practice.
Laboratory for Energy and Environmental Policy innovation (LEEP)
Our goal at LEEP is to develop and support real-time policy experiments, robust networks for learning and exchange, meaningful processes for stakeholder engagement, and durable policy outcomes.
We start from the premise that bottom-up approaches to climate, energy, and environmental problems must be the foundation for any lasting solutions. Much of the hard work and many of the most important policy experiments aimed at tackling these problems are taking place at subnational levels. The challenge is to connect, replicate, scale, and learn from these efforts.
Our theory of change starts from the premise that subnational governments (including states and provinces, counties and districts, cities and municipalities, and communities and villages) are critical actors in the effort to fight climate change, promote clean energy, and build durable frameworks for environmentally sustainable development. We believe that effective solutions to many of our energy and environmental problems must be public-private in character and that, in all cases, they must fit with and grow out of vernacular institutions. To that end, we focus on mobilizing and engaging political leaders, empowering civil servants, and connecting them with civil society partners in a manner that will advance integrated and equitable approaches to sustainable development.
We embrace a network approach to governance. We work to thicken the relationships between government, civil society, and the private sector in the regions where we work while also forging broader connections with ongoing policy initiatives and processes around the world. We work across scales, seeking to promote vertical and horizontal policy alignment. And we ground our work with ongoing policy experiments in a recursive approach to learning and knowledge management.
We believe that some of the most important policy experiments are happening in places far removed from national centers of business and government. We want to understand and support these experiments because we believe that they hold important lessons for other similarly situated places. One of our goals is to establish a distributed platform of satellite labs in places that are already innovating – and that are often far removed from the metropolitan centers of political and economic power – and to connect these efforts to other sources of support and financing to reduce the risks of policy experimentation.
We recognize that we live in a world of fast policy – one in which policy ideas are often quickly disembedded from their original contexts and diffused around the world without any critical assessment of their effectiveness. We believe that this can sometimes constrain bottom-up policy innovation by promoting a model of policy adoption and diffusion that does not fit with vernacular institutions. We want to understand better the dynamics of fast policy and we want to harness and tame it in ways that will promote better and more durable policy outcomes in real places.
Materials Science and Engineering Program (MSE)
The Materials Science and Engineering (MSE) Program is an interdisciplinary Ph.D. and M.S. program aimed at providing a rigorous education in materials science and engineering and the fundamental physics, engineering, chemistry and biology that underlie this discipline. Educational goals are achieved through both coursework and training in cross-disciplinary research supervised by one or more science and engineering faculty members.
Serve as a campus-wide resource for materials research and education activities, bringing together faculty from across the UCB campus to leverage expertise and facilities, promoting impactful research in materials science and engineering and enhancing Departmental materials research efforts as well as materials-related efforts that are a part of current campus initiatives and programs such as space science/aerospace engineering, energy systems, renewable and sustainable energy, biotechnology, biomedicine and geosciences;
Create a vibrant materials science research and engineering program that is both highly visible within the UCB community and internationally recognized;
Recruit, train and graduate outstanding doctoral students with degrees in both MSE and the various disciplinary UCB Departments pursuing materials research;
Attract outstanding faculty to the MSE Program and its participating departments;
Support, organize and develop world-class major instrumentation, shared facilities and infrastructure that enables outstanding materials research; and
Catalyze the pursuit of block funding in the materials research arena through coordination of interdisciplinary materials research teams, and fostering of Centers and major collaborations.
Mortenson Center in Global Engineering
The Mortenson Center combines education, research, and partnerships to improve development tools and practice. We train engineers to recognize the issues at the core of development challenges, and collaborate with partners across the CU-Boulder campus and the world to create sustainable, scalable, evidence-based and multidisciplinary solutions to global development problems. Our program provides multiple pathways for engineers to enter the field of development engineering.
Among engineering professionals, create awareness of developing world issues and provide the knowledge and tools necessary to work in the fields of community recovery and development.
Promote research, design and development of holistic solutions for developing communities that account for technical and non-technical issues.
Build local community capacity through collaboration with organizations working in developing communities worldwide.
CU Fund | Support SEEC
Privacy • Legal & Trademarks


text:
//
//  CAPSPageMenu.m
//
//
//  Created by Jin Sasaki on 2015/05/30.
//
//

#import "CAPSPageMenu.h"

@interface MenuItemView ()

@end

@implementation MenuItemView

- (void)setUpMenuItemView:(CGFloat)menuItemWidth menuScrollViewHeight:(CGFloat)menuScrollViewHeight indicatorHeight:(CGFloat)indicatorHeight separatorPercentageHeight:(CGFloat)separatorPercentageHeight separatorWidth:(CGFloat)separatorWidth separatorRoundEdges:(BOOL)separatorRoundEdges menuItemSeparatorColor:(UIColor *)menuItemSeparatorColor
{
    _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0.0, 0.0, menuItemWidth, menuScrollViewHeight - indicatorHeight)];
    _menuItemSeparator = [[UIView alloc] initWithFrame:CGRectMake(menuItemWidth - (separatorWidth / 2), floor(menuScrollViewHeight * ((1.0 - separatorPercentageHeight) / 2.0)), separatorWidth, floor(menuScrollViewHeight * separatorPercentageHeight))];

    if (separatorRoundEdges) {
        _menuItemSeparator.layer.cornerRadius = _menuItemSeparator.frame.size.width / 2;
    }

    _menuItemSeparator.hidden = YES;
    [self addSubview:_menuItemSeparator];
    [self addSubview:_titleLabel];
}
- (void)setTitleText:(NSString *)text
{
    if (_titleLabel) {
        _titleLabel.text = text;
        _titleLabel.numberOfLines = 0;
        _titleLabel.textAlignment = NSTextAlignmentCenter;
        _titleLabel.baselineAdjustment = UIBaselineAdjustmentAlignBaselines;
    }
}

@end

typedef NS_ENUM(NSUInteger, CAPSPageMenuScrollDirection) {
    CAPSPageMenuScrollDirectionLeft,
    CAPSPageMenuScrollDirectionRight,
    CAPSPageMenuScrollDirectionOther
};

@interface CAPSPageMenu ()

@property (nonatomic) NSMutableArray *mutableMenuItems;
@property (nonatomic) NSMutableArray *mutableMenuItemWidths;
@property (nonatomic) CGFloat totalMenuItemWidthIfDifferentWidths;
@property (nonatomic) CGFloat startingMenuMargin;

@property (nonatomic) UIView *selectionIndicatorView;

@property (nonatomic) BOOL currentOrientationIsPortrait;
@property (nonatomic) NSInteger pageIndexForOrientationChange;
@property (nonatomic) BOOL didLayoutSubviewsAfterRotation;
@property (nonatomic) BOOL didScrollAlready;

@property (nonatomic) CGFloat lastControllerScrollViewContentOffset;
@property (nonatomic) CAPSPageMenuScrollDirection lastScrollDirection;
@property (nonatomic) NSInteger startingPageForScroll;
@property (nonatomic) BOOL didTapMenuItemToScroll;
@property (nonatomic) NSMutableSet *pagesAddedSet;

@property (nonatomic) NSTimer *tapTimer;

@end

@implementation CAPSPageMenu

NSString * const CAPSPageMenuOptionSelectionIndicatorHeight             = @"selectionIndicatorHeight";
NSString * const CAPSPageMenuOptionMenuItemSeparatorWidth               = @"menuItemSeparatorWidth";
NSString * const CAPSPageMenuOptionScrollMenuBackgroundColor            = @"scrollMenuBackgroundColor";
NSString * const CAPSPageMenuOptionViewBackgroundColor                  = @"viewBackgroundColor";
NSString * const CAPSPageMenuOptionBottomMenuHairlineColor              = @"bottomMenuHairlineColor";
NSString * const CAPSPageMenuOptionSelectionIndicatorColor              = @"selectionIndicatorColor";
NSString * const CAPSPageMenuOptionMenuItemSeparatorColor               = @"menuItemSeparatorColor";
NSString * const CAPSPageMenuOptionMenuMargin                           = @"menuMargin";
NSString * const CAPSPageMenuOptionMenuHeight                           = @"menuHeight";
NSString * const CAPSPageMenuOptionSelectedMenuItemLabelColor           = @"selectedMenuItemLabelColor";
NSString * const CAPSPageMenuOptionUnselectedMenuItemLabelColor         = @"unselectedMenuItemLabelColor";
NSString * const CAPSPageMenuOptionUseMenuLikeSegmentedControl          = @"useMenuLikeSegmentedControl";
NSString * const CAPSPageMenuOptionMenuItemSeparatorRoundEdges          = @"menuItemSeparatorRoundEdges";
NSString * const CAPSPageMenuOptionMenuItemFont                         = @"menuItemFont";
NSString * const CAPSPageMenuOptionMenuItemSeparatorPercentageHeight    = @"menuItemSeparatorPercentageHeight";
NSString * const CAPSPageMenuOptionMenuItemWidth                        = @"menuItemWidth";
NSString * const CAPSPageMenuOptionEnableHorizontalBounce               = @"enableHorizontalBounce";
NSString * const CAPSPageMenuOptionAddBottomMenuHairline                = @"addBottomMenuHairline";
NSString * const CAPSPageMenuOptionMenuItemWidthBasedOnTitleTextWidth   = @"menuItemWidthBasedOnTitleTextWidth";
NSString * const CAPSPageMenuOptionScrollAnimationDurationOnMenuItemTap = @"scrollAnimationDurationOnMenuItemTap";
NSString * const CAPSPageMenuOptionCenterMenuItems                      = @"centerMenuItems";
NSString * const CAPSPageMenuOptionHideTopMenuBar                       = @"hideTopMenuBar";

- (instancetype)initWithViewControllers:(NSArray *)viewControllers frame:(CGRect)frame options:(NSDictionary *)options
{
    self = [super initWithNibName:nil bundle:nil];
    if (!self) return nil;

    [self initValues];

    _controllerArray = viewControllers;

    self.view.frame = frame;

    if (options) {
        for (NSString *key in options) {
            if ([key isEqualToString:CAPSPageMenuOptionSelectionIndicatorHeight]) {
                _selectionIndicatorHeight = [options[key] floatValue];
            } else if ([key isEqualToString: CAPSPageMenuOptionMenuItemSeparatorWidth]) {
                _menuItemSeparatorWidth = [options[key] floatValue];
            } else if ([key isEqualToString:CAPSPageMenuOptionScrollMenuBackgroundColor]) {
                _scrollMenuBackgroundColor = (UIColor *)options[key];
            } else if ([key isEqualToString:CAPSPageMenuOptionViewBackgroundColor]) {
                _viewBackgroundColor = options[key];
            } else if ([key isEqualToString:CAPSPageMenuOptionBottomMenuHairlineColor]) {
                _bottomMenuHairlineColor = options[key];
            } else if ([key isEqualToString:CAPSPageMenuOptionSelectionIndicatorColor]) {
                _selectionIndicatorColor = options[key];
            } else if ([key isEqualToString:CAPSPageMenuOptionMenuItemSeparatorColor]) {
                _menuItemSeparatorColor = options[key];
            } else if ([key isEqualToString:CAPSPageMenuOptionMenuMargin]) {
                _menuMargin = [options[key] floatValue];
            } else if ([key isEqualToString:CAPSPageMenuOptionMenuHeight]) {
                _menuHeight = [options[key] floatValue];
            } else if ([key isEqualToString:CAPSPageMenuOptionSelectedMenuItemLabelColor]) {
                _selectedMenuItemLabelColor = options[key];
            } else if ([key isEqualToString:CAPSPageMenuOptionUnselectedMenuItemLabelColor]) {
                _unselectedMenuItemLabelColor = options[key];
            } else if ([key isEqualToString:CAPSPageMenuOptionUseMenuLikeSegmentedControl]) {
                _useMenuLikeSegmentedControl = [options[key] boolValue];
            } else if ([key isEqualToString:CAPSPageMenuOptionMenuItemSeparatorRoundEdges]) {
                _menuItemSeparatorRoundEdges = [options[key] boolValue];
            } else if ([key isEqualToString:CAPSPageMenuOptionMenuItemFont]) {
                _menuItemFont = options[key];
            } else if ([key isEqualToString:CAPSPageMenuOptionMenuItemSeparatorPercentageHeight]) {
                _menuItemSeparatorPercentageHeight = [options[key] floatValue];
            } else if ([key isEqualToString:CAPSPageMenuOptionMenuItemWidth]) {
                _menuItemWidth = [options[key] floatValue];
            } else if ([key isEqualToString:CAPSPageMenuOptionEnableHorizontalBounce]) {
                _enableHorizontalBounce = [options[key] boolValue];
            } else if ([key isEqualToString:CAPSPageMenuOptionAddBottomMenuHairline]) {
                _addBottomMenuHairline = [options[key] boolValue];
            } else if ([key isEqualToString:CAPSPageMenuOptionMenuItemWidthBasedOnTitleTextWidth]) {
                _menuItemWidthBasedOnTitleTextWidth = [options[key] boolValue];
            } else if ([key isEqualToString:CAPSPageMenuOptionScrollAnimationDurationOnMenuItemTap]) {
                _scrollAnimationDurationOnMenuItemTap = [options[key] integerValue];
            } else if ([key isEqualToString:CAPSPageMenuOptionCenterMenuItems]) {
                _centerMenuItems = [options[key] boolValue];
            } else if ([key isEqualToString:CAPSPageMenuOptionHideTopMenuBar]) {
                _hideTopMenuBar = [options[key] boolValue];
            }
        }

        if (_hideTopMenuBar) {
            _addBottomMenuHairline = NO;
            _menuHeight = 0.0;
        }
    }

    [self setUpUserInterface];
    if (_menuScrollView.subviews.count == 0) {
        [self configureUserInterface];
    }
    return self;
}

- (void)initValues
{
    _menuScrollView       = [UIScrollView new];
    _controllerScrollView = [UIScrollView new];
    _mutableMenuItems       = [NSMutableArray array];
    _mutableMenuItemWidths  = [NSMutableArray array];

    _menuHeight                           = 34.0;
    _menuMargin                           = 15.0;
    _menuItemWidth                        = 111.0;
    _selectionIndicatorHeight             = 3.0;
    _totalMenuItemWidthIfDifferentWidths  = 0.0;
    _scrollAnimationDurationOnMenuItemTap = 500;
    _startingMenuMargin                   = 0.0;

    _selectionIndicatorView = [UIView new];

    _currentPageIndex = 0;
    _lastPageIndex    = 0;

    _selectionIndicatorColor      = [UIColor whiteColor];
    _selectedMenuItemLabelColor   = [UIColor whiteColor];
    _unselectedMenuItemLabelColor = [UIColor lightGrayColor];
    _scrollMenuBackgroundColor    = [UIColor blackColor];
    _viewBackgroundColor          = [UIColor whiteColor];
    _bottomMenuHairlineColor      = [UIColor whiteColor];
    _menuItemSeparatorColor       = [UIColor lightGrayColor];

    _menuItemFont = [UIFont systemFontOfSize:15.0];
    _menuItemSeparatorPercentageHeight = 0.2;
    _menuItemSeparatorWidth            = 0.5;
    _menuItemSeparatorRoundEdges       = NO;

    _addBottomMenuHairline              = YES;
    _menuItemWidthBasedOnTitleTextWidth = NO;
    _useMenuLikeSegmentedControl        = NO;
    _centerMenuItems                    = NO;
    _enableHorizontalBounce             = YES;
    _hideTopMenuBar                     = NO;

    _currentOrientationIsPortrait   = YES;
    _pageIndexForOrientationChange  = 0;
    _didLayoutSubviewsAfterRotation = NO;
    _didScrollAlready               = NO;

    _lastControllerScrollViewContentOffset = 0.0;
    _startingPageForScroll = 0;
    _didTapMenuItemToScroll = NO;

    _pagesAddedSet = [NSMutableSet set];
}

- (void)setUpUserInterface
{
    NSDictionary *viewsDictionary = @{
                                      @"menuScrollView" : _menuScrollView,
                                      @"controllerScrollView":_controllerScrollView
                                      };

    _controllerScrollView.pagingEnabled                             = YES;
    _controllerScrollView.translatesAutoresizingMaskIntoConstraints = NO;
    _controllerScrollView.alwaysBounceHorizontal = _enableHorizontalBounce;
    _controllerScrollView.bounces                = _enableHorizontalBounce;

    _controllerScrollView.frame = CGRectMake(0.0, _menuHeight, self.view.frame.size.width, self.view.frame.size.height);

    [self.view addSubview:_controllerScrollView];

    NSArray *controllerScrollView_constraint_H = [NSLayoutConstraint constraintsWithVisualFormat:@"H:|[controllerScrollView]|" options:0 metrics:nil views:viewsDictionary];
    NSString *controllerScrollView_constraint_V_Format = [NSString stringWithFormat:@"V:|-0-[controllerScrollView]|"];
    NSArray *controllerScrollView_constraint_V = [NSLayoutConstraint constraintsWithVisualFormat:controllerScrollView_constraint_V_Format options:0 metrics:nil views:viewsDictionary];

    [self.view addConstraints:controllerScrollView_constraint_H];
    [self.view addConstraints:controllerScrollView_constraint_V];

    // Set up menu scroll view
    _menuScrollView.translatesAutoresizingMaskIntoConstraints = NO;
    _menuScrollView.frame = CGRectMake(0.0, 0.0, self.view.frame.size.width, _menuHeight);
    [self.view addSubview:_menuScrollView];

    NSArray *menuScrollView_constraint_H = [NSLayoutConstraint constraintsWithVisualFormat:@"H:|[menuScrollView]|" options:0 metrics:nil views:viewsDictionary];
    NSString *menuScrollView_constrant_V_Format = [NSString stringWithFormat:@"V:|[menuScrollView(%.f)]",_menuHeight];
    NSArray *menuScrollView_constraint_V = [NSLayoutConstraint constraintsWithVisualFormat:menuScrollView_constrant_V_Format options:0 metrics:nil views:viewsDictionary];

    [self.view addConstraints:menuScrollView_constraint_H];
    [self.view addConstraints:menuScrollView_constraint_V];

    if (_addBottomMenuHairline) {
        UIView *menuBottomHairline = [UIView new];

        menuBottomHairline.translatesAutoresizingMaskIntoConstraints = NO;

        [self.view addSubview:menuBottomHairline];

        NSArray *menuBottomHairline_constraint_H = [NSLayoutConstraint constraintsWithVisualFormat:@"H:|[menuBottomHairline]|" options:0 metrics:nil views:@{@"menuBottomHairline":menuBottomHairline}];
        NSString *menuBottomHairline_constraint_V_Format = [NSString stringWithFormat:@"V:|-%f-[menuBottomHairline(0.5)]",_menuHeight];
        NSArray *menuBottomHairline_constraint_V = [NSLayoutConstraint constraintsWithVisualFormat:menuBottomHairline_constraint_V_Format options:0 metrics:nil views:@{@"menuBottomHairline":menuBottomHairline}];

        [self.view addConstraints:menuBottomHairline_constraint_H];
        [self.view addConstraints:menuBottomHairline_constraint_V];

        menuBottomHairline.backgroundColor = _bottomMenuHairlineColor;
    }

    // Disable scroll bars
    _menuScrollView.showsHorizontalScrollIndicator       = NO;
    _menuScrollView.showsVerticalScrollIndicator         = NO;
    _controllerScrollView.showsHorizontalScrollIndicator = NO;
    _controllerScrollView.showsVerticalScrollIndicator   = NO;

    // Set background color behind scroll views and for menu scroll view
    self.view.backgroundColor = _viewBackgroundColor;
    _menuScrollView.backgroundColor = _scrollMenuBackgroundColor;
}

- (void)configureUserInterface
{
    UITapGestureRecognizer *menuItemTapGestureRecognizer = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(handleMenuItemTap:)];
    menuItemTapGestureRecognizer.numberOfTapsRequired    = 1;
    menuItemTapGestureRecognizer.numberOfTouchesRequired = 1;
    menuItemTapGestureRecognizer.delegate                = self;
    [_menuScrollView addGestureRecognizer:menuItemTapGestureRecognizer];

    // Set delegate for controller scroll view
    _controllerScrollView.delegate = self;

    // When the user taps the status bar, the scroll view beneath the touch which is closest to the status bar will be scrolled to top,
    // but only if its `scrollsToTop` property is YES, its delegate does not return NO from `shouldScrollViewScrollToTop`, and it is not already at the top.
    // If more than one scroll view is found, none will be scrolled.
    // Disable scrollsToTop for menu and controller scroll views so that iOS finds scroll views within our pages on status bar tap gesture.
    _menuScrollView.scrollsToTop       = NO;;
    _controllerScrollView.scrollsToTop = NO;;

    // Configure menu scroll view
    if (_useMenuLikeSegmentedControl) {
        _menuScrollView.scrollEnabled = NO;;
        _menuScrollView.contentSize = CGSizeMake(self.view.frame.size.width, _menuHeight);
        _menuMargin = 0.0;
    } else {
        _menuScrollView.contentSize = CGSizeMake((_menuItemWidth + _menuMargin) * (CGFloat)_controllerArray.count + _menuMargin, _menuHeight);
    }
    // Configure controller scroll view content size
    _controllerScrollView.contentSize = CGSizeMake(self.view.frame.size.width * (CGFloat)_controllerArray.count, 0.0);

    CGFloat index = 0.0;

    for (UIViewController *controller in _controllerArray) {
        if (index == 0.0) {
            // Add first two controllers to scrollview and as child view controller
            [controller viewWillAppear:YES];
            [self addPageAtIndex:0];
            [controller viewDidAppear:YES];
        }

        // Set up menu item for menu scroll view
        CGRect menuItemFrame;

        if (_useMenuLikeSegmentedControl) {
            menuItemFrame = CGRectMake(self.view.frame.size.width / (CGFloat)_controllerArray.count * (CGFloat)index, 0.0, (CGFloat)self.view.frame.size.width / (CGFloat)_controllerArray.count, _menuHeight);
        } else if (_menuItemWidthBasedOnTitleTextWidth) {
            NSString *controllerTitle = controller.title;

            NSString *titleText = controllerTitle != nil ? controllerTitle : [NSString stringWithFormat:@"Menu %.0f", index + 1];

            CGRect itemWidthRect = [titleText boundingRectWithSize:CGSizeMake(1000, 1000) options: NSStringDrawingUsesLineFragmentOrigin attributes: @{NSFontAttributeName:_menuItemFont} context: nil];

            _menuItemWidth = itemWidthRect.size.width;

            menuItemFrame = CGRectMake(_totalMenuItemWidthIfDifferentWidths + _menuMargin + (_menuMargin * index), 0.0, _menuItemWidth, _menuHeight);

            _totalMenuItemWidthIfDifferentWidths += itemWidthRect.size.width;
            [_mutableMenuItemWidths addObject:@(itemWidthRect.size.width)];
        } else {
            if (_centerMenuItems && index == 0.0) {
                _startingMenuMargin = ((self.view.frame.size.width - (((CGFloat)_controllerArray.count * _menuItemWidth) + (CGFloat)(_controllerArray.count - 1) * _menuMargin)) / 2.0) -  _menuMargin;

                if (_startingMenuMargin < 0.0) {
                    _startingMenuMargin = 0.0;
                }

                menuItemFrame = CGRectMake(_startingMenuMargin + _menuMargin, 0.0, _menuItemWidth, _menuHeight);
            } else {
                menuItemFrame = CGRectMake(_menuItemWidth * index + _menuMargin * (index + 1) + _startingMenuMargin, 0.0, _menuItemWidth, _menuHeight);
            }
        }

        MenuItemView *menuItemView = [[MenuItemView alloc] initWithFrame:menuItemFrame];
        if (_useMenuLikeSegmentedControl) {
            [menuItemView setUpMenuItemView:(CGFloat)self.view.frame.size.width / (CGFloat)_controllerArray.count menuScrollViewHeight:_menuHeight indicatorHeight:_selectionIndicatorHeight separatorPercentageHeight:_menuItemSeparatorPercentageHeight separatorWidth:_menuItemSeparatorWidth separatorRoundEdges:_menuItemSeparatorRoundEdges menuItemSeparatorColor:_menuItemSeparatorColor];

        } else {
            [menuItemView setUpMenuItemView:_menuItemWidth menuScrollViewHeight:_menuHeight indicatorHeight:_selectionIndicatorHeight separatorPercentageHeight:_menuItemSeparatorPercentageHeight separatorWidth:_menuItemSeparatorWidth separatorRoundEdges:_menuItemSeparatorRoundEdges menuItemSeparatorColor:_menuItemSeparatorColor];
        }

        // Configure menu item label font if font is set by user
        menuItemView.titleLabel.font = _menuItemFont;

        menuItemView.titleLabel.textAlignment = NSTextAlignmentCenter;
        menuItemView.titleLabel.textColor = _unselectedMenuItemLabelColor;

        // Set title depending on if controller has a title set
        if (controller.title != nil) {
            [menuItemView setTitleText:controller.title];
        } else {
            [menuItemView setTitleText:[NSString stringWithFormat:@"Menu %.0f",index + 1]];
        }

        // Add separator between menu items when using as segmented control
        if (_useMenuLikeSegmentedControl) {
            if ((NSInteger)index < _controllerArray.count - 1) {
                menuItemView.menuItemSeparator.hidden = NO;
            }
        }

        // Add menu item view to menu scroll view
        [_menuScrollView addSubview:menuItemView];

        [_mutableMenuItems addObject:menuItemView];

        index++;
    }

    // Set new content size for menu scroll view if needed
    if (_menuItemWidthBasedOnTitleTextWidth) {
        _menuScrollView.contentSize = CGSizeMake((_totalMenuItemWidthIfDifferentWidths + _menuMargin) + (CGFloat)_controllerArray.count * _menuMargin, _menuHeight);
    }

    // Set selected color for title label of selected menu item
    if (_mutableMenuItems.count > 0) {
        if ([_mutableMenuItems[_currentPageIndex] titleLabel] != nil) {
            [_mutableMenuItems[_currentPageIndex] titleLabel].textColor = _selectedMenuItemLabelColor;
        }
    }

    // Configure selection indicator view
    CGRect selectionIndicatorFrame;

    if (_useMenuLikeSegmentedControl) {
        selectionIndicatorFrame = CGRectMake(0.0, _menuHeight - _selectionIndicatorHeight, self.view.frame.size.width / (CGFloat)_controllerArray.count, _selectionIndicatorHeight);
    } else if (_menuItemWidthBasedOnTitleTextWidth) {
        selectionIndicatorFrame = CGRectMake(_menuMargin, _menuHeight - _selectionIndicatorHeight, [_mutableMenuItemWidths[0] floatValue], _selectionIndicatorHeight);
    } else {
        if (_centerMenuItems) {
            selectionIndicatorFrame = CGRectMake(_startingMenuMargin + _menuMargin, _menuHeight - _selectionIndicatorHeight, _menuItemWidth, _selectionIndicatorHeight);
        } else {
            selectionIndicatorFrame = CGRectMake(_menuMargin, _menuHeight - _selectionIndicatorHeight, _menuItemWidth, _selectionIndicatorHeight);
        }
    }

    _selectionIndicatorView = [[UIView alloc] initWithFrame:selectionIndicatorFrame];
    _selectionIndicatorView.backgroundColor = _selectionIndicatorColor;
    [_menuScrollView addSubview:_selectionIndicatorView];
}

#pragma mark - Scroll view delegate
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
    if (!_didLayoutSubviewsAfterRotation) {
        if ([scrollView isEqual:_controllerScrollView]) {
            if (scrollView.contentOffset.x >= 0.0 && scrollView.contentOffset.x <= ((CGFloat)(_controllerArray.count - 1) * self.view.frame.size.width)) {
                UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
                if ((_currentOrientationIsPortrait && UIInterfaceOrientationIsPortrait(orientation)) || (!_currentOrientationIsPortrait && UIInterfaceOrientationIsLandscape(orientation))){
                    // Check if scroll direction changed
                    if (!_didTapMenuItemToScroll) {
                        if (_didScrollAlready) {
                            CAPSPageMenuScrollDirection newScrollDirection  = CAPSPageMenuScrollDirectionOther;

                            if ((CGFloat)_startingPageForScroll * scrollView.frame.size.width > scrollView.contentOffset.x) {
                                newScrollDirection = CAPSPageMenuScrollDirectionRight;
                            } else if ((CGFloat)_startingPageForScroll * scrollView.frame.size.width < scrollView.contentOffset.x) {
                                newScrollDirection = CAPSPageMenuScrollDirectionLeft;
                            }

                            if (newScrollDirection != CAPSPageMenuScrollDirectionOther) {
                                if (_lastScrollDirection != newScrollDirection) {
                                    NSInteger index = newScrollDirection == CAPSPageMenuScrollDirectionLeft ? _currentPageIndex + 1 : _currentPageIndex - 1;

                                    if (index >= 0 && index < _controllerArray.count ){
                                        // Check dictionary if page was already added
                                        if (![_pagesAddedSet containsObject:@(index)]) {

                                            [self addPageAtIndex:index];

                                            [_pagesAddedSet addObject:@(index)];
                                        }
                                    }
                                }
                            }

                            _lastScrollDirection = newScrollDirection;
                        }

                        if (!_didScrollAlready) {
                            if (_lastControllerScrollViewContentOffset > scrollView.contentOffset.x) {
                                if (_currentPageIndex != _controllerArray.count - 1 ){
                                    // Add page to the left of current page
                                    NSInteger index = _currentPageIndex - 1;

                                    if (![_pagesAddedSet containsObject:@(index)] && index < _controllerArray.count && index >= 0) {
                                        [self addPageAtIndex:index];

                                        [_pagesAddedSet addObject:@(index)];
                                    }

                                    _lastScrollDirection = CAPSPageMenuScrollDirectionRight;
                                }
                            } else if (_lastControllerScrollViewContentOffset < scrollView.contentOffset.x) {
                                if (_currentPageIndex != 0) {
                                    // Add page to the right of current page
                                    NSInteger index = _currentPageIndex + 1;

                                    if (![_pagesAddedSet containsObject:@(index)] && index < _controllerArray.count && index >= 0) {

                                        [self addPageAtIndex:index];
                                        [_pagesAddedSet addObject:@(index)];
                                    }

                                    _lastScrollDirection = CAPSPageMenuScrollDirectionLeft;
                                }
                            }

                            _didScrollAlready = YES;
                        }

                        _lastControllerScrollViewContentOffset = scrollView.contentOffset.x;
                    }

                    CGFloat ratio = 1.0;

                    // Calculate ratio between scroll views
                    ratio = (_menuScrollView.contentSize.width - self.view.frame.size.width) / (_controllerScrollView.contentSize.width - self.view.frame.size.width);

                    if (_menuScrollView.contentSize.width > self.view.frame.size.width ){
                        CGPoint offset  = _menuScrollView.contentOffset;
                        offset.x = _controllerScrollView.contentOffset.x * ratio;
                        [_menuScrollView setContentOffset:offset animated: NO];
                    }

                    // Calculate current page
                    CGFloat width = _controllerScrollView.frame.size.width;
                    NSInteger page = (NSInteger)(_controllerScrollView.contentOffset.x + (0.5 * width)) / width;

                    // Update page if changed
                    if (page != _currentPageIndex) {
                        _lastPageIndex = _currentPageIndex;
                        _currentPageIndex = page;

                        if (![_pagesAddedSet containsObject:@(page)] && page < _controllerArray.count && page >= 0){
                            [self addPageAtIndex:page];
                            [_pagesAddedSet addObject:@(page)];

                        }

                        if (!_didTapMenuItemToScroll) {
                            // Add last page to pages dictionary to make sure it gets removed after scrolling
                            if (![_pagesAddedSet containsObject:@(_lastPageIndex)]) {
                                [_pagesAddedSet addObject:@(_lastPageIndex)];
                            }

                            // Make sure only up to 3 page views are in memory when fast scrolling, otherwise there should only be one in memory
                            NSInteger indexLeftTwo = page - 2;
                            if ([_pagesAddedSet containsObject:@(indexLeftTwo)]) {

                                [_pagesAddedSet removeObject:@(indexLeftTwo)];

                                [self removePageAtIndex:indexLeftTwo];
                            }
                            NSInteger indexRightTwo = page + 2;
                            if ([_pagesAddedSet containsObject:@(indexRightTwo)]) {

                                [_pagesAddedSet removeObject:@(indexRightTwo)];

                                [self removePageAtIndex:indexRightTwo];
                            }
                        }
                    }

                    // Move selection indicator view when swiping
                    [self moveSelectionIndicator:page];
                }
            } else {
                CGFloat ratio = 1.0;

                ratio = (_menuScrollView.contentSize.width - self.view.frame.size.width) / (_controllerScrollView.contentSize.width - self.view.frame.size.width);

                if (_menuScrollView.contentSize.width > self.view.frame.size.width) {
                    CGPoint offset = self.menuScrollView.contentOffset;
                    offset.x = _controllerScrollView.contentOffset.x * ratio;
                    [self.menuScrollView setContentOffset:offset animated:NO];
                }
            }
        }
    } else {
        _didLayoutSubviewsAfterRotation = NO;

        // Move selection indicator view when swiping
        [self moveSelectionIndicator:self.currentPageIndex];
    }
}

- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
{
    if ([scrollView isEqual:_controllerScrollView]) {
        // Call didMoveToPage delegate function
        UIViewController *currentController = _controllerArray[_currentPageIndex];
        if ([_delegate respondsToSelector:@selector(didMoveToPage:index:)]) {
            [_delegate didMoveToPage:currentController index:_currentPageIndex];
        }

        // Remove all but current page after decelerating
        for (NSNumber *num in _pagesAddedSet) {
            if (![num isEqualToNumber:@(self.currentPageIndex)]) {
                [self removePageAtIndex:num.integerValue];
            }
        }

        _didScrollAlready = NO;
        _startingPageForScroll = _currentPageIndex;

        // Empty out pages in dictionary
        [_pagesAddedSet removeAllObjects];
    }
}

- (void)scrollViewDidEndTapScrollingAnimation
{
    // Call didMoveToPage delegate function
    UIViewController *currentController = _controllerArray[_currentPageIndex];
    if ([_delegate respondsToSelector:@selector(didMoveToPage:index:)]) {
        [_delegate didMoveToPage:currentController index:_currentPageIndex];
    }

    // Remove all but current page after decelerating
    for (NSNumber *num in _pagesAddedSet) {
        if (![num isEqualToNumber:@(self.currentPageIndex)]) {
            [self removePageAtIndex:num.integerValue];
        }
    }

    _startingPageForScroll = _currentPageIndex;
    _didTapMenuItemToScroll = NO;

    // Empty out pages in dictionary
    [_pagesAddedSet removeAllObjects];
}

// MARK: - Handle Selection Indicator
- (void)moveSelectionIndicator:(NSInteger)pageIndex
{
    if (pageIndex >= 0 && pageIndex < _controllerArray.count) {
        [UIView animateWithDuration:0.15 animations:^{

            CGFloat selectionIndicatorWidth = self.selectionIndicatorView.frame.size.width;
            CGFloat selectionIndicatorX = 0.0;

            if (self.useMenuLikeSegmentedControl) {
                selectionIndicatorX = (CGFloat)pageIndex * (self.view.frame.size.width / (CGFloat)self.controllerArray.count);
                selectionIndicatorWidth = self.view.frame.size.width / (CGFloat)self.controllerArray.count;
            } else if (self.menuItemWidthBasedOnTitleTextWidth) {
                selectionIndicatorWidth = [self.menuItemWidths[pageIndex] floatValue];
                selectionIndicatorX += self.menuMargin;

                if (pageIndex > 0) {
                    for (NSInteger i=0; i<pageIndex; i++) {
                        selectionIndicatorX += (self.menuMargin + [self.menuItemWidths[i] floatValue]);
                    }
                }
            } else {
                if (self.centerMenuItems && pageIndex == 0) {
                    selectionIndicatorX = self.startingMenuMargin + self.menuMargin;
                } else {
                    selectionIndicatorX = self.menuItemWidth * (CGFloat)pageIndex + self.menuMargin * (CGFloat)(pageIndex + 1) + self.startingMenuMargin;
                }
            }

            self.selectionIndicatorView.frame = CGRectMake(selectionIndicatorX, self.selectionIndicatorView.frame.origin.y, selectionIndicatorWidth, self.selectionIndicatorView.frame.size.height);

            // Switch newly selected menu item title label to selected color and old one to unselected color
            if (self.menuItems.count > 0) {
                if ([self.menuItems[self.lastPageIndex] titleLabel] != nil && [self.menuItems[self.currentPageIndex] titleLabel] != nil) {
                    [self.menuItems[self.lastPageIndex] titleLabel].textColor = self.unselectedMenuItemLabelColor;
                    [self.menuItems[self.currentPageIndex] titleLabel].textColor = self.selectedMenuItemLabelColor;
                }
            }
        }];
    }
}

// MARK: - Tap gesture recognizer selector
- (void)handleMenuItemTap:(UITapGestureRecognizer *)gestureRecognizer
{
    CGPoint tappedPoint = [gestureRecognizer locationInView:_menuScrollView];

    if (tappedPoint.y < self.menuScrollView.frame.size.height) {

        // Calculate tapped page
        NSInteger itemIndex = 0;

        if (_useMenuLikeSegmentedControl) {
            itemIndex = (NSInteger) (tappedPoint.x / (self.view.frame.size.width / (CGFloat)_controllerArray.count));
        } else if (_menuItemWidthBasedOnTitleTextWidth) {
            // Base case being first item
            CGFloat menuItemLeftBound = 0.0;
            CGFloat menuItemRightBound = [_mutableMenuItemWidths[0] floatValue] + _menuMargin + (_menuMargin / 2);

            if (!(tappedPoint.x >= menuItemLeftBound && tappedPoint.x <= menuItemRightBound)) {
                for (NSInteger i = 1; i<=_controllerArray.count - 1; i++) {
                    menuItemLeftBound = menuItemRightBound + 1.0;
                    menuItemRightBound = menuItemLeftBound + [_mutableMenuItemWidths[i] floatValue] + _menuMargin;

                    if (tappedPoint.x >= menuItemLeftBound && tappedPoint.x <= menuItemRightBound) {
                        itemIndex = i;
                        break;
                    }
                }
            }
        } else {
            CGFloat rawItemIndex = ((tappedPoint.x - _startingMenuMargin) - _menuMargin / 2) / (_menuMargin + _menuItemWidth);

            // Prevent moving to first item when tapping left to first item
            if (rawItemIndex < 0) {
                itemIndex = -1;
            } else {
                itemIndex = (NSInteger)rawItemIndex;
            }
        }

        if (itemIndex >= 0 && itemIndex < _controllerArray.count) {
            // Update page if changed
            if (itemIndex != _currentPageIndex) {
                _startingPageForScroll = itemIndex;
                _lastPageIndex = _currentPageIndex;
                _currentPageIndex = itemIndex;
                _didTapMenuItemToScroll = YES;

                // Add pages in between current and tapped page if necessary
                NSInteger smallerIndex = _lastPageIndex < _currentPageIndex ? _lastPageIndex : _currentPageIndex;
                NSInteger largerIndex = _lastPageIndex > _currentPageIndex ? _lastPageIndex : _currentPageIndex;

                if (smallerIndex + 1 != largerIndex) {
                    for (NSInteger i=smallerIndex + 1; i< largerIndex; i++) {

                        if (![_pagesAddedSet containsObject:@(i)]) {
                            [self addPageAtIndex:i];
                            [_pagesAddedSet addObject:@(i)];
                        }
                    }
                }

                [self addPageAtIndex:itemIndex];

                // Add page from which tap is initiated so it can be removed after tap is done
                [_pagesAddedSet addObject:@(_lastPageIndex)];

            }

            // Move controller scroll view when tapping menu item
            double duration = _scrollAnimationDurationOnMenuItemTap / 1000.0;

            [UIView animateWithDuration:duration animations:^{
                CGFloat xOffset = (CGFloat)itemIndex * _controllerScrollView.frame.size.width;
                [_controllerScrollView setContentOffset:CGPointMake(xOffset, _controllerScrollView.contentOffset.y)];
            }];

            if (_tapTimer != nil) {
                [_tapTimer invalidate];
            }

            NSTimeInterval timerInterval = (double)_scrollAnimationDurationOnMenuItemTap * 0.001;
            _tapTimer = [NSTimer scheduledTimerWithTimeInterval:timerInterval target:self selector:@selector(scrollViewDidEndTapScrollingAnimation) userInfo:nil repeats:NO];
        }
    }
}

// MARK: - Remove/Add Page
- (void)addPageAtIndex:(NSInteger)index
{
    // Call didMoveToPage delegate function
    UIViewController *currentController = _controllerArray[index];
    if ([_delegate respondsToSelector:@selector(willMoveToPage:index:)]) {
        [_delegate willMoveToPage:currentController index:index];
    }
    UIViewController *newVC = _controllerArray[index];

    [newVC willMoveToParentViewController:self];

    newVC.view.frame = CGRectMake(self.view.frame.size.width * (CGFloat)index, _menuHeight, self.view.frame.size.width, self.view.frame.size.height - _menuHeight);

    [self addChildViewController:newVC];
    [_controllerScrollView addSubview:newVC.view];
    [newVC didMoveToParentViewController:self];
}

- (void)removePageAtIndex:(NSInteger)index
{
    UIViewController *oldVC = _controllerArray[index];

    [oldVC willMoveToParentViewController:nil];

    [oldVC.view removeFromSuperview];
    [oldVC removeFromParentViewController];

    [oldVC didMoveToParentViewController:nil];
}

// MARK: - Orientation Change

- (void)viewDidLayoutSubviews
{
    // Configure controller scroll view content size
    _controllerScrollView.contentSize = CGSizeMake(self.view.frame.size.width * (CGFloat)_controllerArray.count, self.view.frame.size.height - _menuHeight);

    BOOL oldCurrentOrientationIsPortrait = _currentOrientationIsPortrait;

    UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
    _currentOrientationIsPortrait = UIInterfaceOrientationIsPortrait(orientation);

    if ((oldCurrentOrientationIsPortrait && UIInterfaceOrientationIsLandscape(orientation)) || (!oldCurrentOrientationIsPortrait && UIInterfaceOrientationIsPortrait(orientation))){
        _didLayoutSubviewsAfterRotation = YES;

        //Resize menu items if using as segmented control
        if (_useMenuLikeSegmentedControl) {
            _menuScrollView.contentSize = CGSizeMake(self.view.frame.size.width, _menuHeight);

            // Resize selectionIndicator bar
            CGFloat selectionIndicatorX = (CGFloat)_currentPageIndex * (self.view.frame.size.width / (CGFloat)_controllerArray.count);
            CGFloat selectionIndicatorWidth = self.view.frame.size.width / (CGFloat)_controllerArray.count;
            _selectionIndicatorView.frame =  CGRectMake(selectionIndicatorX, self.selectionIndicatorView.frame.origin.y, selectionIndicatorWidth, self.selectionIndicatorView.frame.size.height);

            // Resize menu items
            NSInteger index = 0;

            for (MenuItemView *item in _mutableMenuItems) {
                item.frame = CGRectMake(self.view.frame.size.width / (CGFloat)_controllerArray.count * (CGFloat)index, 0.0, self.view.frame.size.width / (CGFloat)_controllerArray.count, _menuHeight);
                if (item.titleLabel) {
                    item.titleLabel.frame = CGRectMake(0.0, 0.0, self.view.frame.size.width / (CGFloat)_controllerArray.count, _menuHeight);
                }
                if (item.menuItemSeparator){
                    item.menuItemSeparator.frame = CGRectMake(item.frame.size.width - (_menuItemSeparatorWidth / 2), item.menuItemSeparator.frame.origin.y, item.menuItemSeparator.frame.size.width, item.menuItemSeparator.frame.size.height);
                }

                index++;
            }
        } else if (_centerMenuItems) {
            _startingMenuMargin = ((self.view.frame.size.width - (((CGFloat)_controllerArray.count * _menuItemWidth) + ((CGFloat)(_controllerArray.count - 1) * _menuMargin))) / 2.0) -  _menuMargin;

            if (_startingMenuMargin < 0.0) {
                _startingMenuMargin = 0.0;
            }

            CGFloat selectionIndicatorX = self.menuItemWidth * (CGFloat)_currentPageIndex + self.menuMargin * (CGFloat)(_currentPageIndex + 1) + self.startingMenuMargin;
            _selectionIndicatorView.frame =  CGRectMake(selectionIndicatorX, self.selectionIndicatorView.frame.origin.y, self.selectionIndicatorView.frame.size.width, self.selectionIndicatorView.frame.size.height);

            // Recalculate frame for menu items if centered
            NSInteger index = 0;

            for (MenuItemView *item in _mutableMenuItems) {
                if (index == 0) {
                    item.frame = CGRectMake(_startingMenuMargin + _menuMargin, 0.0, _menuItemWidth, _menuHeight);
                } else {
                    item.frame = CGRectMake(_menuItemWidth * (CGFloat)index + _menuMargin * (CGFloat)index + 1.0 + _startingMenuMargin, 0.0, _menuItemWidth, _menuHeight);
                }

                index++;
            }
        }

        for (UIView *view in _controllerScrollView.subviews) {
            view.frame = CGRectMake(self.view.frame.size.width * (CGFloat)(_currentPageIndex), _menuHeight, _controllerScrollView.frame.size.width, self.view.frame.size.height - _menuHeight);
        }

        CGFloat xOffset = (CGFloat)(self.currentPageIndex) * _controllerScrollView.frame.size.width;
        [_controllerScrollView setContentOffset:CGPointMake(xOffset, _controllerScrollView.contentOffset.y)];

        CGFloat ratio = (_menuScrollView.contentSize.width - self.view.frame.size.width) / (_controllerScrollView.contentSize.width - self.view.frame.size.width);

        if (_menuScrollView.contentSize.width > self.view.frame.size.width) {
            CGPoint offset = _menuScrollView.contentOffset;
            offset.x = _controllerScrollView.contentOffset.x * ratio;
            [_menuScrollView setContentOffset:offset animated:NO];
        }
    }

    // Hsoi 2015-02-05 - Running on iOS 7.1 complained: "'NSInternalInconsistencyException', reason: 'Auto Layout
    // still required after sending -viewDidLayoutSubviews to the view controller. ViewController's implementation
    // needs to send -layoutSubviews to the view to invoke auto layout.'"
    //
    // http://stackoverflow.com/questions/15490140/auto-layout-error
    //
    // Given the SO answer and caveats presented there, we'll call layoutIfNeeded() instead.
    [self.view layoutIfNeeded];
}

// MARK: - Move to page index

/**
 Move to page at index

 :param: index Index of the page to move to
 */
- (void)moveToPage:(NSInteger)index
{
    if (index >= 0 && index < _controllerArray.count) {
        // Update page if changed
        if (index != _currentPageIndex) {
            _startingPageForScroll = index;
            _lastPageIndex = _currentPageIndex;
            _currentPageIndex = index;
            _didTapMenuItemToScroll = YES;

            // Add pages in between current and tapped page if necessary
            NSInteger smallerIndex = _lastPageIndex < _currentPageIndex ? _lastPageIndex : _currentPageIndex;
            NSInteger largerIndex = _lastPageIndex > _currentPageIndex ? _lastPageIndex : _currentPageIndex;

            if (smallerIndex + 1 != largerIndex) {
                for (NSInteger i=smallerIndex + 1; i<largerIndex; i++) {

                    if (![_pagesAddedSet containsObject:@(i)]) {
                        [self addPageAtIndex:i];
                        [_pagesAddedSet addObject:@(i)];
                    }
                }
            }
            [self addPageAtIndex:index];

            // Add page from which tap is initiated so it can be removed after tap is done
            [_pagesAddedSet addObject:@(_lastPageIndex)];
        }

        // Move controller scroll view when tapping menu item
        double duration = (double)(_scrollAnimationDurationOnMenuItemTap) / (double)(1000);

        [UIView animateWithDuration:duration animations:^{
            CGFloat xOffset = (CGFloat)index * self.controllerScrollView.frame.size.width;
            [self.controllerScrollView setContentOffset:CGPointMake(xOffset, self.controllerScrollView.contentOffset.y) animated:NO];
        }];
    }
}

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
{
    return YES;
}

- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer
{
    return YES;
}

// MARK: Getter
- (NSArray *)menuItems
{
    return _mutableMenuItems;
}

- (NSArray *)menuItemWidths
{
    return _mutableMenuItemWidths;
}

@end

redpajama_set_name: RedPajamaGithub


Former FBI Deputy Director Andrew McCabe is suing the Department of Justice, the department's inspector general and the FBI for materials related to his firing.
McCabe has filed a Freedom of Information Act lawsuit for documents, including the Inspector General's Manual and other policy documents used by the Justice Department to justify his termination.
McCabe's legal team has been working on a civil lawsuit related to his firing since March but has not yet filed such a legal action.


Boutique Packaging can be added in the lab approval process for each order that you submit to the labs through ShootProof. This can be the perfect touch for orders that you will ship directly to your clients from the lab, or just when you want an upscale presentation for your delivery.
With all labs, the largest size print that boutique packaging is available for is an 11x14 (14x10 for Loxley Colour). If you happen to have images larger than this included in an order, only the 11x14's (or 14x10) and smaller will be packaged in the boutique box; the remaining portion of the order will not be contained in the boutique box or folder. Because of this, if your order only contains 16x20 prints or larger, you will not see the Boutique Packaging option as an add-on when submitting your order through ShootProof.
What are the boutique packaging options through Bay Photo?


Experience driving perfection in the 2016 Honda Civic Smooth gearshifts are achieved thanks to the 2 liter 4 cylinder engine, and for added security, dynamic Stability Control supplements the drivetrain. This model accommodates 5 passengers comfortably, and provides features such as: 1-touch window functionality, a tachometer, telescoping steering wheel, power door mirrors, power windows, remote keyless entry, and cruise control. Audio features include an AM/FM radio, and 4 speakers, providing excellent sound throughout the cabin. Honda also prioritized safety and security with features such as: head curtain airbags, front side impact airbags, traction control, brake assist, a panic alarm, and 4 wheel disc brakes with ABS. This car was designed with safety in mind, allowing you to drive with even greater assurance. A Carfax history report provides you peace of mind by detailing information related to past owners and service records. We pride ourselves in the quality that we offer on all of our vehicles. Stop by our dealership or give us a call for more information.


Self-patterned and damask fabrics in a traditional style, are both an excellent choice for roman blinds.
The pattern is woven into the fabric and the palette is limited to closely toned colours. This creates an unobtrusive effect, which is subtler than a multi coloured or contrasting pattern.
A damask roman blind will add interest without ruling a room. This type of window dressing is the perfect way to break up a plain expanse of wall. Inject some style without overpowering the other aspects of your design scheme!


text:
Eyewitness to his story, or the whirled according to Trump
They say history is written by the victors, so apparently the polls are dead wrong and DJ Trump is a cinch to win the election. I say this because he and his spokespeople have been rewriting history throughout his campaign, saying Trump was always against the Iraq war; President Obama's policies were responsible for Captain Humayun Khan's death in 2004; Obama and Hillary are the co-parents of ISIS, and most recently that Obama started the war in Afghanistan in 2001. Plus DJT knows a lot about the secret intentions of Mexicans, Muslims and Syrians that was not previously understood.
These revelations prompted me to do a little digging through the almanac myself. Here's some of what I uncovered; you may be shocked – SHOCKED! — to learn the real truth behind these so-called historical "facts":
– It was long alleged the reason the Red Sox went 86 years between World Series wins was due to "The Curse of the Bambino." Nope – it was Obama's fault since he's a card-carrying White Sox fan!
– In August 1930, Judge Crater received a phone call at his vacation home in Belgrade, Maine — setting in motion a series of mysterious movements that led to the jurist's eventual disappearance from the face of the earth. A re-examination of the phone records reveals that call was placed by Hillary Clinton!
– Jack the Ripper was really Barack the Obama!
– Who was that other man standing behind Ted Cruz's father and Lee Harvey Oswald in Dallas in 1963? Tim Kaine!
– Obama's misguided policies of engagement were directly responsible for the War of 1812! And inspired by the sight of an American flag still proudly flying atop Fort McHenry in the early dawn, "The Star-Spangled Banner" was composed on the spot by the noted Baltimore slumlord Francis Scott "Fred" Trump!
– Why did McDonald's stop offering "supersized" french fries in 2004? Because of Michelle Obama's meddlesome nutrition initiative!
– Disastrous trade pacts advanced by Democrats were responsible for sending Nomar Garciaparra to the Chicago Cubs!
– According to the manifest of Malaysia Airlines Flight 370, Hillary Clinton had checked baggage on the plane but conveniently "missed her connection" while lingering over a bubble tea in the airport lounge!
– Marilyn Monroe? Obama!
– Natalie Wood? Obama!
– Amelia Earhart? Obama!
– Bermuda Triangle? Obama!
– Allegations of racism, adultery, tax evasion and xenophobia? Oba… uh, never mind.
What have we learned here? History is literally unraveling unfolding before our very eyes. Which is why I'm trying to keep mine shut tight until the election is over. Fingers in my ears also seem like a good idea.
Facts, Politics
Getting out of (not out in) nature
How to deceive in business without really crying


text:
Sen. Elizabeth Warren backs high-speed rail connecting Springfield, Worcester and Boston
Updated Mar 16, 2017 ; Posted Mar 16, 2017
By Gintautas Dumcius | gdumcius@masslive.com
warren2.jpeg
Sen. Elizabeth Warren on Thursday pledged to push Capitol Hill leaders for infrastructure investments and offered her support for high-speed rail linking major cities in Massachusetts.
"We need a train that runs from Boston to Worcester to Springfield," Warren, D-Mass., said during an "office hours" event at the Worcester Public Library.
Her mid-day appearance drew a crowd of about 150 people, many of them enthusiastic supporters.
Sen. Eric Lesser, D-Longmeadow, has pushed for a feasibility study of high-speed rail connecting Springfield and Boston. Gov. Charlie Baker vetoed a bill calling for the study and has pushed for a broader review of transportation options.
Eric Lesser: Proposal for East-West rail study is 'picking up a lot of energy'
25 legislators have signed on as co-sponsors, according to a list provided by Sen. Eric Lesser's office
In a sit-down with Massachusetts reporters and editors earlier in the day, Warren was asked if she saw infrastructure investment as an area of common ground with President Donald Trump, who has said he will press for a $1 trillion infrastructure plan.
Lesser has asked Trump to include funding for east-west rail service as part of his plan.
"It starts out looking promising," Warren said of Trump's proposal. "The problem is where he's gone with it. What he's describing is a lot of tax breaks, rather than real money going into infrastructure projects."
State Sen. Eric Lesser petitions President Donald Trump for Boston-Springfield rail line funding
Lesser asked the president to include funding for a Springfield to Boston high-speed rail line in his list of nationwide priority infrastructure projects.
Citing potential economic benefits, Warren said she backed investment in north-south Massachusetts rail connections as well as east-west ones.
"We talk about this every year. About how we need the train, from Boston to Worcester to Springfield, at a minimum," Warren said. "We need the train coming north, up through Springfield."
At her "office hours," Warren also praised Worcester, saying the city is reaping the economic benefits of college students and a burgeoning regional airport.
MassLive's Noah Bombard contributed to this report.


text:
Valeant Pharmaceuticals International Inc shares climb after being slammed by U.S. lawmaker in drug price hearings
'We are acknowledging mistakes, we're going to change. We're going to be a responsible corporate citizen and part of the health care community,' Valeant's interim CEO Howard Schiller said
Pete Marovich/Bloomberg
Damon van der Linde
MONTREAL — Valeant Pharmaceuticals International Inc. interim CEO Howard Schiller may have been cut down to size by the U.S. Congress on Thursday over the company's drug price hikes, but you wouldn't know it by looking at the stock, which actually climbed during the hearings.
"I don't even think this is a hearing, this is a scandal: an absolute abuse of power and an abuse of the pharmaceutical industry," said Democrat U.S. Representative Carolyn Maloney, to Schiller, adding that she'd lost sleep thinking about patients who couldn't afford Valeant's Isuprel and Nitropess heart medications, which had price increases of 525 per cent and 212 per cent respectively after being purchased by the Laval, Que.-based drugmaker.
This company has changed quite a bit
Still, Valeant shares were up 3.38 per cent to $134.14 at 1:22 p.m. in Toronto, immediately following the Developments in the Prescription Drug Market hearings by the U.S. House Committee on Oversight and Government Reform. They closed up 3.5 per cent at $97.52.
"(The boost is) probably due to lack of new damaging revelations," Veritas Investment Research analyst Dimitry Khmelnitsky told the Financial Post.
AFP/Brendan Smialowski
The Valeant presented by Schiller on Thursday was very different than the company formed when it merged with Biovail Corp. nearly six years ago.
"We grew very quickly. We are acknowledging mistakes, we're going to change. We're going to be a responsible corporate citizen and part of the health care community," said Schiller at the hearing in Washington, D.C.
"This company has changed quite a bit."
The committee reviewed more than 75,000 pages of documents from Valeant and says they show that CEO Michael Pearson decided to buy the two life-saving heart drugs with plans to dramatically hike prices and drive up his company's revenue and profit.
"We don't bet on science, we bet on management," said Pearson in 2010 when the Aliso Viejo, Calif.-based Valeant was acquired by Mississauga's Biovail for US$3.2 billion.
Pearson has been on medical leave since being admitted to hospital late 2015 with severe pneumonia.
Schiller began the hearing seated at the table with the man who was the catalyst for turning Valeant into a poster child for big pharma price hikes — ex-CEO of Turing Pharmaceuticals, Martin Shkreli.
But, Shkreli didn't have to face the pressure for long and was removed from the hearing within the first few minutes after refusing to testify and invoking the Fifth Amendment.
Shkreli quickly took to Twitter to insult lawmakers — "Hard to accept that these imbeciles represent the people in our government," he wrote — and left Turing's chief commercial officer Nancy Retzlaff to face the scrutiny alongside Schiller.
Hard to accept that these imbeciles represent the people in our government. — Martin Shkreli (@MartinShkreli) February 4, 2016
Democratic U.S. Representative Elijah Cummings first requested documents from Valeant and Turing last summer. Both companies initially refused to comply, prompting Cummings and other Democrats to request that their Republican colleagues issue subpoenas for the information.
Valeant stocks have plunged from highs of $346.32 in August 2015 and currently sit at less than half that value after a perfect storm of price hike concerns, criticisms of R&D spending cuts, as well as short-seller attacks relating to specialty pharmacies and relationships with insurance companies.
Schiller told the Congressional panel that drug price increases were developed by looking at a number of criteria including clinic value, alternative therapies available and patient access.
"Obviously it's quite subjective. In some of these situations we've talked about we have clearly got it wrong," said Schiller.
Martin Shkreli calls U.S. lawmakers 'imbeciles' after invoking the Fifth at hearing on drug prices
My Tinder date with pharma bad boy Martin Shkreli: He's a lot less cocky than you'd think
Chairman of the House, Republican U.S. Representative Jason Chaffetz, said he thought both Turing and Valeant were not telling the whole truth because neither mentioned how much money they stood to gain.
"You didn't say 'profit,' and if you don't include that as factor in how you price a drug, you're lying," said Chaffetz. "I don't think (profit) is an evil thing, but I think you're avoiding it."
Last December Valeant announced it was entering a 20-year agreement with Walgreens Boots Alliance Inc. to reduce wholesale prices by 10 per cent for all dermatological and ophthalmological products and sell certain branded drugs at generic prices with an average discount of more than 50 per cent.
The hearing ended with the panel saying it would follow up with both companies for more information on price increases.
dvanderlinde@nationalpost.com
@DamonVDL
WatchS&P 500 hits 3,000 for the first time as Powell's comment lifts rate cut hopes
Stocks plunge on growth concerns, trade tensions
Dow plunges almost 800 points over flattening yield curve, lost confidence on U.S.-China trade deal
U.S. stocks fall, S&P 500 flirts with correction on fresh trade angst
Crude's bull run made this oilsands producer Canada's top stock
Legal marijuana, oil send Canadian stocks to record high
WatchCannabis shares surge at open on Senate marijuana bill passage, but gains short-lived for some
TSX hits all-time high in broad-based rally
FANG insiders are on track to sell more than $5 billion of stock
Nasdaq-listed Amazon, Alphabet halted for the day after malfunction at NYSE
U.S. markets dove today as industrial and FAANG stocks got hammered
Spotify shares surge 26 per cent in market debut via direct listing


Have some fun creating the most adorable Easter Baskets!
We handpicked this because Easter is just a quick hop away! Have some sun with the kiddos this year and put together custom Easter Baskets together.


text:
Q: Cannot Get Data From Firebase Firestore I have a problem in retrieving data from Firestore. Usually, it works just fine with the code I use, but now I can't read the data from node.js (write from flutter is fine). Tried to console the size result but it returns 0. I don't know if it's related, but the document I have in user is looking gray-ish when usually it's black.

This is my code for retrieving the data.
 var database = db.collection('user').get();
    database.then(user => {
        console.log(user.size);
        user.forEach( subcollection => {
            db.collection('user').doc(subcollection.id).collection('pasien').get()
            .then(
                snapshot => {
                    snapshot.forEach( (pasien) => {
                        if(pasien.data().no_rm == noRm) {
                            console.log(pasien.data());

                        }

                    })
                }
            )
        })
    })

A:
I don't know if it's related, but the document I have in user looking grayish when usually it's black.

That is happening because that document doesn't exist. That document doesn't exist because you didn't create it. What you did do, was to create a sub-collection called "pasien" under a document that never existed in the first place. In other words, you have just reserved an ID for a document in the "user" collection and then create a sub-collection under it.
One thing to remember, in Cloud Firestore documents, and sub-collections don't work the way filesystem files and directories usually work in an operating sytem. If you create a sub-collection under a document, it doesn't implicitly create any parent documents. Sub-collections are not tied in any way to a parent document.
If you want to correct that, you have to write at least a property that can hold a value inside 1 document.


Directly on the beach, the Hotel Don Diego is located 12 km south of Olbia, integrated in the midst of a 60,000 sq m green valley overlooking the sea, surrounded by flower gardens which slope gently down to the private fine sandy and fully-equipped beach, in one of the most charming bays of the Costa Dorata in front of the islands of Tavolara and Molara.
The Don Diego offers its clients all modern facilities, excellent cuisine, the punctilious and friendly service of its staff and is ideal for a relaxing and superior quality holiday.
The hotel has 70 rooms in small villas built in traditional Sardinian style and distributed in various units and different levels in the large park. Rooms are divided in to the following types: standard rooms, junior and senior suites.
All rooms have conditioning, direct-dial phone, satellite colour TV, hairdryer and minibar.


National Custom and Self-Build Week is approaching (May 3-11) and for all those who dream of building their own home this could be the year to turn it into a reality with a number of perfect plots available through CKD Galbraith.
As Scotland's leading property consultancy, CKD Galbraith has a wealth of knowledge and experience in the sale of land for residential development opportunities across the country and have dedicated consultants able to advise both first-time self-build clients and experienced property developers on a range of services including: land sales and purchases, valuations, planning, legislation, design and project management.
Richard Stewart of CKD Galbraith, said: "The demand for generous sized plots of land for self-build is increasing by the day. Self-build is often a remarkably cheaper method for obtaining your dream home and in the right location. We are currently marketing several plots with absolutely stunning views at very reasonable prices.
"Self-build week is the ideal time to find out a bit more on what exactly is involved in the planning and building of your own home. When considering the sector as a whole, self-build is a fantastic way to help stimulate the housing sector and construction industry, as well as the wider economy in general".
Blackhills, in the sought after area of Kirriemuir, situated in easy commuting distance to Perth and Dundee, presents an attractive 0.23 acres plot in mature countryside surroundings with detailed permission for a detached house. Property built here would benefit from outstanding views towards the Sidlaw Hills and the range of amenities in nearby Kirriemuir and Forfar. Offers in the region of 125,000.
Many more development and self-build property opportunities are available through CKD Galbraith so please visit our plots and development page or follow us on Facebook: facebook.com/ckdgalbraith and Twitter: twitter.com/ckdgalbraith.