text:
12 Weight Loss Resolutions You Shouldn't Make
12/17/2013 08:44am EST | Updated December 6, 2017
By Dana Leigh Smith
Get this: 30 percent of all New Year's resolutions are broken before February, according to a poll by the time management firm Franklin Covey. "People tend to fall off the weight-loss wagon so quickly because their goals are unrealistic," says Toby Amidor, a registered dietitian based in New York City. "When people feel as though they've failed, they tend to throw in the towel for good instead of giving their resolution another shot." Here, four of the nation's top diet experts reveal common weight loss resolutions that almost always backfire.
1. "I want to lose 20 pounds."
"Dropping 20 pounds is a great long-term goal, but dieters tend to fall off track when they have such a lofty resolution," says Amidor.
Instead: Lose one pound per week.
"Instead of taking on such a big task, focus on losing one pound a week by setting small diet and exercise goals," suggests Amidor. "For example, resolve to pick skim dairy over whole and pledge to work out 30 minutes, three times a week. You'll be surprised how small tweaks can result in major change."
2. "I'm going to try the ________ diet."
Fill in the blank with any fad diet and you're doomed for failure. A typical diet-of-the-moment requires cutting out one or more major food groups, like fruits, grains or meats. That's simply unhealthy and can also prove overwhelming, says Amidor.
Instead: Eat lean protein and veggies at every meal.
A well-balanced and properly portioned eating plan that includes a variety of produce and lean meats (and the occasional sweet treat!) will always be the ticket to long-term weight loss, Amidor says.
3. "I'm going to stop eating at restaurants."
Nixing a night out with friends for the sake of your diet is no way to live, says Amidor. You'll only wind up frustrated and will be more likely to fall off the wagon.
Instead: Order smarter at restaurants.
"Before dining out, have 10 almonds or an apple so you don't arrive ravenous, and then start with a small salad," suggests Amidor. In a 2004 study published in the Journal of the American Diet Association, Penn State researchers found that women who started a lunch with a salad consumed up to 12 percent fewer calories than those who skipped the first course. "Choose a light appetizer as your entree and have the bread basket removed," says Amidor.
4. "I'm going to eat 900 calories a day until I lose the weight."
Sure, severely restricting your calorie intake will spur weight loss, but you'll gain it all back as soon as you start eating normally again (not to mention that starving yourself is dangerous). "This is often the attitude of yo-yo dieters, who go from a size four to a 12 and back again, seemingly overnight," says Amidor.
Instead: Develop a healthy eating plan with an RD.
If you're unsure how to lose weight the healthy way, consider making an appointment with a dietitian. "Many RDs now take insurance, so don't be afraid to ask if yours is accepted," says Amidor. The Academy of Nutrition and Dietetics has a registered dietitian referral service that allows you to search a database of practitioners across the nation.
5. "I'm going on a juice cleanse."
After a holiday binge, a detox may seem like a good idea, "but an all-or-nothing approach to weight loss will ultimately fail," says Lisa DeFazio, RD, a celebrity nutritionist based in Los Angeles.
Instead: Do a mini-cleanse.
Jumpstart your weight loss plan with a two-day, 1,200-calorie juice cleanse instead. "Replace breakfast and lunch with a fresh vegetable juice or a protein shake and eat a balanced dinner of whole grains, vegetables and a lean protein like chicken or fish," suggests DeFazio.
6. "I'm going vegetarian."
Losing weight requires burning more calories than you consume, but eliminating meat from your diet won't necessarily cut your calorie intake. "Newbie vegetarians sometimes gain weight because they are unaware of the hidden calories in vegetarian go-tos like cheese and pasta," warns DeFazio.
Instead: Reduce your meat intake.
"Lean animal proteins should take up no more than a quarter of your plate at each meal," says DeFazio. Fill the rest of your dish with whole grains, fruits and vegetables to fuel weight loss. You could also try swapping some of your meat with vegetarian protein sources.
7. "I'm quitting junk food."
"Cutting out indulgences may initially help you lose weight, but over time it will make you feel deprived and ultimately lead to bingeing," warns says Tanya Zuckerbrot, a registered dietitian based in New York City and founder of the F-Factor Diet.
Instead: Follow the 80/20 rule.
Many weight loss experts (like Jillian Michaels) recommend making 80 percent of the calories you consume healthy, and saving the remaining 20 percent for what may otherwise be considered diet no-nos.
8. "I'm going to cut calories by skipping breakfast."
Research shows that foregoing a morning meal will put you on the fast track to weight gain, not loss. In a study published in the European Journal of Neuroscience, for example, participants who skipped breakfast were hungrier and more likely to indulge in fattening foods later in the day.
Instead: Eat a protein-packed breakfast every morning.
Eating a filling breakfast lessens the chances of bingeing on junk later in the day, says Zuckerbrot. "Pair lean proteins with high fiber, complex carbs -- think a veggie omelet with a slice of whole-wheat toast or Greek yogurt with fruit and a tablespoon of nuts -- to keep hunger at bay and ward off craving all day long."
9. "I won't eat after 9 p.m."
"There is no rule of thumb on what time to stop eating," says Zuckerbrot. "The body stores any calories that aren't used for energy regardless of the time those calories are eaten."
Instead: Sleep at least seven hours a night.
People who skimp on sleep are more susceptible to weight gain, according to a University of Pennsylvania study published in the journal Sleep. Researchers believe that sleep-deprived people tend to consume more calories daily than those who get a full night's rest.
10. "I'm going to get more exercise."
"This resolution isn't specific enough to be successful," says Jim White, a personal trainer and registered dietitian in Virginia Beach, Va.
Instead: Commit to a set number of weekly workouts
Fitness newbies should start with one weekly workout that combines cardio and weight training, like a body sculpting class or a session with a trainer. After three weeks, build up to two weekly workouts, and over time aim for five workouts a week. Progressing slowly wards off injury and excessive soreness that may prevent or deter you from sticking to your exercise program.
11. "I'm going to do yoga four times a week."
While yoga is a valuable part of any fitness routine, it probably won't help you lose much weight. "A typical hour-long session only burns about 200 calories," notes White.
Instead: Try a variety of workouts.
In addition to yoga, include a variety of heart-pumping workouts like walking, weightlifting, cycling, or Zumba in your fitness program to accelerate weight loss, suggests White. You could also mix things up with this workout that integrates hand weights into a yoga routine.
12. "I'm going to the gym for two hours every day."
Working out two hours a day is not only boring, but it can also cause injury in newbies who aren't used to being physically active, warns White.
Instead: Do efficient workouts.
Trade in long sweat sessions for high intensity, 30-minute interval workouts -- you won't burn out as quickly and you'll actually torch more calories than doing long, drawn-out workouts," says White. Plus, researchers from the University of Western Australia found that interval training helps suppress post-workout appetite, further accelerating weight loss.
More from Health.com:
28 New Year's Resolutions to Look and Feel Better
Top 10 Healthiest New Year's Resolutions
Weight Loss Resolutions You Shouldn't Make originally appeared on Health.com
Weight Loss Success Stories
healthy livinglose weightnew year's resolutionshealthy resolutionsresolutions


text:
El Torneig de les Cinc Nacions de 1973 fou la 44a edició en el format de cinc nacions i la 79a tenint en compte les edicions del Home Nations Championship. Deu partits es van jugar entre el 13 de gener i el 14 d'abril. Per primera vegada, i única en el format de cinc nacions, tots els equips van guanyar els seus partits com a locals, cosa que va suposar un empat entre les cinc seleccions. Com el reglament no disposava de cap element per desempatar, es van considerar com una victòria compartida per a cada un dels equips.

A causa dels disturbis ocorreguts a Irlanda, que havia donat lloc a la pèrdua de més de 100 soldats britànics l'any 1972 i els riscos potencials, tant Escòcia com Gal·les es van negar a jugar contra Irlanda a Dublín. Desafiant les expectatives en contra, Anglaterra si que va accedir a viatjar.

Classificació

Resultats

Referències

Competicions esportives del 1973
1973

redpajama_set_name: RedPajamaWikipedia


text:
RRT JOBS
ALLIED JOBS
MD JOBS
RN - Orthopedics, Plastic Surgery, & Chronic Pain - Riyadh, Saudi Arabia
The King Faisal Specialist Hospital and Research Center (KFSH&RC) is a modern, 1,000+ bed Joint Commission International (JCI)-accredited academic medical facility located in Riyadh, the vibrant capital city of Saudi Arabia.
There are 34 beds on this unit specifically designated to Orthopedics, Plastic Surgery and Chronic Pain Service patients. C-2 provides nursing care primarily to adult and pediatric patients with malignant and/or congenitally related diseases.
Types of Patients:
Adult/Pediatric Orthopedic, e.g., joint replacements, tumour resections, soft tissue releases, scoliosis (anterior and posterior resections), brachial plexus repair, spinal cord stimulator insertion, adult spine surgery, osteogenesis imperfecta, minimally invasive surgical procedures for adult spine, sports injuries (e.g., knee/shoulder arthroscopy)
Plastic Surgery, e.g., abdominoplasty/liposuction, breast augmentation/reduction/mammoplasty, pressure sore management, serial burn reconstruction, hemangioma debulking, septorhinoplasty, tissue expanders, cleft lip/palate repair, congenital defect repair (e.g., syndactyly), flaps/grafts for microvascular procedures, tendon transfer, VAC therapy for complex wounds
Applicants with a Bachelor's degree in Nursing must have a minimum of two years experience
Applicants with an Associate's Degree or Diploma in Nursing must have a minimum of four years experience
Current nursing (RN) license
Must have a minimum of two years current experience as an RN on a similar unit at a large tertiary-care hospital.
At this time, the hospital can consider only FEMALE applicants.
12-month renewable contract
Single-status contract
Accommodations provided
Return airfare
More than 7 calendar weeks of vacation
Interested in working in the USA?: We have positions in the USA for RNs educated in the Philippines and in other countries.
To apply to this job please fill out the form below, email your resume to hza@hziegler.com or call us at 1-800-387-4616. If you have already applied for a job with us, you only need to enter your email address.
Upload Resume:
If you don't have a resume, just leave this field blank.
Jobs Email: Yes No
Can we email you future jobs as they are posted?
Jobs Email: Can we email you future jobs as they are posted?
To apply to this job please email your resume to hza@hziegler.com or call us at 1-800-387-4616.
RN - VIP Unit (medicine/surgery)
RN - Neurology
RN - Medicine/Surgery
RN - VIP (Medical/Surgical)
RN - General Surgery
RN - ENT/Dental/Ophthalmology
King Faisal Specialist Hospital, Riyadh
The King Faisal Specialist Hospital & Research Centre, Riyadh, with 1,000+ beds, is the most high acuity tertiary-care centre in the entire Arabian Peninsula. Opened in 1975, it is constantly expanding and updating its facilities and services, and has the latest in technology and treatment methods.
The hospital specializes in the treatment of, and research in, cardiology, oncology, organ transplant, and genetic diseases.
The capital city, population about 5 million and expanding into the surrounding desert at a rapid pace. Has extravagantly fanciful buildings, malls, and towers.
The social life for Westerners is enriched by events at the foreign embassies in the city. After people acclimatize to the heat, they play sports: golf, tennis, hockey, soccer, sand-board.
Saudi Arabia, population of approximately 34 million (2020 est.; 62% Saudis, 38% expatriates), with mountains and the Red Sea on the west coast, the Arabian Gulf on the east coast, and the Empty Quarter in the middle.
Mecca and Medina, the two most holy cities in Islam, are located north of Jeddah. The country's majority religion is Sunni Islam. Common recreational activities pursued by Westerners: desert camping, swimming and diving in the Red Sea, running, tennis, hiking in the mountains. more
Copyright (C) 2021 Helen Ziegler and Associates. All rights reserved.

