Children and young people are supported to lead healthy and happy lives, develop resilience and get the right support at the right time.
Increase investment in and expand the budget for evidence-based, prevention and early intervention mental health and wellbeing programs and initiatives in schools across the state.
complement and integrate with clinical and acute care services.
But getting the right support at the right time is often out of reach for too many of our young people and particularly those experiencing multiple and diverse forms of disadvantage.
We know that transport in regional and remote communities is a significant barrier to young people accessing the services they need. We also know that properly resourcing schools and the community mental health sector to connect with young people is crucial to addressing their mental health and wellbeing needs.
As a central access point and place of engagement, schools have a significant role to play in promoting mental health and wellbeing to young people, including coping with stress and reducing stigma.3,4 They are therefore the ideal setting to provide preventions and interventions to improve mental health and mental health awareness, reduce stigma, encourage help-seeking and provide referral pathways to support.5 Communities tell us about the incredible work their local schools are doing to support student mental health and wellbeing, but that their resources are limited and often mean they are unable to engage the full-time staff or range of services and programs needed.
NCOSS was pleased to see $42 million for community-based mental health services and supports in the mental health budget for 2018-19. However, we need more significant, sustained and targeted investment in community-based supports that are youth focused and designed, culturally appropriate, trauma-informed and recovery-oriented, particularly for regional, rural and remote areas, if we are to meet the needs of young people in all their diversity.
Bullot A., Cave, L., Fildes, J., Hall, S. and Plummer, J. 2017, op. cit.
Wyn, J., Cahill, H., Holdsworth, R., Rowling, L., & Carson, S. 2000, 'MindMatters, a whole-school approach promoting mental health and wellbeing', Australian and New Zealand Journal of Psychiatry, 34 (4), 594-601.
Tew, J., Ramon, S., Slade, M., Bird, V., Melton, J. & Le Boultillier, C. 2011, Social factors and recovery from mental health difficulties: a review of the evidence. British Journal of Social Work.


Simple Success Strategies For Women Entrepreneurs, curated by publisher Suzanne Doyle-Ingram and co-authored with 11 exceptional and inspiring women in business who know what success looks like, has become an instant bestseller. Today, women are starting and growing businesses more now than ever. Their businesses are bolstering the economy, providing jobs and supporting their families. Successful women realize that they have the ability to help other women grow and prosper as well – there is more than enough opportunity for everyone.
Inside Simple Success Strategies, you'll discover inspiring tips and strategies to take your own business to the next level. In this book you will learn: How Niching Can Grow Your Business; Creating a Powerful Brand; Establishing Financial Security; How to Discover Your Unique Writing Voice; Developing Client Creation Values; Wealth Generating Strategies; Using Video to Shine Online; The Brain and Success Connection; How to Achieve Any Goal; How Not to Say Yes to Everything; Why You Need a Blog; and much more. The entrepreneurs featured in Simple Success Strategies are: Karine Bengualid, Ria Qureshi, Erin Whalen, Jaeny Baik, Kerry Vega, Lynn Williams, Azadeh Yaraghi, Jeanette Jackson, Michele Platje Devlin, Pascale Hansen, and Nathalie Plamondon-Thomas.
Simple Success Strategies is an inspiring read with personal stories, tools and strategies that each co-author has personally developed and refined throughout the years of owning her own business. 100% of the retail royalties from this book are being donated to the eWomenNetwork Foundation to benefit women and children in the United States and Canada.
"Being able to help create 11 best selling authors in one day is definitely one of the best perks of my job."
Suzanne Doyle is the CEO of Prominence Publishers in Vancouver, Canada and is passionate about helping coaches, consultants and authors to publish their own books and to use them as part of their business marketing and publicity efforts. On Simple Success Strategies, her co-authors, Karine Bengualid, Ria Qureshi, Erin Whalen, Jaeny Baik, Kerry Vega, Lynn Williams, Azadeh Yaraghi, Jeanette Jackson, Michele Platje Devlin, Pascale Hansen, and Nathalie Plamondon-Thomas, are all established entrepreneurs in Vancouver and come from a variety of business and industry sectors.


text:
Protesters in Haiti reject calls for foreign troops | Al Jazeera Newsfeed
"No to the Canadians, no to the Americans." Thousands of people in crisis-torn Haiti have been protesting against the government's push for foreign military help with gang-related violence. The UN chief has called for "armed action". Subscribe to our channel http://bit.ly/AJSubscribe Follow us on Twitter https://twitter.com/AJEnglish Find us on Facebook https://www.facebook.com/aljazeera Check our website: http://www.aljazeera.com/ Check out our Instagram page: https://www.instagram.com/aljazeeraenglish/ @AljazeeraEnglish #Aljazeeraenglish #News
Whatch on Al Jazeera
Tags: ALJAZEERA
Previous Latest news bulletin | October 18th – Midday
Next Ease sanctions to extend Ukraine grain deal, says Russia
British workers unite in largest strike in a generation

redpajama_set_name: RedPajamaCommonCrawl


It's Anna's birthday and Elsa and Kristoff are determined to give her the best celebration ever, but Elsa's icy powers may put more than just the party at risk. Based on the new Disney Frozen animated short, "Frozen Fever," this storybook comes with over 30 stickers. It's perfect for Frozen fans ages 3-7.


In this FREE course, Peter Anthony Wynn gives you his top ten inspirations to live by. These inspirations will give you advice on just how to live your life in a way that you will get what you want more often. In just 13 short videos, you will become better at getting what you want, and you will succeed even more than you already do. Sign up today FOR FREE and get started!
You will learn Top Ten Inspirations to Live By and become a rockstar! You'll have access to hours of quality content, online resources, and much more.


Shopping that the hickory hardware p140 surface mount cabinet hinge set of either by internet or show rooms are not easy. You can find several brands available. What's more, you can choose the makes that lots of folks urge or also the brand which includes multiple beneath product brand name. Then everything you have to accomplish is always to hire the contractor. The builder will help give some possibilities on exactly what would you look the cabinet. He will likewise quantify the some chances to replace several counter-tops or just abandon it. For that vanity cabinet, you can possess the regular merchandise or even the custom made a single. Nevertheless, the readymade product generally is more affordable compared to custom-made . In the event that you want a timeless and easily-adapted color, you can choose the white dressing table cabinet. Nonetheless, that you really don't need to worry we have lots of types of coloring you may like.
hickory hardware p140 surface mount cabinet hinge set of these as for example tub faucets, showerheads, bathtub and sink faucets, and water faucet fittings. They've got different role predicated on places, level of take care of, shape, size, completed and many much more. Today's informative article I will tell you concerning delta taps merchandise in line with these components. Here we go!
The wall mounted cabinets with towel pub could give your flooring wider since it places around the wall. You can utilize the cabinet easily. So, what can you really think about the wall cupboards with towel bar? It's extremely helpful matters, is not it? You can start to put as discretionary and remedy of your slim cabinet. Let's begin to use the hickory hardware p140 surface mount cabinet hinge set of!
Once you decide to install this barn door in your cabinet, you must know that the suits also. You can find a few forms of materials that you can choose since it is adjustable door. You can select to mix with wooden, glass or other materials. Now is the time for you to change your doorway together with hickory hardware p140 surface mount cabinet hinge set of.
Delta Victorian venetian bronze 2-handle wide spread water sensation cabinet faucet, and delta Lorain stainless 2-handle 4- at centre put water feel cabinet faucet, and delta Olmsted bronze 2-handle wide-spread water sense cabinet faucet. Kohler Elliston polished chrome 2-handle wide spread water sensation cabinet faucet and Kohler Elliston bright brushed nickel 2-handle wide spread cabinet faucet.
Heating is the first thing should really be met in the event that you want to make an effective yet good cabinet. As there'll be various scents inside this, you will need good ventilation to flow-in the excellent atmosphere and also bring the terrible air.
Because cabinet was fashioned for wet place, the walls needs to really be extra-dry. You are able to require the contractor or designer to ensure the wall is properly made as a way to stop any harm due to moist and water. The paint will be adjusted as well. Paint with watertight is exceptionally chosen.
However, this idea has been employed this day, so it's not going to be odd for those who employ this particular idea for your cabinet. Despite its function, on the toilet cabinets also is likely to make the appearance somewhat accessible. But in the flip side, for your look point of view, it will be helpful and advertising positive belief to the cabinet moreover the cabinet mix flawlessly with all the additional appliance and furniture.
This Hickory Hardware P140 Surface Mount Cabinet Hinge Set Of the gallery form Surface Mount Cabinet Hinges. Hopefully you can find the best inspiration from our gallery here.


