text:
Published9 Jul 2018
Reviewed9 Jul 2018
Author Charlie Wood
Leo Valdivia, Dr. Steve Wilson
This above image highlights the zebrafish's entire visual system with fluorescent green coloring. An image's journey starts in the eyes, where vision receptors take in light from the fish's surroundings. From there, each retina passes its data along the optic nerves — those thick green ropes that exit the eyes and cross in the middle on their way deeper into the brain. Finally, the optic nerves deliver the information to the optic tectum. This organ takes that input and turns it into an image the fish can understand.
The pathway inside your head is pretty similar, except the raw information from your eyes ends up in a more advanced area for interpretation: the visual cortex. We do have an optic tectum, although in humans and other primates it goes by a different name (the superior colliculus), and it mostly takes care of directing our gaze at interesting stuff around us.
Charlie Wood
Charlie Wood is a science writer with a bachelor's degree in physics from Brown University and a master's degree in science journalism from New York University. In previous lives he taught physics in Mozambique and English in Japan, but these days he freelances from his home in New York.
Northmore, D. (n.d.). The Optic Tectum. Retrieved July 9, 2018, from https://pdfs.semanticscholar.org/57a5/f77cd8b62d3abd007c5fb29049e15cd9feed.pdf.
Leslie, M. (n.d.). How the Optic Tectum Stacks Up. Journal of Cell Biology, 211, 807-807. Retrieved July 9, 2018, from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4657180/.
Kustov, A. A., & Robinson, D. L. (n.d.). Shared neural control of attentional shifts and eye movements. Nature, 384, 74-77. Retrieved from https://www.nature.com/articles/384074a0.
Related Topics Vision Animals in Research Thinking, Sensing & Behaving In the Lab
Also In Vision
Beyond the Rainbow: The Incredible Visual World of Fishes
How 'One Little Pink Dot' Marked the Spot of the Brain's Face-Detecting Center
Baby Mantis Shrimp Perceive UV Light Like Their Parents
Restoring Vision in Older Adults Can Reduce Risk of Dementia
Transcranial Magnetic Stimulation Can Improve Visual Perception
How Do Our Brains Recognize Faces?
Check out the Image of the Week Archive.
Check out the latest news from the field.


text:
Online Bonus Content
Daily Development
Vitale Enjoying Life In The Middle Of The Action
Jordan P. Hickey
As a diehard St. Louis Blues fan, Joe Vitale witnessed the start of many NHL games at the Kiel Center.
But as fate would have it, seldom did he make it to the end. That's just the way it is when work forces your father to be an early riser.
And even though that was the norm for much of the young Vitale's life, it was a different story on Jan. 12, 2012, the first time he skated as a member of the Pittsburgh Penguins against his beloved Blues in front of a packed house, including 50 of his closest friends and family members, at the renamed Scottrade Center.
Even though Vitale made his NHL debut more than a year earlier, his first NHL game in St. Louis felt like another debut. Looking back at it now, it was a special night. Then again, every night in the NHL is special, and Vitale never takes it for granted.
Height: 5-foot-11
Birth Date: Aug. 20, 1985
Hometown: St. Louis
College: Northeastern University
Junior Hockey: Played for the Sioux Falls Stampede of the USHL in 2004-05
Drafted: Selected by Pittsburgh in the 7th round (195th overall) of the 2005 NHL Entry Draft
It was several years ago, during his four-year career at Northeastern University, when he received advice from then Penguins' scout Tom Fitzgerald about the importance of never forgetting who you are as a player.
Looking back, Vitale recalls that encounter with Fitzgerald, who is now an assistant to Penguins' general manager Ray Shero, and uses his words as part of his daily motivation.
"'That's your foundation as a player, and as long as you work hard, everything else will take care of itself,'" Vitale recalls Fitzgerald saying. "'Just one day at a time, work your [butt] off and things will work out.'"
After his four years at the Boston-based Hockey East school, Vitale went on to refine his game in Scranton/Wilkes-Barre, playing for Pittsburgh's AHL affiliate. It was there that he learned what it meant to be a professional.
"You're playing with guys who, literally, this is how they provide for their family," Vitale says. "It kind of made me take my game more professional from a personal standpoint, to do well for the guys next to me, who had much bigger priorities in life."
While it's true that a rash of injuries may have hastened Vitale's path to Pittsburgh, it was his disciplined and hard-nosed play that made it difficult for the powers that be to send him back to the minors.
And along the way he adjusted his game to be better fitted to the pros.
"I used to run around just as fast as I can, 100 miles an hour," Vitale recalls. "Being around these guys, they've taught me to slow the game down a bit, hold onto the puck, don't be in such a rush to make a play."
On a roster dotted with superstars such as Sidney Crosby and Evgeni Malkin, Vitale may never be a household name, but he has earned the trust of his head coach, Dan Bylsma, who was a similar type of player during his NHL career.
"He brings his NHL skill, his work ethic and tenacity and grit," Bylsma says. "And he certainly brought that to our team in a third line, fourth line, checking role, face-off role, penalty-killing kind of role."
Even with the backing of his head coach, Vitale plays every shift and every game like his NHL career could evaporate right before his eyes.
"There's always someone out there fighting for your spot. You can never be complacent, and you can never take a night off," he says.
"A lot of times, you come to the rink, and you're like, man, your body's worn out, your mind's blown out and you just want to take the night off. And you have to find it in yourself to get up for that game because you know if you take one game off, that could be the last game you play for a long time."
There may be some truth to that, but it's clear that Vitale is not about to let his dream slip away without a fight. He knows what it's like to be on the other side of the glass. That's why he wants to enjoy the ride as long as he can.
"It's not going to be here forever," Vitale says. "It's going to go by very, very quick. So I know when it's over at some point, I want to look back and know that I enjoyed it."
Photos courtesy of Getty Images
Dalton Childs
Branford, Conn.
This past season Dalton enjoyed one of those rare blink-and-you-missed-it moments when he scored a natural hat trick in a mere 17 seconds. It happened during a game between Dalton's Junior Bulldogs and the Greenwich Blues on Feb. 5. Dalton scored his first goal with only 2:14 left in a scoreless Peewee B game and added two more on the way to a 4-0 victory. According to Yale Youth Hockey Association president Matt O'Buck, it was like "playing a 500-yard plus par 5 and getting a hole in one. It doesn't happen." Hockey has been a long-time focus of Childs' family, as his father, Stephen, played hockey at Quinnipiac University and now coaches Bantams in the East Haven Hockey Program.
Tags: Pittsburgh Penguins, NHL, Joe Vitale
Type: First Liners
Issue Features
A+ Effort
'Big Walt's' Wild Ride
A Ref For All Occasions
Fun in the Sun at the Frozen Four
Bringing in the Reinforcements
USA Hockey 2012 National Champions
Issue Departments
First Liners: Joe Vitale
Back Checking: Caring Coaches Provide A Big Assist To Amateur Hockey Community
Slaps Gallery: June/July Online Exclusive Gallery
Who is your favorite American player?
The Official Site Of USA Hockey Magazine | © 2001-2019
Touchpoint Media

redpajama_set_name: RedPajamaCommonCrawl


1 Russian Ruble (RUB) to (GHS) Ghana Cedi Exchange Rate - RUB/GHS Charts, History, Historical Rates, Currency Converter.
1 RUB/GHS Exchange Rate points that how much 1 Russian Ruble in Ghana Cedis currency is.
It is also available to check inverse of the rate as 1 Ghana Cedi to Russian Ruble. Exchange Rates are updated each minute at 1exchangerate.com. In addition to the exchange rate, you are also able to get Russian Ruble and Ghana Cedi currency to any other money exchanges. You can calculate cross rates of these two exchange rate by using the currency calculator below.


Want see the sight new video naked actresses? then you in the right place, we every day publish selfie celebrities and their Leaked, as well as the underwear. We you find fotos fusion on the internet. We constantly add update our content.


text:
China, Greece ink BRI memorandum
Mo Jingxi
Updated: Aug 28,2018 7:03 AM China Daily
China and Greece signed a memorandum of understanding on Aug 27 to cooperate further within the framework of the Belt and Road Initiative, making the Mediterranean country the first developed Western nation to ink such a deal with China.
State Councilor and Foreign Minister Wang Yi likened the MOU to a symbol of the strong bilateral cooperation between Beijing and Athens during the signing ceremony with Greek Foreign Minister Nikos Kotzias in Beijing.
Kotzias began a five-day official visit to China on Aug 26, with Shanghai also on his itinerary.
"As a significant intersection along the overland and maritime silk routes, Greece is a natural partner for jointly building the Belt and Road Initiative," Wang said at a news conference after meeting with Kotzias.
Eurasia is a key region of cooperation for the initiative, which will connect the economic centers of both continents, facilitate interconnectivity and open up new areas of cooperation, Wang said.
China will also dovetail the BRI with strategies including the Investment Plan for Europe, and push forward new cooperation models such as third-party cooperation and multilateral cofinancing, he added.
"We believe the initiative will become the new growth point of strategic cooperation between China and Greece," he said.
The state councilor said that the China-Greece relationship, based on growing mutual trust, has achieved major progress in various areas including infrastructure and energy, adding that Greece's Port of Piraeus is a typical example of early cooperative projects.
The port, managed by China's COSCO, has climbed to 38th globally in terms of cargo tonnage from 93rd in 2010.
The number of railway lines carrying containers from the port to Central and Eastern Europe now stands at about 18, Wang said, and the port's direct economic contribution to Greece has exceeded 600 million euros ($700 million), with over 10,000 jobs created.
Wang also added that joint construction of the Belt and Road Initiative between China and other countries is an important symbol of multilateralism.
"Both China and Greece are ready to provide more stability and positive energy in facing global uncertainties," he said.
Kotzias, for his part, said his country supported the BRI, proposed by President Xi Jinping, and was glad to sign the MOU with China.
Greece will take the opportunity to push forward bilateral cooperation to a new level and people-to-people exchanges to new heights, he said.
Greece is willing to enhance coordination and cooperation with China amid global complexity and changes, to support multilateralism and promote free trade, he added.
China-CEEC partnership promotes open, equal, practical cooperation
Belt and Road Initiative 'open and inclusive'