redpajama_set_name: RedPajamaCommonCrawl


Today is March 26, 2018, and the PMI has migrated the PMP exam to the 6th edition of the PMBOK Guide, and so the PMP Question Bank has also been updated to reflect the change. In this edition, the PMI has changed around 10% to 15% of the content and therefore, the same percentage of questions has been updated in the new version of the PMP Question Bank.... PMI PMP Certification Practice Tests, PMP Study Guides, Free PMP Exam Questions, Project Management Professional Practice Exams, PMP Practice Tests PMP (5th Edition) Certification Products Built To Satisfy The Most Demanding Professional.
Picktorrent: pmp exam question bank 1440 question - Free Search and Download Torrents at search engine. Download Music, TV Shows, Movies, Anime, Software and more.


text:
Q: How does the ASP.NET MVC UpdateModel() method work? I'm working on my first .NET MVC application and using the NerdDinner tutorial as a reference point. One point that is intriguing me at the moment is the UpdateModel() method. (I don't like using things I don't really understand.)
Taken from the NerdDinner tutorial -
//
// POST: /Dinners/Edit/2

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Edit(int id, FormCollection formValues) {

    Dinner dinner = dinnerRepository.GetDinner(id);

    UpdateModel(dinner);

    dinnerRepository.Save();

    return RedirectToAction("Details", new { id = dinner.DinnerID });
}

My main question is how does the UpdateModel() get access to the formValues passed in the Edit method? Why is the collection not passed in explicitly as a parameter to the method?

A: It does inspect all the HttpRequest inputs such as Form, QueryString, Cookies and Server variables. I think in this order.

A: UpdateModel() is a Controller helper method that attempts to bind a bunch of different input data sources (HTTP POST data coming from a View, QueryString values, Session variables/Cookies, etc.) to the explicit model object you indicate as a parameter. Essentially, it is only for model binding.
If you express the input parameters for your Action as a strongly-typed model (like a View Model), you've already taken all of the steps that are done behind the scenes when UpdateModel() is called. If you retrieve an object from the DataContext and edit its properties, SaveChanges() is all you need to push the updates back to the database (in this case, Save()).
Example:
//
// POST: /Dinners/Edit/2

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Edit(DinnerViewModel incoming) {

    var dinner = dinnerRepository.GetDinner(incoming.DinnerID);
    dinner.Description = incoming.Description;
    dinnerRepository.Save();

    return RedirectToAction("Details", new { id = incoming.DinnerID });
}

However, there is a use-case for using UpdateModel() with a strongly-typed model: when you are passing in a strongly-typed model and want its values to directly replace those of an entity from the database (provided they are all named and typed the same). In this case, you would retrieve the object, use UpdateModel() on it, and its model binding operation will pull in any similarly-named and typed properties from the strongly-typed object to the retrieved object. In other words, it will perform reflection for you.
So, like your example, if you want all properties to update without specifying which to update, and your strongly-typed model and database model have similarly-named properties, you would still want to use UpdateModel() to take advantage of the reflection.
Example:
//
// POST: /Dinners/Edit/2

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Edit(DinnerViewModel incoming) {

    var dinner = dinnerRepository.GetDinner(incoming.DinnerID);
    UpdateModel(dinner);
    dinnerRepository.Save();

    return RedirectToAction("Details", new { id = incoming.DinnerID });
}

The only advantage here (over using a FormCollection object) is that you'd have access to all other properties of the strongly-typed object (as shown by incoming.DinnerID).
Conclusion: if you're translating a strongly-typed object to a derived object, it's probably easiest to use UpdateModel(). However, it's largely unnecessary if you are simply updating a few properties of the derived object. Also, be aware that use of the Entity Framework (instead of something like Linq to SQL) makes all of this moot, as it can relate strongly-typed objects and derived objects with its own methods.

A: Instead of passing Model object as a parameter to "Post()" action method, we are creating an instance of an Model object within the "Post()" function, and updating it using "UpdateModel()" function. "UpdateModel()" function inspects all the HttpRequest inputs such as posted Form data, QueryString, Cookies and Server variables and populate the employee object.
e.g.
[HttpPost]
[ActionName("Create")]
public ActionResult Create_Post()
{
        EmployeeBusinessLayer employeeBusinessLayer =
            new EmployeeBusinessLayer();
        Employee employee = new Employee();
        UpdateModel(employee);
        employeeBusinessLayer.AddEmmployee(employee);
        return RedirectToAction("Index");
}

redpajama_set_name: RedPajamaStackExchange


Check out these tips from some of Australia's best homes to help you make the most of your outdoor space.
No home is complete without a little bit of greenery, be it indoor plants or a vast landscaped garden. These tips from some of Australia's best homes will help you optimise your garden areas and bring your home to life.
1. Flip convention on its head and landscape first.
John and Deb's Chic Shed is essentially a greenhouse, and plants are incredibly important to their lifestyle. To marry their love of nature and architecture, John decided to complete his home's landscaping prior to constructing the impressive shed. This allowed the outside to be seamlessly incorporated into the light-filled interior of the home.
Tip: If you have big dreams for your garden, consider plotting this out before commencing your build.
2. Consider what activities you enjoy.
Exercise is a top priority in the lives of Simon, Deb and their three boys, and they've ensured their Family Resort caters to all of their fitness needs. From the tennis court to the gym to the two pools (one indoor, one outdoor), they have carefully considered what activities are important to them and built custom spaces to match.
Tip: Be mindful when deciding on what spaces are must-haves in your home. If you're sports mad like Simon and Deb, consider how you can make space for exercise. Alternatively, if you're an artist or musician, why not build yourself your very own studio?
3. Use plants to soften your building materials.
Most people might shy away from building with concrete, considering it far too harsh and industrial, but Damian and Prudence have proven that concrete can actually be warm and inviting. Not only is it forgiving if you have kids (you can wipe their scribbles right off the walls!), concrete ages beautifully, and it only takes a few select materials to make it feel like home.
Tip: Use carefully curated materials like plants and warm timber to soften traditionally harsh surfaces like concrete.


text:
Here are the hidden tracks in the Game of Thrones-the cinematic teaser trailer
the Night of today released strømmetjenesten HBO a mysterious teasertrailer from the long-awaited final season of "Game of Thrones", which has its premiere in
10 December 2018 Monday 01:01
the Night of today released strømmetjenesten HBO a mysterious teasertrailer from the long-awaited final season of "Game of Thrones", which has its premiere in april 2019.
The new trailer is 35 seconds long, and shows none of the familiar characters from the "GoT"universe. Nevertheless, the contents of the clip meaning for those who are familiar with "a song of ice and fire", which, of course, is the name of the book series by George R. R. Martin that the series is based on.
See the trailer at the top of the case!
Fire and ice meet Revealed the central detail from the last "Game of Thrones"-season
Dagbladet reviewer Marie Kleve, who have read the books and followed the series all the way with, among other recapper of the episodes, have seen the trailer. She believes there is much to gain from this little clip, despite the fact that you actually don't get to see a single scene from the series.
- Finally we get the big battle between ice and fire! So it remains to see how it really is going to look like, for this the cinematic teaser trailer says not much about it, " says Kleve, before she continues:
- But I love it, I love all the other symboltunge "Game of Thrones"-teaserne! They've learned that the funniest thing with this universe is to look for tracks, and it is a part to find here too, of course.
She points out that "Game of Thrones" is known for a cryptic, but powerful teasertrailere – in the previous round left off the date of sesongpremieren using a video of melting ice.
- Ilddrage against isdrage
This time it is much more dramatic - as it should be for the last season, believes Kleve. The video takes up the theme from the title of the book series "A song of ice and fire", and hint that the final battle will be between just ice and fire.
- But we knew that the everything. Daenerys is on the way to the north together with the fire-breathing dragons, to take up the fight against nattkongen and isdragen his, and the army of ice zombies. So can the trailer mean something more?
It shows how the ice crawls over the game board we know from the intro to the tv series, and covers both the Stark family wolf and the Targaryens dragon. But at the same time devouring the fire the lion of the Lannister family, before the two elements meet to battle.
The 15 most shocking death falls in "Game of Thrones"
the Relationship between the wolf and the dragon on the one side, and the lion on the other it was very tense at the conclusion of last season, and it looks to that a war between these two factions is also, inevitably, mean Kleve.
She recalls that Jon Snow last season swore allegiance to Daenerys, and thus united the Stark and Targaryen their forces against the threat from the north, at the same time as Cersei refused to help.
- truck and Trailer hint that Daenerys and the dragons to her will take down Cersei first, at the same time as Nattkongen attacking her and Jon, and in the end it ilddrage against isdrage.
Stark and Nattkongen?
According to Kleve, it is these interpretations that are the most obvious.
UNCERTAIN CONCLUSION: Fresh photos from Belfast has given new hope to the fans, after the thrilling conclusion of season seven. Video: HBO / Catherine Donnelly Show more Show more Show more
But dig us deeper in the "Game of Thrones"-the mythology, and especially the one who has grown up in fanforumer on the web, we find other theories which can get the extra guy on fire now. For example, the linking the Stark family to Nattkongen and his gang, " says Kleve, and adds:
- Some believe that Bran Stark is Nattkongen, while others have guessed that Jon at one time or another show will join him. We'll see. I look forward, at least!
The eighth and final season of "Game of Thrones" premiers in april 2019. The date is currently not known, but it is only a few months of the fans can make themselves ready to say goodbye with the series.
Extreme safety around the "Game of Thrones": - Everything is infiltrated