text:
Arts & Culture Columns People Places Health Science Fiction Catapult
All Classes Generators Online Classes Instructors Contact FAQ Gift Certificates
Don't Write Alone
Interviews Toolkit Opportunities Columns Where We Write Free Write Notes on Craft Notes from Class Writing Life Shop Talk about
Who We Are Our Vision Magazine Masthead Submit Events
Perception Box
images via Samrah Shahid/istolethetv/flickr
Saadia Faruqi and Shoshana Kordova
@shoshanakordova
"God will not forgive until the person you have wronged forgives": On Repentance, Faith, and Family Life
How to Mark a Child's Religious Milestones
The Civil Rights Activist Whose Unique Spirituality Helped Me Find My Own
Joy Notoma
How To | Growing Faith
Fasting With Children
"Fasting has been a source of comfort, a way to become closer to God. All that changed when I had children."
This is Growing Faith, a column about parenting and faith coauthored by Saadia Faruqi and Shoshana Kordova.
Saadia: The month of Ramadan is the holiest month of the Muslim calendar, when healthy adults fast from dawn to dusk every day for approximately thirty days. The Islamic fast is a complete fast, which means no food, water, or medication during the fasting hours. This can be tough for mothers, especially those with small children.
I've always loved fasting. It's been a source of comfort during difficult times, a way to become closer to God when I need Him the most. All that changed when I had children. Nobody told me that small humans test your patience like nothing else, and that fasting does the same because you are hungry and thirsty and short of temper.
This is the main conundrum, really. On the one hand, parenting is supposed to be the best job in the world. One tradition of the Prophet Muhammad says, "Paradise lies under the feet of the mother." On the other hand, the act of being a mother lends itself to being constantly barraged with noise, demands, and tantrums. Now, more than a decade after I first became a parent, there are snippets I remember of each Ramadan: Eating suhoor (the early morning breakfast before the start of the fast) with my baby daughter clutched in one hand. Praying the optional tahajjud prayers in the dark to avoid waking the children up. Anger at my son's high-energy behavior that makes me shout at him, realizing as I do that the anger is caused by hunger, not my son. The headaches because of their noise level. The impatience with the people I have the most cause to be grateful for.
The Prophet Muhammad also said, "If a person does not avoid false talk and false conduct during the fast, then God does not care if he abstains from food and drink." Most glaring are the memories of despair that another Ramadan has passed without the patience and peace that it demands.
Shoshana: The best-known of Judaism's six fast days, Yom Kippur lasts twenty-five hours, from one evening to the next; in Orthodox communities, much of that time is spent in synagogue. Fasting can send different messages depending on the type of fast day. On Yom Kippur, we free ourselves of material needs—leather shoes and bathing and sex are prohibited along with food and drink—and concentrate on the spiritual task of repentance. On Tisha B'Av, Judaism's other twenty-five-hour doozy of a fast, which comes at the height of summer, the same restrictions are a sign of mourning for the destruction of the Temple.
Even if you have never gone a day without eating and drinking, you may have observed that the neediness of children does not take a twenty-five-hour hiatus. If anything, children, whose fasting obligations begin only when they become a bar or bat mitzvah at age twelve (for girls) or thirteen (for boys) can seem not just hungry on Yom Kippur, but as insatiable as the whale that swallows Jonah in the section of the Bible recited at the Yom Kippur afternoon service. Look down the rows of worshipers, and you'll be hard-pressed to find mothers of small children not armed with snack bags.
On most Jewish holidays, the festive meal tends to receive a disproportionate amount of emphasis, so eliminating food preparation and consumption can help shift our focus to prayer and self-reflection. But fasting doesn't necessarily mean you stop thinking about food (or coffee). It can mean you imagine what you'd like to consume (I'll start with the pasta! No, with the ice cream!). It can mean you feel lightheaded and tired, and find it difficult to concentrate. It can make the sound of a whiny "Imaaaaaaaaaaaaaaaa!" even more grating than usual. It can make you impatient with your children and unreasonably annoyed at having to provide them the sustenance they require. When that sustenance comes not from the fridge or the cupboard but from your own body, the mission becomes still more complex. A mother once told me that nursing her baby while she was fasting made her feel like her son was sucking the life out of her.
Saadia: My son is now eleven and has been trying his hand at fasting since last year. Although children are not allowed to fast continuously, it is considered beneficial for them to practice as much as possible. Last year he kept half-fasts on the weekends, which meant eating the suhoor breakfast in the morning at 4:30 a.m., then fasting until lunch time. This was easy. Many kids sleep much of their fast away, but it still allows them to feel part of this important tradition.
This year my son plans to practice half-fasts for several days, perhaps one every other day. He is skinny and not a food lover, so I suspect that skipping breakfast will be no big deal. But I'm noticing the same irritability and lack of patience that comes with my own fasts. It is difficult to be angry at this very human trait, but it can be a lesson that fasting isn't a joke or an easy task.
My daughter is younger, and she won't be practicing for a couple of more years. But I've decided to make her fast from snacking, which will be great for her. She is a snack addict, and is unable to stay long without peering into the kitchen pantry for yet another yummy delight. If I can wean her away from these unhealthy habits in Ramadan, it will be goal accomplished!
Shoshana: When I was a kid and we went to my grandparents' house in Queens for Yom Kippur, they'd stock up on the sugary snacks we rarely, if ever, got to have at home. It was too hard to say no to the Devil Dogs and Ring Dings, even when I was old enough to feel kind of iffy about indulging in treats when all the grown-ups around me were abstaining even from water.
There's a different kind of indulgence you crave after you give birth to a baby: rest, maybe even sleep. Especially if you've discovered said baby has no idea that "day" and "night" are two separate things. Oddly enough, it was the first Yom Kippur I experienced as a parent, nearly a decade ago, that made me feel so rested and refreshed (not the usual adjectives one associates with either the Day of Atonement or new parenthood). Even now, I sometimes try to hold on to the echo of that feeling.
Pregnant women and nursing mothers typically don't fast during the four minor fast days that last from morning to night. But in Orthodox Judaism, if a woman's fasting is not considered harmful to her own health or that of her fetus or infant, she is generally encouraged to refrain from eating and drinking on Yom Kippur and Tisha B'Av. Different rabbis reconcile these principles—the religious obligation of fasting and the importance of keeping vulnerable members of society healthy—in different ways.
We asked our rabbi what I should do on the Yom Kippur that took place less than a month after the birth of our oldest child. After clarifying that the doctor had said there was no medical reason not to fast, he suggested I go on what was essentially a shortened form of bed rest, with spousal assistance as needed, and to start drinking in small quantities if I felt my milk lessening. Stay in bed all day, don't even walk around the house , I was told. The idea was to conserve energy so my body would keep producing what my baby seemed to think was the most addictive victual known to mankind.
And so it was that for the first time I could remember in twenty-nine years, I didn't go to shul on Yom Kippur. With my husband coming home from services periodically to change or hold the baby, I stayed put and prayed in my bedroom. I nourished without being nourished. After a few weeks of life as a mother, getting a full day's rest may have been the most spiritual experience I could have asked for.
Saadia: This year, Ramadan has been easier. Last week as my son sat at the table eating suhoor with me, eyes heavy with sleep, I was struck by a wave of emotion. How far we've all come from the days that his presence was a challenge to my fulfilling my own religious obligations! Now he is fasting with me, or at least practicing. Both my children stand with me in the mosque for afternoon prayers, serious in their worship for just a few moments. We break the fast together, my daughter helping lay the table, my son bringing in the samosas and kabob.
Now that the early years are passed, I can look back with more perspective. The impatience that comes to mothers who want to do their adult thing while their toddlers are wailing beside them is one real reason for Ramadan: I can use this month to hone my patience, to learn to bite my tongue, to close my eyes and count to ten just like I tell my children to do. If I can learn how to fast while parenting, perhaps I'll have learned the whole point of Ramadan.
Saadia Faruqi is a Pakistani American writer. She is the editor of Muslim literary journal Blue Minaret and author of the short story collection Brick Walls: Tales of Hope & Courage from Pakistan. She lives in Houston with her husband and children. @saadiafaruqi
Shoshana Kordova is an Orthodox Jewish writer and editor raised in NJ and living in Israel. She has written for Smithsonian, Prevention, Quartz, NYT's Motherlode, and The Daily Beast. She has four daughters. @shoshanakordova
Shoshana and Saadia are co-founders of Have Faith, Will Parent, a meeting place for parents of all religions.
Enter your email address to receive notifications for author Saadia Faruqi and Shoshana Kordova
Confirmation link sent to your email to add you to notification list for author Saadia Faruqi and Shoshana Kordova
Please Don't Pray for Us—We'll Have Children When We're Ready!
People I hardly knew implied that without children, I was failing as a woman, a Muslim, and a human being.
Shoshana and Saadia discuss milestones and coming-of-age ceremonies in their respective faith traditions.
"God is sometimes easier to please than our fellow humans."
Teaching Our Children How to Mourn
"We teach each other the prayer so that when someone dies, we are ready to fulfill our obligations."
People | On Writing | Growing Faith
Women Writing About Complicated Desire Saved Me When the Evangelical Church Couldn't
What I'd been looking for at the convent, I could find in reading and writing. If other writers could channel their desires, I could use it, too.
Cameron Dezen Hammon
People | Growing Faith
Looking for My Ancient Religion in Uzbekistan
Still, I was in search of something more, something concrete, something material.
Meher Mirza
You have flagged this story. We'll look into your complaint and take it down if it violates our community guidelines.
Are you sure this story content violates community guidelines?
catapult
dont't write alone
Where We Write
Free Write
Notes on Craft
Notes from Class
What kind of story would you like to write?
Editorial Community
Log into your Catapult account below
You do not have an account with Catapult. Please make sure you have typed your email address correctly. If you believe this message is in error, please email [email protected]
Enter your password to proceed
Haven't set your password? Login with your associated social account
launching remarkable writing
NYC Classes
Magazine Masthead


text:
Virtuoso from Python
====================

This package is intended to be a collection of modules for
interacting with `OpenLink Virtuoso`_ from python.

The goal is to provide drivers for `SQLAlchemy` and `RDFLib`.

At the time of this writing it requires a fork of pyodbc, which you can find on this branch:
https://github.com/maparent/pyodbc/tree/v3-virtuoso

It can be installed normally with `pip install -r requirements.txt`

You have to set up your ``~/.odbc.ini`` (or ``/etc/odbc.ini``) file with a block similar to this:
::
    [VOS]
    Description = Open Virtuoso
    Driver      = /usr/local/virtuoso-opensource/lib/virtodbcu_r.so
    Address     = localhost:1111
    Locale      = en.UTF-8

Most parameters depend on your installation, but be sure to use ``virtodbcu_r.so`` as opposed to any other variant. Wo have used virtuoso 7.1 in production, and also virtuoso 6.1. As of this writing, there is an issue with using LONG VARCHAR columns in virtuoso 7.2.

For more information see http://packages.python.org/virtuoso

.. _OpenLink Virtuoso: http://virtuoso.openlinksw.com
.. _SQLAlchemy: http://www.sqlalchemy.org/
.. _RDFLib: http://rdflib.net/

This package also contains an experimental generator of Virtuoso
Linked Data Views, which was presented as a poster at ISWC2014:
http://ceur-ws.org/Vol-1272/paper_60.pdf

The original design of this library is by `William Waites`, and development is continued by `Marc-Antoine Parent` for an earlier stage of the `Assembl` project.

.. _William Waites: https://bitbucket.org/ww/virtuoso/src
.. _Marc-Antoine Parent: https://github.com/maparent/virtuoso-python
.. _Assembl: https://github.com/assembl/assembl

redpajama_set_name: RedPajamaGithub


text:
Q: How to get ANTLR4 grammar to parse over a single line without requiring line break in the middle? I'm currently relearning ANTLR and I'm having a bit of an issue with my grammar and parsing is. I'm editing it in IntelliJ IDEA with the ANTLR plugin and I'm using ANTLR version 4.9.2.
My grammar is as follows
grammar Pattern;
pattern:
    patternName
    patternMeaning
    patternMoves;

patternName     :   'Name:'     NAME            ;
patternMeaning  :   'Meaning:'  NAME            ;

patternMoves    :   'Moves:'    (patternStep)+  ;
patternStep     :   'Turn' angle stance;
stance          :   'Walking Stance';
angle   :   ('90'|'180'|'270'|'360') '°' 'anti-'? 'clockwise';

NAME    :   WORD (' ' WORD)*;
fragment WORD    :   [a-zA-Z]+;
WS: [ \t\r\n]+ -> skip;

now when I try and parse the following text, I get the following error line 2:9 mismatched input 'clockwise Walking Stance' expecting {'anti-', 'clockwise'}
Name: Il Jang
Meaning: Heaven and light
Moves:
Turn 90° clockwise Walking Stance

However, if I change the text to the below it works without any issues. How can I tweak my grammar to allow me to parse it on one line?
Name: Il Jang
Meaning: Heaven and light
Moves:
Turn 90° clockwise
Walking Stance

A: Your problem is that clockwise Walking Stance is a valid NAME, so it's interpreted as such rather than as an instance of the clockwise keyword followed by the NAME Walking Stance. Adding a line break fixes this because line breaks can't appear in names.
To fix this, you should turn WORD into a lexer rule and NAME into a parser rule. That way the name rule will only be tried in places where the parser actually expects a name, so it won't try to interpret clockwise as part of a name. And the WORD rule won't eat keywords because the match produced by the WORD rule won't be longer than the keyword, so the keyword wins.

A: If this is your entire grammar, then there are no lexer rules defining the handling of whaitespace.  In fact, the are no explicit lexer rules. (ANTLR will create implicit lexer rules for any literal strings in your parser rules (unless the match an already define grammar rule.))
Your grammar is essentially (in ANTLR's perception)
grammar Pattern;

patternMoves    :   T_1    (patternStep)+  ;

patternStep     :   T_2 angle stance;

stance          :  T_3;

angle   :   (T_4|T_5|T_6|T_7) T_8 T_9? T_10;

T_1: 'Moves:';
T_2: 'Turn';
T_3: 'Walking Stance';
T_4: '90';
T_5: '180';
T_6: '270';
T_7: '360';
T_8: '°';
T_9: 'anti-';
T_10: 'clockwise';

ANTLR's processing takes a stream of characters, passes them to a lexer, which must decide what to do with all characters (even whitespace).  The lexer produces a stream of tokens that the parser rules process.
You need some lexer rule that prescribes how to handle whatespace:
WS: [ \t\r\n]+ -> skip;

Is a common way of handling this.  It tokenized all whitespace as a WS token, but then skips handing that token to the parser.  (This is very handy as you won't have to sprinkle WS or WS? items all through your grammar where whitespace is expected.
That your plugin accepts you input would imply to me that it may be treating each line of input as a new parse.

redpajama_set_name: RedPajamaStackExchange


text:
Spotlight Shines On An Alabama University and Its Shenanigans
The University of Alabama at Birmingham (UAB) is back in the national news--for all of the wrong reasons.
The Chronicle of Higher Education, the premier source for news about colleges and universities, reports this week about UAB's ham-handed efforts to oust Glenn Feldman, a tenured professor in the School of Business.
Feldman, the author of seven books and almost 100 articles, has a stellar record as a scholar. So why does UAB want to get rid of him? As a specialist in labor economics and history, Feldman has ties to the union movement and Democratic Party politics. Apparently that interferes with UAB's efforts to appeal to a white, conservative, "pro business" market.
In both the Chronicle's main article, and a followup opinion piece, experts say they are not surprised at what Feldman is experiencing. And they say taxpayers who support public institutions should be concerned about serious threats to academic freedom. Writes Chronicle reporter Peter Schmidt:
Mr. Feldman is unusual in his zeal, but he is hardly alone in suspecting college administrators' motives and their willingness to respect tenure. William F. Trimble, a professor of history at Auburn University and president of the AAUP's Alabama state conference, argues that tenured faculty members feel especially backed into a corner in Gulf Coast states, where they watched several colleges cite the financial hardship brought on by Hurricane Katrina's devastation in 2005 as justification for jettisoning academic programs and faculty positions.
"We now have a situation where there is a budget crisis all over the country," especially at public colleges, Mr. Trimble says. "Tenured faculty members have found themselves in a vulnerable position."
Under the "leadership" of President Carol Garrison, UAB has become a breeding ground for dysfunction. We summarized the universities scandals and embarrassments in a post titled "Has UAB Become a Hotbed for Mismanagement and Corruption." A number of new embarrassments have surfaced since we wrote that post in December 2008, including three cases of academic fraud.
Feldman's problems started when David R. Klock arrived as UAB's new business dean, after a brief stay at Cal Poly Pomona. Feldman was not the only one who quickly sensed Klock's antipathy toward labor studies, the Chronicle reports:
Mr. Feldman's complaints against the university argue that it very quickly became apparent to him that the center's work was not valued by Dean Klock, a former chief executive of CompBenefits Corporation—a major health-benefits provider—who had spent the previous two-and-a-half years as dean of the college of business administration at California State Polytechnic University at Pomona.
The idea that Mr. Klock was no fan of the center's work is seconded by Marc T. Cryer, who worked under Mr. Feldman as an assistant professor and now directs the center at its new location, at Jefferson State Community College, in Birmingham. In an interview, Mr. Cryer called Mr. Klock "very business-oriented" and "certainly not a friend of labor."
"He was pretty clear that he did not feel that the labor movement had any business in academe or that academe had any business spending time on the labor movement," Mr. Cryer said.
How badly did Klock and other administrators want to get rid of Feldman and the Center for Labor Education and Research (CLEAR) that he served as director? They asked the Alabama Legislature to withdraw a $650,000 line-item appropriation and kicked away more than $3 million in federal grants by shipping the center off to Jefferson State Community College.
When the labor center was jettisoned, UAB officials said Feldman would need to take 18 hours of graduate courses to become "academically qualified" to teach economics--even though he had been teaching economics, and was academically qualified, for years. Reports the Chronicle:
Last month, Mr. Trimble of the state AAUP sent university officials a letter disputing the idea that accreditors would deem Mr. Feldman academically unqualified to teach economics. He called the university's request that the professor obtain graduate credits in that field "at best curious," asserting that Mr. Feldman had already long taught economics courses and has "an impressive publication record."
A number of commenters at the Chronicle's Web site were astonished by UAB's actions. Wrote one:
This may be the first time in history that a public university asked a state legislature to cut its funding. And the notion that a full professor in the business school must take the equivalent of a year's worth of full-time classes in order to be qualified to teach is completely unprecedented. I've never heard of that happening anywhere.
As has become their practice, UAB administrators went into hiding when serious questions were raised. Klock, President Carol Garrison, and Provost Eli Capilouto apparently declined to be interviewed for the Chronicle article. Instead they trotted out public-relations chief Dale Turnbough to issue a statement, saying UAB "disputes what Professor Feldman alleges."
On what grounds does UAB dispute Feldman's allegations? What specifically about them is not accurate? Turnbough doesn't say because she, too, apparently is not taking questions. That's why UAB likes to issue "statements"--to avoid pesky questions.
Marc Bousquet, a prominent writer on academic issues, says in a piece titled "The United States of Alabama" that Feldman's situation is a sign of broader problems across the country. Bousquet, the author of the Web site howtheuniversityworks.com, writes:
. . . the UAB business-school dean (Klock) responsible for pushing first practiced his hatcheting ways here in California. It's not a regional issue at all or even restricted to higher-education workplaces.
The many things that should concern us about Feldman's experience in Alabama are all things happening in schools at every level across the country:
+ Administrator pro-business bias
+ Consolidation of administrator power
+ Declining faculty power and declining faculty solidarity
+ Abuse of credentialing (UAB has demanded that full-professor Feldman go back to school and earn a year's worth of credits to retain his tenure)
+ Ever-closer ties between corporations, politics, and the campus
+ Business influence on curriculum
+ The culture-struggle practice of administration, designed to produce compliant subjectivities and expel dissenters
+ A growing legal web that muzzles faculty governance speech at public institutions
+ The abuse of standards of civility and collegiality to paint an understandably upset victim as unreasonable, a tendency in which I have to say that Peter Schmidt's reporting unfortunately participates (though to be fair to Schmidt I haven't seen the documents he characterizes).
Bousquet closes by siding with a commenter who goes by the handle "mchag12":
"The relationship with the faculty at public universities is just becoming untenable as faculty are treated as line items to be dispensed with at will by high paid administrators. What would you do, azprof, if your department was slated for demolition and your university actually asked the state legislature to defund it? Back out of the room shuffling and bowing and repeating thank you, thank you? If you think you are safe, you're not."
That last line by mchag says it all.
Posted by legalschnauzer at 11:41:00 AM
Labels: Carol Garrison, Chronicle of Higher Education, David R. Klock, Eli Capilouto, Glenn Feldman, Marc Bousquet, UAB
The Workplace Safety Training (WST) program was part of CLEAR at UAB for 20 years. It received $3 million in federal funds every 5 years, mostly to train Alabama police, fire, and public safety personnel in handling hazardous materials, meth labs, confined space rescue,and Homeland Security threats. Eli Capilouto and David Klock were so hot to kill CLEAR and WST that they were willing to flush away all those federal millions. Now, that's vindictiveness. Not exactly the kind of thing taxpayers in Alabama expect from a state university. I understand the old directors of WST, Alan Veasey and Kenneth Oldfield, are still with WST now that it has moved to Jefferson State Community College.
FREEDOM. What a lovely word. Too bad you don't have it in Alabama.
UAB is a complete mess.
I can't believe Carol Garrison and Eli Capilouto are letting people like dean David Klock and assoc provost Harlan Sands run around like crazy: cutting, cutting, cutting, with no regard to quality, tenure, academic freedom, seniority, due process, cause, or anything else.
How far UAB has fallen in the last 5 years or so!
Richard Shelby's Pork Parade Helps Fund Discrimina...
Did Bush DOJ Intentionally Appoint Tainted Special...
Obama's Justice Department Appears to be Participa...
TV Shrink Provides Insights On Our Insecurities
Prosecutor Who Cleared Bush Officials Has Connecti...
Is an Alabama University Trying to Cash in on Disa...
Is BP Oil Spill Already Producing Acid Rain at Inl...
Report on U.S. Attorney Firings Reads Like a Farce...
Shirley Sherrod Is Not The Only One Who Has Been "...
Toyota's Threats Fail When a University Shows Some...
A State Actually Takes Judicial Ethics Seriously--...
University of Alabama and Its Buddies Gang Up on A...
BP Oil Cap Drives Republican Lunacy Into High Gear...
UAB Dysfunction Doesn't Happen In A Vacuum
Spotlight Shines On An Alabama University and Its ...
Victim of Bush DOJ Is Still Being Victimized Under...
A "Valentine" for Alabama's Corporate Sociopaths
Corporate Candidates Crash and Burn in Alabama
GOP Factions Square Off In a Classic Alabama Death...
BP and a "Hole in the World" Revisited
Obama and Whistleblowers: Should Progressives Be "...
Is BP Trying to Cover Up the Mess It's Made On Ala...
Will Berwick Help Shine a Spotlight on Medicare Fr...
Despite the BP Disaster, Big Oil Has Its Eye on th...
Celebrating "Walking on Sunshine," 25 Years Later
High-Profile DUI Case in Georgia Reveals an Ugly S...
Conditions Go From Bad to Worse Off the Alabama Co...
Creator of Oil-Spill Videos Makes Us Proud to be f...
I Have a Surprising Connection to BP's "Bogus Pres...
Blow to the Head Killed Former Riley Aide


text:
Hef RIP at 91
Lonesome George
Getty Images for Playboy
After living the past 60-odd years dressed mostly in pajamas, Hugh Marston Hefner has left the building. Teaming with Marilyn Monroe in the first issue of Playboy Magazine in December of 1953, some say Hef was responsible for the sexual revolution that followed in the 1960s and '70s, with his daring magazine acting as the cornerstone of the Age of Aquarius and free love.
There's no doubt he had an impact on the American Culture and lifestyle. The magazine he founded not only featured beautiful (and mostly naked) women, but also included articles and interesting stories about a wide variety of subjects that weren't just limited to sex and nudity.
When I was in college and any male friends were caught with a Playboy, the standard response was "I mainly read it for the articles," although the fold-out centerfolds were well covered too. I think I was in my late teens before I realized real women didn't have staples in their necks and abdomens.
Hefner chose the fast-reproducing rabbit as his iconic logo, explaining in a late '60s interview that "The rabbit, the bunny, in America has a sexual meaning, and I chose it because it's a fresh animal: shy, vivacious, jumping - sexy."
Hugh Hefner, born April 9, 1926 in Chicago, leaves behind a wife and four children, and a media legacy widely imitated but never matched.
Categories: Entertainment, News


Tell him you'd rather work independently on a contractual basis. You two can talk about it over lunch in Venice.
Would you be a double agent? Or just give up the old Gig?
It's fun and a challenge to interact with and manage schizophrenics.


text:
In-depth journalism.
In your home state.
Sign up for CT Mirror's free daily briefings.
COVID rampant in Stamford, a harbinger of things to come
by Mark Pazniokas January 3, 2022 @ 2:52 pm Updated January 26, 2023 @ 10:33 pm
Stamford Mayor Caroline Simmons talks about the COVID outbreak in Stamford. She spoke at the Stamford Health hospital complex with Gov. Ned Lamont and others. MARK PAZNIOKAS / CTMIRROR.ORG
Stamford Mayor Caroline Simmons talks about the COVID outbreak in Stamford. She spoke at the Stamford Health hospital complex with Gov. Ned Lamont, U.S. Sen. Richard Blumenthal and others.
STAMFORD — COVID-19 is spreading rapidly here in Connecticut's second-largest city, where cases exploded with the suddenness of a Colorado wildfire, doubling last week to nearly 1,200 new infections.
Forty percent of the 4,200 tests administered at the Stamford Health hospital complex last week were positive, twice as high as the statewide average; It was 26% at the hospital the previous week and 13% the week before that.
For good and bad, Stamford's experience is emblematic of the latest phase of a pandemic entering its third calendar year: So far, the new omicron variant is both highly contagious, but showing signs of being less virulent.
Gov. Ned Lamont began the new year at the Stamford Health campus on Monday, joining Mayor Caroline Simmons and health officials in delivering an update on a surge that has badly stressed the health system here and across Connecticut.
Stamford Health had 68 COVID patients on Monday, seven of whom were in intensive care. They comprised 25% of the 267 patients at the 305-bed hospital. Of its 3,700 employees, 140 were out sick with COVID.
Want more in-depth Connecticut reporting?
Get CT Mirror briefings with enterprise reporting, investigations and more in your inbox daily.
"Fortunately, they have low-level illness, and they're coming back to work very quickly. And we have been able to augment our staffing with travelers, with per diem staff," said Kathleen Silard, the hospital's chief executive officer.
The impact has been on staff, many who work longer or extra shifts, but the hospital has not curtailed service to non-COVID patients, she said.
"We've been able to continue to do all the things we do every day. We deliver babies, we take care of patients with trauma, cancer, and heart attacks and strokes and elective surgery. That does not stop," Silard said.
Statewide, according to numbers released later Monday, hospitalizations for COVID increased by 301 to 1,452 since Thursday, a stunning 25% jump. Hospitalizations now exceed the peak of 1,200 during the surge a year ago, but fall short of the 2,000 in the spring of 2020.
More STORIES IN Health
Newtown nursing home report alleges neglect, staffing shortages
State noncommittal to nursing homes' request for more money
More STORIES in Politics
Advocates and lawmakers make push for state-level voters' rights act
Democrats to Lamont: Ease fiscal restraints for CT schools' sake
With one of the highest rates of vaccinations in the state, the experience in Stamford has exposed the limits and benefits of the vaccines: Inoculations cannot stop the spread, but they greatly mitigate its impact.
"I know people are scared, and are concerned with hearing about a new variant yet again," said Dr. Manisha Juthani, the commissioner of public health. "The good news is if you're vaccinated, and particularly if you were boosted, the majority of people are having mild symptoms. Some are even asymptomatic."
The unvaccinated are a small minority in Connecticut, yet they also are the vast majority of those hospitalized with COVID or dying from the virus, officials said. Seventy-five percent of those hospitalized and nearly all in the ICU with COVID in Stamford were unvaccinated, Silard said.
The updated numbers showed that statewide the 68.8% were not fully vaccinated.
Lamont said the availability of vaccines and the willingness of people to get them mean that the continuing pandemic, while physically and emotionally exhausting, need not claim lives or jobs.
"This is not 2020. This is not 2021," Lamont said. "We're in a very different position than we were before. We have all the tools to keep you safe. More importantly, you have all the tools to keep yourself safe."
Gov. Ned Lamont said, "This is not 2020." Behind him are state Sen. Patricia Billie Miller and Mayor Caroline Simmons.
Ninety-seven percent of residents in Stamford have had at least one COVID vaccination, second only to West Hartford, Simmons said.
Statewide, 89% of the population has had at least one dose and 75% are fully vaccinated. For those 12 and older, 95% have had at least one dose and 84% are fully vaccinated. Ninety-five percent of those 65 and up are fully vaccinated.
"The unvaccinated have reason to be scared," Juthani said. "For people who are vaccinated, we are looking at a better future."
"It works. It keeps you safe. It keeps you out of the ICU," Lamont said.
Juthani and Silard said mutations of the virus also may be helping: Over time, viruses tend to become more contagious, but less virulent.
"And that is what we are hoping with this virus, that we're seeing more, but that is going to impact us a little less," Silard said.
The experience here, in a hospital that serves lower Fairfield County and Westchester County, is likely a harbinger of what's to come. State officials are nervously watching rising cases to the south in New York and New Jersey.
"We've seen throughout this pandemic, that generally what happens there eventually makes its way to us, which is why we really need people to do the things they know they can do right now, and those mitigation measures of wearing your mask, staying home as much as possible," Juthani said. "If you are able to telework, I think that's a good thing to do right now."
Connecticut has a mask mandate in the schools. Whether to mandate masks in indoor public spaces, as recommended by health officials, is left up to local officials in the state. Simmons, the newly elected mayor, has issued a mask mandate.
Juthani was asked if it is time for a statewide order. Rather than answer, she looked to the governor and stepped away from the microphones. Lamont stepped forward and answered the question.
"I don't think so," the governor said. "I think overwhelmingly people in Connecticut are doing the right thing. They're wearing the mask."
Lamont, who has mandated vaccinations for state employees, teachers and health workers, said he wished to avoid the further politicization of public health measures.
"I don't want to put a lot of counter pressures on and rebellion and people fighting back against it," Lamont said. "I urge everybody wear the mask when you're indoors. I'm getting N95 masks available to anybody, so no questions asked. I think we're on the right track right now."
The pandemic is both a political and public health challenge.
Lamont was overly aggressive last week, announcing the distribution of self-testing kits, then suffered an embarrassing delay when the shipment did not come through. Distribution began over the weekend, and Stamford's mayor, a fellow Democrat and ally of the governor, was quick to offer praise.
"I just want to thank the incredible effort yesterday, where we distributed 20,000 at-home tests to Stanford residents. It was an efficient and smooth operation. I want to thank the governor for his leadership," Simmons said.
U.S. Sen. Richard Blumenthal, a Democrat who will be on the ballot this year with the governor, also emphasized what the Lamont administration delivered.
"The governor really deserves a lot of credit for stepping forward, aggressively seeking more tests and his tremendously important efforts need to be matched by the federal government," Blumenthal said.
The Biden administration has promised 500 million tests by month's end.
Sen. Tony Hwang, R-Fairfield, a member of the legislative committee that oversees the governor's emergency pandemic orders and the only Republican elected official to speak, was more measured.
"I want to acknowledge the effort that we made to address testing and the increased capacity," Hwang said. "I am here to offer my support to the governor and to the legislative branch."
Tagged: COVID-19, COVID-19 Mask Mandate, Fairfield County, mandates, Ned Lamont, testing
Mark PazniokasCapitol Bureau Chief
mpazniokas@ctmirror.org
Mark is the Capitol Bureau Chief and a co-founder of CT Mirror. He is a frequent contributor to WNPR, a former state politics writer for The Hartford Courant and Journal Inquirer, and contributor for The New York Times.
More by Mark Pazniokas


Posted April 23rd, 2019 by Brooks Lindquist & filed under Blog, Workout of the Day.
Posted April 22nd, 2019 by Brooks Lindquist & filed under Blog, Workout of the Day.
Posted April 21st, 2019 by Brooks Lindquist & filed under Blog, Workout of the Day.
Posted April 18th, 2019 by Brooks Lindquist & filed under Blog, Workout of the Day.
Posted April 17th, 2019 by Brooks Lindquist & filed under Blog, Workout of the Day.
Posted April 16th, 2019 by Brooks Lindquist & filed under Blog, Workout of the Day.
Posted April 15th, 2019 by Brooks Lindquist & filed under Blog, Workout of the Day.
Posted April 14th, 2019 by Brooks Lindquist & filed under Blog, Workout of the Day.
Posted April 11th, 2019 by Brooks Lindquist & filed under Blog, Workout of the Day.
Posted April 10th, 2019 by Brooks Lindquist & filed under Blog, Workout of the Day.


If you're curious as to what exactly Costa Rican cuisine is like, check out this post. We included 15 of our favorite Costa Rican dishes on there and recommendations for our favorite sodas. Since Yeison is Costa Rican, I've had the privilege to try a lot of Costa Rican dishes that most tourists don't get to so I'll also include recommendations for where to get them.
But if you want to try traditional Costa Rican dishes, then you must go to a soda (what Costa Ricans call local restaurants). There you will find only local Costa Rican food and one good thing about eating at a Costa Rican soda is that it's usually much cheaper than eating at a touristic restaurant!
Chifrijos are the ultimate Costa Rican bar food. It's basically a bowl of rice, beans, pico de gallo, chicharrones (fried pork) and guacamole. They usually serve this at every local bar and though it may not be on the menu (there are some patent laws regarding the name), you can ask the waiter.
Pair the chifrijo with an Imperial beer (or a shot of chiliguaro) and you basically have Costa Rica in one meal! Our favorite places to go for a chifrijo are at the Posada de la Brujas restaurant in San Jose (it is called a patrulla on their menu), Isagas Bar in Jaco and Bar Villa Costa in Villarreal. I recommend going to a local bar though, most tourist bars don't have them.
Olla de carne is one of the few soup dishes they eat here. It's a very simple but hearty and healthy soup with beef, yucca, corn, green plantain, taro, yam, carrot and potato.
Only local restaurants have olla de carne but not all of them have it every day. Since this soup is known as "hangover food" and takes awhile to make, restaurants usually only make them once a week. Our favorite places for olla de carne is Soda Sabor Tico in Monteverde and the Parada de Bus in La Fortuna. The soup in the photo is from Las Delicias del Maiz in Alajuela. They all have them every day.
You can try to make this at home with our Costa Rican olla de carne recipe.
Caracolitos in Spanish are the small pasta shells and Costa Ricans make a tuna pasta salad with them. It's more like a side dish rather than a main dish and I like to get it when I don't feel like rice.
If you go to a soda that is buffet style, you will usually find ensalada de caracolitos.
Costa Rican tacos are not like Mexican tacos at all. They roll the tortilla with the filling and deep fry it.
They put shredded cabbage with ketchup and mayonnaise on top and it's usually filled with beef or chicken. You can find this in some sodas and it's usually under the fast food section.
Patacones are smashed fried plantains and they're probably one of the best things to eat in Costa Rica. You can order them with guacamole, pico de gallo or beans.
We usually order this as an appetizer and patacones are normally served with rice and beans on the Caribbean coast. The patacones in Puerto Viejo are amazing and we also had really good ones at Soda Tipica Las Palmas in Montezuma and Soda Tiquicia in Santa Teresa.
These are Costa Rican corn pancakes that are eaten as a snack or for breakfast. These are delicious paired with coffee as they are normally made sweet or you can eat it with natilla like the picture above, a type of sour cream.
Chorreadas is like a pancake but made with ground corn which you pan fry until it turns a crunchy golden brown. We've had good ones at Soda Sabor Tico in Monteverde but they are not usually on menus so you can ask the waiter.
Churchills were invented in Puntarenas and this is a must if you love sweets. It's a more intense variation of the Costa Rica copo with ice cream with kola syrup, condensed milk, powdered milk and barquillos (the straw cookies).
You can also try a copo or granizado which is the same thing without the ice cream. You can find them in every beach town and most cities.
Rice and beans are from the Caribbean side of the country, making it completely different than the typical gallo pinto breakfast dish. The locals use coconut milk in the rice and beans, pair it with patacones and slow cooked chicken or fish.
Add a bit of the Caribbean hot sauce and you have one of the best things to eat in Costa Rica. Our favorite place for rice and beans is Soda Lidias in Puerto Viejo.
If you love rich soups, then you must try crema de Pejibaye. Pejibaye, or peach palm is a type of fruit native to Central America. It kind of looks like a really small coconut but the inside is a soft, kind of grainy fruit that tastes a bit like sweet potato.
They make this into a cream soup so it's quite rich but full of nutrients as pejibaye is very healthy.
This is the Costa Rican version of pickled vegetables. You can find this in nearly all sodas and if you don't see one on your table, ask your waiter. Each soda makes their own so they're always different but if you like the pickled/vineger flavor, you'll love the chilera!
They usually use onions, cucumbers, carrots, cauliflower and Panamanian peppers. Most sodas make their own chilera.
A Costa Rican gallo is kind of a snack and it is very common in barbecue restaurants. It is basically a tortilla with a meat, either beef, pork or chicken but they also have them with beans and cheese.
A very popular place for gallos is Betico Mata in Turrialba.
Ceviche de banano verde is made with green banana, lettuce, onion, celery, sweet pepper and lime juice. It's eaten as an appetizer and you can eat it with chips.
This is an excellent dish for vegans as it's made with green bananas, onions, celery and other veggies. We had this one at Danta Corcovado Lodge.
Another Caribbean dish to try is rondon, a rich coconut milk soup with fish and veggies like corn, yuca, Panamanian pepper and potato.
This is a hearty soup, perfect for rainy days in the Caribbean. You can find this at all the local restaurants in Puerto Viejo, the one at Selvin's was really good.
Trits is a type of ice cream made from the Costa Rican company Dos Pinos who makes all sorts of dairy products. It's originally an ice cream cookie and they just made an entire Trits flavor ice cream.
You can get Trits ice cream at any supermarket or small grocery store. It's so good!
Costa Rican empanadas are another one of our favorite fast food snacks. They fill the empanada with meat and stuff it with cabbage.
Rainforest Cafe in La Fortuna is one of our favorite places for empanadas, they are huge!
Arroz con palmito is a Costa Rican rice dish that's not super common at restaurants but we have gotten it a couple times. It's rice with heart of palm. This hearty dish is topped with cheese and made with whole cream. Yeison loves this but he doesn't really like ordering it at restaurants, he prefers to eat it when his aunts make it.
This isn't really a dish since it's a dessert but I couldn't leave this one out. Spoon is a chain of restaurants and they make their own desserts and pastries. Their chocolate cake is one of my favorite cakes.
I'm not a huge fan of frosting but I love theirs. It's thick and gooey and their cakes are always good but the chocolate is the best! You can buy Spoon cakes at supermarkets like Auto Mercado or Mega Super.
I certainly can't talk about Costa Rican food without mentioning the three below. These are three of the most common, most traditional dishes of Costa Rica that you will find at every single local restaurant.
These two dishes are probably what you'll eat in Costa Rica the most as you can find them at every soda, or traditional restaurant. Gallo pinto, a mixture of rice, beans and chopped veggies is the signature breakfast food usually accompanied with eggs, toast, fried plantains, sausage and natilla (sour cream). Some Costa Ricans prefer tortillas instead of toast.
Pair that with a cup of coffee and you got yourself a super traditional Tico breakfast! You can get our Costa Rican gallo pinto recipe here.
The casado, translation "married" is a typical dish for lunch or dinner. It's like a smorgasbord plate but typically comes with rice, beans, a meat, a salad and fried plantains/tortilla/cheese.
The reason why these two main dishes are quite heavy is because most of the Costa Ricans back in the day were farmers or coffee pickers so they needed a lot of energy to work.
This is a fairly popular Costa Rican dish and just as common as casados. Rice and chicken, mixed with vegetables normally accompanied with salad and fries. This rice and chicken was one of the best I ever ate with heart of palms in the salad, one of our favorites.
You can get our Costa Rican rice with chicken recipe here if you want to try to make some at home!
If you're vegetarian, you can ask for a vegetarian casado or vegetarian rice. You can read more tips on eating vegetarian in Costa Rica here.
Read more about Costa Rica below!
who knew the same food eaten all over the world could be made to taste so differently and mouth watering. "Patacones" a delicacy in my country but known by another name and prepared differently..
I'm a tica living in UK and I love our cusine!
I am a tica living in California. I just went back to Costa Rica for three weeks to visit family and friends. The food… my favorite. These recipes are great and there are so many more! Picadillo de plátano verde, picadillo de chayote with corn. Mayonnaise from Costa Rica is the best, made by Lizano. Costa Rican pozol is outstanding. To me, it's the best food. And when you go to the Caribbean… the food is soooo good! The rice and beans made with coconut milk, its delicious!
Great article that shows that Costa Rica food is definitely not just rice and beans! I didn't know about the Churchills, seem very yummy!!!
One of my favourite foods in Costa Rica is Sopa de Pollo. It is so hot (not spicy–just temperature), it is definitely hard to eat on a hot day. It was always served with a bowl of rice. I would take the solids out of my soup, put them on the pile of rice until they cooled off, eat them, and maybe when I was done that, I could handle drinking the still hot soup broth. I just loved all the cilantro in it–it tasted so fresh! Also, I am sure their soup broth must be made from free range chickens–isn't that all they have in CR? I am recalling the roosters that kept waking me up all night in Brasilito…..they are beautiful to look at, but at night….I'd be strangling them and making soup too!
My next favourite was pork kebabs made on BBQ's on the street. Oh my goodness! If you could get me a recipe for those–I would be eternally grateful!
This information really helps for my project!
All these dishes look delicious!
Hi, My brother is a Doctor and he graduated from the UNIBE. Thanks for reading our blog!
I miss all of my foodand these pictures reminded me how I love my country..I miss the beaches and of course the tacos ticos!!!!
My step dad is Costa rica and he told me all about. I would love to go there some day. He taught me and my mom some of the spinach and some of the food it is amazing!!
Saludos Eugenia! Si esos churchills son buenísimos pero con uno ya es suficiente para un año por la cantidad de azucar. Donde sea que estes te deseamos lo mejor. Pura vida!
Costa Rican ceviche. I was accustomed to Mexican ceviche from the Pacific coast (differs somewhat by region from north to far south) and Peruvian ceviche. In 7 years living in Costa Rica I've tried a lot of ceviche. There is an unusual twist to it unlike what I was previously accustomed to. Often made my own from super fresh Pacific ocean fish, or a variety of fresh mariscos (non fin fish seafoods). Took a couple of years to learn what the difference is (as I learned Spanish). Ginger ale, or sometimes Fresca or some similar citrus soda pop in addition to jugo de limón (lime juice). As a former chef, this first struck me as strange, but I have to hand it to them……….. They've nailed it!
I recommend Marios or Gingers but there are quite a few good ones in Hermosa.
Where would you eat in Playa Hermosa?
Those corn pancake/tortilla things look really yummy.
They are really delicious when they're well done!
I would gladly try one of each, eheheh! I just have to get to Costa Rica first (it is one of my longed-for long destinations).
Thanks for sharing, and for the great photos!
Most of these dishes remind me of Colombian food, which is very similar, I suppose due to the close proximity of the countries! The deserts are definitely more appealing in my opinion 🙂 We had to carry a bottle of chilli sauce with us, as the flavours are not very apparent in a lot of the food!
Yeah for sure! Latin American countries I feel like have similar foods, though Panama was completely different. Haha I started doing that too except I brought Siracha!
uhhhmmmm the tacos got me all hungry. I just love wraps and fried stuff in general AND i'm a muncher… perfect for me. Reminds me a little of what the Tunisians called Brik, a wrap of all kind of things, deep fried and served with a sprinkle of lemon or lime on top.
The Patacones con Guacamole looks great and I know I like the Mexican variation. So I would love to taste the Costa Rica variation as well. So do the Costa Ricans not use much spices in their food?
Definitely! Patacones are one of my favorites! No not really, they use basic condiments and a few sauces like their signature Salsa Lizano and some others but compared to other cuisines, it is not as flavorful.
Huge mistake reading this whilst hungry! They all look so good, I would try them all.
Thanks for a very mouth-watering post! It's interesting seeing the differences from Mexican food. I like Costa Rica's take on the taco!
Love Costa Rican food & Latin American food in general.
We Salvadorans eat almost the same Ticos do, except that the meals have different names!
Ah those patacones and guacamole look so good!
Now i've to go get a snack lol!
Yum! These all look so delicious! Great t know there's some variety of food there. Interesting what comes with their tacos. We call those taquitos here in SoCal. The patacones con guacamole looks so good. I don't think I've ever had plantains with guac before.
It's so funny, I had taquitos before in the States but always associated it as Mexican food so when I saw it and Costa Ricans call it their taco, well it's essentially like little taco! But delicious nonetheless. You'll have to try plantains with guac, the combination is delicious! I never had plantains before either until I moved down, it's not very common in WA!
Oh I haven't tried pancakes their pancakes! That'll be something to look forward to when we go to Guatemala. haha I would send you some but don't think they'll make it all the way other there!
I'll take that chicken and rice first..and then slowly make my way around that table.
That should be the next invention, scratch and sniff computers 🙂 Thanks Noel!
Ooh, I want a churchill! And I love arroz con pollo. It's hard to imagine getting bored with Costa Rican food!
Hi Sammi, when I was in CR I had a lot of rice and beans but I didn't mind because they were delicious that I didn't get sick of it. I don't eat meat so I didn't much option anyway. That chorreadas looks yummy. I would like to try it next time I visit which I hope will be soon. My husband who's more food adventurous would love to try all the dishes you featured here. He hasn't been to CR but is now inspired to visit soon.
They're all pretty delicious! And a good variety. I hope you guys come, you'll have lots of fun! 🙂 Thanks Marisol!
I would but I actually don't like cheese 😀 so meat is good for me! Thanks for commenting!
great pics, making me hungry!!! i think taco is my favourite of all these but i did love costa rican food – even gallo pinto!!
I love the taco too, one of my favs! Thanks for commenting Clayton!
Right, I'm definitely down for some patacones with guacamole and a few chorreadas. I think I may have become a diabetic just by looking at those churchills though… Good luck!
Would have a plate of patacones con guacamole right now. Or just any day of the week. And then I would have some chorreadas. And then some more patacones. I love food.
Starting each day with a heap of patacones was one of my favorite memories of Panama – glad to see the Ticos use the same word! Also, thanks for the tip on the distinction in Nicaragua.
No problem! I personally was in this awkward situation where the Nicaraguans thought I was asking for ticks but they know the distinction so we just laughed it off haha.
Aw I can't imagine not eating guacamole or avocados now, it's a staple part of my diet! I'd miss it a ton too!
They all look good but the Olla de carne is right up my alley.
This looks delicious, especially the taco. Really looking forward t heading down to Costa Rica (eventually), will be trying some of these beauties!
Nice post. I'm a Tica and I've been reading your blog for a while now, it's pretty good read. I know ceviche is not a Costa Rican dish per se, but it's as common as ordering arroz con pollo for lunch. Just thought I'd mention it. Costa Rican tamales as well. Aguadulce is another pretty common beverage.


text:
# Bonfire Models

Keeping with the MVC spirit, Bonfire uses Models to allow you interact with your database in a simple, consistent manner. By using the **BF_Model** as the base class for all of your models, you can very quickly setup a simple model capable of finding records, creating new and editing existing records, deleting records, checking if a key/value is unique in this table, counting the results, and more.

BF_Model acts as a middleman layer between your models and CodeIgniter's standard Model class, working hand-in-hand with ActiveRecord query builder. If you don't need any special queries, your can have a working model in just a handful of lines.

**Sections**

* [Skeleton File](#skeleton)
* [Selecting Data](#selecting)
* [Inserting Data](#inserting)
* [Updating Data](#updating)
* [Deleting Data](#deleting)
* [Utility Methods](#utility)
* [Return Types](#returns)
* [Chainable Methods](#chainable)
* [Exending the Model](#extending)
* [Observers](#observers)
* [Data Validation](#validation)

### Is it an ORM?

BF_Model is not an ORM. While ORM's have their place, Bonfire does not ship with one included.

## A Skeleton Model

To get started with a new model, you can use the following skeleton file:

    class X_model extends BF_Model
	{
        protected $table_name	= '';
        protected $key			= 'id';
        protected $soft_deletes	= FALSE;
        protected $date_format	= 'int';
        protected $log_user		= FALSE;

        protected $set_created	= TRUE;
        protected $created_field	= 'created_on';
        protected $created_by_field	= 'created_by';

        protected $set_modified		= FALSE;
        protected $modified_field	= 'modified_on';
        protected $modified_by_field = 'modified_by';

        protected $deleted_field    = 'deleted';
        protected $deleted_by_field = 'deleted_by';

        // Observers
        protected $before_insert    = array();
        protected $after_insert     = array();
        protected $before_update    = array();
        protected $after_update     = array();
        protected $before_find      = array();
        protected $after_find       = array();
        protected $before_delete    = array();
        protected $after_delete     = array();

        protected $return_insert_id = true;
        protected $return_type      = 'object';
        protected $protected_attributes = array();
        protected $field_info           = array();

        protected $validation_rules         = array();
        protected $insert_validation_rules  = array();
        protected $skip_validation          = false;
        protected $empty_validation_rules   = array();
    }

This is the bare minimum needed to take advantage of BF_Model's built-in functions. All variables shown here are set to their default, so you don't need to show them if you are using the default values.  Model_name is the name of your class and follows the same rules as [CodeIgniter models](http://codeigniter.com/user_guide/general/models.html).

BF_Model supports quite a few ways to customize how your class works with the database.

### `$table_name`

The var `$table_name` should be set to the name of the table in your database. If you database is set to use a prefix (Bonfire defaults to a `bf_` prefix), you should leave the prefix off. So a table named `bf_users` should be entered as `users`.

### `$key`

The var `$key` should be the name of the primary key for your table. BF_Model requires that your table has primary key. If it doesn't you should extend Model and will need to write your own methods to interface with the database. The `$key` is expected to be linked to an INT field.

### `$soft_deletes`

Bonfire uses the concept of *soft deletes* that will set a flag that an item has been deleted instead of actually deleting the item. This allows you to later restore the user in case the deletion was accidental, or to keep a permanent record of any sensitive information, like transaction records.

To use soft_deletes, your table must have a `deleted` field that is a **TINYINT (1)**. A value of `0` means the record has not been deleted, while a value of `1` shows that the item has been deleted.
The name of the `deleted` field may be modified by setting `$deleted_field`.

If `$soft_deletes == TRUE`, Bonfire will automatically update the record to set `deleted` to a value of `1`.

If `$soft_deletes == FALSE`, the record will be permanently deleted from the database.

### `$date_format`

Determines the type of field that is used to store created and modified dates. The possible values are:

- 'int' - A Unix integer timestamp. (This is the default)
- 'datetime' Is a MySQL Datetime field. ( YYYY-MM-DD HH:MM:SS )
- 'date' is a MySQL Date field. ( YYYY-MM-DD )

While 'int' seems to be one of the most common amongst PHP developers, datetime should be at least considered since it makes inspecting your data within the database much easier to interpret, though it does take a little bit more work during the script execution.

### `$set_created`

Bonfire can automatically set your created on dates and times for you, in the format specified through `$date_format`. To use this, your table must have a `created_on` field of the proper type.

If `$set_created == TRUE`, Bonfire will set the `created_on` field value for you at the time of an `insert()` call.
The name of the `created_on` field may be modified by setting `$created_field`.

### `$set_modified`

Bonfire can automatically set your modified on dates and times for you, in the format specified through `$date_format`. To use this, your table must have a `modified_on` field of the proper type.
The name of the `modified_on` field may be modified by setting `$modified_field`.

If `$set_created == TRUE`, Bonfire will set the `created_on` field value for you at the time of an `insert()` call.

### `$created_field` & `$modified_field`

`created_field` and `modified_field` specify the name of the field that the time is inserted into. Defaults to *created_on* and *modified_on*.

### `$log_user`

`log_user` provides a way to keep a small activity trail of actions related to each record.  When TRUE, it will populate a field in the record with the user id. This applies to the `insert`, `update` and `deleted` commands, and their related methods, like `update_by`.

The name of the fields to store the user id in can be set by changing the `created_by_field`, `modified_by_field` and `deleted_by_field` values. They default to `created_by`, `modified_by` and `deleted_by`, respectively.

### `$deleted_field` & `$deleted_by_field`

`deleted_field` and `deleted_by_field` specify the name of the fields used to determine whether a row has been deleted (when `$soft_deletes` == true) and the user which deleted the row (when `$log_user` == true).

### `$escape`

When FALSE, the `select()` method will not try to protect your field names with backticks. This is useful if you need a compound statement.

### `$db_con`

Holds the database connection details for this model only. Can be either a string or an array as per the [CodeIgniter manual](http://codeigniter.com/user_guide/database/connecting.html). This is useful if you have a single model that needs to use a database connection different than the rest, like a logging class.

### `$return_type`

Specifies whether the model returns records as an object or an array. The only valid values here are `object` or `array`.

The format can be overridden on a per-call basis using the `as_array` and `as_object` methods.

    $user = $this->user_model->as_array()->find($id);

### `$protected_attributes`

This is simply a list of keys that will always be removed from the data arrays passed to the insert, update, and similar methods. This is convenient if you like to throw your $_POST arrays directly at the model, but don't want the 'submit' inputs being saved, or for always removing the 'id' if it's passed in.

    protected $protected_attributes = array( 'submit', 'id' );

### `$field_info`

This is an array of field definitions which may be used (in combination with `prep_data()`) to define the model's interaction with the database. If `field_info` is empty, the model will query the database to fill this array when using `get_field_info()`. The `field_info` array could also be used by a controller to help map post data to the fields in the model. See CodeIgniter's `$this->db->field_data()` [http://www.codeigniter.com/user-guide/database/fields.html](http://www.codeigniter.com/user-guide/database/fields.html)

The field definition should be as follows:

    $field_info = array(
        array(
            'name'          => 'id',
            'type'          => 'int',
            'primary_key'   => 1,
        ),
        array(
            'name'          => 'field_1_name',
            'type'          => 'varchar',
            'default'       => '',
            'max_length'    => 255,
        ),
    );

## Provided Methods

By using the skeleton file, you get a number of methods ready to use on your model. All of these methods can be overriden in your own model if you need to customize them by joining other tables, processing the results before handing off to the controller, etc.

    $user = $this->user_model->select('id, username, email')
                             ->where('deleted', 1)
                             ->limit(10,0)
                             ->find_all();

If you need to do additional processing, join tables, etc than you can do that in your model using CodeIgniter's built-in ActiveRecord commands.

    class User_model extends BF_Model {
        public function find_all()
        {
            $this->db->join(...);
            return parent::find_all();
        }
    }

## Selecting Data
### `find()`

The `find()` method is used to locate a single record based on it's `id`.

    $user = $this->user_model->find($id);

    echo $user->username;

Returns an object with the results if found, or `FALSE` if not found.

### `find_by()`

A convenience method that combines the `where()` and `find()` methods. Expects to return a single result, so you should search on a field that will have unique values.

    $this->user_model->find_by('email', 'darth@theempire.com');

This method can also be called with only a single associative array as the first parameter. This allows you set multiple criteria to search by.

    $user = $this->user_model->find_by( array('email'=>'darth@theempire.com', 'deleted'=>0) );

    # SQL: SELECT * FROM `bf_users` WHERE email='darth@theempire.com' AND deleted='0'

This defaults to combining all criteria as "AND" but can be modified by passing the the type into the third parameter:

    $user = $this->user_model->find_by( array('email'=>'darth@theempire.com', 'deleted'=>0), null, 'OR' );

    # SQL: SELECT * FROM `bf_users` WHERE email='darth@theempire.com' OR deleted='0'

### `find_all()`

Locates all records in the table.

    $this->user_model->find_all();

If you need to modify the search criteria you can use any of the chainable methods.

    $users = $this->user_model->where('deleted', 1)
                              ->limit(25)
                              ->find_all();

    foreach ($users as $user)
    {
        echo $user->username;
    }

Returns an array of objects where each object holds the results of a single record.

### `find_all_by()`

Locates all records matching certain criteria. This is a convenience method for using a `where()` and a `find_all()` in one command.

    $this->user_model->find_all_by('deleted', 1);

Any of the standard options available to a CodeIgniter `where()` method may be used here.

    $this->user_model->find_all_by('deleted', 1);
    $this->user_model->find_all_by('deleted !=', 0);
    $this->user_model->find_all_by( array('email'=>'darth@theempire.com', 'deleted'=>0) );

Returns an array of objects where each object holds the results of a single record.

## Inserting Data
### `insert()`

Creates a new record. Will set the `created_on` field if the model is setup to allow that. The first parameter should be an associative array of field/values to insert.

    $user = array(
        'email'     => 'dart@theempire.com',
        'username'  => 'darth.vader'
    );
    $this->user_model->insert($user);

    # SQL: INSERT INTO `bf_users` (email, username, created_on) VALUES ('darth@theempire.com', 'darth.vader', 1321645674);

Returns an INT ID of the new record on success, or `FALSE` on failure.

### `insert_batch()`

Allows for inserting more than one record at a time. Works just like CodeIgniter's stock method, but handles setting the table name for you.

    $data = array(
       array(
          'title' => 'My title' ,
          'name' => 'My Name' ,
          'date' => 'My date'
       ),
       array(
          'title' => 'Another title' ,
          'name' => 'Another Name' ,
          'date' => 'Another date'
       )
    );

    $this->db->insert_batch('mytable', $data);

## Updating Data
### `update()`

Updates an existing record in the database by ID. Will set the correct time for the `modified_on` field, if the model requires it.

    $user = array(
        'email'     => 'dart@theempire.com',
        'username'  => 'darth.vader'
    );
    $this->user_model->update($user_id, $user);

    # SQL: UPDATE `bf_users` SET email='darth@theempire.com', username='darth.vader', modified_on=1321645674 WHERE id=1;

Returns a boolean `TRUE/FALSE` on success/failure.

### `update_where()`

Updates a single record in the database by a key/value pair. Will set the correct time for the `modified_on` field, if the model requires it.

    $user = array(
        'email'     => 'dart@theempire.com',
        'username'  => 'darth.vader'
    );
    $this->user_model->update('is_father', 1, $user);

    # SQL: UPDATE `bf_users` SET email='darth@theempire.com', username='darth.vader', modified_on=1321645674 WHERE is_father=1;

### `update_batch()`

Updates multiple records with a single method call.

```php
  $data = array(
     array(
        'title' => 'My title' ,
        'name' => 'My Name 2' ,
        'date' => 'My date 2'
     ),
     array(
        'title' => 'Another title' ,
        'name' => 'Another Name 2' ,
        'date' => 'Another date 2'
     )
  );

  $this->model->update_batch($data, 'title');
```

The first parameter is an array of values. The second parameter is the where key.

## Deleting Data
### `delete()`

Deletes a single record from the database. If `$soft_deletes` are on, then will just set the `deleted` field to `1`. Otherwise, will permanently delete the record from the database.

    $this->user_model->delete($user_id);

    # SQL w/ soft deletes: UPDATE bf_users SET deleted=1 WHERE id=$user_id;
    # SQL w/out soft deletes: DELETE FROM bf_users WHERE id=$user_id;

Returns a boolean `TRUE/FALSE` on success/failure.

###  `delete_where()`

Deletes one or more records that match certain requirements. If $soft_deletes == true, will set the `deleted` field to 1, otherwise will delete the record permenantly.

The first parameter accepts an array of key/value pairs to form the 'where' portion of the query.

    $wheres = array(
        'active'    => 0,
        'last_login' => '< '. time()
    );
    $this->model->delete_where($wheres);

## Utility Methods
### `is_unique()`

Checks to see if a given field/value combination would be unique in the table.

    $this->user_model->is_unique('email', 'darth@theempire.com');

### `count_all()`

Counts all records in the table.

    $this->user_model->count_all();

Returns an INT containing the number of results, or FALSE.

### `count_by()`

Counts the number of elements that match the field/value pair.

    $this->user_model->count_by('delete', 1);

Returns an INT containing the number of results, or FALSE.

### `get_field()`

A convenience method to return only a single field of the specified row. The first parameter is the ID of the row to search in. The second parameter is the column to return the value of.

    $this->user_model->get_field($user_id, 'email');

Returns the value of the row's field, or FALSE.

### `get_created_field()`, `get_modified_field()`, `get_deleted_field()`, `get_created_by_field()`, `get_modified_by_field()`, & `get_deleted_by_field()`

Returns the names of the respective fields, or an empty string if the fields are not used by the model (based on the values of `set_created`, `set_modified`, `soft_deletes`, and `log_user`).

### `get_field_info()`

Returns the `$field_info` array, attempting to populate it from the database if empty.

### `prep_data()`

Intended to be called by a controller and/or extended in the model, `prep_data` processes an array of field/value pairs (can be the result of `$this->input->post()`) and attempts to setup a `$data` array suitable for use in the model's `insert`/`update` methods. The output array will not include the model's `key`, `created_on`, `created_by`, `modified_on`, `modified_by`, `deleted`, or `deleted_by` fields, or fields indicated as the primary key in the model's `field_info` array.

For example, the user_model extends prep_data to map field names from the view that don't match the tables in the database and ensure fields that should not be set are not set:

    public function prep_data($post_data)
    {
        $data = parent::prep_data($post_data);

        if ( ! empty($post_data['timezones'])) {
            $data['timezone'] = $post_data['timezones'];
        }
        if ( ! empty($post_data['password'])) {
            $data['password'] = $post_data['password'];
        }
        if ($data['display_name'] === '') {
            unset($data['display_name']);
        }
        if (isset($post_data['restore']) && $post_data['restore']) {
            $data['deleted'] = 0;
        }
        if (isset($post_data['unban']) && $post_data['unban']) {
            $data['banned'] = 0;
        }
		if (isset($post_data['activate']) && $post_data['activate']) {
			$data['active'] = 1;
		} elseif (isset($post_data['deactivate']) && $post_data['deactivate']) {
			$data['active'] = 0;
		}

        return $data;
    }

The User Settings controller then uses the model's `prep_data` method to process the post data before inserting/updating the user:

	private function save_user($type='insert', $id=0, $meta_fields=array(), $cur_role_name = '')
	{
        /* ... Omitting validation setup and gathering of user_meta data ... */

		// Compile our core user elements to save.
        $data = $this->user_model->prep_data($this->input->post());

		if ($type == 'insert') {
			$activation_method = $this->settings_lib->item('auth.user_activation_method');

			// No activation method
			if ($activation_method == 0) {
				// Activate the user automatically
				$data['active'] = 1;
			}

			$return = $this->user_model->insert($data);
			$id = $return;
		} else {	// Update
			$return = $this->user_model->update($id, $data);
		}

        /* ... Omitting saving user_meta data and event trigger ... */

		return $return;

	}//end save_user()

## Return Types

You can temporarily override the type of records returned by the model by using the folliwing commands. This allows you to use objects as a default since they consume less memory, but ask for the results as an array for a single method that you need the extra flexibilty arrays provide.

### `as_array()`

A chainable method that specifies the model should return the results as an array (for single results) or an array of arrays (for multiple rows). This overrides the models `$result_type` class variable.

### `as_object()`

A chainable method that specifies the model should return the results as an object (for single results) or an array of objects (for multiple rows). This overrides the models `$result_type` class variable.

### `as_json()`

A chainable method that specifies the model should return the results as a JSON object suitable for returning in AJAX methods. This overrides the models `$result_type` class variable.

## Chainable Methods

Thanks to CodeIgniter's [ActiveRecord](http://www.codeigniter.com/user_guide/database/active_record.html) library, it is very simply to modify the BF_Model's methods. This can be done through either chainable methods or by extending methods.

Chainable methods are a feature of PHP 5 and higher that allow you to return the results of one function into another, and to keep this 'chain' of events continuing through several functions. Bonfire duplicates several of the stock ActiveRecord methods in BF_Model to make it simple and elegant to customize your queries.

Bonfire's model supports chaining for most of the ActiveRecord methods available, including:

* select
* select_max
* select_min
* select_avg
* select_sum
* distinct
* from
* join
* where
* or_where
* where_in
* or_where_in
* where_not_in
* or_where_not_in
* like
* not_like
* or_like
* or_not_like
* group_by
* having
* or_having
* limit
* offset
* set

All of these methods accept the same parameters as their [CodeIgniter](http://www.codeigniter.com/user_guide/database/active_record.html) counterparts. These are included for the sole reason of making your syntax more expressive. You can now do things like:

    $this->user_model->where('city', 'Detroit')
                     ->or_where('city', 'Cleveland')
                     ->join('tour_dates', 'x on y')
                     ->find_all();

### `where()`

Modifies the query to a specific `where` condition. Can be used with any of the read-type queries (find, find_all, etc).

The first parameter is the field to match against. The second parameter is the value of the field to find.

Accepts any of the standard CodeIgniter ActiveRecord where statements.

    $this->user_model->where('email', 'darth@theempire.com');
    $this->user_model->where('email !=', 'darth@theempire.com');
    $this->user_model->where( array('email' => 'darth@theempire.com') );

    $this->user_model->where('email', 'darth@theempire.com')
                     ->find_all();

You can also pass an array of field/value pairs as the first parameter. In this case, the second parameter is ignored.

    $wheres = array(
        'active'        => 1,
        'deleted'   => 0
    );
    $results = $this->model->where($wheres)->find_all();

## Extending Methods

While it is possible to modify the query via the chainable methods any time you need results in your controller, it is highly recommended to extend the model's methods to bring you the results you need. This keeps all of your changes to queries in a single place.

Sometimes, you might want to do some additional processing to the database results before passing it on to the controller. This is another perfect example of when to extend the model's method.

To extend an existing method, you simply create a new method in your model that accepts the same parameters as the original BF_Model method.

    // Extend the existing functionality.
    public function find($id=null)
    {
        $result = parent::find($id);

        if ($result)
        {
            $result->display_name = $this->format_name($result);
        }

        return $result;
    }

## Modify Query in Controller

You can modify a query in your model for a single use by using CodeIgniter's ActiveRecord commands in your controllers. Since BF_Model uses the ActiveRecord commands, the changes in your controller will affect the results of the next query in your model.

    // In your controller.
    $this->db->join('other_table', 'link_field = users.id', 'left');
    $user = $this->user_model->find($user_id);

## Observers

Observers provide a simple and convenient method for your models to change portions of the data at certain execution points within a model's interaction. This can be very handy for adding in the created_on time before inserting a record, or deleting related records in other tables whenever a user is deleted.

The following events can be observed by your class:

- before_insert
- after_insert
- before_update
- after_update
- before_find
- after_find
- before_delete
- after_delete
- empty_validation_rules

These are each arrays that should have the name of the methods to call, in order of priority as the array's elements.

    protected $before_insert = array('set_created_on', 'another_callback');

To observe an event and have your methods called you simply add the method name to the definition array and create a new function.

    protected function set_created_on($row)
    {
        if (!array_key_exists($this->created_field, $row))
        {
            $row[$this->created_field] = $this->set_date();
        }

        return $row;
    }

Each observing method must accept a single parameter. Depending on the event triggered, this might be a single INT, or an array of values, etc. Check the function to verify what the payload being passed along is for the event you're observing.

The following table lists what data should be expected during each observer. Note that the *_batch or *_many may exhibit slightly different behaviour. You should familiarize yourself with code for each if you need special triggers for these situations.

Trigger                 | Type          | Description
------------------------|---------------|-------------------------------------------------
before_insert           | array         | The values to be inserted in the new record
after_insert            | mixed         | The primary_key of the row just inserted.
before_update           | array         | The values to be updated. Does NOT include the primary key.
after_update            | array         | The data that was inserted (including any modifications made in before_udpate).
before_find             | mixed         | The primary_key of the row to find.
after_find              | array/object  | The found object/array (depends on the specified return type for that model)
before_delete           | mixed         | The primary_key of the row to be deleted.
after_delete            | mixed         | The primary_key of the row that was just deleted.
empty_validation_rules  | array         | An array of temporary validation rules.

## Validating Data

The model should contain all of the validation rules for your data so that it is always kept in a single place with the model that represents it. Bonfire's models provide a simple way to automatically have your data validated during inserts and updates.

### Basic Validation

The `$validation_rules` variable can take an array of data that follows the same format as CodeIgniter's [Form Validation Library](http://www.codeigniter.com/user-guide/libraries/form_validation.html#validationrulesasarray).

    protected $validation_rules = array(
        array(
            'field' => 'username',
            'label' => 'Username',
            'rules' => 'trim|strip_tags|min_length[4]'
        ),
        array(
            'field' => 'password',
            'label' => 'lang:bf_password',
            'rules' => 'trim|min_length[8]'
        )
    );

Note: the value of the `label` can be retrieved from a language file by prefixing the name of the entry in the language file with `lang:`, as in the example for the password field, above.

During an insert or update, the data passed in is automatically validated using the form_validaiton library. If the validation doesn't pass successfully, the insert/update method will return a value of FALSE and the form_validation_ library will function as expected, providing errors through `validation_errors` and `form_error`.

### Insert Rules Customization

Often, you will have certain rules that are slightly different during object creation than you will during an update. Frequently, this is as simple as having a field required during inserts, but not during updates. You can handle this by adding any additional rules for inserts in the `$insert_validation_rules` class variable.

    protected $insert_validation_rules = array(
       'password'   => 'required|matches[pass_confirm]'
    );

Unlike, the $validation_rules array, the $insert_validation_rules array consists of the field name as the key, and the additional rules as the value. Theses rules are added at the end of the normal rules string before being passed to the form_validation library.

### Skipping Validation

If you need to turn off validation for any reason (like performance durin a large CSV import) you can use the `skip_validation()` method, passing either TRUE or FALSE to the skip or not skip the validation process. This stays in effect as long as the model is loaded but will reset the next time the model is loaded in memory. Typically the next page request.

    $this->user_model->skip_validation(true);

    $this->user_model->skip_validation(true)->insert($data);

### Traditional validation using the Model's validation rules

If you wish to perform validation in the Controller (or another Model), you can retrieve the validation rules from the Model using the `get_validation_rules()` method, passing either 'update' or 'insert' to determine whether the `$insert_validation_rules` are added (you will probably want to disable the model's validation when calling the `insert()`/`update()` methods using the `skip_validation()` method or the model's `skip_validation` property). The rules may then be passed to CI's Form Validation library to perform validation:

    $this->form_validation->set_rules($this->example_model->get_validation_rules('update'));

    if ($this->form_validation->run() === false) {
        return false;
    }

### Generating validation rules

If you want to generate the validation rules in code (rather than supplying a hard-coded array), you can supply the name of a function to the `$empty_validation_rules` observer to generate the validation rules. The function will receive an array of the current validation rules (usually empty or a non-array value, but if multiple functions are used with the observer, it may be a valid array), and is expected to return an array of validation rules.

For instance, you could create a function that uses $this->db->field_data($this->table_name) to retrieve the field information directly from the database, then iterate through the results to create validation rules for each field based on the information returned by the database.

Because it is faster to use the array, the observer will not be called if the array has been set (and the array generated by the observer when it is called will be assigned to the array to prevent the current instance of the model from attempting to generate the rules again).