text:
Everyday Bioethics
Understanding Tomorrow's Bioethical Issues Today
BioBasics
Bioethics in Culture
Bioethics Curricula
Christian BioWiki
Additional Links & Resources
Intersections Forum
Beginning of Life
Infertility & Reproduction
The Christian Biowiki
CBHD Website
Additional Links and Resources
The Center is pleased to offer the following collection of resources that have been compiled from a variety of sources and resource submissions, including a special collection of graduate student projects from Trinity Graduate School. Unless otherwise noted, these materials represent the perspective of their author(s) or respective organization and do not necessarily represent the views of The Center for Bioethics & Human Dignity or Trinity International University. In many cases these resources have been altered from their original format to improve accessibility. If you have concerns regarding material included in any of these resources, please contact us at info@cbhd.org.
Annotated Bibliography: Why the Church Needs Bioethics (Zondervan, 2011).
Biblical Passages for Bioethical Awareness (Justin Young, 2007).
Resources for Developing a Worship Service with a Bioethical Emphasis (Luci Gunderson, 2006).
Links to Other CBHD Resources
CBHD.org — The Center for Bioethics & Human Dignity flagship website promoting Christian bioethical scholarship.
ChristianBiowiki.org — An online guide to the bioethics statements and positions from Christian denominations and movements.
HerDignity.Net — The online presence of Her Dignity Network, connecting a global network of people and organizations who share two basic ideas: first, that women's dignity is ultimately about human dignity, and, second, that female bodies and health are essential aspects of both her dignity and our common humanity.
Bioethics.com — CBHD 's site providing updates on global bioethics news, issues, and events.
The Center for Bioethics & Human Dignity | Trinity International University
2065 Half Day Road, Deerfield, IL 60015 USA | 847.317.8180 | info@cbhd.org
MORE CBHD ONLINE RESOURCES ▶
CBHD ONLINE RESOURCES
CBHD.org
Exploring the nexus of biomedicine, biotechnology,
and our common humanity
ChristianBiowiki.com
An online resource providing denominational statements on bioethical issues.
HerDignity.net
A network of resources on
global health for women and girls.
Bioethics.com
Your global information source for bioethics news and issues.
CBHD ALSO PARTNERS WITH:


FX Network revealed the opening credits to the upcoming American Horror Story: Cult, the seventh season in the highly controversial and debatable horror anthology.
Donald Trump and Hillary Clinton make their debut in the opening sequence of Ryan Murphy's FX anthology series. As previously revealed, the show is based on the 2016 American presidential election. From the looks of this clip, clearly they won't be playing it down with the politics. Click here to see the photos revealed so far. The season premieres on September 5.
Watch the opening credits above and tell us what you think about the upcoming season.


Professional manufacturer of Hard chrome rod for hydraulic, founded in 2004, major in honed tube, hydraulic tube, chrome rod, chrome bar, chrome shaft, at present we are biggest manufacturer and wholesaler in north of China.
Longyue hydraulic Machinery, a professional manufacturer specialized in hydraulic and pneumatic products.
We provide Design, Produce, Machining and Service since 2004.
Qingzhou Longyue Hydraulic Machine Co.,Ltd was established in 2001, with more than 10 years import and export experences. Qingzhou Longyue Machine has been an influential exporter in the global metal products market. More than 160 customers from 26 countries and regions have established long-term business relationships with us.
We sincerely welcome friends from all over the world contact us to establish mutually beneficial business relationships.