text:
Home News How the new citizenship law affects Muslims in India
Protests against new citizenship law in India
On Dec 12, 2019, India passed a Citizenship Amendment Act which sparked outrage and protests all throughout the country. The amendment to the Citizenship Act gives priority to Hindus, Sikhs, Buddhists, Jains, Parsis and Christians resident in India before 2014, but excludes Muslims, including minority sects.
This discriminatory bill amassed a lot of protestors and rightfully try to force the authority to amend this act of racism and give Muslims the same rights.
During the protests, police attacked students and minors beating them up and threatening them. They also vandalized universities and beaten up students in their dorm rooms, libraries and in public places. These attacks took place in Jamia Millia Islamia University, Aligarh Muslim University, Nadwa University and Jawharlal Nehru University.
Current Muslim residents are facing harassment and intimidation and are afraid of losing their own citizenships themselves. The whole situation of the country is at unrest.
More than 200,000 people protested in North India alone, and Police crackdown and brutality continues.
The UN Human Rights office condemned the law as "fundamentally discriminatory in nature".
May Allah bring peace and prosperity to our brothers and sisters suffering immensely in India.
Pregnant Muslim woman attacked at Sydney cafe
Leaked Chinese documents expose Uyghur abuse
Kashmiris under oppression
The campaign to bring these Australian women and children home
What on Earth is going on in Kashmir?
Betrayed By My Own Country – #OliverBridgeman Interviewed
Why Don't You Pray? | Whispers Ep 1
The New Grand Mufti of Australia has just been announced …
5 Steps to Staying Positive During Menses in Ramadan
Struggling to read the Quran
Fame, Fitnah and Music – Siedd & Essam | Video Podcast
How Hollywood has failed Muslim Women
Five habits to protect your home from evil


Stephanie Jamieson, a 37-year-old working mom, is getting rid of her child-care specialist later this season and fears a dearth of options could impinge on her behalf potential to keep working. In Ludington, Mich., the lakeside city of 8,000 where Ms. Jamieson lives with her hubby, a subject examiner, and 3-year-old boy, local day-care centers have long delay lists. "It's aggravating being unsure of if I'll find something with time," she said. Her manager is fretting, too. John Wilson, ceo of European Land Services, doesn't want to reduce Ms. Jamieson, administrator of the subject section there. He has swung doing his thing, joining several Michigan business market leaders to thrust for express legislative action to boost child care.
Historically low lack of employment is forcing headway on a concern that is around since women joined the labor force: child care and attention. Businesses increasingly view it as a concern essential with their procedures and areas, and policy designers from New Hampshire to Michigan to Colorado have determined it as key to freeing up staff to fill tenacious vacancies and creating a talent pipeline.
In Washington, Congress early on Friday exceeded a budget package that whenever written into precise spending legislation in the approaching weeks would add $5.8 billion over 2 yrs to a national program that helps areas provide child health care to low-income family members.
The budget presented by Chief executive Donald Trump on Mon carries a smaller upsurge in funding for federal government child good care. That amount could rise, though it is unclear by how much because the supervision is still considering how other factors besides money–such as regulations–affect the option of affordable child treatment, regarding to a older official from any office of Management and Budget.


text:
Q: When executing MySQL file from command line, how to make the result yielded with special characters escaped? I intend to execute a SQL as following and get the result outputted to terminal:
echo "select * from tbl limit 10" | mysql -hxxx -uxxx -pxxx -Dxxx

there's one field's content having single-quote in it, which is a JSON. I'd like the result being "{\'a\': 1}", yet what it yields is "{'a': 1}".
OUTFILE could not be applied in current scenario. Could anyone help out? Thanks!