text:
PHILOSOPHY AND HISTORY OF EAPSI'S FOUNDER
Written by Alan Garcia,
I have been a qualified snowboard instructor since January 2001 and also a ski instructor and tennis coach since 2002. I first qualified when I was 15 in Whistler, Canada with what was then one of just a handful of professional instructor training companies. Today there are dozens of companies and far more websites which sell other people's courses making a minefield of good or tragic possibilities on your path to becoming an instructor. Some courses offer good service and results but at extortionate prices with huge profit margins. Other courses are run by cowboys who can easily sell the dream with the usual sound bytes and "imagine a life being paid to ski or board" dream-pushing only for you to find that your £6,000- £8,000 ten week course would have been far better elsewhere.
Alan Garcia, Pro Skier Sponsored by 3Ryde
The end of the 2012- 2013 season marks the culmination of one of my biggest goals, dreams and ambitions at Sunshine World as we have now had over 60 people qualify as professional ski and/ or snowboard instructors through our training alone, all trained by our own Pro Team, and we still hold a 100% pass rate for everyone who trained on our 10 week or longer courses with full attendance. The Sunshine World instructor training courses remain by far the cheapest in the world. We own a luxurious chalet, have our own ATOL licensed Tour Operator through which we organise professionally run, all inclusive ski and snowboard holidays to the awesome resort of Zakopane, Poland's winter capital. As we are based in Poland all the running costs of the business and our living costs couldn't be cheaper and so our £ goes that much further all around. The ski areas have mainly brand new lifts and the resorts even have features which you don't get elsewhere such as floodlit skiing and boarding until 10pm every day of the season.
Pro Skier, Alan Garcia, sponsored by 3Ryde
The ski and snowboard industry is actually rather small, especially the part of the industry which is independent from the huge travel corporations who control the majority of all travel including winter travel. They have multiple brands including quiksilver snowboard, which are all controlled centrally making them appear smaller and more personal and masking their profit driven, corporate approach to business. The ski and snowboard instruction part of the industry is even smaller and is highly protected in Europe by the cartels (in my opinion not far off gangsters on snow) who do everything they can to maintain their stranglehold on the lucrative market of selling lessons, even breaking EU laws on qualification recognition (particularly in France).
In the UK there never has been an official Government body for ski and snowboard instructor qualifications. There used to be a highly reputable and democratic Member's Association called BASI (the British Association of Snowsport Instructors) who I qualified myself with as a BASI 2 ski instructor shortly after my 19th birthday. A few years ago however the BASI Member's Association was converted by the BASI directors along with just 300 or so votes out of thousands of BASI members (most of whom didn't vote at all, in my opinion because they weren't aware of the severity of the vote's implications and/ or because they didn't know a vote was taking place at all- members were made aware of the vote by post along with the recommendation of the board of directors to "vote yes" in favour of changing BASI's legal status to a "Company Limited by Guarantee" or a LTD company to you and me). Thus today there is BASI LTD. They still sell the "Official BASI GAP Courses" to the "BASI Affiliate" companies. It doesn't take much looking before you see the obvious links between the people who run BASI and the people who run the BASI Affiliate companies.
I started Sunshine World when I was 20 after 5 years of training through expensive courses while working full time to help pay for those courses. As there was no viable, affordable alternative system for either full service ski and snowboard holidays or professional instructor training I figured I'd make a new system myself. I had grown impatient with jumping through the hoops set out by people who may or may not have once been good and dynamic athletes when they were younger but now were clearly simply too old to be up to date with the latest styles in skiing and snowboarding. Many of whom couldn't even hit a rail or nail a proper 360! They control the highest levels of qualification even though the most senior people in the organisations never had to take the tests which younger instructors have to in order to get the same official badge and status! (All the governing bodies of skiing and snowboarding around the world work a similar, although not identical way) They were automatically awarded the new top level status when they invented them. For example CASI (the Canadian Association of Snowboard Instructors) only had 3 levels when I qualified with them over 10 years ago. About 8 years ago they brought in the CASI level 4 and most of the senior level 3s automatically gained level 4 status including my own coach, Greg Daniels. Now Greg is a legend in every way I can think of and I love him dearly. The only reason I mention his example now is that I know many people who have tried for their level 4 who are clearly much better riders than Greg as well as being passionate, experienced and extremely talented instructors and yet they fail their level 4 time and again. The people running the associations claim to be trying to maintain standards whereas I think it's clear that they know that the fewer people who have "their" level then the easier it is for them to maintain control of these lucrative and powerful organisations. If you don't do things their way you wont get the top level as they control who passes and fails.
Albert Einstein was refused entry to University for not being at "the standard" set by the admissions board. Sometimes those who the old guard try to hold back are able to evolve further than ever through their own passion, intuition, freewill and refusal to quit.
Alan Garcia, Pro Snowboarder Sponsored by 3Ryde
There are many ways into and through the industry. At Sunshine World we help people gain qualifications more cheaply and with far more fun and positivity than any other company on the market. Every person who comes to Sunshine World has a name and a story which I care about genuinely and I train them myself along with our Pro Team of internationally qualified ski and snowboard instructors. We have trained many people now who have gained employment both through Sunshine World and with many other companies all around the world. Working in Canada, Japan, all around Europe, New Zealand and many other destinations in both summer and winter.
This level of openness and simple honesty is what you can expect from us every step of the way. We are different to ALL the other companies on the market in virtually every way. One thing is certain- we get great results, cost far less than every alternative, have an amazing time and we don't let anyone stop us from helping people have awesome experiences on and off the slopes every year. Please do call or email us any time if you'd like to find out more. There's no question that it's worth getting into the industry. Most importantly believe in yourself, work hard, train hard, play harder and don't let anyone knock your confidence or make you feel you aren't at "their standard" and Never Stop Dreaming :D
Mais pourquoi une réplique Breitling et pas un original, certains peuvent demander. La réponse courte est le prix, et puisque je ne suis pas un homme de peu de mots, permettez-moi de m'expliquer. Nous savons tous très bien quel genre d'histoire Breitling montres portent derrière. Ces de luxe ne sont pas seulement fonctionnels et précis, ils ont un look unique à eux qui les ont fait quelques-uns des plus connus et les plus recherchés montres tout au long de l'histoire. Seul le mot «luxe» devrait être un indice sur le prix qu'ils portent.


text:
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[Category: php | fightmaster's blog]]></title>
  <link href="http://fightmaster.github.io/blog/categories/php/atom.xml" rel="self"/>
  <link href="http://fightmaster.github.io/"/>
  <updated>2014-02-03T00:20:08+04:00</updated>
  <id>http://fightmaster.github.io/</id>
  <author>
    <name><![CDATA[fightmaster]]></name>

  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  <entry>
    <title type="html"><![CDATA[Чистый код. Boolean attribute]]></title>
    <link href="http://fightmaster.github.io/blog/2014/02/02/clean-code-boolean-attribute.html"/>
    <updated>2014-02-02T11:43:00+04:00</updated>
    <id>http://fightmaster.github.io/blog/2014/02/02/clean-code-boolean-attribute</id>
    <content type="html"><![CDATA[
Прошло два месяца с момента публикации последнего поста. Все настолько сильно перевернулось в моих рабочих буднях, что никак не войду в нужный ритм. Прошу извинить.

Но сегодня пойдет речь не об этом. На работе споткнулся на два интересных момента, а я обещал вам писать о своих приключениях. Попробую рассказать об одном из них.

Boolean Attribute

На мой взгляд, Boolean Attribute особенный итем/тип/термин в ООП. Кажется, что он намного проще Exception, подумаешь, всего лишь два возможных значения: true и false.
Но то ли я книжек в своей жизни уже перечитал, то ли опыт рефакторинга легаси проекта сказывается.
Я стал замечать у себя приступы ненависти, самоуничтожения при виде, как люди могут работать с такими атрибутами.

Пример номер 1

В каком-то контроллере какого-то проекта кто-то решил изменить статус.

```php
<?php
if ($vacancy->getStatus()) {</p>

<pre><code>$status = false;
</code></pre>

<p>} else {</p>

<pre><code>$status = true;
</code></pre>

<p>}</p>

<p>$vacancy->setStatus($status);
?>
```

Сколько претензий у вас к этому коду? Лично я затрудняюсь определить для себя, с какой стороны этот код обругать.
По-моему, автор сам себя запутал. Вообще, это глобальная проблема программиста, что он не знает чего хочет и пишет код.
Милый друг, остановись и подумай, прекрати смотреть и копипастить.

Пример номер два

Бытовой пример, есть некий класс с атрибутом. Если человек когда-нибудь слышал про is*, то он обязательно напишет слудующее.

```php
<?php
class User
{</p>

<pre><code>private $isActivated = false;
private $enabled = true;

public function setIsActivated($isActivated)
{
    $this->isActivated = $isActivated;
}

public function getIsActivated($isActivated)
{
    return $this->isActivated;
}

/*
public function isIsActivated($isActivated)
{
    return $this->isActivated;
}

public function isActivated($isActivated)
{
    return $this->isActivated;
}
*/

public function setEnabled($enabled)
{
    $this->enabled = $enabled;
}

public function getEnabled($enabled)
{
    return $this->enabled;
}

/*
public function isEnabled($enabled)
{
    return $this->enabled;
}
*/
</code></pre>

<p>}</p>

<p>```

Вообще всевозможных вариаций трудно представить, в зависимости от конекста они вызывают разное “фи”.

Это же php

Этот параграф специально для тех, кто любит поржать над php. Как вы знаете и понимаете, создав setEnabled,
вы можете вызвать $user->setEnabled('Ha-ha'); $user->setEnabled(1); $user->setEnabled(0);. Немного неприятно.

Скрытые проблемы

На самом деле проблема лежит не в самом классе, а там где его используют. Программисты порой создают булевые атрибуты в качестве индикаторов чего-то.
И зачастую вызов стандартных set*, get* превращает код в какую-то паутину. Вы не сразу вспоминаете или понимаете, а что на самом деле здесь происходит.
Это не является какой-то причиной появления гавнокода, но это один из шагов к нему. Трудно превести конкретный пример, искать/описывать лень, но если представить…

Если мы завели какой-то флаг, значит он для чего-то нужен. Скорее всего, это будет какой-то if, а возможно и не один.
Соответственно нам не нужен в большинстве случаев get*.
Самое худшее, если этот флаг влияет на поведение другого атрибута этого объекта.
Вызов казалось бы обычного setDeleted может привести к невалидности соседнего атрибута.
А пихать дополнительную логику в этот сеттер – еще хуже.

Лекарство, но не пуля

Лично я предпочитаю следующие правила. Атрибуты делать причастиями: enabled, deleted, activated.
Вместо get* использовать is*: isEnabled, isDeleted, isActivated.
Вместо set* создавать методы-глаголы действия: enable, disable, delete, restore, activate, deactivate.

В случаях, когда все-таки ваш фреймворк требует set* метод, использовать что-то вроде этого:

```php
<?php
public function enable()
{</p>

<pre><code>$this->enabled = true;
</code></pre>

<p>}</p>

<p>public function disable()
{</p>

<pre><code>$this->enabled = false;
</code></pre>

<p>}</p>

<p>public function setEnabled($enabled)
{</p>

<pre><code>if ($enabled) {
    $this->enable();
} else {
    $this->disable();
}
</code></pre>

<p>}
?>
```

Проблемы с наименованием

В текущем проекте несколько раз сталкивались с слишком замудренными атрибутами, к которым хороший глагол сразу не подберешь.
Мне кажется тут две проблемы: похой скилл подбора имен и сложная логика, пора начать рефакторинг.

Всегда можно однозначно дать определение состояния, в котором находится объект при данном значении атрибута.
Соответсвенно есть и название переходов из одного состояния в другое.

Если же состояние определяется сразу несколькими значениями, его формулировка занимает два-три предложения, навряд ли предложенная схема вам подойдет и поможет.
Скорее всего, она запутает код еще больше. Лучше всего задуматься о пересмотре этого куска кода, попробовать вынести логику в отдельный resolver.

]]></content>
  </entry>

  <entry>
    <title type="html"><![CDATA[Все дело в том, что так бывает...]]></title>
    <link href="http://fightmaster.github.io/blog/2013/10/17/the-whole-point-is-that-it-happens.html"/>
    <updated>2013-10-17T23:00:00+04:00</updated>
    <id>http://fightmaster.github.io/blog/2013/10/17/the-whole-point-is-that-it-happens</id>
    <content type="html"><![CDATA[
Именно так начинается одно из моих любимых стихотворений. Я собирался сегодня прийти домой и пописать код, но внезапно мне пришла в голову мораль одной басни, сюжет которой случился днем. Рекомендую уделить немного времени, хотя бы потому что это случалось с вами.

В статье про код ревью был “запрос” на практическую сторону. Но руки не доходят написать что-то, да и сделать это достаточно сложно, по крайней мере в том виде, в котором я вижу. Скорее всего, она появится из таких маленьких статей, как эта.

Кусочек сыра

Сегодня попался на глаза вот такой кусочек кода.

```php
<?php
//code
if (!Utilities::arrayContains($array1, $array2)) {</p>

<pre><code>return false;
</code></pre>

<p>}
//code
?>
```

Думаю что-то не так. Создают функцию в классе Utilities только тогда, когда не могут определить ее принадлежность. Что уже странно. Во-вторых, ну название. Вроде бы и понятно все, с другой стороны, не внушает какого-то доверия.

```php
<?php
/<em>*
 * @param array $array1
 * @param array $array2
 * @return boolean
 </em>/
public static function arrayContains(array $array1, array $array2)
{</p>

<pre><code>foreach ($array1 as $value1) {
    if (!in_array($value1, $array2)) {
        return false;
    }
}

return true;
</code></pre>

<p>}
?>
```

Действительно, несколько раз пробегаю глазами, так как боюсь упустить что-то, заставляя себя поверить в увиденное. Аккуратно оставляю предложение заменить содержание на <?php empty(array_diff($array1, $array2));?>, переименовать или удалить метод.

В итоге вечером получаем…

```php
<?php
/<em>*
 * @param array $array1
 * @param array $array2
 * @return boolean
 </em>/
public static function isArrayDiff(array $array1, array $array2)
{</p>

<pre><code>$diff = array_diff($array1, $array2);

return empty($diff);
</code></pre>

<p>}
?>
```

Про лису

Хитрый лис не скажет вороне: “Дай сыр, птица”. Во-первых, она может не дать его. Во-вторых, навряд ли это чему-то научит, басня-то не получится и морали не будет. Поэтому идеальный вариант для ревью – это подача чего угодно в наилучшем виде для автора кода. В более сложных случаях я и свой вариант содержания не предлагаю, так как его у меня просто нет. Просто прошу еще раз подумать, в сложных ситуациях спасает парное программирование. При этом не надо выступать в роли оратора или диктатора. Если вы хотите думать за всех, пишите проект один тогда. Не могу сказать, что у меня всегда получается быть хитропопой лисой, но я стараюсь.

Про чистый код и ворону

Я думаю, что знаю на 99 процентов причину появления такого метода. Конечно, человек уже наелся определенного куска проекта. Метод вызывается в очень неприятном месте с кучей условных конструкций, хотелось как-то лучше разгрести. Скорее всего, в голову не пришла функция array_diff, и вынос foreach в отдельный метод – правильный выбор.

Но сам урок начался позже. Методы из двух строчек имеют место быть, все дело в названии. В последнем варианте мы получили обертку над стандартной функцией. В данном контексте она бессмысленна. Если мы захотим реализовать работу со стеком в ООП стиле и обернуть array_pop и array_push в класс и методы, то у нас будет цель и причина всего этого. Здесь цель не прослеживается.

Так что же делать в данном случае? Я бы подумал над куском кода, где это вызывается. Возможно, существует определение этой операции в целом. Ведь массивы что-то содержат, у них есть нормальные имена (в статье они преднамеренно переведены в array1 и array2).

Например, если бы array1 содержал права пользователя, а array2 все необходимые права на просмотр страницы. Тогда, на мой скромный взгляд, метод имеет место быть на 101 процент, с каким-нибудь именем isAllow*.

Если мы не можем как-то определить и выделить по смыслу эти строчки, то и выносить их, скорее всего, нет смысла.

Мораль басни

Я думаю, стервятники и любители поржать даже не зайдут в этот скромный блог. В чем же я увидел “мораль” и почему такое название статьи?

Вы что-то прочитали, у вас куча идей и желание все перехерачить. А что-то идеальное лежит почему-то всегда на “горном перевале”. Так бывает, что на эмоциях мы проскакиваем его. Прочитали о паттернах – давай плодить из plain php кучу классов, выстраивать архитектуру, которая в итоге ничуть не понятнее. Прочитали дядюшку Боба – давай все дробить без остановки. Прочитали про agile – давай ломать работу проекта. Прочитали статью – давай сразу внедрять.

Я сам постоянно допускаю подобные ошибки, но при этом думаю, что это правильно. Продолжая горную тему: это лучше, чем сидеть перед перевалом всю жизнь, не совершая каких-то дерзких попыток покорения вершин, или вообще спуститься в долину со словами: “Да ну нафиг эти горы”. С приобретением опыта наши просчеты уменьшаются, а какими путниками мы станем, зависит только от нас.

Статью завершу словами: “Лучше гор могут быть только горы, на которых никто не бывал”.

]]></content>
  </entry>

  <entry>
    <title type="html"><![CDATA[Unit Tests. Data provider без головной боли]]></title>
    <link href="http://fightmaster.github.io/blog/2013/10/05/unit-tests-data-provider-without-a-headache.html"/>
    <updated>2013-10-05T01:00:00+04:00</updated>
    <id>http://fightmaster.github.io/blog/2013/10/05/unit-tests-data-provider-without-a-headache</id>
    <content type="html"><![CDATA[
Недавно текущий проект перевалил за 1500 юнит тестов. Захотелось подвести какой-то итог. И сегодня не будет какого-то рецепта: “А делайте так – получите счастье”. Посмотрим на примерах, как можно сделать что-то иначе. Внимание, очень много странных букв под php синтаксисом.

Мы с вами не на пробежке, разогреваться нам не надо, начнем сразу с кода. Примеры вымышленные, и я буду использовать аббревиатуру uut (Unit Under Test).

isPositiveNumber($number)

```php
<?php
public function isPositiveNumber($number)
{</p>

<pre><code>return ($number > 0)
</code></pre>

<p>}
?>
```

Тест мог бы выглядеть так:

```php
<?php
/<em>*
 * @test
 </em>/
public function isPositiveNumber()
{</p>

<pre><code>$result = $this->uut->isPositiveNumber(1);
$this->assertTrue($result);

$result = $this->uut->isPositiveNumber(0);
$this->assertFalse($result);

$result = $this->uut->isPositiveNumber(-1);
$this->assertFalse($result);
</code></pre>

<p>}
?>
```

Или так:

```php
<?php
/<em>*
 * @test
 </em>/
public function isPositiveNumberTrueScenario()
{</p>

<pre><code>$result = $this->uut->isPositiveNumber(1);
$this->assertTrue($result);
</code></pre>

<p>}</p>

<p>/<em>*
 * @test
 </em>/
public function isPositiveNumberFalseScenario()
{</p>

<pre><code>$result = $this->uut->isPositiveNumber(0);
$this->assertFalse($result);

$result = $this->uut->isPositiveNumber(-1);
$this->assertFalse($result);
</code></pre>

<p>}
?>
```

Мы пишем и пишем так тесты, пока кто-то не прочитает официальную документацию и не узнает, а что такое Data Providers: phpunit.de. Чаще всего нам необходимо протестировать метод с разными входными данными и проверить результат. Вот для избежания дублирования тестов и придумали эти провайдеры.

```php
<?php
/<em>*
 * @test
 * @dataProvider isPositiveNumberProvider
 *
 * @param integer $inputData
 * @param boolean $expectedResult
 </em>/
public function isPositiveNumber($inputData, $expectedResult)
{</p>

<pre><code>$result = $this->uut->isPositiveNumber($inputData);
$this->assertEquals($expectedResult, $result);
</code></pre>

<p>}</p>

<p>/<em>*
 * @return array
 </em>/
public function isPositiveNumberProvider()
{</p>

<pre><code>return array(
    array(1, true),
    array(0, false),
    array(0, false)
);
</code></pre>

<p>}
?>
```

Кажется мы нашли решение для всего и плодим тесты одни за другим…

Простота – залог успеха

Написав первую главу, я понял, что не могу придумать адекватный пример для второй. А по ощущениям, я большую часть жизни так писал. Несколько дней искал объяснение этому факту. Пришел к выводу, что наш код со временем стал чище, и такие тесты практически вымерли.

Отступление… В день выпуска статьи у меня был небольшой митинг с коллегой, который завершился словами: “Если разбить метод на три, как я предложил, то и с тестированием проблем не будет”. Не могу утверждать, что мои слова действительно помогут, но они заставили меня еще раз задуматься о необходимости писать тесты.

Беря любой старый пример, я понимаю, что можно было написать по-другому. Или, как я недавно начал говорить, “выпендриться” и написать код мечты. Поэтому придется пойти на откровения дальше, взяв не самый хороший код из жизни.

Юнит тесты поздней осенью

Утро, поздняя осень, за окном холодно и темно. Вы приходите на работу в часов эдак семь или раньше. Идете на кухню, наливаете себе кофе, медленно и молчаливо пьете, с коллегой, девушкой, думая о том, что надо бы написать к коду тест.

Когда-то и кто-то что-то написал, дальше всем миром это апгрейдили, апгрейдили, а вчера вам пришлось снова что-то туда добавить. При этом вы были уставший, и вам срать было на этот старый код. Да и сейчас, наверное, особенно отношение не изменилось, просто ночью проснулся профессионализм.

Медленно мысли о “надо написать” перерастают в “как написать”. В голове прокручиваются воспоминания о том, а что же делает код. У вас есть некие данные, из которых собирается какая-то сущность. При этом накладывается куча всевозможных “бизнес” ограничений на входную информацию. Что-то вроде сахар не может быть синим, а картошка не может доставлена в ресторан без лука, а помол кофе может быть лишь трех видов, а третий вид поставляется только из Африки. Вроде и валидация, а с другой стороны ничего стандартного не прикрепишь.

В итоге в отведенные два часа из трех вы вчера написали что-то наподобие этому, plain php.

```php
<?php
/<em>*
 * @param Model $model
 * @throws CustomException
 </em>/
protected function checkSomethingRestrictions(Model $model)
{</p>

<pre><code>$linkedModel = $model->getLinkedModel();
if ($linkedModel && $model->hasSomething()) {
    throw new CustomException('Failed 1', 1);
}

//code - code - code

if ($model->isEnabled() && $something == false) {
    throw new CustomException('Failed 17', 17);
}
</code></pre>

<p>?>
```

Проснувшись и преодолев чувство стыда за написанное, вы пишите быстренько тест.

```php
<?php
/<em>*
 * @test
 * @dataProvider checkSomethingRestrictionsProvider
 *
 * @param string $modelReference
 * @param string $exceptionMessage
 * @param integer|null $exceptionCode
 </em>/
public function checkSomethingRestrictions($modelReference, $exceptionMessage = null, $exceptionCode = null)
{</p>

<pre><code>if ($exceptionMessage !== null || $exceptionCode !== null) {
    $this->setExpectedException('CustomException', $exceptionMessage, $exceptionCode);
}

$model = $this->referenceRepository->getReference($modelReference);
$this->uut->checkSomethingRestrictions($model);
</code></pre>

<p>}</p>

<p>/<em>*
 * @return array
 </em>/
public function checkSomethingRestrictionsProvider()
{</p>

<pre><code>return array(
    array('model_1'),
    array('model_2'),
    array('model_3'),
    array('model_4'),
    array('model_5'),
    array('model_6'),
    array('model_7'),
    array('model_8'),
    array('model_9'),
    array('invalid_model_1', 'Failed 1', 1),
    array('invalid_model_2', 'Failed 2', 2),
    array('invalid_model_3', 'Failed 3', 3),
    array('invalid_model_5', 'Failed 5', 5),
    array('invalid_model_4', 'Failed 4', 4),
    array('invalid_model_6', 'Failed 6', 6),
    array('invalid_model_7', 'Failed 7', 7),
    array('invalid_model_8', 'Failed 8', 8),
    array('invalid_model_9', 'Failed 9', 9),
    array('invalid_model_10', 'Failed 10', 10),
    array('invalid_model_11', 'Failed 11', 11),
    array('invalid_model_12', 'Failed 12', 12),
    array('invalid_model_13', 'Failed 13', 13),
    array('invalid_model_14', 'Failed 14', 14),
    array('invalid_model_15', 'Failed 15', 15),
    array('invalid_model_16', 'Failed 16', 16),
    array('invalid_model_17', 'Failed 17', 17)
);
</code></pre>

<p>}
?>
```

Конечно, слово “быстро” не совсем к месту. Создали кучу фикстур для тестирования различных ситуаций и закомитили.

К сожалению, пример попал в 7 или 8 из 10. Имена переменных вымышленные, но размер дата провайдера совершенно реален.

Тут самое время вернуться к статье о код ревью. Система код ревью – это машина будущего, она переносит ваших коллег на полгода вперед, тем самым предоставляя возможность изменить ход событий, избежать тупления над кодом и тестом.

При написании кода мы стараемся дать сразу понять: что делает метод, что возвращает, что хранит переменная и т.д..

При написании теста мы стараемся показать сразу: что тестируем и какую ситуацию описывают входные данные и т.д..
fightmaster http://fightmaster.github.io/blog/2013/09/23/unit-tests.html

И правда, а что тестируется в итоге? Вот упадет через полгода код на 15 варианте дата провайдера, и чем мне это поможет? Название какой-то фикстуры (о хорошем тоне именования фикстур в следующей серии) ни о чем нам не скажет. Ну пойдем, откроем ее, а дальше что? А вдруг Петя ее поменял, а за ним Саша. А кто из них был не прав? А вдруг в нашей системе изменились требования, и именно этот тест теперь не должен падать при таких условиях. В обшем ничерта непонятно.

Вторая сторона, это добавить что-то в тест. Мы не знаем куда именно добавлять наш вариант. Все равно куда – не дело. А может наш вариант уже добавлен?

Первое и самое простое, что приходит в голову, оставить просто пояснения, в двух или трех словах выражающие особенность этого кейса.

```php
<?php</p>

<p>/<em>*
 * @return array
 </em>/
public function checkSomethingRestrictionsProvider()
{</p>

<pre><code>return array(
    // model 1, pass
    array('model_1'),
    // model 2, pass
    array('model_2'),

    // code
    // code

    array('model_7'),
    // model 8, pass
    array('model_8'),
    // model 9, pass
    array('model_9'),
    // model 1, unknown attribute, fail
    array('invalid_model_1', 'Failed 1', 1),
    // model 2, unknown name, fail
    array('invalid_model_2', 'Failed 2', 2),
    // model 3, no assign balck color, fail
    array('invalid_model_3', 'Failed 3', 3),

    // code
    // code

    // model 16, unknown name, fail
    array('invalid_model_16', 'Failed 16', 16),
    // product WITH color specified, fail
    array('invalid_model_17', 'Failed 17', 17)
);
</code></pre>

<p>}
?>
```

Теперь мы хотя бы знаем, что хотели сказать авторы. Поддерживать тест теперь намного проще, порог вхождения в код сокращен.

Бесконечность параметров

В первых строках этой главы я завис на несколько минут. Все дело в том, что я очень редко вижу методы с большим набором входных параметров. Все знают, что это имеет плачевные последствия, и никто так не пишет нынче. Но почему-то все забывают эти правила при написании тестов. Мне кажется это феномен. Я наблюдал это в других проектах. Да, и где-то в глубине души существует искра надежды, что вы делали также.

Чаще всего в тесте нам нужно сконфигурировать определенную ситуацию. В предыдущей главе это достигалось с помощью фикстур. Часто используются моки или даже сами объекты, последнее конечно неправильно. Но в данных примерах именно они и будут. Так как работа с мок объектами – это целое искуство, и я не хочу все смешивать.

```php
<?php
/<em>*
 * @test
 * @backupGlobals enabled
 * @dataProvider getGlobalsProvider
 *
 * @param boolean $a
 * @param boolean $b
 * @param array $expectedResult
 </em>/
public function getGlobals($a, $b, $expectedResult)
{</p>

<pre><code>$GLOBALS['a'] = $a;
$GLOBALS['b'] = $b;
$result = $this->uut->getGlobals();
$this->assertSame($expectedResult, $result);
</code></pre>

<p>}</p>

<p>/<em>*
 * @return array
 </em>/
public function getGlobalsProvider()
{</p>

<pre><code>return array(
    array(true, true, array('a_value' => true, 'b_value' => true)),
    array(true, false, array('a_value' => true, 'b_value' => false)),
    array(false, true, array('a_value' => false, 'b_value' => true)),
    array(false, false, array('a_value' => false, 'b_value' => false)),
);
</code></pre>

<p>}
?>
```

Такой вот незамысловатый пример. Через некоторое время использование дата провайдера таким образом превращается в привычку. И в результате…

```php
<?php
/<em>*
 * @test
 * @dataProvider findBySearchMappingProvider
 *
 * @param string|null $color
 * @param string|null $size
 * @param integer|null $width
 * @param integer|null $length
 * @param integer|null $height
 * @param boolean|null $enabled
 * @param array $expectedReferences
 * @param integer $expectedResultCount
 </em>/
public function findBySearchMapping($color, $size, $width, $length, $height, $enabled, $expectedReferences, $expectedResultCount)
{</p>

<pre><code>$expectedResults = array();
foreach ($expectedReferences as $referenceName) {
    $expectedResults[] = $this->referenceRepository->getReference($referenceName);
}

$searchMapping = new SearchMapping();
$searchMapping->setColor($color)
    ->setSize($size)
    ->setWidth($width)
    ->setLength($length)
    ->setHeight($height)
    ->setEnabled($enabled);

$results = $this->uut->findBySearchMapping($searchMapping);

$this->assertCount($expectedResultCount, $results);
$this->assertContainsOnlyInstancesOf('SomeInterface', $results);
$this->assertEquals($expectedResults, $results);
</code></pre>

<p>}</p>

<p>/<em>*
 * @return array
 </em>/
public function findBySearchMappingProvider()
{</p>

<pre><code>return array(
    array(null, null, null, null, null, null, array('model_1', 'model_2', 'model_3', 'model_4', 'model_5', 'model_6'), 6),
    array('black', null, null, null, null, null, array('model_1'), 1),
    array('red', null, null, null, null, null, array('model_2'), 1),
    array('NOTEXIST', null, null, null, null, null, array(), 0),
    array(null, 'XL', null, null, null, null, array('model_1', 'model_2', 'model_3', 'model_4', 'model_6'), 5),
    array(null, 'M', null, null, null, null, array('model_5'), 1),
    array('black', 'XL', null, null, null, null, array('model_1'), 1),
    array('black', 'M', null, null, null, null, array(), 0),
    array('black', 'XL', 1, 1, 23, null, array(), 0),
    array(null, null, null, null, null, true, array('model_1', 'model_3', 'model_4', 'model_5', 'model_6'), 5),
    array(null, null, null, null, null, false, array('model_2'), 1),
    array(null, null, null, 5, null, null, array('model_3'), 1),
    array(null, null, null, 1000, null, null, array(), 0),
    array(null, null, null, null, 1, null, array('model_1', 'model_6'), 2),
    array(null, null, null, null, 100, null, array(), 0)
);
</code></pre>

<p>}
?>
```

Когда это видишь первый раз на ревью, сначала прощаешь или не придаешь значение. Но команда – это лавина, особенно, если задание в релизе способствует появлению таких провайдеров. Иногда количество параметров достигало до 15. И в какой-то момент понимаешь, что надо брать ситуацию под контроль. Это осознание усиливается, когда в одном PR (Pull Request) несколько таких примеров. Что же делать?

Естественно, сначала оставляем комментарии, что-то вроде такого.

```php
<?php
/<em>*
 * @return array
 </em>/
public function findBySearchMappingProvider()
{</p>

<pre><code>return array(
    //$color, $size, $width, $length, $height, $enabled, $expectedReferences, $expectedResultCount
    //find all models
    array(null, null, null, null, null, null, array('model_1', 'model_2', 'model_3', 'model_4', 'model_5', 'model_6'), 6),
    //find models by the color
    array('black', null, null, null, null, null, array('model_1'), 1),
    //find models by the color
    array('red', null, null, null, null, null, array('model_2'), 1),
    //trying find models by the non-existent color
    array('NOTEXIST', null, null, null, null, array(), 0),
    //find models by the size
    array(null, 'XL', null, null, null, array('model_1', 'model_2', 'model_3', 'model_4', 'model_6'), 5),
    //find models by the size
    array(null, 'M', null, null, null, array('model_5'), 1),

    // code
    // code
);
</code></pre>

<p>}
?>
```

Так как это минимум умственных и временных затрат для достижения компромисса между программистом и владельцем продукта.

Не комментируйте плохой код — перепишете его.

Спустя время мы нашли несколько решений. До сих пор у меня нет объяснения, почему они сразу не всплыли. Вспомним цитату выше. Нам нужно всего лишь показать, что мы хотим протестировать. А многочисленные null лишь говорят о том, что эти значения нас не интересуют для этого теста.

Воспользуемся советом дядюшки Боба.

```php
<?php
/<em>*
 * @return array
 </em>/
public function findBySearchMappingProvider()
{</p>

<pre><code>return array(
    // find all models
    array(
        array(),
        array('model_1', 'model_2', 'model_3', 'model_4', 'model_5', 'model_6'),
         6
     ),
    array(
        array('color' => 'black'),
        array('model_1'),
        1
    ),
    array(
        array('color' => 'red'),
        array('model_2'),
        1
    ),
    array(
        array('color' => 'NOTEXIST'),
        array(),
        0
    ),
    array(
        array('size' => 'XL'),
        array('model_1', 'model_2', 'model_3', 'model_4', 'model_6'),
        5
    ),
    array(
        array('size' => 'M'),
        array('model_5'),
        1
    ),
    array(
        array('color' => 'black', 'size' => 'XL'),
        array('model_1'),
        1
    ),
    array(
        array('color' => 'black', 'size' => 'M'),
        array(),
        0
    ),
    array(
        array('color' => 'black', 'size' => 'XL', 'width' => 1, 'length' =>, 'height' => 23),
        array(),
        0
    ),
    array(
        array('enabled' => true),
        array('model_1', 'model_3', 'model_4', 'model_5', 'model_6'),
        5
    ),
    array(
        array('enabled' => false),
        array('model_2'),
        1
    ),
    array(
        array('length' => 5),
        array('model_3'),
        1
    ),
    array(
        array('length' => 1000),
        array(),
        0
    ),
    array(
        array('height' => 1),
        array('model_1', 'model_6'),
        2
    ),
    array(
        array('height' => 100),
        array(),
        0
    )
);
</code></pre>

<p>}
?>
```

Вуаля, ассоциативные массивы спасают этот мир. Ключ массива выступает в роли комментария, и необходимость онного чаще всего излишне теперь (хотя НЕ всегда). Осталось теперь поправить сам код теста.

```php
<?php
/<em>*
 * @test
 * @dataProvider findBySearchMappingProvider
 *
 * @param array $dataMapping
 * @param array $expectedReferences
 * @param integer $expectedResultCount
 </em>/
public function findBySearchMapping($mappingData, $expectedReferences, $expectedResultCount)
{</p>

<pre><code>$expectedResults = array();
foreach ($expectedReferences as $referenceName) {
    $expectedResults[] = $this->referenceRepository->getReference($referenceName);
}

$searchMapping = new SearchMapping();
$searchMapping->setColor(isset($mappingData['color']) ? $mappingData['color'] : null)
    ->setSize(isset($mappingData['size']) ? $mappingData['size'] : null)
    ->setWidth(isset($mappingData['width']) ? $mappingData['width'] : null)
    ->setLength(isset($mappingData['length']) ? $mappingData['length'] : null)
    ->setHeight(isset($mappingData['heigth']) ? $mappingData['height'] : null)
    ->setEnabled(isset($mappingData['enabled']) ? $mappingData['enabled'] : null);

$results = $this->uut->findBySearchMapping($searchMapping);

$this->assertCount($expectedResultCount, $results);
$this->assertContainsOnlyInstancesOf('SomeInterface', $results);
$this->assertEquals($expectedResults, $results);
</code></pre>

<p>}
?>
```

Рефакторинг

Но негоже оставлять в таком виде тест, вдруг кто-то решит взять на заметку этот совет.

Во-первых, блок, получающий ожидаемые объекты, един как минимум для этого тест кейса. Во-вторых, тоже самое можно сказать про создание конфигурируемого объекта. При этом чаще всего это мок объект, и он используется в других тестах. В-третьих, я ненавижу параметр $expectedCounts, тем более когда есть набор ожидаемых объектов.

```php
<?php
/<em>*
 * @test
 * @dataProvider findBySearchMappingProvider
 *
 * @param array $dataMapping
 * @param array $expectedReferences
 </em>/
public function findBySearchMapping(array $mappingData, array $expectedReferences)
{</p>

<pre><code>$expectedResults = $this->getSomethingByReferences($expectedReferences);
$searchMapping = $this->getSearchMapping($mappingData);

$results = $this->uut->findBySearchMapping($searchMapping);

$this->assertCount(count($expectedResults), $results);
$this->assertContainsOnlyInstancesOf('SomeInterface', $results);
$this->assertEquals($expectedResults, $results);
</code></pre>

<p>}</p>

<p>/<em>*
 * @return array
 </em>/
public function findBySearchMappingProvider()
{</p>

<pre><code>return array(
    // find all models
    array(
        array(),
        array('model_1', 'model_2', 'model_3', 'model_4', 'model_5', 'model_6')
     ),
    array(
        array('color' => 'black'),
        array('model_1')
    ),

    //code

    array(
        array('color' => 'black', 'size' => 'XL', 'width' => 1, 'length' =>, 'height' => 23),
        array()
    ),
    array(
        array('enabled' => true),
        array('model_1', 'model_3', 'model_4', 'model_5', 'model_6')
    ),

    //code
);
</code></pre>

<p>}</p>

<p>/<em>*
 * @param array $references
 * @return SomeInterface[]
 </em>/
private function getSomethingByReferences(array $references)
{</p>

<pre><code>$models = array();
foreach ($references as $referenceName) {
    $models[] = $this->referenceRepository->getReference($referenceName);
}

return $models;
</code></pre>

<p>}</p>

<p>/<em>*
 * @param array $mappingData
 * @return SearchMapping
 </em>/
private function getSearchMapping(array $mappingData)
{</p>

<pre><code>$searchMapping = new SearchMapping();
$searchMapping->setColor(isset($mappingData['color']) ? $mappingData['color'] : null)
    ->setSize(isset($mappingData['size']) ? $mappingData['size'] : null)
    ->setWidth(isset($mappingData['width']) ? $mappingData['width'] : null)
    ->setLength(isset($mappingData['length']) ? $mappingData['length'] : null)
    ->setHeight(isset($mappingData['heigth']) ? $mappingData['height'] : null)
    ->setEnabled(isset($mappingData['enabled']) ? $mappingData['enabled'] : null);
</code></pre>

<p>}
?>
```

Заключение

Последний мой PR содержал data provider для сложного поиска c около 70 вариантами. И знаете, он выглядит “удобоваримо”. Я придерживаюсь такого правила, если, прокручивая провайдер колесиком мышки, вы все прекрасно понимаете – значит проверка на качество пройдена.

]]></content>
  </entry>

  <entry>
    <title type="html"><![CDATA[Задания к лекции "Работа со строками"]]></title>
    <link href="http://fightmaster.github.io/blog/2013/02/24/four-lecture-working-with-strings.html"/>
    <updated>2013-02-24T00:50:00+04:00</updated>
    <id>http://fightmaster.github.io/blog/2013/02/24/four-lecture-working-with-strings</id>
    <content type="html"><![CDATA[
С небольшим опозданием выложены задания к четвертой лекции.
Задача про палиндромы имеет подводные камни, будьте внимательны.

]]></content>
  </entry>

  <entry>
    <title type="html"><![CDATA[Вторая лекция: Управляющие структуры]]></title>
    <link href="http://fightmaster.github.io/blog/2013/02/14/second-lecture-control-structures.html"/>
    <updated>2013-02-14T02:30:00+04:00</updated>
    <id>http://fightmaster.github.io/blog/2013/02/14/second-lecture-control-structures</id>
    <content type="html"><![CDATA[
Выложены материалы ко второй лекции. Встретимся через 5.5 часов:).
Домашнее задание будет доступно в субботу.

]]></content>
  </entry>

</feed>

redpajama_set_name: RedPajamaGithub


Plastic surgery addict and self proclaimed "Human Barbie" of the UK Sarah Burge as been in the news lately. She drew ire from child advocates when she reportedly gave her seven year old daughter an expensive coupon for future liposuction surgery. Even though the coupon will be saved until the girl is an adult, the media and others were infuriated at such a bizarre gift. Burge's children have all had or are interested in having cosmetic surgery.
As for Burge, she reportedly spent close to a million dollars on her own plastic surgery operations. She works as an event planner for plastic surgery and she is a plastic surgery advocate. While having one or two procedures during the course of life is becoming more and more common place among women, Burge is definitely way over the top. Burge feels there should not be a stigma around wanting to look good and using plastic surgery as a means to an end.
Mothers like Burge and television shows such as Toddlers and Tiaras which place a high emphasis of beauty draw so much criticism. Any time a pure and innocent childhood is threatened, psychologists draw the line. Seeing as many people are against having plastic surgery even as adults, you can only imagine what they would think of mothers that preach surgery for their younger family members. Plastic surgery is one thing, excessive plastic surgery another.


Home » Community Groups » Sitefinity » Upgrading Sitefinity » Upgrading Sitefinity » What are some of the reasons why user control properties don't get migrated?
What are some of the reasons why user control properties don't get migrated?
I'm at a lost as to why one of my user control's public property values in 3.7 are not being migrated to 6.2. I don't have this issue with lots of other user controls.
I can see the value of the public property in the 3.7 database table sf_CmsControlProperty.
I cannot see the value in the 6.2 database table sf_control_properties (I assume this is where it goes).
The page and user control are migrated correctly, In fact I can edit the page and control, and type in a value. Save the page. Then check the 6.2 database table sf_control_properties. There I can see the new value I just entered. There are three rows in the database table representing the new value I just entered... which I find a bit weird too. Why not just one row?
I tried all sorts of things... can't get this resolved.
The user control properties that are not migrated must be properties of widgets that are not of the widgets that are migrated by sitefinity from 3.7 to 6.x versions (widgets that are available in both versions) or the properties that are not migrating are not properties available for the same widgets in sitefinity 6.x version.
Please let me know what properties for which widgets are not migrated? If the widgets which properties are not migrated are custom versions of the built in widgets for sitefinity 3.7 (like customized widget for displaying news) which was added additional properties to serve specific case those additional properties are not to be detected by the migration as properties for news widget, in this train of tough this will be the same for other customized widgets.
Thanks for your reply. I asked a somewhat similar question in the official support channel. Maybe I was not clear here and in my official support ticket. I think both of you are wrong. It's not true that custom controls/widgets properties won't get migrated. If both totally custom controls/widgets in 3.7 and 6.2 have the same public property, the value will get migrated. BUT there appears to be some conditions. In 3.7 the public property must not access any other controls. It has to have simple getter and setter. My guess is that it is due to the way the template (ascx) is being loaded, that the controls are not initialized. Also some data type of those properties matter.
Anyway, for now I'll make do with what I have. There will be more manual migration steps.


Salisbury Poetry Week Open Mic Nite wtih Fenix Youth Project!
Poets of all ages, from all over the shore, are invited to read their poetry and recite spoken word in this Open Mic celebration! Light refreshments will be provided. MCed by local artists Pat Valdata, Jamal Gould, and Amber Green.
Search listings near Salisbury, MD.


The other day, I stumbled upon what looked like a basic HTML/CSS solution. I wanted CSS that would push the footer to the bottom of the page, irrespective of content height, in an ASP.NET Master Page setup. Thanks to Ryan Fait for this.
It was straightforward enough to get it working for IE7. Firefox 3.0 didn't play nice at first until I moved the wrapper and footer divs out to the master page. Feel free to download the sample below and try it out for yourself - VS 2008 solution. Ignore the red wigglies in the master page. It has been tested in IE7, Firefox 3.0 and Chrome 0.2.149.29.
With master pages you need to take account of the "form" element by including it in the appropriate CSS selector.
I've been doing some more testing with this and it seems like IE7 is the only browser that plays nice. Has anyone any ideas on this?
Have you tried the download link?
The download link is broken. I'm running into the same problem and was looking to see if I could take a look at your solution.
I'm seeing two problems here. The first is that when you moved the divs to the master page, they are inside the content area, and therefore never show up in the final html. Second, the problem in FF in the first place, it that it doesn't like the <form> element, and doesn't push the footer down with the <Form> present.
"Second, the problem in FF in the first place, it that it doesn't like the <form> element, and doesn't push the footer down with the <Form> present."
You're right about this; just FYI, I fixed that problem by placing the starting <form> tag inside the 'wrapper' div rather than outside it. Since all your form elements are going to start after the 'wrapper' div of your master page, it should be fine to this.
Thanks for letting us download this cool stuff.. I'm sure that all of us are thankful here..
There is only one page in a project but it is working. foot sticky dll is a nice peice of code.


A careful lubrication of conveyor belts is indispensable to obtain a good sliding degree of containers, granting a correct synchronism among the different stages of the packaging. The lubrication solution offered by AEB.
to keep belts clean by avoiding (limiting as much as possible) the environmental microbial pollution caused by the dirt on/under the links of the belts (residues of product, dust, wear material of belts/runners).
The lubrication of conveyor belts for containers in the beverage industry has always represented an aspect of primary importance: against an expense of about 2% of the operational costs of a company for the purchase of lubricants, there is an increase of about 28% on the budget in the case of a bad lubrication of the equipment. The above-mentioned costs are referred to the utilization of lubricants of the second generation (amine-based).
Today, lubricants of the first generation (based on fatty acids, surfactants, vegetable oils) are still used: they are suitable for production lines not particularly quick, with belts with metallic links and in the presence of particularly "dirtying" liquids, such as fruit juices, wine and soft-drinks.
The usage concentrations of products based on fatty acids are indicative and are influenced by the hardness of the water used for dilution.
During the last years lubricants with a silicon base have been created, that can be considered food grade, in the same way as formulations based on amines and fatty acids. The characteristic of these products is that they can be used only on belts with links in a synthetic material and that do not carry glass or tinned plate containers.
very low utilization concentrations and hence strong decrease of op-eration costs.
The latest generation technology is the so called "dry" lubrication. Practically, it is based on formulations which are ready to use, that is with no dilution in water, and supplied automatically on the belts, with specific equipment and suitable spraying stations, with very low concentrations and for short time – from 5" to 15" with a time interval that may reach 4-5 hours between one treatment and the other. This system, called Dry-System, enables a product saving of about 70-80% and this means a saving of more than 50% from the economic point of view.
The lubricant compatibility with composition materials (conveyor belts and containers) represents of course the first argument to face. It is useless to choose a formulation if it does not grant that it does not attack surfaces, independently from all other factors that may be considered afterwards. In order to value the "compatibility" between lubricant and container, trials are carried out on the different materials (glass, PET, PVC, paper/poly-coupled, tinned plate) and also the impact towards serigraphy, inks, etc. Other evaluations are carried out when the lubricant is optimized, with the survey of the different friction values, suitably measured. The survey is carried out in the different parts of the conveyor belts, empty or full containers – accumulation areas – production stop with belts moving – areas with a particular friction – belts utilized for packaging in different sizes. All the gathered information will contribute to define the supply/non supply times, the number of spraying station and the kind of supply heads.
Lubimatic Control Dry: centralized equipment for the automatic supply of "DRY" lubricants, with a ON/OFF programmable temporized sys-tem. The lubricant is conveyed to the line by means of a membrane pneumatic pump with a pressure of 4 Bar. The system is suitable for one or more lines with the application of "satellites" and is able to supply up to 100/120 spraying stations. The spraying stations utilized with Lubimatic Control Dry are dry-system and no-drop and are able to grant a particular homogeneous nebulisation of the product on the en-tire surface of that particular area. Lubimatic Control Dry is used only with AEB "DRY" lubricants: Sintodry.
All AEB formulations are in accordance with EC Regulations about the utilization of chemical products in companies packaging, storing and transporting foodstuff and in particular with EC Regulation 93/43/EC and those regulating the application of the HACCP self-control system.


India continues to assert its image in the global technology community. During Prime Minister Narendra Modi's visit to Silicon Valley last month, issues like social media and entrepreneurship were popular talking points. "Our startups represent not just commercial success stories, but are powerful examples of social innovation," Modi had boasted at an event in San Jose. Tech CEOs praised him for the 'Digital India' campaign that would appear to have the country poised for innovative greatness.
Less sanguine observers, however, have raised concerns about the loss of Indian talent to the West. India does not lack talent. Many of the country's peripatetic expats have been highly successful. The boardrooms of Silicon Valley and Wall Street are full of Indian success stories.
Upward mobility is not enjoyed only by a handful of Indian corporate superstars. The average income of Indian-American families, at $88,000 annually, is the highest among all ethnic subgroups.
One might assume that a country producing such successful talent would itself enjoy elite educational status. However, politics and bureaucratic meddling have compromised the quality of once-elite educational institutions like the IITs and IIMs. Bright young Indians have fled in part because India's corporate and research environment failed to value and compensate them for their talents.
Between 2000 and 2014, more than 61,000 high-income Indian families emigrated in search of better opportunities and quality education for their children. In a Gallup survey published in 2012, 10 million Indians expressed a desire to move to the US.
IIT may be a victim of its own success, with the government duplicating the university in almost every state (14 new ones since 1990). The once formidable IIT brand has been rubber-stamped on what could be called 'provincial universities'. Reservations for staff and students in these new schools have gradually eroded the quality of education. The pool of teaching talent has been stretched thin with the proliferation of new positions, nearly a third of which sit vacant. That figure rises to 40% when counting all Indian universities.
Loose standards and the absence of controls and benchmarks have diluted the quality of PhD dissertations. The global reputation of Indian universities lags behind China, never mind the West. The US, with its massive demand for higher education and historically supportive policies and resources, has only a handful of truly elite technological institutions: such as MIT, Caltech, Georgia Tech, and departments in flagship universities like UC Berkeley and the University of Michigan. Competition for admission to these is fierce. By contrast, the glut of IITs has recently led to deadline extensions for filling seats, a harbinger of competitive disadvantage.
Predictably, CEOs are complaining that Indian graduates lack functional skills. A 2011 survey revealed that finding qualified employees was achallenge for 70% of Indian companies. A 2011 Wall Street Journal piece found that "75% of technical graduates and more than 85% of general graduates are unemployable by India's high-growth global industries". Lack of English comprehension and basic vocational skills are often cited as the explanation.
And yet, Modi claims that India is still the world's 'back office', even as the Philippines surpasses India to become the largest call centre. British and American firms have even repatriated their call centres. Personnel costs may be higher, but efficiency gains have apparently made this strategy worthwhile. India is losing its techno-economic competitive edge, and has been doing so for years.
India needs to create 12 million new jobs each year for decades to come. The emigration of India's promising young workers leaves a vacuum of talent that the remaining population cannot fill.
Modi's 'Make in India' campaign has netted splashy headlines, and indeed there is some progress. India recently improved its ranking by 16 places year-on-year in the World Economic Forum's Global Competitiveness Report. With rapid advancements in technology in the coming decades, India will lose some job types, but also see millions of new ones that do not currently exist. Sadly, there does not appear to be any genuine attempt to reform university education and vocational training to meet the vast skill shortages of the future.
India needs a culture of innovation, future-oriented planning, public and private sector risk-taking, and massive infrastructure improvements to fertilise the growth of highpaying jobs — jobs that peer countries are eager to poach. Unfortunately, these conditions are largely absent.
The weight of an unwieldy bureaucracy, the re-emergent scourge of 'tax terrorism', policy uncertainty eroding FDI confidence, erratic revisions of regulations, and the overall absence of meaningful reform will continue to hamper innovation and job-creation. Unless these fundamental conditions improve, India's best talent will continue to be found in its airport departure lounges.
People now have higher expectations for living standards, particularly for their children. Modi's visit to Silicon Valley is evidence that the government is committed to building the country's global image. However, India first must sell its value as a country to its own citizens. Currently, it is failing to close that sale.


Love in High Places by Parrish (Mark Parrish) features powerful pop anthems and intimate ballads, led by a signature soulful female voice and personable and relatable lyrics. The songs on are anchored by the powerful vocals and great keyboard-based musical arrangements and are sonically broadened by distinct drums and urban electric sounds which gives the album an evolved, modern-day feel while simultaneously sounding like a classic body of timeless music. The album features inspirational songwriting and a mix of rich sounds delivered by songwriter-arranger Parrish.
This is easily the most consistent and cohesive set of pop orientated songs I've heard from a newcomer in recent times. In fact the story about this new album should be about two great talents been materialized into a great singer and a great songwriter. These two go like a hand into a glove.
For a long time the genre of soulful pop with its rich legacy just seemed to disappear, despite the fact that the genre and charts have been populated on the rare occasion by some deserving performers. Love in High Places with its quality can compare to some excellent soul albums of the past, but it also has significant commercial pop potential, that probably will not interfere with Parrish's artistic vision.
On Amazon the album is categorized as Dance & Electronic as well as Pop. I personally find these descriptions to be rather reductive and limited as far as the first 4 tracks on this 6-track album goes. Sure I can hear the Electronics…and yes, you can dance to this, but Love in High Places runs so much deeper. Partly because of the musical arrangements and particularly because of the phenomenal female vocals on the first 4 tracks, namely: "Have It All", "If I Could Fly", "Freedom" and "Amazing". The remaining 2 songs can probably be considered 'lighter' in tone due to the male vocals on "I Wait My Whole Life" and the second female voice on "Without You By My Side".
Without wanting to diminish the importance of the other two singers, I personally think if Parrish wants to keep knocking on musical heaven's door, he would be advised to stick with the singer who handles the first part of the album. She elevates the already grand musical compositions into something more sublimely powerful and instantly recognizable. This last trait being that elusive ingredient most unknown artists are desperately searching for in their quest to acquiring recognition among the masses.
In this album you can feel the passion for the music through the vocals, and grasp each emotion from how Parrish wrote and arranged them. The album never becomes monotonous as every song has a slightly different formula. My absolute favorite tunes are "If I Could Fly" and "Freedom". Parrish definitely has a great future as a songwriter, while the commercial success of his songs will mostly depend on whoever is interpreting them. The first 4 songs on Love in High Places have certainly got him off to a flying start!


Lean on Pete, the new film from director Andrew Haigh (45 Years, Weekend) is sad. This is the first word that comes to mind when I think of the film, something I've been doing often in the weeks since I saw it. It contains the kind of sadness that slips into the cracks of your foundation and breaks you from the inside out. When the credits rolled, I was left off-kilter. My world had tilted. Something irreparable had occurred.
The film centers on Charley, a 15 year old kid played with wide eyes and impossible vulnerability by Charlie Plummer (All the Money in the World). He doesn't have much, but he does have a little: a past as an athlete, a father who seems to be trying, a hopeful outlook on the world around him. The Charley we meet in the film's beginning isn't jaded by where his life has fell short. There is mention of an aunt who isn't in the picture anymore, but Charley doesn't let feel bitter about it. What good would it do?
But this movie isn't about Charley. Not really. It's about Pete, or rather Lean on Pete, a run-hard racehorse owned by Dell (a worn-down Steve Buscemi). Pete's presence makes this a horse movie, but it is not a Horse Movie. This is not Black Stallion, this is not War Horse. This is an Andrew Haigh film, and so it is quiet and uncompromising, subtle and shattering.
When Charley meets Pete, he is running in the early hours of dawn, something he does as part of his routine. The summer is ending soon and football tryouts are coming up. He wants to get back into shape. It is surprising to hear that Charley plays football; he is a small kid, with long limbs and a physicality bordering on breakable. But the surprise of it is also part of Lean on Pete's magic: There is a truth to everything, even in the implausible.
On his run, Charley passes a stable, where a few horses are out walking. He stops and watches the horses, and by the day's end, he has gotten a job there through pure force of will (Dell, the owner of said stable, is doubtful of Charley's capabilities, but quickly learns that what Charley lacks in experience, he makes up for in desire to be there). Charley's job with Dell is a lot of grunt work: shoveling hay, walking the horses, loading them up in the trailer. From the moment he starts, we know he is doomed. His eyes are too big, too open to make it through this world alive. And so he falls in love with Pete. And when Pete stops winning races, he saves him, and together they attempt to survive the world they live in.
Haigh makes romances. Weekend, his debut, follows two young men as they grow together over a weekend. 45 Years, his Oscar-nominated follow-up, explores the commitment and desolation of an aging marriage. While Lean on Pete may not appear to be as immediately romantic as Haigh's previous two features, do not be mistaken. It glows and vibrates with the same energy that makes Haigh such a talented filmmaker. He adores his characters but refuses sentimentality at every turn. He presents their lives, their situations as they are, which becomes its own kind of tragedy.
Charley spends the majority of the film's run time trying to do the right thing. He supports his father, he does right by Dell, and he takes care of Pete, even when it becomes impossible to do all three. At every turn, the world disappoints him, and yet he does not give up. Plummer portrays Charley as an open book, the kind of face that can't help but give itself away. It is a remarkable performance, and one of the very best of the year. It is a fitting coincidence that both actor and character share the first name, for Plummer imbues Charley with such humanity and empathy that it becomes impossible to separate the two. Lean on Pete would not survive without Plummer's face, which becomes its central focal point for its 121 minutes. Cinematographer Magnus Nordenhof Jønck shoots his face in intimate close up, following his every look and glance with the kind of rapt attention we ascribe to works of art. It is a miracle that Plummer doesn't wilt under this kind of intimacy. Lean on Pete is the first lead role the 19 year old actor has done, and it doesn't show one bit. Ultimately, it is the kind of performance that will linger, and one that promises a long, successful career to follow.
Lean on Pete is an exquisite film. Nothing this year has affected me the way it did. Haigh makes movies that we don't see very often, ones about the small things, the things in between everything else, the outskirts of nowhere. I feel blessed to witness them. And with Lean on Pete, Haigh has mastered his technique to haunting effect. It is the strongest effort from an already strong filmmaker. And, most importantly, it does right by Charley. Just as Charley would have done for him, and for us.