text:
{-# LANGUAGE OverloadedStrings   #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies        #-}

{-# OPTIONS_GHC -fno-warn-missing-signatures #-}

-----------------------------------------------------------------------------
-- |
-- Module      : Main
-- Copyright   : (c) 2015-18 Călin Ardelean
-- License     : BSD-style
--
-- Maintainer  : Călin Ardelean <mmn80cpu@gmail.com>
-- Stability   : experimental
-- Portability : portable
--
-- A REPL for testing purposes.
-----------------------------------------------------------------------------

module Main (main) where

import           Control.Monad         (liftM, replicateM, unless)
import           Data.List             (intercalate, isPrefixOf)
import qualified Data.Sequence         as S
import           Data.String           (fromString)
import           Data.Time.Clock       (getCurrentTime)
import           Data.Time.Clock.POSIX (posixSecondsToUTCTime,
                                        utcTimeToPOSIXSeconds)
import qualified Data.Text             as T
import           FeedReader.DB         (Property, Reference)
import qualified FeedReader.DB         as DB
import           FeedReader.Import     (downloadFeed, importOPML, updateFeed)
import           FeedReader.Types
import           FeedReader.Utils      (diffMs, text2DateTime)
import           Pipes
import qualified Pipes.Prelude         as P
import           Pipes.Safe
import           System.Random         (getStdGen, randomRIO, randomRs)

introMessage = do
  yield "Welcome to the Jungle!"
  yield "Type 'help' for a list of commands."
  cat

helpMessage = do
  yield "Commands:"
  yield "  help    : shows this helpful message"
  yield "  stats   : shows general stats"
  yield "  get t k : SELECT * FROM t WHERE ID = k"
  yield "          : t: 'cat', 'feed', 'person' or 'item'"
  yield "  getk t k: SELECT * FROM t WHERE UniqueKey = k"
  yield "          : t: 'feed', 'person' or 'item'"
  yield "          : UniqueKey: 'URL', 'Name' or 'URL'"
  yield "  range p t c s z"
  yield "          : SELECT TOP p * FROM t WHERE c < s ORDER BY c z"
  yield "          : c: '*' will use a default column"
  yield "          : s: for date columns, start with 'D:' and replace ' ' with '_'"
  yield "          : s: for string columns, start with 'S:'"
  yield "          : s: use '*' to start at the top"
  yield "          : z: ASC or DESC"
  yield "  filter p t c k o s z"
  yield "          : SELECT TOP p * FROM t WHERE c = k AND o < s ORDER BY o z"
  yield "  add n t : inserts n random records into the DB (t as above)"
  yield "  cat n p : inserts a category"
  yield "          : n: name"
  yield "          : p: parent ID"
  yield "  del k   : deletes document with ID = k"
  yield "  range_del p t c s z"
  yield "          : deletes a range of documents starting at k"
  yield "          : params as in 'range'"
  yield "  gc      : performs GC"
  yield "  debug i c"
  yield "          : shows the internal state"
  yield "          : i: if '1' will show all indexes"
  yield "          : c: if '1' will show the contents of the cache"
  yield "  curl u  : downloads and parses feed at URL = u"
  yield "  opml p  : imports OPML file at path p"
  yield "  feed k  : downloads, parses and updates feed with ID = k"
  yield "  status i s"
  yield "          : updates the status of item with ID = i to s"
  yield "          : s: one of New, Unread, Read"
  yield "  quit    : quits the program"

processCommand h = do
  args <- words <$> await
  unless (null args) $
    case head args of
      "help"      -> helpMessage
      "stats"     -> doAbortable 0 args h cmdStats
      "get"       -> doAbortable 2 args h cmdGet
      "getk"      -> doAbortable 2 args h cmdGetk
      "range"     -> doAbortable 5 args h cmdRange
      "filter"    -> doAbortable 7 args h cmdFilter
      "add"       -> doAbortable 2 args h cmdAdd
      "cat"       -> doAbortable 2 args h cmdAddCat
      "del"       -> doAbortable 1 args h cmdDel
      "range_del" -> doAbortable 5 args h cmdRangeDel
      "gc"        -> doAbortable 0 args h cmdGC
      "debug"     -> doAbortable 2 args h cmdDebug
      "curl"      -> doAbortable 1 args h cmdCurl
      "opml"      -> doAbortable 1 args h cmdOPML
      "feed"      -> doAbortable 1 args h cmdFeed
      "status"    -> doAbortable 2 args h cmdItemStatus
      _           -> yield . showString "Command '" . showString (head args) $
                       "' not understood."
  processCommand h

doAbortable n args h f =
  if n == length args - 1
  then f h args `catches` [ Handler (each . lines . transErr)
                          , Handler (each . lines . dbErr) ]
  else yields' "Command '" $ showString (head args) . showString "' requires " .
         shows n . showString " arguments but " .
         shows (length args - 1) . showString " were supplied."
  where transErr (DB.AbortUnique s)   = s
        transErr (DB.AbortConflict s) = s
        transErr (DB.AbortDelete s)   = s

        dbErr (DB.LogParseError s) = s
        dbErr (DB.DataParseError pos sz s) = showString s . showString
          "\nPosition: " . shows pos . showString "\nSize: " $ shows sz ""
        dbErr (DB.IdAllocationError s) = s
        dbErr (DB.DataAllocationError sz mbsz s) = showString s . showString
          "\nSize requested: " . shows sz . showString
          "\nLargest gap: " . maybe (showString "no gaps") shows mbsz $ ""

------------------------------------------------------------------------------
-- Random Utilities
------------------------------------------------------------------------------

randomString l r = do
  ln <- randomRIO (l, r)
  DB.pack <$> replicateM ln (randomRIO (' ', '~'))

randomStringIx l r = Sortable <$> randomString l r

randomContentIx l r = Sortable . Plain <$> randomString l r

time2Int str = fromInteger . round . utcTimeToPOSIXSeconds .
               DB.unDateTime . text2DateTime str

randomTime = do
  now <- DB.DateTime <$> getCurrentTime
  let l = time2Int "2000-01-01" now
  let r = time2Int "2020-01-01" now
  ti <- randomRIO (l, r)
  return . DB.DateTime . posixSecondsToUTCTime $ fromInteger ti

randomTimeIx = Sortable <$> randomTime

randomCat =
  Cat <$> randomStringIx 10 30
      <*> pure Nothing

randomFeed c =
   Feed <$> pure (Just c)
        <*> (Unique <$> randomString 100 300)
        <*> pure Nothing
        <*> randomString 100 300
        <*> randomContentIx 100 300
        <*> (Plain <$> randomString 100 300)
        <*> randomString 2 10
        <*> pure []
        <*> pure []
        <*> (Plain <$> randomString 10 50)
        <*> pure Nothing
        <*> randomTimeIx
        <*> pure False
        <*> pure Nothing

randomPerson =
  Person <$> (Unique <$> randomStringIx 10 30)
         <*> randomString 100 300
         <*> randomString 10 30

randomItem f s =
     Item <$> pure f
          <*> (Unique <$> randomString 100 300)
          <*> (Plain <$> randomString 100 300)
          <*> (Plain <$> randomString 100 300)
          <*> pure []
          <*> pure []
          <*> pure []
          <*> (Plain <$> randomString 10 50)
          <*> (Plain <$> randomString 200 300)
          <*> randomTimeIx
          <*> randomTimeIx
          <*> pure s

------------------------------------------------------------------------------
-- Record Printing
------------------------------------------------------------------------------

class Printable a where
  getFieldNames :: a -> [String]
  getFieldValues :: (DB.LogState l, MonadSafe m) => DB.Handle l ->
                     Reference a -> a -> m [String]

instance Printable Cat where
  getFieldNames _ = [ "Id", "Parent", "Name" ]
  getFieldValues _ k it =
    return [ show k
           , maybe "-" show (catParent it)
           , unpack . unSortable $ catName it
           ]

instance Printable Person where
  getFieldNames _ = [ "Id", "Name", "Email", "URL" ]
  getFieldValues _ k it =
    return [ show k
           , unpack . unSortable . unUnique $ personName it
           , unpack $ personEmail it
           , unpack $ personURL it
           ]

instance Printable Feed where
  getFieldNames _ = [ "Id", "Cat", "Updated", "Sub", "Err", "Title" ]
  getFieldValues _ k it =
    return [ show k
           , maybe "-" show $ feedCat it
           , take 19 . show $ feedUpdated it
           , if feedUnsubscribed it then " x" else " -"
           , if null $ feedLastError it then " -" else "ERR"
           , content2Str . unSortable $ feedTitle it
           ]

instance Printable Item where
  getFieldNames _ = [ "Id", "Feed", "Updated", "Sta", "Title" ]
  getFieldValues h k it = do
    st <- handleAbort . DB.runQuery h . DB.itemStatusToKey $ itemStatus it
    return [ show k
           , show $ itemFeed it
           , take 19 . show $ itemUpdated it
           , showStatus st
           , content2Str (itemTitle it)
           ]

content2Str (Plain str) = unpack str
content2Str (HTML  str) = unpack str
content2Str (XHTML str) = unpack str

showStatus StatusNew     = "(?)"
showStatus StatusUnread  = " ?"
showStatus StatusRead    = " ~"
showStatus StatusStarred = "{★}"

printRecords :: forall a l m. (Printable a, DB.LogState l, MonadSafe m) =>
                DB.Handle l -> [(Reference a, a)] -> Pipe String String m ()
printRecords h rs = do
  let ns = getFieldNames (undefined :: a)
  vs <- traverse (uncurry $ getFieldValues h) rs
  let szs = map (+1) $ foldr (zipWith max . map length) (map length ns) vs
  let szs' = take (length szs - 1) szs
  let ss = szs' ++ [78 - sum szs']
  each $ map (concat . zipWith (\sz str -> take (sz - 1) str ++
         replicate (sz - length str) ' ') ss) (ns : vs)

------------------------------------------------------------------------------
-- Command Functions
------------------------------------------------------------------------------

yields sf = yield $ sf ""
yields' s sf = yields $ showString s . sf

timed f = do
  t0 <- liftBase getCurrentTime
  f
  t1 <- liftBase getCurrentTime
  yields' "Command: " $ showsTimeDiff t0 t1

timeOf f = do
  t0 <- liftBase getCurrentTime
  r  <- f
  t1 <- liftBase getCurrentTime
  return (r, diffMs t0 t1)

showsTimeDiff t0 t1 = showsTimeDiff' $ diffMs t0 t1

showsTimeDiff' d =
  if d >= 1 then shows d . showString " ms"
  else shows (d * 1000) . showString " us"

handleAbort cmd = liftBase cmd >>= either throwM return

showTime dt = yields' "Command: " $ showsTimeDiff' dt

cmdStats h _ = timed $ do
  s <- handleAbort (DB.getStats h)
  yields' "Category count: " $ shows (DB.countCats s)
  yields' "Feed count    : " $ shows (DB.countFeeds s)
  yields' "Person count  : " $ shows (DB.countPersons s)
  yields' "Entry count   : " $ shows (DB.countItems s)

type LookupRet a = IO (Either DB.TransactionAbort (Maybe a))

cmdGet h args = do
  let t = args !! 1
  let kstr = args !! 2
  let k = read kstr :: Int
  let out = maybe (yields' "No record found with Id = " $ showString kstr)
                  (each . lines)
  case t of
    "cat"    -> do
       (r, dt) <- timeOf $ handleAbort
                    (DB.runLookup h (fromIntegral k) :: LookupRet Cat)
       out $ fmap show r
       showTime dt
    "feed"   -> do
       (r, dt) <- timeOf $ handleAbort
                    (DB.runLookup h (fromIntegral k) :: LookupRet Feed)
       out $ fmap show r
       showTime dt
    "person" -> do
       (r, dt) <- timeOf $ handleAbort
                    (DB.runLookup h (fromIntegral k) :: LookupRet Person)
       out $ fmap show r
       showTime dt
    "item"   -> do
       (r, dt) <- timeOf $ handleAbort
                    (DB.runLookup h (fromIntegral k) :: LookupRet Item)
       out $ fmap show r
       showTime dt
    _        -> yield . shows t $ " is not a valid table name."

type LookupUnqRet a = IO (Either DB.TransactionAbort (Maybe (Reference a, a)))

cmdGetk h args = timed $ do
  let t = args !! 1
  let k = args !! 2
  let out = maybe (yields' "No record found with Key = " $ showString k)
                  (each . lines)
  case t of
    "feed"   ->
      handleAbort (DB.runUnique h "feedURL" (DB.Unique k)
               :: LookupUnqRet Feed) >>= out . fmap (show . snd)
    "person" ->
      handleAbort (DB.runUnique h "personName" (DB.Unique k)
               :: LookupUnqRet Person) >>= out . fmap (show . snd)
    "item"   ->
      handleAbort (DB.runUnique h "itemURL" (DB.Unique k)
               :: LookupUnqRet Item) >>= out . fmap (show . snd)
    _        -> yield . shows t $ " is not a valid table name."

page h c p s mk o now dft z = handleAbort $
  maybe (DB.runRange h p (fromString fprop) (parseVal s now) so)
  (\k -> DB.runFilterRange h p (fromString fprop) (nk k)
                          (fromString oprop)(parseVal s now) so)
  mk
  where fprop = if c == "*" then dft else c
        oprop = if o == "*" then dft else o
        nk k  = if k == 0 then Nothing else Just $ fromIntegral (k :: Int)
        so    = if z == "ASC" then DB.SortAsc else DB.SortDesc

parseVal s now
  | "D:" `isPrefixOf` s = Just . DB.Sortable . DB.toKey . DB.Sortable $
                          text2DateTime (T.pack $ drop 2 s) now
  | "S:" `isPrefixOf` s = Just . DB.Sortable . DB.toKey . DB.Sortable . T.pack $ drop 2 s
  | s == "*"            = Nothing
  | otherwise           = Just . DB.Sortable . DB.toKey . DB.Sortable $
                            (read s :: Int)

cmdPage h args s mk o z = do
  let p = (read $ args !! 1) :: Int
  let t = args !! 2
  let c = args !! 3
  now <- DB.DateTime <$> liftBase getCurrentTime
  case t of
    "cat"    -> do
      (as, dt) <- timeOf $ page h c p s mk o now "catName" z
      printRecords h (as :: [(Reference Cat, Cat)])
      showTime dt
    "feed"   -> do
      (as, dt) <- timeOf $ page h c p s mk o now "feedUpdated" z
      printRecords h (as :: [(Reference Feed, Feed)])
      showTime dt
    "person" -> do
      (as, dt) <- timeOf $ page h c p s mk o now "personName" z
      printRecords h (as :: [(Reference Person, Person)])
      showTime dt
    "item"   -> do
      (as, dt) <- timeOf $ page h c p s mk o now "itemUpdated" z
      printRecords h (as :: [(Reference Item, Item)])
      showTime dt
    _        -> yield . shows t $ " is not a valid table name."

cmdRange h args = do
  let s = args !! 4
  let z = args !! 5
  cmdPage h args s Nothing "" z

cmdFilter h args = do
  let k = (read $ args !! 4) :: Int
  let o = args !! 5
  let s = args !! 6
  let z = args !! 7
  cmdPage h args s (Just k) o z

showIDs is = do
  let ids = map show is
  let l = length ids
  let (prefix, suffix) = if l > 10
                         then (showString "First 10 Ids: ", showString "...")
                         else (showString "Ids: ", showString ".")
  yields $ shows l . showString " records generated."
  yields $ prefix . showString (intercalate ", " (take 10 ids)) . suffix

nothing = Nothing :: Maybe (Sortable DB.IxKey)

cmdAdd h args = timed $ do
  let n = (read $ args !! 1) :: Int
  let t = args !! 2
  g <- liftBase getStdGen
  case t of
    "cat"    -> handleAbort (liftM sequence . P.toListM . P.replicateM n $
                  randomCat >>= DB.runInsert h)
                >>= showIDs
    "person" -> handleAbort (liftM sequence . P.toListM . P.replicateM n $
                  randomPerson >>= DB.runInsert h)
                >>= showIDs
    "feed" -> do
      cs' <- handleAbort $ DB.runRange h maxBound "catName" nothing DB.SortAsc
      let cs = S.fromList cs'
      let rs = take n $ randomRs (0, S.length cs - 1) g
      fs <- handleAbort $ liftM sequence . P.toListM . for (each rs) $ \r ->
        (lift . randomFeed . fst . S.index cs) r >>=
        lift . DB.runInsert h >>=
        yield
      showIDs fs
    "item" -> do
      fs' <- handleAbort $ DB.runRange h maxBound "feedUpdated" nothing DB.SortAsc
      let fs = S.fromList fs'
      let rfids = (fst . S.index fs) <$> take n (randomRs (0, S.length fs - 1) g)
      stNew <- handleAbort . DB.runQuery h $ DB.itemStatusByKey StatusNew
      is <- handleAbort $ liftM sequence . P.toListM . for (each rfids) $ \fid ->
        lift (randomItem fid stNew) >>=
        lift . DB.runInsert h >>=
        yield
      showIDs is
      return ()
    _      -> yield . shows t $ " is not a valid table name."

cmdAddCat h args = timed $ do
  let n = args !! 1
  let p = (read $ args !! 2) :: Int
  let c = Cat (Sortable $ pack n) (if p == 0 then Nothing else Just $ fromIntegral p)
  cid <- handleAbort $ DB.runInsert h c
  yields' "Category " $ shows cid . showString " inserted."

cmdDel h args = timed $ do
  let k = (read $ args !! 1) :: Int
  handleAbort . DB.runDelete h $ fromIntegral k
  yield "Record deleted."

def c d = fromString $ if c == "*" then d else c

cmdRangeDel h args = timed $ do
  let t = args !! 2
  let p = (read $ args !! 1) :: Int
  let c = args !! 3
  let s = args !! 4
  let z = args !! 5
  let so = if z == "ASC" then DB.SortAsc else DB.SortDesc
  now <- DB.DateTime <$> liftBase getCurrentTime
  sz <- maybe (yield "Explicit value required." >> return 0)
    (\k -> case t of
      "cat"    -> handleAbort (DB.runDeleteRange h p
                  (def c "catName"     :: Property Cat   ) k so)
      "feed"   -> handleAbort (DB.runDeleteRange h p
                  (def c "feedUpdated" :: Property Feed  ) k so)
      "person" -> handleAbort (DB.runDeleteRange h p
                  (def c "personName"  :: Property Person) k so)
      "item"   -> handleAbort (DB.runDeleteRange h p
                  (def c "itemUpdated" :: Property Item  ) k so)
      _        -> yield (shows t " is not a valid table name.") >> return 0)
    (parseVal s now)
  yields $ shows sz . showString " records deleted."

cmdGC h _ = timed $ do
  liftBase $ DB.performGC h
  yield "Garbage collection job scheduled."

cmdDebug h args = timed $ do
  let i = args !! 1 == "1"
  let c = args !! 2 == "1"
  liftBase (DB.debug h i c) >>= each . lines

cmdCurl _ args = timed $ do
  let url = args !! 1
  liftBase (show <$> downloadFeed (DB.pack url)) >>= each . lines

cmdFeed h args = timed $ do
  let f = (read $ args !! 1) :: Int
  let fid = fromIntegral f
  (mbf, is) <- handleAbort $ updateFeed h fid
  maybe (yield "Feed not found.") (\feed -> do
    yield . showString "Feed " . shows fid $ " updated ok."
    yield ""
    each . lines $ show feed
    yield ""
    printRecords h is ) mbf

cmdItemStatus h args = timed $ do
  let i = (read $ args !! 1) :: Int
  let s = args !! 2
  let iid = fromIntegral i
  case s of
    "New"     -> handleAbort $ DB.runUpdateItemStatus h iid StatusNew
    "Unread"  -> handleAbort $ DB.runUpdateItemStatus h iid StatusUnread
    "Read"    -> handleAbort $ DB.runUpdateItemStatus h iid StatusRead
    "Starred" -> handleAbort $ DB.runUpdateItemStatus h iid StatusStarred
    _         -> yield "Status unknown."

cmdOPML h args = timed $ do
  let path = args !! 1
  res <- importOPML h path
  either yield (\rs -> do
    yield $ shows (length rs) " feeds merged:"
    printRecords h rs)
    res

pipeLine h =
      P.stdinLn
  >-> P.takeWhile (/= "quit")
  >-> processCommand h
  >-> introMessage
  >-> P.map (showString "  ")
  >-> P.stdoutLn

main :: IO ()
main = runSafeT . runEffect $ bracket
    (do t0 <- getCurrentTime
        putStrLn "  Opening DB..."
        h <- DB.open (Just "feeds.log") (Just "feeds.dat") Nothing Nothing
        t1 <- getCurrentTime
        putStrLn . showString "  DB opened in " $ showsTimeDiff t0 t1 ""
        return (h :: DB.Handle DB.FileLogState) )
    (\h -> do
        putStrLn "  Closing DB..."
        DB.close h
        putStrLn "  Goodbye." )
    pipeLine

redpajama_set_name: RedPajamaGithub


Here is a classic clip from Fly Tying The Angler's Art with Leroy Hyatt the late Dave Engerbretson. The Zug bug is a quick and simple nymph using another of my favourite materials, peacock herl. It's a perfect choice for small lakes and ponds and I've used it in the past with some pretty good success. Leroy will be at the WCFFE in January in Calgary doing some demos and I can't wait to see him tie a few flies. When I first started tying, I picked up a lot of tips from him and Dave.


Gladiator sandals. Bright red patent leather low flatforms with wide straps and double fastening. Perfect for all your summer looks, try them in the city with a pair of optical white trousers and an open-work cotton top!


text:
Q: Postscript printing from codeblocks - very odd output I would like to print some code from code::blocks 12.11 on an Ubuntu 13.04 machine. All other printing seems to be fine but the output to the printer and file (postscipt) has strangely misaligned colours. The text all seems to be there but different coloured text is moved / scaled / overwritten making it unusable (sadly I don't have the reputation to include an image) so I've uploaded one at picpaste.
Any ideas - I don't know whether this is CB, ubuntu or ..?
Thank you

A: Wow. There's a lot of nonsense in that file. Reencoding the same font over and over and over again. 0 0 translate. 1.00000000 1.00000000 scale. I'm not sure whether to blame wxWindows PostScript renderer or code::blocks, but that's some bad postscript code.
I made a work-around, but it's not really a fix. And if any of the responsible parties are reading this, DO NOT DO THIS and consider it fixed. It's broken.
That said, inserting this code just after %%BeginProlog appears to give much better results. It seems that the placement of text is using the wrong size for the space character, so shrinking all the fonts a little bit makes it look ok.
/shrinkfont {
    dup dup findfont dup length dict begin {
        1 index /FID ne {
            1 index /FontMatrix ne {
                def
            }{
                .0008 exch .0008 exch
                dup length array copy
                scale def
            } ifelse
        } { pop pop } ifelse
    } forall
    currentdict end definefont pop pop
} def
/Courier shrinkfont
/Courier-Bold shrinkfont
/Courier-Oblique shrinkfont

Packaged as an AWK script:
#shrinkfont.awk
!/%%BeginProlog/{print}
/%%BeginProlog/{
print "%%BeginProlog"
print "    % modification by shrinkfont.awk"
print "    /shrinkfont {"
print "        dup dup findfont dup length dict begin"
print "        {"
print "            1 index /FID ne {"
print "                1 index /FontMatrix ne {"
print "                    def"
print "                }{"
print "                    .0008 exch .0008 exch"
print "                    dup length array copy"
print "                    scale def"
print "                } ifelse"
print "            } { pop pop } ifelse"
print "        } forall"
print "        currentdict end definefont pop pop"
print "    } def"
print "    /Courier shrinkfont"
print "    /Courier-Bold shrinkfont"
print "    /Courier-Oblique shrinkfont"
print "    % end modification"
}

Invocation:
awk -f shrinkfonts.awk postscripttest.txt > postscripttest.ps


text:
Immediate family is defined as:
The spouse, child (including a stepchild and an adoptive child), parent, sibling, grandparent, aunt, or uncle of the person
A parent or sibling of the person's spouse
Any member of the person's household.
Employment in the Anchorage School district is a privilege entrusted by the public. Employees of the District "must adhere to the highest levels of ethical conduct to preserve the integrity of the governmental process and avoid conflicts of interest."* All ASD employees are responsible for reading and complying with the information addressed in ASD School Board policy with regard to conflict of interest (ASD Code of Ethics and section 1.15 of the Anchorage Municipal Code).
It is also imperative that immediate family members (see box at right) inform an ASD employee of any intent of their employer to do business with the Anchorage School District so that the ASD employee may attend to any potential conflict of interest issue.
* Anchorage Municipal Code
School district policy
See the following policy sections for detailed information:
AR 3311.1(e).1
Waiver for Board Members and Employees
4119.21/4219.21/4319.21
All Personnel - Codes of Ethics
Forms, publications and municipal code
Annual filing is required
Conflict of interest documentation must be filed annually by employees (fiscal year is July 1 - June 30).
Disclosure statements must be filed when an immediate family member wishes to do business with the Anchorage School District or the Municipality of Anchorage.
Request for Waiver (Form A)
Request for Waiver (Form A) applications must be filed when an ASD employee/Board Member owns a sole proprietorship, or is a partner in a partnership, or is an officer, director, major shareholder (five percent (5%) or more of the outstanding shares) or has management control in a corporation that wishes to do business with the Anchorage School District.
Request for Waiver (Form B)
Request for Waiver (Form B) application must be filed when an ASD Employee wishes to sell or receive royalties on books or other materials he/she has authored.
Request for Waiver (Form C)
Request for Waiver (Form C) application must be filed on those occasions where a teacher has been tutoring a child who transfers to a new school or class or advances to a higher grade and the child becomes a student in the class being taught by his/her tutor.
If the value or nature of the gift requires it, a Gift Disclosure form must be filed within 10 days of receipt of the gift.
Contemporaneous Employment
Regular employees who have or intend to have contemporaneous service or employment, including self-employment, must report that service or employment.
Municipality of Anchorage Code of ethics Section 1.15
(follow left menu path to Title 1 General Provisions / Chapter 1.15 Code of Ethics)
Note: All Anchorage School District employees , whether a certificated employee or a classified employee, full time or part time, temporary or permanent, excluding elected members of the Anchorage School Board are also considered Municipal employees for the purposes of the Anchorage Municipal Code 1.15.


text:
Valuation and Portfolio Update Meeting December 15, 2020 Exhibit 99.1
W W W . K B S . C O M The information contained herein should be read in conjunction with, and is qualified by, the information in KBS Growth & Income Real Estate Investment Trust's (the "Company or KBS Growth & Income REIT or KBS G&I REIT") Annual Report on Form 10-K for the year ended December 31, 2019 (the "Annual Report"), and in the Company's Quarterly Report on Form 10-Q for the period ended September 30, 2020 (the "Quarterly Report"), including the "Risk Factors" contained therein. For a full description of the limitations, methodologies and assumptions used to value KBS G&I REIT's assets and liabilities in connection with the calculation of KBS G&I REIT's estimated value per share, see KBS G&I REIT's Current Report on Form 8-K dated December 7, 2020 (the "Valuation 8-K"). Important Disclosures 2 Certain statements contained herein may be deemed to be forward-looking statements within the meaning of the Federal Private Securities Litigation Reform Act of 1995. The Company intends that such forward-looking statements be subject to the safe harbors created by Section 21E of the Securities Exchange Act of 1934, as amended. These statements include statements regarding the intent, belief or current expectations of the Company and members of its management team, as well as the assumptions on which such statements are based, and generally are identified by the use of words such as "may," "will," "seeks," "anticipates," "believes," "estimates," "expects," "plans," "intends," "should" or similar expressions. Readers are cautioned not to place undue reliance on these forward-looking statements, which speak only as of the date they are made. The Company undertakes no obligation to update or revise forward-looking statements to reflect changed assumptions, the occurrence of unanticipated events or changes to future operating results over time, unless required by law. Such statements are subject to known and unknown risks and uncertainties which could cause actual results to differ materially from those contemplated by such forward-looking statements. The Company makes no representation or warranty (express or implied) about the accuracy of any such forward-looking statements. These statements are based on a number of assumptions involving the judgment of management. Forward-Looking Statements
W W W . K B S . C O M Important Disclosures The COVID-19 pandemic, together with the resulting measures imposed to help control the spread of the virus, including quarantines, "shelter in place" and "stay at home" orders, travel restrictions on businesses and school closures, has had a negative impact on the economy and business activity globally. The COVID-19 pandemic is negatively impacting almost every industry, including the U.S. office real estate industry and the industries of the Company's tenants, directly or indirectly. The extent to which the COVID-19 pandemic impacts the Company's operations and those of its tenants, will depend on future developments, which are highly uncertain and cannot be predicted with confidence, including the scope, severity and duration of the pandemic, the actions taken to contain the pandemic or mitigate its impact, and the direct and indirect economic effects of the pandemic and containment measures, among others. If tenants default on their rent and vacate, the ability to re-lease this space is likely to be more difficult if the economic slowdown continues and any long-term impact of this situation, even after an economic rebound, remains unclear. Further, reductions in property values related to the impact of the COVID-19 pandemic may limit the Company's ability to draw on the revolving commitment under its term loan due to covenants described in the loan agreement. The Company may fund distributions from any source including, without limitation, from offering proceeds or borrowings. Distributions paid through September 30, 2020 have been funded in part with cash flow from operating activities, from the proceeds from the sale of real estate and in part with debt financing, including advances from the Company's advisor. In addition, distributions have been funded with cash resulting from the advisor's waiver and deferral of its asset management fee. There are no guarantees that the Company will continue to pay distributions or that distributions at the current rate are sustainable. Actual events may cause the value and returns on the Company's investments to be less than that used for purposes of the Company's estimated NAV per share. With respect to the NAV per share, the appraisal methodology used for the appraised properties assumes the properties realize the projected net operating income and expected exit cap rates and that investors would be willing to invest in such properties at yields equal to the expected discount rates. Though the appraisals of the appraised properties, with respect to Duff & Phelps, and the valuation estimates used in calculating the estimated value per share, with respect to Duff & Phelps, the Company's advisor and the Company, are the respective party's best estimates as of September 30, 2020, the Company can give no assurance in this regard. Even small changes to these assumptions could result in significant differences in the appraised values of the appraised properties and the estimated value per share. These statements herein also depend on factors such as: future economic, competitive and market conditions; the Company's ability to maintain occupancy levels and rental rates at its real estate properties; the Company's ability to sell its real estate properties at the times and at the prices it expects; and other risks identified in Part I, Item IA of the Company's Annual Report and in Part II, Item 1A of the Company's Quarterly Report. Forward-Looking Statements 3
W W W . K B S . C O M The Impact of COVID-19 on Capital Markets and US Real Estate Investments 4
W W W . K B S . C O M • On Tuesday, November 24, 2020 the Dow eclipsed 30,000 for the first time1, a remarkable record in the midst of a pandemic; a rise stimulated by news of potential vaccines. • Since April, the economy has gained back roughly a million jobs, but that still leaves office-using employment roughly 1.8 million jobs below its February peak.2 • Despite reports of people fleeing central cities for the suburbs, the leasing data does not indicate businesses are abandoning cities. In fact, recent data from Cushman & Wakefield shows that 28.6% of all U.S. leasing transactions that renewed this year occurred in the central business district.2 • The central business district/suburban mix of all new non-renewal leases is also roughly the same as the historical average. For the most part, companies appear to be staying put. COVID-19:The Economy 1 The Wall Street Journal, Wednesday, November 25, 2020 2 Cushman & Wakefield, U.S. National Marketbeat Report, Office, Q3, 2020 5
W W W . K B S . C O M • According to recent data released by Green Street Advisors, the performance of the S&P 500 suggests that the economy, in a year or two, will be largely unmarked by the pandemic. Treasury yields, extraordinarily low by historic standards (though highest amongst G7 nations), signal anemic demand/GDP growth after the initial recovery.1 COVID-19:The Economy 1 Green Street, U.S. Commercial Property Outlook, November 25, 2020 6
W W W . K B S . C O M • Positive vaccine test results are a reminder that the darkness may clear soon1 • GDP forecast revised; output to match 4Q19 by the end of next year1 • Economic activity in the U.S. rebounded sharply last quarter. A nationwide surge in coronavirus infections will restrain GDP over the next couple of quarters, but outstanding results from vaccine trials has brightened the outlook for '21/'22. Longer term, structural headwinds (e.g., an aging population, elevated debt/GDP) will limit economic growth to the 2% range.1 COVID-19:The Economy 1 Green Street, U.S. Commercial Property Outlook, November 25, 2020 7
W W W . K B S . C O M • The continued demand for high-tech talent will help drive commercial real estate growth.1 • Office-using employment rebounded quickly in the third quarter of 2020 indicating future demand for physical workspaces. 2 • More than 30% of the private sector office-using jobs lost in the second quarter were recovered by the end of the third quarter.2 • Professional and business services drove the recovery of office-using employment during the third quarter. The Seattle and Dallas markets regained 94.1% and 71.8% of jobs in this sector.2 • Office-using job sectors, down 4.1% year-over-year, have continued to fare better than the labor market as a whole, down 6.1% year-over-year.3 • Newmark notes that office-using employment numbers have historically been a major factor in determining office returns, and the recent rebound in these numbers is a positive sign for the office market.2 8 COVID-19: Office Market Outlook 1 National Real Estate Investor, Oct. 26, 2020 2 GlobeSt.com, Office Jobs Recovering Faster Than Usual For a Recession, Nov. 30, 2020 3 Commercial Edge, National Office Report, November 2020
W W W . K B S . C O M COVID-19: What We are Seeing • We were the first large real estate firm to roll-out the Maptician space planning software to help tenants manage COVID risk. This has been well received. • We have implemented enhanced air-quality filtration and air-cleaning mechanisms to ensure air quality in our buildings continues to be clean and safe for all tenants. • According to Colliers, the number of coworking spaces is expected to double or triple nationwide in the next five years. The resurgence comes as more tenants give their employees additional options for working closer to home. 1 • Over the past seven months approximately 72.0 million square feet of sublease space has become available in the market which may have a negative effect on rental rates.2 • The good news for existing property owners like KBS is that supply is relatively constrained. This is more of a demand-driven downturn than an oversupply-driven market.3 9 1Commercial Observer, Number of Coworking Spaces to Double or Triple Nationwide in the Next Five Years, Nov. 24, 2020 2Commercial Edge, National Office Report, November 2020 3 Cushman & Wakefield, U.S. National Marketbeat Report, Office, Q3, 2020
W W W . K B S . C O M As illustrated below, rental collection rates for the office sector, as reported by NCREIF, have hovered slightly below or above 90%.1 10 COVID-19: Rent Collections 1 Rent Analysis Report, NCREIF, November 2020 As of November 15, 2020
W W W . K B S . C O M Depending upon the duration of quarantines and the corresponding economic slowdown, some of Company's tenants have or will seek rent deferrals or become unable to pay their rent. Through December 5, 2020, rent collections is as follows: Over the course of the COVID-19 crisis, the Company has received short-term rent relief requests from tenants who have been directly impacted by mandated closures. Rent relief arrangements have been structured as temporary deferrals of base rent that will be paid back over a range of 12 to 24 months. In most cases, it is in the Company's best interest to help its tenants remain in business and reopen when shelter-in-place orders or other mandated closures are lifted. Rent relief requests to date may not be indicative of collections or requests in any future period. 11 Period of Rent Collected % of Rent Collected Q2 2020 95% Q3 2020 90% October 2020 90% November 2020 92% COVID-19: Rent Collections
W W W . K B S . C O M 12 Distributions The Advisor continues to defer the collection of asset management fees, which results in more cash available to pay distributions. From January through June 2020, the Company's Board of Directors declared a monthly distribution equal to a 3% annualized rate based on the December 2019 net asset value per share. However, the Board has determined to adjust the distribution policy in response to the uncertainty caused by the ongoing public health crisis of the COVID-19 pandemic and its impact on the Company's operations and those of its tenants. For the quarter ended September 30, 2020, the Company's Board authorized a quarterly distribution equal to a 2% annualized rate based on the December 2019 net asset value per share, which was paid in November 2020. COVID-19: Distribution History: *on an annualized basis Distribution Rate Paid January 2020 – June 2020 $0.25/share* Q3 2020 $0.1686/share*
Portfolio Highlights 13
W W W . K B S . C O M FUND OVERVIEW Initial Private Offering June 2015 – April 2016 Public Offering April 2016 – June 2017 Second Private Offering October 2017 – August 20205 Current NAV (Dec. 2020)6 $4.90 per share Total Equity Raised7 $94.7 million Current Distribution Rate9 2.00% based on NAV 1 With the exception of total leverage, portfolio overview information reflects information as of September 30, 2020 for the current portfolio of consolidated real estate properties. 2 Represents aggregate acquisition price (excluding closing costs) of the current consolidated real estate portfolio and any subsequent capital expenditures. 3 Represents cost basis, which is acquisition price (excluding closing costs) plus subsequent capital expenditures for the current consolidated real estate portfolio. 4 Based solely on the appraised values as of September 30, 2020 as reflected in the December 2020 estimated share value for the current portfolio of consolidated real estate properties. 5 The Second Private Offering was suspended in December 2019 and officially terminated in August 2020. 6 Data as of September 30, 2020. See the Current Report on Form 8-K dated December 7, 2020 and the risk factors included in the Quarterly Report on Form-10Q. 7 Includes proceeds from distribution reinvestment plan. 8 Includes future leases of current consolidated real estate portfolio that had been executed but had not yet commenced as of September 30, 2020. 9 Distributions are not guaranteed. Current Distribution Rate is based on the December 2019 NAV and reflects the latest distribution declared in November 2020 10 Calculated as total debt on consolidated real estate properties of $91.8 million divided by December 2020 estimated value of all consolidated properties of $149.7 million. PORTFOLIO OVERVIEW 1 Total Acquisitions2 $158.2 million Cost Basis of Current Portfolio of Consolidated Properties 3 $170.6 million Dec. 2020 Estimated Value of Current Portfolio of Consolidated Properties4 $149.7 million Rentable Sq. Ft. 582,791 Total Leased8 91.5% Total Leverage10 61.3% 14 Fund and Portfolio Overview As of September 30, 2020, unless otherwise noted;
W W W . K B S . C O M PROPERTY NAME CITY, STATE PROPERTY TYPE / NO. OF BUILDINGS ACQUISITION DATE SIZE (SF) PURCHASE PRICE1 OCCUPANCY % AT ACQUISITION LEASED % AS OF 9/30/202 Commonwealth Building Portland, OR Office 1 Building 6/30/2016 224,122 $68,545,000 96% 87.1% The Offices at Greenhouse Houston, TX Office 1 Building 11/14/2016 203,284 46,489,000 95% 100.0% Institute Property Chicago, IL Office 1 Building 11/9/2017 155,385 43,155,000 92% 86.8% TOTAL / WEIGHTED AVG. 582,791 $158,189,000 95% 91.5% 15 Portfolio Highlights 1 Purchase price reflects contractual purchase price, net of closing credits, and excludes acquisition fees and expenses. 2 Total leased percentage includes future leases that have been executed but have not yet commenced as of September 30, 2020. As of September 30, 2020
W W W . K B S . C O M $46,150 $0 $0 $45,681 $0 $0 $20,000 $40,000 $60,000 2020 2021 2022 2023 Thereafter 3 Capital Management Initial Debt Maturities 1 Calculated as total debt on properties of $91.8 million divided by December 2020 estimated value of consolidated properties of $149.7 million. 2 Average cost of debt as of September 30, 2020. 3 Subsequent to September 30, 2020, the maturity of this loan balance was extended to November 2021 and the Company has the option to exercise an additional one-year extension to November 2022. Total Debt $91.8 million Loan-to-Value1 61.3% Average cost of debt2 3.9% per annum Average term to initial maturity 1.22 years Average term to fully extended maturity 3.22 years Interest Rate Exposure ($ in millions) 16 As of September 30, 2020 Floating-Rate Debt (Unswapped) $13.3 14% Floating-Rate Debt (Fixed through Swap) $78.5 86%
W W W . K B S . C O M Portfolio Overview1 Geographic Diversification3 1 All information in the property overview excludes an investment in unconsolidated JV. 2 Leased % includes future leases that had been executed but had not yet commenced as of September 30, 2020. 3 Based on occupied square feet as of September 30, 2020. No. of Consolidated Held for Investment Assets 3 Total Rentable Sq. Ft. 582,791 Wtd Avg Lease Term 3.2 years Economic Occupancy 91.5% Leased Occupancy2 91.5% No. of Tenants 62 Occupied SF Expirations as of September 30, 2020 Key Statistics Leased Occupancy2 2.8% 3.0% 13.9% 8.9% 18.6% 36.0% 5.9% 4.1% 5.3% 0.0% 1.5% 0.0% 0 20,000 40,000 60,000 80,000 100,000 120,000 140,000 160,000 180,000 200,000 S q u a re F e e t 17 As of September 30, 2020 OR 37% TX 38% IL 25% 87.1% 100.0% 86.8% 70% 80% 90% 100% Commonwealth Offices at Greenhouse Institute Property
W W W . K B S . C O M Tenancy Overview1 Industry Diversification3 Top 10 Tenants Industry Property % of Portfolio2 AECOM Professional, Scientific and Technical Offices at Greenhouse 25.4% J. Connor Consulting, Inc. Management Consulting Offices at Greenhouse 6.0% Galois, Inc Computer Systems Design & Programming Commonwealth 5.8% Quantum Spatial Professional, Scientific and Technical Commonwealth 4.6% City of Portland Public Administration (Government) Commonwealth 3.9% NEEA Educational Services Commonwealth 3.7% Downtown Entertainment LLC Accommodation and Food Services Institute Property 3.7% Cushing and Company Other Institute Property 3.6% Infogroup, Inc. Information Commonwealth 2.6% Kennedy Jenks Consult, Inc Professional, Scientific and Technical Commonwealth 2.4% TOTAL (based on total occupied square feet) 61.7% Weighted Average Lease Term (Top 10 Tenants) 3.42 years 18 As of September 30, 2020 1 All information in the tenancy overview excludes an investment in an unconsolidated JV. 2 Based on occupied square feet as of September 30, 2020. 3 Annualized base rent represents annualized contractual base rental income as of September 30, 2020, adjusted to straight-line any contractual tenant concessions (including free rent), rent increases and rent decreases from the lease's inception through the balance of the lease term. Percent of annualized base rent is based on total annualized base rent of the current portfolio. 4 "Other" is comprised of various industries with less than 3% of total annualized base rent. Management Consulting 5% Accommodation and Food Services 6% Finance 3% Public Administration 5% Arts, Entertainment, and Recreation 4% Professional, Scientific and Technical Services 37% Information 7% Computer Systems Design and Related Services 10% Healthcare & Social Assistance 3% Manufacturing 4% Other4 9% Educational Services 3% Advertising, Public Relations and Related Services 4%
December 2020 Estimated Value Per Share 19 19
W W W . K B S . C O M • Appraisals of all three KBS G&I REIT's real estate properties owned and one investment in unconsolidated joint venture as of September 30, 2020, performed by Duff & Phelps. • Valuations performed by the Advisor of KBS G&I REIT's cash, other assets, mortgage debt and other liabilities. The estimated value of the notes payable is equal to the GAAP fair value as disclosed in the Quarterly Report, and the estimated values of cash and a majority of other assets and other liabilities are equal to their carrying values. KBS G&I REIT's estimated value per share2 was determined in accordance with the Institute for Portfolio Alternatives' (formerly known as the Investment Program Association) Practice Guideline 2013-01, Valuations of Publicly Registered Non-Listed REITs. Duff & Phelps, an independent, third-party real estate valuation firm, was engaged to provide a calculation of the range in estimated value per share of common stock as of September 30, 2020. Duff & Phelps based the range in estimated value per share upon: • The estimated value per share did not include an enterprise (portfolio) premium or discount. Consideration was given to any potential subordinated participation in cash flows that would be due to the Advisor in a hypothetical liquidation if the required stockholder return thresholds are met. The Advisor estimated the fair value of this liability to be $0. 20 Valuation1 1 For more information, see the Valuation 8-K. 2 The estimated value of the REIT's assets less the estimated value of the REIT's liabilities, divided by the number of shares outstanding, all as of September 30, 2020. KBS G&I REIT's board of directors approved $4.90, which represents the mid-range value of the range in estimated value per share calculated by Duff & Phelps, as the estimated value per share of KBS G&I REIT's common stock as recommended by the Advisor and KBS G&I REIT's conflicts committee. Both the range in estimated value per share and the estimated value per share were based on Duff & Phelps' appraisals and the Advisor's valuations.
W W W . K B S . C O M 21 Valuation Summary 1 Based on data as of September 30, 2020 as discussed in the Valuation 8-K. 2 Based on data as of September 30, 2019. 3 Includes rents and other receivables, deposits and prepaid expenses as applicable. 4 Includes accounts payable, accrued liabilities, security deposits and prepaid rent. December 20201 Estimated Value December 20192 Estimated Value Real Estate (Consolidated Properties) $149,740,000 (97.8%) $208,700,000 (96.9%) Investment in Unconsolidated Joint Venture $214,768 (0.1%) $824,443 (0.4%) Cash $2,255,503 (1.5%) $4,903,245 (2.3%) Other Assets3 $923,658 (0.6%) $839,258 (0.4%) Total Assets: $153,133,929 $215,266,946 Mortgage Debt $90,588,521 $119,307,267 Other Liabilities4 $12,683,243 $10,860,798 Total Liabilities: $103,271,764 $130,168,065 Net Equity at Estimated Value $49,862,165 $85,098,881
W W W . K B S . C O M 22 Valuation Change Summary 1 Based on the estimated value per share of KBS G&I REIT's assets less estimated value of KBS G&I REIT's liabilities, divided by the number of shares outstanding, all as of September 30, 2020. 2 Modified operating cash flows reflects modified funds from operations ("MFFO") adjusted to add back the amortization of deferred financing costs and deferral of asset management fee. The Company computes MFFO in accordance with the definition included in the practice guideline issued by the IPA in November 2010. December 2019 estimated value per share 8.43 Changes to estimated value per share: Real Estate (Consolidated Properties) (3.37) Capital expenditures on real estate (0.21) Total change related to real estate (3.58) Investment in Unconsolidated Joint Venture (0.06) Modified operating cashflows in excess of distributions declared 2 0.18 Changes to other assets and liabilities: Mortgage debt 0.20 Interest rate swaps (0.08) Deferral of asset management fee liability (0.17) Other changes (0.02) Total changes to fair value of other assets and liabilities (0.07) Total change in estimated value per share (3.53) December 2020 estimated value per share 4.90 On December 7, 2020, KBS G&I REIT's Board of Directors approved an estimated value per share of $4.90.1 The following is a summary of the estimated value per share changes within each asset and liability group from the December 2019 estimated value per share. The decrease in estimated value per share was primarily due to the decrease in real estate value. $ $ $
W W W . K B S . C O M 23 Real Estate Valuation Updates The value of $48.5 million represents a $8.5 million or 14.9% decrease vs. the appraised value of $57.0 million as of December 2019. The value decrease was primarily due to the following: • The largest tenant at the project, AECOM, decided to market approximately 84,000 square feet of its total 136,000-square-foot leased premises for sublease, resulting in a significant reduction in value due to the projected costs and downtime attributable to backfilling this space in 2025 and beyond. • The effect of COVID-19 on the oil and gas markets has reverberated through the office capital markets, resulting in increased underwritten vacancy and expanding cap rates across the office marketplace. Leasing velocity in the Houston market, the energy capital of the world, has remained stagnant during what has been a challenging time given the impacts of not only COVID-19 on office demand, but also a downward shock to commodity pricing putting further stress on demand for office space among oil and gas companies which traditionally drive this market. • Reduced leasing expectations underscore the economic difficulties of the metro, resulting in rising concessions and in some cases reduced rental rates. Offices at Greenhouse Houston, Texas Offices at Greenhouse
W W W . K B S . C O M 24 Real Estate Valuation Updates The value of $65.3 million represents a $19.3 million or 22.8% decrease vs. the appraised value of $84.6 million as of December 2019. The value decrease was primarily due to the following: • Portland, Oregon has been disproportionately affected by COVID-19. With nonessential offices closed, tenants are unable to use their space. Combined with social unrest concerns among the most severe in the U.S., many downtown businesses have chosen to list their spaces for sublease in order to cut costs in the short term. In addition, some tenants with impending lease expirations are giving back their space and are either relocating out of the area or temporarily working from home as an alternative. • Several tenants including NEEA, DLR Architecture, Citrix, Jack Olds, and Acorns have put notice that they will not be renewing at Commonwealth. Such known vacates and the risk of others, without the promise of quick backfills or leasing of existing vacancy, could leave us with occupancy in the 60% - 65% range by year end 2021 despite being 87% leased today. • The increase in vacancy throughout Portland has caused market rents to decrease significantly and anticipate to continue to decline by more than 10% from pre-COVID levels. In addition, an expectation of increased concessions while still very few data points in 2020 given the ongoing pandemic. While social unrest has quieted post-election, the absence of a daily downtown population continues to be a drag on any appearance of market recovery. Commonwealth Portland, Oregon Commonwealth Commonwealth
W W W . K B S . C O M 25 Real Estate Valuation Updates The value of $35.9 million represents a $6.0 million or 14.3% decrease vs. the appraised value of $41.9 million as of December 2019. The value decrease was primarily due to the following: • Rental rates decreased from $33 psf to $31 psf on average. Additionally, there was no rent growth assumed for the following two years, which has an adverse effect on the compounding of rents. • Tenant retention has been down. Currently, there are five tenants totaling over 21,000 square feet who will be vacating at the end of their leases. • 2020 leasing has been slow as Chicago has been one of the most impacted cities regarding COVID-19 lock-downs and restrictions. 213 W. Institute Chicago, IL 213 W. Institute
W W W . K B S . C O M Due to the minimal amount of capital raise in the REIT, which had been substantially impacted early on by regulatory changes, and the inability to significantly improve its size and scale in order to help offset the sizeable G&A costs of operating a non-traded REIT, the Board formed a special committee to evaluate strategic alternatives for the REIT. Based upon the special committee's assessment and recommendation, in August of 2020, the special committee directed the Company's advisor, with the assistance of the independent financial advisor of the special committee, to develop a plan of liquidation for approval by the board and submission to our stockholders. The Company initially expected to present a plan of liquidation for a vote of the stockholders of the Company within six months from its determination to pursue a liquidation strategy. However, as a result of the current adverse market conditions caused by the civil unrest and disruption in Portland and Chicago, where several of the Company's properties are located, and the ongoing uncertainty and business disruptions related to the COVID-19 pandemic, the board believes it is in the best interest of the stockholders to delay any proposal to liquidate the Company. The Company remains committed to pursuing a liquidation strategy when market conditions improve. 26 Update on Strategic Alternatives
W W W . K B S . C O M 2021 Goals 27 Continue to evaluate the timing of our liquidation strategy Improve property cash flow through strategic leasing renewals with existing tenants and new leases for current vacant space Continue value enhancing capital projects to maintain the high level of occupancy
28 Q&A For additional questions, contact KBS Capital Markets Group Investor Relations (866) 527-4264


text:
Inspirational stories, leadership styles, life lessons, pivotal moments, business tips, and more were shared on this episode of Collaborative Connections Radio Show and podcast, sponsored by KLM Consulting, Marketing, and Management.
Host, Kelly Lorenzen was on-air with Judy Smith of Smith Hager Bajo, Inc., Madeline Frederick with Children's Hospital Los Angeles (CHLA), and Megan Duffy with DLR Group.
They also shared why they chose healthcare, their BIG WHY, brands, values, culture, and what collaboration means to them.
It was such a dynamic conversation with these amazing business leaders and worth the listen.
Our Featured Guests
Judy Smith started her hospital career at WakeMed in Raleigh, NC. She worked with several health systems before moving into the world of management consulting and facility planning.
As a consultant, she has successfully completed more than 1,000 women and children's hospital projects in six countries and is an active lecturer, author and strategist.
She has devoted her career and significant personal time to improving the health environment for women and children.
Connect with Judy on LinkedIn.
Smith Hager Bajo, Inc., is a consultant-owned firm committed to making a difference in the health care of women and children.
Since the firm was founded by three women in 1995, it has become recognized nationally for helping hospitals improve their services and environments for women and children.
Collectively, consultants have completed more then 2,000 projects ranging from strategic business planning of women's health services to facility planning for state of the art children's hospitals.
Madeline Frederick is a hospital executive, with expertise in strategic planning, operational improvement, and aligning resources with organizational goals.
She has twelve years of experience in healthcare administration, including roles with the VA Health System, academic health systems, an NCI-designated cancer center, and currently, a children's hospital.
While she has built her career in southern California, she is originally from Kansas City, and earned her Master of Health Services Administration from University of Kansas Medical Center.
Founded in 1901, Children's Hospital Los Angeles is a worldwide leader in pediatric and adolescent health.
Megan Duffy is a Principal at DLR Group and has over 20 years of experience in interior design and planning services for public and private sector clients including healthcare clients.
As Senior Interior Design Lead, she takes pride in her role as a mentor, leader, and creative spirit. She takes on every project with an eye toward expressing the goal and mission of every client.
DLR Group is an integrated design firm delivering architecture, engineering, interiors, planning, and building optimization for new construction, renovation, and adaptive reuse.
Their promise is to elevate the human experience through design. This promise inspires sustainable design for a diverse group of public and private sector clients; local communities; and the planet.
DLR Group is 100 percent employee-owned and fully supports the initiatives and goals of the 2030 Challenge, and is an initial signatory to the China Accord and the AIA 2030 Commitment.
About Collaborative Connections
Kelly Lorenzen started the "Collaborative Connections" show to bring her clients and favorite charities together to meet each other, connect and collaborate in life and business. She hopes to build a stronger community one show at a time.
What Is Your Why?
Relationships Matter
Project Management and Technology
KLM Services
`); }); $('body').on('click', '.things-we-can-help-with .toggle-more', function(){ $(this).parents('.things-we-can-help-with').toggleClass('view-more'); }); }); //]]>


text:
Q: ¿Cómo usar la función fillna() de pandas con un array de valores? Tengo este dataframe

Y se necesita cambiar los valores NaN en la columna price por los valores en el array samples. Sin embargo al utilizar fillna() como en el código no cambia los valores
samples = np.random.normal(media,std,d.price.isna().sum())
d.fillna(value = pd.Series(samples))

¿Cómo se puede utilizar el fillna() con el array samples para cambiar los valores NaN en el dataframe?

A: fillna() solo acepta parametros tipo scalar o dict.
Si necesitas obligatoriamente usar fillna() tendrás que convertir los valores de "samples" en un diccionario, un ejemplo:
import numpy as np
import pandas as pd

# DataFrame con los datos
df = pd.DataFrame([[75.97, 0.0, 9.05], [np.nan, 1.0, 10.88], [np.nan, 0.0, 11.65], [107.92, 2.0, 8.92]], columns=['price','category','margin'])

# Creas samples, como diccionario
samples = {'price': {1:1000, 2:5000}}

# Usas fillna para cambiar los valores de la columna "price"
df_no_NaN = df.fillna(value=dic)

print(df_no_NaN)

Al crear samples: tendrás que tener en cuenta lo siguiente, pasar el nombre de la columna y la posición de la fila.
samples = {'NOMBRE_DE_TU_COLUMNA': {#FILA_PRIMER_NAN:1000, #FILA_SEGUNDO_NAN:5000}}

También debes tener en cuenta, que usar:
df.fillna(value=samples)

No afecta al DataFrame df, tendras que asignar el resultado a otro DataFrame o asignarlo al mismo "df"
df = df.fillna(value=samples)

A: Comparto una aproximación complementaria que aprovecha la función de DataFrame.apply:
https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.apply.html
Pasos:

*

*crear lista de samples (como hiciste)

*crear una función que hace list.pop(0) a un valor de samples, lo cual va quitando los valores de samples uno por uno por cada NaN que encuentra

*aplicar DataFrame.apply con una función lambda que aplica esa función a cada NaN de la columna 'price'

# Datos inventados
#
#itemid   price  cat
# 0    2835  108.08    1
# 1    5236     NaN    2
# 2    2480   91.84    0
# 3    2700     NaN    0
# 4    3352   92.60    1
# 5    3477   77.28    2
# 6    4102  118.41    1
# 7    5065     NaN    0

media_antes = np.mean(df['price'])
std_antes = np.std(df['price'])
samples = list(np.random.normal(media_antes,std_antes,df['price'].isna().sum()))
# [88.239808,112.273754,84.982539]

# Función que se aplica a la función lambda
def getOne():
    res = samples[0]
    samples.pop(0)
    return res

# Modificar la columna precio
df['price'] = df['price'].apply(
    lambda x: getOne() if pd.isna(x) else x
)

# Resultado/Datos modificados
#
#itemid       price  cat
# 0    2835  108.080000    1
# 1    5236   88.239808    2
# 2    2480   91.840000    0
# 3    2700  112.273754    0
# 4    3352   92.600000    1
# 5    3477   77.280000    2
# 6    4102  118.410000    1
# 7    5065   84.982539    0

Comparé la media y la desviación estándar antes y después (varias veces), y la media cambia algo aunque la desviación estándar no tanto.
Antes:
  itemid   price  cat
0    2835  108.08    1
1    5236     NaN    2
2    2480   91.84    0
3    2700     NaN    0
4    3352   92.60    1
5    3477   77.28    2
6    4102  118.41    1
7    5065     NaN    0

M = 97.6
sd = 14.2

Después:
   itemid       price  cat
0    2835  108.080000    1
1    5236   88.239808    2
2    2480   91.840000    0
3    2700  112.273754    0
4    3352   92.600000    1
5    3477   77.280000    2
6    4102  118.410000    1
7    5065   84.982539    0

M = 96.7
sd = 13.6

Con una muestra más grande el cambio de media y variación debe de ser mucho menor.


text:
Jung_E (2023) Netflix Movie Review
An exciting sci-fi that falls flat
Jung_E is Netflix's latest Korean film with a dystopian premise where humans are at war. With the Allied Forces and the Adrian Republic constantly at war, Kronoid devices Jung_E, an AI project of a super-soldier to end it. Captain Yun Jung-yi, an almost indestructible soldier who could even beat up robots when she was injured is the prototype.
A failed mission had lead to Yun going into a coma with her daughter leading a team years later to create an AI combat robot modelled after her. The Allied vs Adrian civil war would have been won had she completed her last mission, such was her power and it is now up to Kronoid to have the AI finish the mission she never did.
Jung_E gives viewers a new take on the humans vs robots scenario as several of the characters have cyborg-like qualities. And with it being an action movie, the well-choreographed action sequences are anything but boring – an aspect that film buffs especially love about Korean movies.
Shocking plot twist after plot twist keep viewers on their toes like the very first revelation that the Captain Yun we first see is not actually human and that she is being used as a model to create an AI who is as impervious and clever as her in warfare. The production is futuristic with a hint of nostalgia from old school stand fans to sky trains with 21st-century interiors hinting at the human race's want to win the war and go back to the old days.
While we see her daughter, team leader Yun Seo-hyun doing her best to greenlight the Jung_E project and make it a success, the main focus is on Captain Yun and how she was when she was alive and her AI who acts and feels like humans do. It's like the writers want us to root for her and Kim Hyun-joo does a remarkable job of portraying such a complex character despite her limited screen time.
We also get multi-dimensional characters from the quiet leader Yun Seo-hyun who has some tricks up her sleeves, played by the late Kang Soo-yeon to the mysterious director Kim portrayed by Ryu Kyung-soo. Along with them, we have the maddeningly charming cameo by Uhm Ji-won as production head, Lee Se-yeon who makes you wonder if she will be the bad guy.
But it is a shame to see Kang Soo-yeon's last role wasted on the prudent Seo-hyun who could have been better explored especially with the fact that she is such a dynamic character's daughter. However, she is made into a sad and sulky character whose only purpose in life is to perfect her mother's AI. Instead, Ryu Kyung-soo is given more space to explore as the grey character Kim from being the funny guy who acts as the comic relief to pulling his weight when he needs to with suspicious motives.
Additionally, the world-building of Jung_E has too many facets being explained at the same time, making it confusing for those who watch it for the first time. Too many storylines mess up the pacing making us wonder just how exciting they could have been if Jung_E would have instead been made into a TV show. It also makes the other characters' arcs uninteresting as we would rather watch the AI of Captain Yun and cheer for her.
Jung_E also has us waiting for something big and climactic but it never appears. Viewers expect the Jung_E project to culminate into something explosive but the way it progresses is anything but satisfactory as this exciting premise with much potential falls flat in the second half as you keep waiting for the conflict only to realise the movie is almost coming to an end.
Read More: Jung_E Ending Explained
Feel free to check out more of our movie reviews here!
Chris Hipkins: Who is Jacinda Ardern's replacement as New Zealand's PM? | World News
Dying Light 2: Save Game PC Location Guide