I have been meditating for years. My morning ritual started in the midst of chaos over 20 year ago. It was a way to start my day with intention and peace. Whenever I enter into a higher state of consciousness I travel crossing realms and moving into infinite guidance. I don't know exactly how to describe it. Everyone's experiences are different. I begin with prayers. If there is something that needs clearing or guidance I will ask, otherwise it is just a state of being. And, in that state of BE-ing I find answers to the most complex and simple questions. Sometimes it is through a vision while other times through a word or feeling. The power of letting go and retrieving into the Divine is invaluable. There is nothing more meaningful for me in the morning time. Whenever I skip this ritual I become a bundle of imbalance energy and I am reminded to find a spot to move inward if only for a few minutes.
Meditation has no rules. I get asked how I can just stop the thought process and chit chat? I don't control anything. I blank out. But, if a thought begins to nag or nit-pick or just start to take priority I do allow for it. I sit it down as if it was a guest. I don't make it too comfortable for a long duration and then I send it off by entering into my happy place. This is a bench in front of a giant waterfall in a tropical forest. I go there in my imagination and entertain the breeze, smells, plants and sounds. I am there in a heartbeat. Before long that, too, disappears and I am back in the emptiness of peace.
I believe that folks make too much out of just sitting and allowing. Control and rigidity begin to occupy the mind allowing for EGO to dictate what is correct. There is no right or wrong way. If you start with prayer and allow guidance to lead there is nothing that beats this healing modality of union with self and God. Make space for it. If you need to light incense or candles or have soft music then do so. Take five minutes of deep breathing while closing your eyes and opening the heart to all that is mystical. The Divine visits the moment you accept authentic truth and surrender.
Meditation does not have a religion. It doesn't care how old you are. It doesn't judge (that's your Ego doing that) nor criticize if you are sitting in a yogi position or laying down comfortably. Meditation has no set rules. Sure you can buy into the idea that you need a teacher or guru and that you are doing it wrong but this is a personal involvement with God. No one can truly guide you there unless you are willing to marry into this relationship and commitment of love. How do you feel when you enter the state of sleep? How do you pray? How do you move when you are among joy with loved ones or playing in nature? These are all facets of meditation. Creativity is a huge form of meditating and being close to divine energy. How do you quiet your chaos? There must be a way other than through avoidance or addiction. I do know that when I have a huge blockage I go to G.O.D. (guidance over doing). I stop the nonsense that has been fabricated in me and begin to search in the depth of consciousness for a shift in perception. God lives there.
I am no master in how to's. I don't have a secret formula. I refuse to tell you how you need to do something because everyone is unique. But, what I do know is that the mind, body and spirit need moments of union without judgment or unworthiness from a life of social programming. The essence of you needs a space of entering divinity and guidance. We all need a form of relaxing into the breath of life. There are a million videos and CD's full of techniques. However, YOU have the answer to how and what works for you. Meditation is not a secret society of the universe. It is simply the infinite of your own knowing and tapping into the infinite wisdom of Spirit.
I wish you a powerfully serene and magical day. Allow your faith and mysticism to guide you into the arms of God. The universe is your playground…make it a wondrous day! I love you. I love you. I love the you that embraces all that you are as AWEsome.
My mysticism – I will reflect on this with curiosity and delight. Thank you for your willingness to share your journey, Millie. You are inspiration.
You are so kind and generous with your words. I love you, lady. Hope all is well with you and yours. When it starts to slow down in Sept. I would love to see you….hugs and kisses.
I meditate with Deepak when he offers free group meditation. I like when he invites the world to come together and meditate for world peace. I feel the energy. I meditate at any given time in any given place. I often meditate laying down before I go to sleep and on those nights I have the most peaceful rest.
Any form of relaxing and detaching is sensational. I am happy for you. Mucho love to you, dear sweet soul.


THE HEALTHCARE SYSTEM IN GERMANY.
Health insurance is mandatory in Germany. Get more information about this topic!
Every individual with a place of residence in Germany must have health insurance. There are very few exceptions which apply only to certain professions and sections of the population.
Germany also has a so-called dual system of both statutory and private health insurance. Each type has its advantages and drawbacks. There are also certain regulations as to who is entitled to which type of insurance.
Health insurance in Germany, in particular statutory health insurance, is based on the concept of the welfare state. According to this, everybody pays into the system and those who require benefits due to illness or accident are provided with support. Not everyone will use up the full amount they have paid in over the course of their life, but everyone helps finance those who are in greater need.
Contribution rates for the year 2019.
Your employer transfers the entire amount to be paid for social insurance directly to us, including the employer contribution. BMW BKK then forwards the various amounts as appropriate.
Contribution assessment ceilings for 2019 per month and year.
Under a private health insurance scheme, contributions are based on the individual's age and state of health. The older you are and the more previous illnesses you have, the higher the contribution. Occupational groups such as civil servants, the self-employed and high-earners with an income of over EUR 60,750 gross for more than a year have private health insurance.
It is important to consider very carefully whether or not to take out private health insurance because generally speaking it is irrevocable. Once you have private health insurance, it is permanent.
The terms and conditions of a private health insurance scheme will tend to be more favourable at the beginning and become less economical with increasing age. Private health insurance is generally particularly expensive if you wish to include family members or start a family. There are also considerable differences in the benefits available depending on the scheme you choose.
The most important thing is to be sure you obtain detailed information before switching to private health insurance. BMW BKK offers expert and individualised consultation on this issue. Our experienced staff will be happy to get together with you and compare details, look at the advantages and drawbacks of statutory and private health insurance and consider the benefits and risks.
VOLUNTARY INSURANCE WITH BMW BKK.
If your annual income exceeds the limit of EUR 60,750, you are voluntarily insured with BMW BKK.
The difference between this and mandatory insurance is that the monthly health and nursing care insurance contributions remain the same (on a yearly basis). And you don't pay any extra contributions for one-off payments such as vacation allowances or Christmas bonuses.
THE ELECTRONIC HEALTHCARE CARD (EGK).
What data is currently saved on the eGK?
The eGK currently only has administrative data such as your name, date of birth, address and health insurance number.
What are the advantages of the healthcare card?
The card bears a photograph which shows you to be the holder – a quick and clear means of identification.
An online match is also carried out between the policyholder data saved on the eGK and the current data held by BMW BKK. This means that any changes such as a new address can be added to the eGK the next time the card-holder goes to the doctor.
So you do not require a new eGK in this event, and any card this is invalid, lost or stolen can be cancelled. This further reduces misuse.
Data privacy: top priority is attached to protecting your personal details.
Nobody can access the confidential data saved on your healthcare card without your consent. Access is only possible with your PIN code in conjunction with the healthcare profession ID only issued to healthcare professionals.
You can also use your PIN Code to both add and delete data. What is more, certain information can be hidden or only made accessible to certain doctors. You can of course view your data yourself at any time.
How am I protected from data misuse?
In addition to the rigorous data privacy requirements, all access is logged. The last 50 accesses to the policyholder's data are saved. This means that every access is documented and can be subject to criminal prosecution if necessary. The very latest encryption techniques are used for the eGK. This prevents unauthorised persons from accessing your healthcare information.
What happens if I lose the card?
If someone finds the card, they will not be able to access the policyholder's details. What is more the photo clearly shows who the holder is, thereby preventing misuse. As soon as the policyholder reports loss of the card to BMW BKK, we provide a new one within a short time.