I'm in bed this morning, cradling a heating pad and trying to ignore my body. I've had a lot of musculoskeletal pains over the years, along with some other surprises as I've aged. As I lie here, accepting that I'm being forced to take some time off, I found myself pondering this body and why it is I live so much of my life outside of it.
As writers, we tend to spend a lot of time in our heads. When we are planning stories, yes, but I'm willing to wager that you're like me, and you probably still live inside your head a lot, even when you aren't writing. This is something I would like to work on. I feel like I am always thinking. Say for instance, when I'm chopping vegetables, warming the skillet, and pulling spices from their cubbies, I'm not always present and focused on the task at hand. I might be thinking about what I want to do once I've finished dinner, or what I want to work on next in my writings, or I might be trying to remember what it is I wanted to do to my website. Regardless of what the thought is, the point is that I am living in my head. I'm roughly attached to my eyes to see what I'm doing and to my hands to keep myself moving, but I'm not truly existing in the moment, taking in the scene around me, feeling the activity or the lack of it, paying attention to the scents and sounds, no matter how subtle they may be.
I don't think this is healthy. I think habits like this continue to spill into everyday life and, ultimately, contribute to us being disconnected from those around us.
I don't have much of a point to this post. I just wanted to share my thoughts with you as I try to disconnect from this aching body. I hope you all have a wonderful day and an amazing week.
That is a great point. I do not spend enough time giving my thoughts their space. A daily walk would be wonderful for that. Thank you. And thank you for reading it.
I've been there, and often return to (or retreat into) my own personal headspace when I'm writing, searching for ideas, or dealing with unpleasant memories. On the other hand, over the years I've had a few interesting experiences that have taught me how to bring myself out and to engage with the world as it comes.
In essence, it boils down to a conscious choice.
When you catch yourself overthinking things, the best thing I can recommend is to force your mind to stop. This is best accomplished by taking deep breaths, while blanking your thoughts. Imagine yourself a mountain, and every fleeting thought or feeling a breeze passing over you. Even if you slip up and start giving them purchase, simply acknowledge that fact and continue trying to empty your head. This will gradually become easier to do, and with sufficient practice, you may find yourself living a lot more and overthinking a lot less.
There's still times when thinking about things is not only healthy, but necessary for survival. But that doesn't take away from the general dharma you want to get away from. It's easy to see how that can interfere with anyone's enjoyment of life.
Thank you so much for this. I am trying to get more regular with meditating to help as well. I like your suggestions, thank you.
I don't think there is a thing wrong with dreaming while awake, but it's true that most of us could use more practice attending to the here-and-now from time to time.
Sympathies on your chronic pain, WB. You might find it interesting that the two items you wrestle with in this piece (mindfulness and pain management) can be linked to improve both. I doubt your system will allow me to post a link, so Google "Using Mindfulness to Approach Chronic Pain" by Margarita Tartovsky.


We know the billing process can be very confusing and you may have questions following an office visit or procedure. We have a staff of seasoned professionals available to discuss any billing questions you have.
For all questions regarding your bill, please contact call our Billing staff at (503) 964-9565.
Why didn't my insurance company cover my visit?
All insurance companies have the same disclaimer: "Coverage is not a guarantee of payment". The term 'covered' is different than that of 'payment'. 'Covered' means that your insurance is going to allow the service(s) received and will process your claim according to your specific plan benefits. Reasons for non-payment include but are not limited to: non-covered service, deductible, co-insurance or cost share, co-pay, plan exclusion, etc. As an example, often times the office visit will be allowed and paid by the insurance plan but the procedure performed that same day is applied to the deductible. Given the number of insurance companies and the numerous networks and benefit packages it is not possible for us to know exactly what your benefits are. Questions regarding your specific benefits are better directed to your health insurance plan.
What is a deductible? What is co-insurance or cost share?
A deductible is a fixed amount you agree with your health insurance plan to pay out of pocket each year for covered (or allowed) health care costs before they begin to pay. For example, if you have a $1000 deductible, you will be responsible for paying for the first $1000 in healthcare expenses out of pocket before your insurance company begins to pay. After the deductible has been satisfied there may also be an amount due from you called a co-insurance or cost share amount. This term refers to an amount you may be required to pay as your cost share for certain covered services. This amount is usually calculated as a percentage.


The original winning artwork becomes the property of SWISSARTEXPO. The artist assigns all rights to this original winning artwork to ARTBOX.GROUPS GmbH. After SWISSARTEXPO, the artist is prohibited from selling any further copies of the winning artwork, neither in copy form nor in digital form. For all other submitted artworks that do not win the copy right stays with the artist.
ARTBOX.TALENT is a non-profit platform that offers free exhibition possibilietes to artists from all around the world. ARTBOX.TALENT is financed exclusively by sponsores and patrons. Various free art tenders give young and upcoming artists the possibility to show their art.
From 15th - 19th August 2019 the big art festival SWISSARTEXPO will take place in Zurich. We would like to offer an artist the opportunity to occupy a very special place at SWISSARTEXPO by designing the official SWISSARTEXPO poster. The official poster will be shown large at the entrance to SWISSARTEXPO and integrated into the exhibition's overall appearance.
The participation is free of charge!
What requirements must the poster fulfill?
All details, such as the official logo, sponsors, dates, etc. will be added by the SWISSARTEXPO team. You do not have to put this on the poster.


text:
"11 shoes inspired by 11 cities around the world" The KYRIE 6 Preheat Collection is coming 11/11
By JBettis420 | November 6, 2019
Kyrie Irving has a special connection to number 11. It begins with his dad, Drederick Irving, who wore #11 during his basketball career; Kyrie wore it in high school and does now with Brooklyn. The connection extends to a metaphor for balance and harmony (1+1) that resonates with Kyrie, and cascades from there. "K" is the eleventh letter of the alphabet; "Kyrie Irving" is 11 letters; Irving played 11 games at Duke University; he was drafted round 1, pick 1 in the 2011 NBA draft and he surpassed the 11,000 point mark on March 11.
With a nod to Irving's globetrotting curiosity and 11 cities with special meaning to him, the KYRIE 6 will debut with a preheat collection of 11 shoes inspired by 11 cities, including Beijing, Berlin, Guangzhou, Houston, Los Angeles, Manila, Miami, New York City, Shanghai, Taipei, and Tokyo.
The KYRIE 6 preheat collection will be available on November 11 exclusively in each respective city.
Click through the link below for a closer look at all these amazing colorways.
The KYRIE 6 Preheat Collection is 11 shoes inspired by 11 cities releasing on 11/11
Related Itemssd
← Previous Story Kyrie Irving on 'Unboxed' with B/R Kicks: An Exclusive Look at the Kyrie 6
Next Story → Roddy Ricch Goes Sneaker Shopping With Complex
Breaking: Damon Dash arrested in NYC for unpaid child support
Dre and Ye?!!! Kanye says he and Dre are working on Jesus Is King Part II
The Incredible Story of the Bugatti in the Lake

redpajama_set_name: RedPajamaCommonCrawl


Come and join the farm this Friday for the Christmas sales day on 7th December 11-3. Be sure to pop down and check the farm out, there will be lots on offer including Christmas trees, calendars, jams, crafts and fresh food in the cafe.
Come and join us at the farm for our open day where we will have lots of bedding plants, small crafts and farm produce on sale! Come and meet the animals and see the farm in the sunshine (hopefully!). We will be here 11-3 and look forward to seeing you there!
Get in touch and join us for NBF's latest fundraiser!
We held a Royal Ascot race day at our Croftbrook Opportunity day centre making hats for all of our clients with all of our staff participating and dressing up for the occasion. There were 8 races for everyone to bet on with prizes of chocolates for the winning bets. There were also champagne & strawberries as an afternoon treat for the special occasion. Everyone had a fantastic day.
A Charity partnership with Bumble the Bus.
The Family Care Trust Craft Group has been set up as a result of a number of very generous donations of crafting equipment and with the kind support of volunteers giving up their time to make crafts and cards which will be on sale to raise funds for the Family care Trust.
Family Care Trust is celebrating its 25th anniversary in 2019!


UAE striker Ahmed Khalil has agreed to join Al Jazira this summer, ending his long affiliation with Al Ahli.
UAE striker Ahmed Khalil looks set to join Al Jazira this summer on a free transfer, ending his long affiliation with Al Ahli, although as of Wednesday night there had been no official confirmation from either club.
The forward, whose contract with the UAE champions has entered its final few months and thus makes him a free agent, has reportedly accepted a four-year deal with the Abu Dhabi club, worth an estimated Dh18m per year. It would make him one of the highest paid footballers in the UAE.
Khalil had been discussing renewing his contact with Ahli, his boyhood club whom he has served since making his debut in 2006, but the package offered by Jazira is considerably more attractive. Cosmin Olaroiu, the Ahli manager, initially denied the news following his side's 2-0 victory at Al Dhafra on Wednesday's, which Khalil missed through injury, but the Romanian did suggest his striker had received a better proposal elsewhere.
Nevertheless, Khalil's appeal is obvious. In 163 league appearances for Ahli in the professional era, he has scored 56 goals. During that time, he has three UAE top-flight titles, one President's Cup and the Arabian Gulf Cup twice, while in 2015 he played an integral role in Ahli's run to the Asian Champions League final.
Khalil has also become one of the UAE's most influential stars. He scored the goals to seal a first appearance at the Olympics, in 2012, and was a key part of the side that won the 2013 Gulf Cup and finished third at the 2015 Asian Cup – the country's best performance on foreign soil. His 15 goals thus far in qualification for the 2018 World Cup make him the competition's top scorer.
As his impact and profile has increased, so too has Khalil's standing both inside and outside the UAE. He has often captained club and country, and has in the recent past been subject of interest from Spain's Primera Liga, Italy's Serie A and the Portuguese top flight. Al Ain have also been linked.
At Jazira, Khalil would line up alongside compatriot Ali Mabkhout, the 2016/17 AGL's current leading goalscorer. Ahli, meanwhile, began the season with Khalil, Rodrigo Lima and Asamoah Gyan on their books, but with Lima injured and Gyan struggling for form and fitness, it leaves the Dubai side with much work to do this summer.
Editor's note: Story updated from earlier version to reflect clubs' comments from Wednesday night.


text:
package mealplanner

// main HTTP server handlers for the meal planner backend

import (
	"appengine"
	"appengine/datastore"
	"appengine/mail"
	"appengine/memcache"
	"appengine/user"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"net/http"
	"os"
	"strings"
	"time"
	"unicode"
)

// Error constants
var (
	ErrUnknownItem      = errors.New("Unknown item")
	ErrUnsupported      = errors.New("Unsupported action")
	ErrPermissionDenied = errors.New("Permission Denied")
)

// setup the handler functions
func init() {
	http.HandleFunc("/", errorHandler(indexHandler))
	http.HandleFunc("/dish", cacheHandler(dishHandler))
	http.HandleFunc("/dish/", cacheHandler(dishHandler))
	http.HandleFunc("/users", permHandler(usersHandler))
	http.HandleFunc("/ingredient", cacheHandler(ingredientHandler))
	http.HandleFunc("/ingredient/", cacheHandler(ingredientHandler))
	http.HandleFunc("/menu/", cacheHandler(menuHandler))
	http.HandleFunc("/tags", permHandler(allTagsHandler))
	http.HandleFunc("/backup", permHandler(backupHandler))
	http.HandleFunc("/restore", permHandler(restoreHandler))
	http.HandleFunc("/share/", errorHandler(shareHandler))
	http.HandleFunc("/shareAccept/", errorHandler(shareAcceptHandler))
	http.HandleFunc("/libraries", errorHandler(librariesHandler))
	http.HandleFunc("/switch/", errorHandler(switchHandler))
	http.HandleFunc("/deletelib", errorHandler(deletelibHandler))
	// search uses POST for a read, we don't use permHandler because
	// it would block searches of readonly libraries
	http.HandleFunc("/search", errorHandler(searchHandler))
}

// context structure to carry common data we need for most of our handlers
type context struct {
	w        http.ResponseWriter
	r        *http.Request
	c        appengine.Context
	u        *user.User
	uid      string
	l        *Library
	lid      *datastore.Key
	readOnly bool
}

// type to let us build general functionality for a handler
//  using a common context
type handlerFunc func(c *context)

// errorHandler catches errors and prints an HTTP 500 error
func errorHandler(handler handlerFunc) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {
		defer func() {
			if err, ok := recover().(error); ok {
				w.WriteHeader(http.StatusInternalServerError)
				fmt.Fprintf(w, "%v", err)
			}
		}()
		c := newContext(w, r)
		handler(c)
	}
}

// permHandler wraps errorHandler and also checks for non-GET methods
//  being used with a read-only library
func permHandler(handler handlerFunc) http.HandlerFunc {
	return errorHandler(func(c *context) {
		if c.readOnly && c.r.Method != "GET" {
			check(ErrPermissionDenied)
		}
		handler(c)
	})
}

// cacheHandler wraps permHandler and errorHandler, it checks the
//  cache for the response first
func cacheHandler(handler handlerFunc) http.HandlerFunc {
	return permHandler(func(c *context) {
		if c.r.Method == "GET" {
			item, err := memcache.Get(c.c, c.lid.Encode()+c.r.URL.Path)
			switch err {
			case nil:
				c.w.Write(item.Value)
				return
			case memcache.ErrCacheMiss:
				// we don't have the result cached, use the handler
				break
			default:
				check(err)
			}
		}
		handler(c)
	})
}

// panics if err != nill
func check(err error) {
	if err != nil {
		panic(err)
	}
}

// redirect "/" to "index.html"
func indexHandler(c *context) {
	http.Redirect(c.w, c.r, "/index.html", http.StatusFound)
}

// returns JSON information about the user [{Name: "", logoutURL:""}, ...]
func usersHandler(c *context) {
	logoutURL, _ := user.LogoutURL(c.c, "/index.html")
	fmt.Fprintf(c.w, `[{ "Name" : "%v", "logoutURL" : "%v"}]`,
		c.u, logoutURL)
}

// returns JSON with dish or dishes
func dishHandler(c *context) {
	// handle measured ingredients
	if strings.Contains(c.r.URL.Path, "/mi/") {
		measuredIngredientsHandler(c)
		return
	}
	// handle tags
	if strings.Contains(c.r.URL.Path, "/tags/") {
		wordHandler(c, "Tags")
		// update keywords if tags have changed
		if c.r.Method != "GET" {
			updateDishKeywordsKeyStr(c, getParentID(c.r))
		}
		return
	}
	// for debugging, get keywords
	if strings.Contains(c.r.URL.Path, "/keywords/") {
		wordHandler(c, "Keyword")
		return
	}
	// handle pairings
	if strings.Contains(c.r.URL.Path, "/pairing/") {
		pairingHandler(c)
		return
	}
	// use the standard data handler, add post-processing via callback
	//  so we can update keywords and remove references to this dish
	//  when items are written and deleted
	handler := newDataHandler(c, "Dish", func() Ided { return &Dish{} }, "Name")
	handler.handleRequest(c.lid,
		func(method string, key *datastore.Key, item Ided) {
			switch method {
			case "POST", "PUT":
				// update keyword index after a change
				updateDishKeywords(c, key, item.(*Dish))
			case "DELETE":
				// remove any measured ingredients of this dish
				query := c.NewQuery("MeasuredIngredient").Ancestor(key).KeysOnly()
				keys, err := query.GetAll(c.c, nil)
				check(err)
				datastore.DeleteMulti(c.c, keys)
				// removing any pairings that reference this dish
				query = c.NewQuery("Pairing").Filter("Other=", key).KeysOnly()
				keys, err = query.GetAll(c.c, nil)
				check(err)
				datastore.DeleteMulti(c.c, keys)
				for _, pk := range keys {
					memcache.Delete(c.c, "/dish/"+pk.Parent().Encode()+"/pairing/")
				}
				// fix any menus referencing this dish
				query = c.NewQuery("Menu")
				iter := query.Run(c.c)
				menu := &Menu{}
				for mkey, err := iter.Next(menu); err != datastore.Done; mkey, err = iter.Next(menu) {
					check(err)
					newDishes := make([]*datastore.Key, 0, len(menu.Dishes))
					for _, dkey := range menu.Dishes {
						if !key.Equal(dkey) {
							newDishes = append(newDishes, dkey)
						}
					}
					if len(newDishes) < len(menu.Dishes) {
						menu.Dishes = newDishes
						_, err = datastore.Put(c.c, mkey, menu)
						check(err)
						// flush the cache for menus
						memcache.Delete(c.c, c.lid.Encode()+"/menu/"+mkey.Encode())
						memcache.Delete(c.c, c.lid.Encode()+"/menu/")
						memcache.Delete(c.c, c.lid.Encode()+"/menu")
					}
					menu = &Menu{}
				}
			}
		})
}

// query data store for tags applied to the element with key given,
//  add them to the map passed in
func addTags(c appengine.Context, key *datastore.Key, words map[string]bool) {
	query := datastore.NewQuery("Tags").Ancestor(key)
	iter := query.Run(c)
	tag := &Word{}
	for _, err := iter.Next(tag); err == nil; _, err = iter.Next(tag) {
		addWords(tag.Word, words)
	}
}

// break up the text into words and add/remove keywords  for the dish
func updateDishKeywords(c *context, key *datastore.Key, dish *Dish) {
	words := make(map[string]bool)
	addWords(dish.Name, words)
	addWords(dish.Source, words)
	addWords(dish.Text, words)
	addTags(c.c, key, words)
	if updateKeywords(c.c, key, words) {
		// if we made changes, we need to clear the cache
		cacheKey := c.lid.Encode() + "/dish/" + key.Encode() + "/keywords/"
		memcache.Delete(c.c, cacheKey)
	}
}

// update the keywords for the dish, starting with the encoded key for the dish
func updateDishKeywordsKeyStr(c *context, keyStr string) {
	key, err := datastore.DecodeKey(keyStr)
	check(err)
	dish := Dish{}
	err = datastore.Get(c.c, key, &dish)
	check(err)
	updateDishKeywords(c, key, &dish)
}

// update the ingredient's keywords
func updateIngredientKeywords(c *context, key *datastore.Key,
	ing *Ingredient) {
	words := make(map[string]bool)
	addWords(ing.Name, words)
	addWords(ing.Category, words)
	addTags(c.c, key, words)
	if updateKeywords(c.c, key, words) {
		// if we made changes, we need to clear the cache
		cacheKey := c.lid.Encode() + "/ingredient/" + key.Encode() + "/keywords/"
		memcache.Delete(c.c, cacheKey)
	}
}

// break apart the text into words, add each word to the given map
//  also, add singluars by stripping "s" and "es"
func addWords(text string, words map[string]bool) {
	spaced := strings.Map(func(rune rune) rune {
		if unicode.IsPunct(rune) {
			return ' '
		}
		return rune
	}, text)
	pieces := strings.Fields(spaced)
	for _, word := range pieces {
		if len(word) > 1 {
			word = strings.ToLower(word)
			words[word] = false
			if strings.HasSuffix(word, "s") {
				words[word[0:len(word)-1]] = false
				if strings.HasSuffix(word, "es") {
					words[word[0:len(word)-2]] = false
				}
			}
		}
	}
}

// deletes or adds keyword entries as children of the key if they
//  are out of sync with the words map
// returns true if any entries were added or removed
func updateKeywords(c appengine.Context, key *datastore.Key, words map[string]bool) bool {
	query := datastore.NewQuery("Keyword").Ancestor(key)
	iter := query.Run(c)
	changed := false
	word := &Word{}
	for key, err := iter.Next(word); err == nil; _, err = iter.Next(word) {
		if _, ok := words[word.Word]; ok {
			words[word.Word] = true
		} else {
			// this keyword isn't here any more
			datastore.Delete(c, key)
			changed = true
		}
	}
	for word, exists := range words {
		if !exists {
			newWord := Word{"", word}
			newKey := datastore.NewIncompleteKey(c, "Keyword", key)
			_, err := datastore.Put(c, newKey, &newWord)
			check(err)
			changed = true
		}
	}
	return changed
}

// handler for requests to get the measured ingredients of a dish (parent)
func measuredIngredientsHandler(c *context) {
	// get the dish's id and verify it
	parent, err := datastore.DecodeKey(getParentID(c.r))
	check(err)
	c.checkUser(parent)
	// use the default data handler
	handler := newDataHandler(c, "MeasuredIngredient", func() Ided { return &MeasuredIngredient{} }, "Order")
	handler.handleRequest(parent, nil)
}

// handler to get list of dishes that include the given ingredient
func dishesForIngredientHandler(c *context) {
	// check that the ingredient is valid
	ingKey, err := datastore.DecodeKey(getParentID(c.r))
	check(err)
	c.checkUser(ingKey)
	// setup handler class
	handler := newDataHandler(c, "Dish", func() Ided { return &Dish{} }, "")
	if c.r.Method == "GET" {
		// get all measured ingredients that reference this ingredient
		query := c.NewQuery("MeasuredIngredient").Filter("Ingredient =", ingKey).KeysOnly()
		dishes := make([]string, 0, 100)
		iter := query.Run(c.c)
		// take each match, and add its parent (dish)
		for key, err := iter.Next(nil); err != datastore.Done; key, err = iter.Next(nil) {
			check(err)
			dishes = append(dishes, key.Parent().Encode())
		}
		handler.sendJSONNoCache(dishes)
	} else {
		check(ErrUnsupported)
	}
}

// handler to access tags and keyword children of an item (parent)
func wordHandler(c *context, kind string) {
	// validate the parent Key
	parentKey, err := datastore.DecodeKey(getParentID(c.r))
	check(err)
	c.checkUser(parentKey)
	// use the default handler
	handler := newDataHandler(c, kind, func() Ided { return &Word{} }, "")
	handler.handleRequest(parentKey, nil)
}

// handler to access pairings as children of a dish (parent)
func pairingHandler(c *context) {
	// validate the dish key
	parentKey, err := datastore.DecodeKey(getParentID(c.r))
	check(err)
	c.checkUser(parentKey)
	kind := "Pairing"
	handler := newDataHandler(c, kind, func() Ided { return &Pairing{} }, "")
	// we don't use the standard handlers for PUT and DELETE
	switch c.r.Method {
	case "PUT":
		// can't modify a pairing, only add/remove
		check(ErrUnsupported)
	case "DELETE":
		// validate the id
		id := getID(c.r)
		key, err := datastore.DecodeKey(id)
		check(err)
		handler.checkUser(key)
		// find the symetrical pairing so we can remove it too
		pairing := Pairing{}
		err = datastore.Get(c.c, key, &pairing)
		check(err)
		otherParent := pairing.Other
		query := datastore.NewQuery(kind).Ancestor(otherParent).Filter("Other=", parentKey).Filter("Description=", pairing.Description).KeysOnly()
		keys, err := query.GetAll(c.c, nil)
		check(err)
		// delete the entry given
		handler.delete(key)
		// delete the symetrical pairing(s)
		datastore.DeleteMulti(handler.c, keys)
		// flush the cache
		clearPairingCache(c, otherParent, key)
	default:
		// use the default handler for "GET" and "POST"
		handler.handleRequest(parentKey,
			func(method string, key *datastore.Key, item Ided) {
				switch method {
				case "POST":
					// after a "POST" to create a new item,
					//  add the symetrical entry for the other dish
					pairing := item.(*Pairing)
					// create the matching entry
					other := pairing.Other
					newPairKey := datastore.NewIncompleteKey(c.c, kind, other)
					pairing.Other = parentKey
					pairing.Id = ""
					newPairKey, err := datastore.Put(c.c, newPairKey, pairing)
					check(err)
					clearPairingCache(c, other, nil)
				}
			})
	}
}

// clear the pairing cache for the specified dish/pair that is changed
func clearPairingCache(c *context, dishKey *datastore.Key, pairingKey *datastore.Key) {
	url := c.lid.Encode() + "/dish/" + dishKey.Encode() + "/pairing/"
	memcache.Delete(c.c, url)
	if pairingKey != nil {
		url += pairingKey.Encode()
		memcache.Delete(c.c, url)
	}
}

// handler for ingredients
func ingredientHandler(c *context) {
	// handle requests for dishes using the ingredient
	if strings.Contains(c.r.URL.Path, "/in/") {
		dishesForIngredientHandler(c)
		return
	}
	// handler for tags
	if strings.Contains(c.r.URL.Path, "/tags/") {
		wordHandler(c, "Tags")
		// update keywords if tags were changed
		if c.r.Method != "GET" {
			key, err := datastore.DecodeKey(getParentID(c.r))
			check(err)
			ingredient := Ingredient{}
			err = datastore.Get(c.c, key, &ingredient)
			check(err)
			updateIngredientKeywords(c, key, &ingredient)
		}
		return
	}
	// handler for debugging keywords
	if strings.Contains(c.r.URL.Path, "/keywords/") {
		wordHandler(c, "Keyword")
		return
	}
	// use default data handler with callback when done
	handler := newDataHandler(c, "Ingredient", func() Ided { return &Ingredient{} }, "Name")
	handler.handleRequest(c.lid,
		func(method string, key *datastore.Key, item Ided) {
			switch method {
			case "POST", "PUT":
				// update keywords after adding/changing an item
				updateIngredientKeywords(c, key, item.(*Ingredient))
			}
		})
}

// handler for menu requests
func menuHandler(c *context) {
	// handle tags
	if strings.Contains(c.r.URL.Path, "/tags/") {
		wordHandler(c, "Tags")
		return
	}
	// use default data handler
	handler := newDataHandler(c, "Menu", func() Ided { return &Menu{} }, "Name")
	handler.handleRequest(c.lid, nil)
}

// helper function for decoding json checking for errors
func readJSON(r *http.Request, object interface{}) {
	err := json.NewDecoder(r.Body).Decode(object)
	check(err)
}

// helper to fetch the ID part of the URL (anything after the last '/')
func getID(r *http.Request) string {
	parts := strings.Split(r.URL.Path, "/")
	if len(parts) < 3 {
		return ""
	}
	return parts[len(parts)-1]
}

// helper to fetch the parent's ID when multiple IDs appear in the path
// returns 3rd to last path part, e.g. /dish/<pid>/tags/<tid>
// will return "<pid>"
func getParentID(r *http.Request) string {
	parts := strings.Split(r.URL.Path, "/")
	if len(parts) < 5 {
		return ""
	}
	return parts[len(parts)-3]
}

// create a new context to wrap data
//  creates a new library if user has none
//  sets the context if user wants to view a library othe than their own
//  caches library in memcache
func newContext(w http.ResponseWriter, r *http.Request) *context {
	c := appengine.NewContext(r)
	u := user.Current(c)
	uid := u.ID
	if len(uid) == 0 {
		uid = u.Email
	}
	lid, l, init := getOwnLibrary(c, u)
	// check if the user wants to use a different library
	upl, err := datastore.DecodeKey(l.UserPreferredLibrary)
	if err != nil {
		//fmt.Fprintf(w, "No UPL %v", l.UserPreferredLibrary)
		upl = nil
	}
	readOnly := false
	// use an alternate library if the user wants to
	if upl != nil && !lid.Equal(upl) {
		// check for permision
		perm := getLibPerm(c, uid, upl)
		//fmt.Fprintf(w, "Try UPL %v, %v\n", l.UserPreferredLibrary, perm)
		var otherlib *Library = nil
		if perm != nil {
			otherlib = &Library{}
			_, err = memcache.Gob.Get(c, upl.Encode(), otherlib)
			//fmt.Fprintf(w, "cache %v %v\n", err, otherlib)
			if err != nil {
				err = datastore.Get(c, upl, otherlib)
				//fmt.Fprintf(w, "ds %v %v\n", err, otherlib)
			}
			if err == nil {
				lid = upl
				l = otherlib
				// save the library back to the cache
				memcache.Gob.Set(c, &memcache.Item{Key: upl.Encode(), Object: otherlib})
			}
		}
		if l != otherlib {
			// user can't get to this library, update thieir record
			//  so we dont fail all the time
			l.UserPreferredLibrary = ""
			datastore.Put(c, lid, l)
			memcache.Gob.Set(c, &memcache.Item{Key: lid.Encode(), Object: l})
		} else {
			readOnly = perm.ReadOnly
		}
	}
	// create the context with all of the data we gathered
	ctxt := &context{w, r, c, u, uid, l, lid, readOnly}
	// if this is a new library, populate it with data
	if init {
		file, err := os.Open("mealplanner/base.json")
		if err != nil {
			file, err = os.Open("base.json")
		}
		if err == nil {
			importFile(ctxt, file)
		}
	}
	return ctxt
}

// get the user's id
func (self *context) getUid() string {
	uid := self.u.ID
	if len(uid) == 0 {
		uid = self.u.Email
	}
	return uid
}

// check if the key given is accessible in the current library
//  panic if not
func (self *context) checkUser(key *datastore.Key) {
	if !self.isInLibrary(key) {
		check(ErrUnknownItem)
	}
}

// returns true iff the key is part of the current library
func (self *context) isInLibrary(key *datastore.Key) bool {
	// check if the library is an ancestor of this key
	for key != nil {
		if self.lid.Equal(key) {
			return true
		}
		key = key.Parent()
	}
	return false
}

// create a new query always filtering on the library in use
func (self *context) NewQuery(kind string) *datastore.Query {
	return datastore.NewQuery(kind).Ancestor(self.lid)
}

// encode the object as JSON and write it so the response stream
//  write the data to the memcache as well so future requests
//  can skip the datastore access
//  sets Content-Type header to application/json
func (self *context) sendJSON(object interface{}) {
	j, err := json.Marshal(object)
	check(err)
	self.w.Header().Set("Content-Type", "application/json")
	self.w.(io.Writer).Write(j)
	cacheKey := self.lid.Encode() + self.r.URL.Path
	switch self.r.Method {
	case "POST":
		// posting is adding a new item, the URL is the "collection"
		//  URL, and the new item is being returned
		// thus we should delete the now dirty collection from the cache
		//  and add the new item to the cache
		memcache.Delete(self.c, cacheKey)
		if cacheKey[len(cacheKey)-1] != '/' {
			memcache.Delete(self.c, cacheKey+"/")
		} else {
			memcache.Delete(self.c, cacheKey[:len(cacheKey)-1])
		}
		if ider, ok := object.(Ided); ok {
			if cacheKey[len(cacheKey)-1] != '/' {
				cacheKey += "/"
			}
			cacheKey += ider.ID()
			memcache.Set(self.c, &memcache.Item{Key: cacheKey, Value: j})
		}
	case "PUT":
		// PUT is updating an item, we should update the cache
		//  with this item, and clear the parent collection
		memcache.Set(self.c, &memcache.Item{Key: cacheKey, Value: j})
		id := getID(self.r)
		parentKey := cacheKey[:len(cacheKey)-len(id)]
		memcache.Delete(self.c, parentKey)
		memcache.Delete(self.c, parentKey[:len(parentKey)-1])
	case "GET":
		//  GETs are getting the item, we should add to the cache
		memcache.Set(self.c, &memcache.Item{Key: cacheKey, Value: j})
	case "DELETE":
		// we shouldn't get here, deletes don't send back JSON
	}
}

// same as sendJSON, but won't cache the result
func (self *context) sendJSONNoCache(object interface{}) {
	j, err := json.Marshal(object)
	check(err)
	self.w.Header().Set("Content-Type", "application/json")
	self.w.(io.Writer).Write(j)
}

// encode the object in JSON, nicely indented, and write
//  the response with application/json content-type
func (self *context) sendJSONIndent(object interface{}) {
	j, err := json.MarshalIndent(object, "", "\t")
	check(err)
	self.w.Header().Set("Content-Type", "application/json")
	self.w.(io.Writer).Write(j)
}

// dataHandler to generalize the GET/POST/PUT/DELETE handling for the client interface
type dataHandler struct {
	context
	// the Datastore entity 'kind'
	kind string
	// a factory to generate a new item for receiving datastore and JSON data
	factory func() Ided
	// the field from the data store for ordering a query (used for getAll)
	orderField string
}

// factory for data handler
func newDataHandler(c *context, kind string, factory func() Ided, orderField string) *dataHandler {
	return &dataHandler{*c, kind, factory, orderField}
}

// handle the data request, calling the optional callback when complete
// handles GET/POST with no key to get the whole collection or create a new item
// handles GET/PUT/DELETE with a key to get, update and remove the given item
// this method will validate data and check permissions
// after completion, the optional callback is called with key and item reference
//  item is nil for DELETE and GET(all)
//  key is nil for GET(all)
//  method specifies which HTTP method was used
func (self *dataHandler) handleRequest(ancestor *datastore.Key,
	callback func(method string, key *datastore.Key, item Ided)) {
	id := getID(self.r)
	var key *datastore.Key
	var item Ided
	// handle request with no specific ID
	if len(id) == 0 {
		switch self.r.Method {
		case "GET":
			// we return a JSON list of all items
			self.getAll(ancestor)
		case "POST":
			// we create a new item and return it
			key, item = self.createEntry(ancestor)
		default:
			check(ErrUnsupported)
		}
	} else {
		// we are working with a specific id, validate it
		var err error
		key, err = datastore.DecodeKey(id)
		check(err)
		if key.Incomplete() {
			check(ErrUnknownItem)
		}
		self.checkUser(key)
		// handle the get, update and delete methods
		switch self.r.Method {
		case "GET":
			item = self.get(key)
		case "PUT":
			item = self.update(key)
		case "DELETE":
			self.delete(key)
		default:
			check(ErrUnsupported)
		}
	}
	// call the callback if we have one
	if callback != nil {
		callback(self.r.Method, key, item)
	}
}

// send back JSON for every item returned by the query
//  fixing up the Id fields for each
func (self *dataHandler) getAll(ancestor *datastore.Key) {
	query := datastore.NewQuery(self.kind).Ancestor(ancestor)
	if len(self.orderField) != 0 {
		query = query.Order(self.orderField)
	}
	items := make([]interface{}, 0, 100)
	item := self.factory()
	iter := query.Run(self.c)
	for key, err := iter.Next(item); err != datastore.Done; key, err = iter.Next(item) {
		check(err)
		item.SetID(key.Encode())
		items = append(items, item)
		item = self.factory()
	}
	self.sendJSON(items)
}

// default data handler for "POST" to create an item
// returns the new key and new item
func (self *dataHandler) createEntry(parent *datastore.Key) (*datastore.Key, Ided) {
	// use the library as parent if we don't have an immediate
	// parent
	if parent == nil {
		parent = self.lid
	}
	r := self.r
	c := self.c
	// use the factory to create an item
	item := self.factory()
	// read the JSON from client
	readJSON(r, item)
	// create a new datastore key
	key := datastore.NewIncompleteKey(c, self.kind, parent)
	// save the new item
	key, err := datastore.Put(c, key, item)
	check(err)
	// write the key into the Id field for the JSON response to address
	//  the new item
	item.SetID(key.Encode())
	// send back the response and cache it
	self.sendJSON(item)
	// return the new key and item
	return key, item
}

// default data handler for "GET" to fetch one item
// returns the fetched item
func (self *dataHandler) get(key *datastore.Key) Ided {
	// create the object
	object := self.factory()
	// fetch it from the data sstore
	err := datastore.Get(self.c, key, object)
	check(err)
	// ensure the item has the proper Id in the JSON to the client
	object.SetID(key.Encode())
	// send the object to the client and cache it
	self.sendJSON(object)
	return object
}

// default data handler for "PUT" to update one item
// returns the updated item
func (self *dataHandler) update(key *datastore.Key) Ided {
	// create object to receive data
	object := self.factory()
	// read the JSON
	readJSON(self.r, object)
	// don't let user change the ID
	object.SetID(key.Encode())
	// save to the datastore
	_, err := datastore.Put(self.c, key, object)
	check(err)
	// send JSON back to the client and cache it
	self.sendJSON(object)
	return object
}

// default data handler for "DELETE" to remove one itme
func (self *dataHandler) delete(key *datastore.Key) {
	// delete the item
	err := datastore.Delete(self.c, key)
	check(err)
	// remove this item from the cache
	cacheKey := self.lid.Encode() + self.r.URL.Path
	memcache.Delete(self.c, cacheKey)
	// remove the parent from the cache too
	// strip off the key from the URL
	parentURL := cacheKey[:len(cacheKey)-len(key.Encode())]
	memcache.Delete(self.c, parentURL)
	// also without the /
	memcache.Delete(self.c, parentURL[:len(parentURL)-1])
}

// fetch the user's own library (not necessarily their current library)
// checks memcache first, then datastore.  Populates the cache
// returns the key, library and a boolean that is true if the library is new
func getOwnLibrary(c appengine.Context, u *user.User) (*datastore.Key, *Library, bool) {
	uid := u.ID
	if len(uid) == 0 {
		uid = u.Email
	}
	init := false
	lid := datastore.NewKey(c, "Library", uid, 0, nil)
	l := &Library{}
	_, err := memcache.Gob.Get(c, lid.Encode(), l)
	if err == memcache.ErrCacheMiss {
		err = datastore.Get(c, lid, l)
		if err == datastore.ErrNoSuchEntity {
			l = &Library{uid, 0, u.String(), ""}
			lid, err = datastore.Put(c, lid, l)
			check(err)
			init = true
		}
		memcache.Gob.Set(c, &memcache.Item{Key: lid.Encode(), Object: l})
	}
	return lid, l, init
}

// get a permision item for the specified library
// checks memcache before datastore
func getLibPerm(c appengine.Context, uid string, libKey *datastore.Key) *Perm {
	accessCacheKey := uid + "Perm" + libKey.Encode()
	perm := &Perm{}
	_, err := memcache.Gob.Get(c, accessCacheKey, perm)
	if err != nil {
		query := datastore.NewQuery("Perm").Ancestor(libKey).Filter("UserId =", uid).Limit(1)
		iter := query.Run(c)
		if _, err = iter.Next(perm); err == nil {
			// save the permision back to the cache
			memcache.Gob.Set(c, &memcache.Item{Key: accessCacheKey, Object: perm})
		} else {
			return nil
		}
	}
	return perm
}

// structure to read search parameters from client's post
type searchParams struct {
	// list of tags that must match
	Tags []string
	// space/comma separated list of keywords to search for
	Word string
}

// handler for search requests, client "POST"s searchParams as JSON
func searchHandler(c *context) {
	// decode the JSON search parameters
	sp := searchParams{}
	readJSON(c.r, &sp)
	// create a channel for goroutines to send back search results
	resultsChannel := make(chan map[string]map[string]uint)
	// count how many goroutines we start so we read all the results back from the channel
	var queries uint = 0

	// start a goroutine to search for items each specified tag
	// the merge will do the "and" operation to constrain them
	if len(sp.Tags) > 0 {
		for _, target := range sp.Tags {
			word := target
			go func() {
				// fetch the tags that match
				query := c.NewQuery("Tags").KeysOnly()
				query.Filter("Word=", word)
				keys, err := query.GetAll(c.c, nil)
				check(err)
				results := make(map[string]map[string]uint)
				addResults(keys, results)
				// send the results through the channel
				resultsChannel <- results
			}()
			queries++
		}
	}

	// handle word search
	if len(sp.Word) > 0 {
		go func() {
			results := make(map[string]map[string]uint)
			// break the query into words
			terms := make(map[string]bool)
			addWords(sp.Word, terms)
			// search for each word
			for target, _ := range terms {
				query := c.NewQuery("Keyword").Filter("Word=", target).KeysOnly()
				keys, err := query.GetAll(c.c, nil)
				check(err)
				addResults(keys, results)
			}
			if ings, ok := results["Ingredient"]; ok {
				for ing, _ := range ings {
					ingKey, err := datastore.DecodeKey(ing)
					check(err)
					// carry results forward to list dishes that have the ingredients that matched
					query := c.NewQuery("MeasuredIngredient").Filter("Ingredient =", ingKey).KeysOnly()
					keys, err := query.GetAll(c.c, nil)
					check(err)
					addResults(keys, results)
				}
			}
			// send the results through the channel
			resultsChannel <- results
		}()
		queries++
	}

	// merge the results from all the queries
	results := mergeResults(resultsChannel, queries)
	c.sendJSONNoCache(results)
}

// loop through the results, adding them to a two level map keyed on the entity
//  kind (Dish,Ingredient) and then the item itself, counting how many
// times we come across each item
func addResult(key *datastore.Key, results map[string]map[string]uint) {
	parent := key.Parent()
	parentEnc := parent.Encode()
	if kind, ok := results[parent.Kind()]; ok {
		if _, ok := kind[parentEnc]; ok {
			kind[parentEnc] += 1
		} else {
			kind[parentEnc] = 1
		}
	} else {
		results[parent.Kind()] = make(map[string]uint)
		results[parent.Kind()][parentEnc] = 1
	}
}

// add results as above for multiple items
func addResults(keys []*datastore.Key, results map[string]map[string]uint) {
	for _, key := range keys {
		addResult(key, results)
	}
}

// take the results from /count/ queries from the /resultsChannel/
//  and perform an intersection
func mergeResults(resultsChannel chan map[string]map[string]uint,
	count uint) map[string]map[string]uint {
	if count == 0 {
		return make(map[string]map[string]uint)
	}
	// start with the first map we get
	results := <-resultsChannel
	// for each additional set we get, make a new map
	// keeping only items that appear in both results
	count--
	for count > 0 {
		results2 := <-resultsChannel
		results1 := results
		results = make(map[string]map[string]uint)
		for kind, ids1 := range results1 {
			if ids2, ok := results2[kind]; ok {
				ids := make(map[string]uint)
				for id1, cnt1 := range ids1 {
					if cnt2, ok := ids2[id1]; ok {
						ids[id1] = cnt1 + cnt2
					}
				}
				results[kind] = ids
			}
		}
		count--
	}
	return results
}

// handler to get all tags in this library
func allTagsHandler(c *context) {
	tags := make([]string, 0, 100)
	// order by the tag name, so we can skip duplicates
	query := c.NewQuery("Tags").Order("Word")
	results := make([]Word, 0, 100)
	_, err := query.GetAll(c.c, &results)
	check(err)
	lastTag := ""
	for _, tag := range results {
		if tag.Word != lastTag {
			tags = append(tags, tag.Word)
			lastTag = tag.Word
		}
	}
	c.sendJSONNoCache(tags)
}

// handler to create JSON to backup all data in the current library
func backupHandler(c *context) {
	// initialize the backup structures
	b := backup{}
	b.MeasuredIngredients = map[string][]MeasuredIngredient{}
	b.Tags = map[string][]Word{}
	b.Pairings = map[string][]Pairing{}

	// gather all the dishes
	query := c.NewQuery("Dish")
	keys, err := query.GetAll(c.c, &b.Dishes)
	check(err)
	for i, _ := range b.Dishes {
		key := keys[i]
		b.Dishes[i].Id = key.Encode()
	}
	// gather all the ingredients
	query = c.NewQuery("Ingredient")
	keys, err = query.GetAll(c.c, &b.Ingredients)
	check(err)
	for i, _ := range b.Ingredients {
		key := keys[i]
		b.Ingredients[i].Id = key.Encode()
	}
	// gather all the tags
	tags := make([]Word, 0, 500)
	query = c.NewQuery("Tags")
	tkeys, err := query.GetAll(c.c, &tags)
	check(err)
	first := 0
	var lastParent *datastore.Key = nil
	// fix-up each tags' ID and after we've found
	//  all tags belonging to a single parent, save
	//  that slice of tags to the map
	for i, _ := range tags {
		parent := tkeys[i].Parent()
		if !parent.Equal(lastParent) {
			if lastParent != nil {
				b.Tags[lastParent.Encode()] = tags[first:i]
			}
			lastParent, first = parent, i
		}
		tags[i].SetID(tkeys[i].Encode())
	}
	if lastParent != nil {
		b.Tags[lastParent.Encode()] = tags[first:]
	}
	// gather the measured ingredients
	mis := make([]MeasuredIngredient, 0, 512)
	query = c.NewQuery("MeasuredIngredient")
	ikeys, err := query.GetAll(c.c, &mis)
	check(err)
	lastParent, first = nil, 0
	for i, _ := range mis {
		parent := ikeys[i].Parent()
		if !parent.Equal(lastParent) {
			if lastParent != nil {
				b.MeasuredIngredients[lastParent.Encode()] = mis[first:i]
			}
			lastParent, first = parent, i
		}
		mis[i].Id = ikeys[i].Encode()
	}
	if lastParent != nil {
		b.MeasuredIngredients[lastParent.Encode()] = mis[first:]
	}
	// gather all the pairings
	pairings := make([]Pairing, 0, 512)
	query = c.NewQuery("Pairing")
	pkeys, err := query.GetAll(c.c, &pairings)
	check(err)
	lastParent, first = nil, 0
	for i, _ := range pairings {
		parent := pkeys[i].Parent()
		if !parent.Equal(lastParent) {
			if lastParent != nil {
				b.Pairings[lastParent.Encode()] = pairings[first:i]
			}
			lastParent, first = parent, i
		}
		pairings[i].Id = pkeys[i].Encode()
	}
	if lastParent != nil {
		b.Pairings[lastParent.Encode()] = pairings[first:]
	}
	// gather the menus
	query = c.NewQuery("Menu")
	keys, err = query.GetAll(c.c, &b.Menus)
	check(err)
	for i, _ := range b.Menus {
		key := keys[i]
		b.Menus[i].SetID(key.Encode())
	}
	c.sendJSONIndent(b)
}

// handler to restore data, uses import.go
func restoreHandler(c *context) {
	file, _, err := c.r.FormFile("restore-file")
	check(err)
	importFile(c, file)
	indexHandler(c)
}

// email a sharing request
func shareHandler(c *context) {
	// create a request to share the library
	// form: /share/read/email/other@email.address.com
	// form: /share/write/email/other@email.address.com
	uid := c.getUid()
	// verify the user owns this library
	if uid != c.l.OwnerId {
		check(ErrPermissionDenied)
	}
	// construct a Share entity to store as a child of the
	//  being shared
	var permStr = getParentID(c.r)
	share := Share{
		ExpirationDate: time.Now().Add(30 * 24 * time.Hour),
		ReadOnly:       permStr != "write",
	}
	key := datastore.NewIncompleteKey(c.c, "Share", c.lid)
	key, err := datastore.Put(c.c, key, &share)
	check(err)
	// construct an email to the requested user
	var email = getID(c.r)
	subject := c.u.Email + " would like to share a meal-planning library with you"
	body := subject + ".\n\nFollow this link to gain access to the library: http://" + c.r.Header.Get("Host") + "/shareAccept/" + key.Encode()

	msg := mail.Message{
		Sender:  c.u.Email,
		To:      []string{email},
		Subject: subject,
		Body:    body,
	}
	// send the message on the user's behalf
	if err := mail.Send(c.c, &msg); err != nil {
		fmt.Fprintf(c.w, "Failed to send an email message to '%v'. %v", email, err)
		datastore.Delete(c.c, key)
	}
}

// accept an invitation to share
func shareAcceptHandler(c *context) {
	// validate the key for a share entry
	key, err := datastore.DecodeKey(getID(c.r))
	if err != nil {
		fmt.Fprintf(c.w, "{\"Error\":\"Invalid key, please check your email to ensure you typed the URL correctly.\"}")
		return
	}
	// fetch the record
	share := Share{}
	err = datastore.Get(c.c, key, &share)
	if err != nil {
		fmt.Fprintf(c.w, "This invitation has expired, please ensure you typed the URL correctly or contact the sender to retry.")
		return
	}
	// grant user access to this library by creating a permission
	libKey := key.Parent()
	uid := c.getUid()
	// remove any previous permissions the user had to the library
	delQuery := datastore.NewQuery("Perm").Ancestor(libKey).Filter("UserId=", uid).KeysOnly()
	delKeys, err := delQuery.GetAll(c.c, nil)
	if err == nil && len(delKeys) > 0 {
		datastore.DeleteMulti(c.c, delKeys)
	}
	// create the permission for the user to access the library
	perm := Perm{UserId: uid, ReadOnly: share.ReadOnly}
	permKey := datastore.NewIncompleteKey(c.c, "Perm", libKey)
	permKey, err = datastore.Put(c.c, permKey, &perm)
	if err != nil {
		fmt.Fprintf(c.w, "We're sorry, the service failed to complete this operation, please try again.")
		return
	}
	// delete the share request so it can't be used again
	datastore.Delete(c.c, key)
	accessCacheKey := uid + "Perm" + libKey.Encode()
	memcache.Gob.Set(c.c, &memcache.Item{Key: accessCacheKey, Object: &perm})

	// update the user's record to use the shared library
	c.l.UserPreferredLibrary = libKey.Encode()
	datastore.Put(c.c, c.lid, c.l)
	memcache.Gob.Set(c.c, &memcache.Item{Key: c.lid.Encode(), Object: c.l})
	// redirect the user back to index.html to view the newly accessible
	//  library
	indexHandler(c)
}

// structure for JSON encoding of library information to give the client
type UserLibrary struct {
	Id       *datastore.Key
	Name     string
	ReadOnly bool
	Current  bool
	Owner    bool
}

// return a list of libraries this user can access
func librariesHandler(c *context) {
	// start with the library the user owns
	lid, l, _ := getOwnLibrary(c.c, c.u)
	uid := c.getUid()
	libraries := make([]UserLibrary, 0, 10)
	libraries = append(libraries, UserLibrary{lid, l.Name, false, lid.Equal(c.lid), true})
	// look for any permissions the user has to access other libraries
	query := datastore.NewQuery("Perm").Filter("UserId=", uid)
	perm := Perm{}
	iter := query.Run(c.c)
	for key, err := iter.Next(&perm); err != datastore.Done; key, err = iter.Next(&perm) {
		check(err)
		// fetch libraries that we find
		lib := Library{}
		libkey := key.Parent()
		err = datastore.Get(c.c, libkey, &lib)
		if err != nil {
			continue
		}
		// add our client's structure to the list to send
		ul := UserLibrary{libkey, lib.Name, perm.ReadOnly,
			libkey.Equal(c.lid), false}
		// use the OwnerId as the name if the library isn't named
		if len(ul.Name) == 0 {
			ul.Name = lib.OwnerId
		}
		libraries = append(libraries, ul)
	}
	// send JSON to the client
	c.sendJSONNoCache(libraries)
}

// handler to switch which library the user is looking at
func switchHandler(c *context) {
	// verify the library key
	desiredKey, err := datastore.DecodeKey(getID(c.r))
	check(err)
	if desiredKey.Kind() != "Library" {
		check(ErrUnknownItem)
	}
	// start by getting the user's own library
	lid, l, _ := getOwnLibrary(c.c, c.u)
	if !lid.Equal(desiredKey) {
		// user want's to see someone else's library, check if they have
		// permission
		perm := getLibPerm(c.c, c.uid, desiredKey)
		if perm == nil {
			check(ErrPermissionDenied)
			return
		}
	} else {
		// we use nil to indicate the user wants their own library
		desiredKey = nil
	}
	// we verified that the desiredKey is a library the user has permission to access
	//  save their preference
	if desiredKey != nil {
		l.UserPreferredLibrary = desiredKey.Encode()
	} else {
		l.UserPreferredLibrary = ""
	}
	_, err = datastore.Put(c.c, lid, l)
	check(err)
	memcache.Gob.Set(c.c, &memcache.Item{Key: lid.Encode(), Object: l})
	// redirect the user back to the index to use the updated library preference
	indexHandler(c)
}

// handler to delete entire library
func deletelibHandler(c *context) {
	for _, kind := range []string{"Keyword", "Tags", "Pairing", "Menu", "MeasuredIngredient", "Dish", "Ingredient"} {
		query := c.NewQuery(kind).KeysOnly()
		dkeys, err := query.GetAll(c.c, nil)
		if err == nil {
			datastore.DeleteMulti(c.c, dkeys)
		}
	}
	lid, _, _ := getOwnLibrary(c.c, c.u)
	err := datastore.Delete(c.c, lid)
	check(err)
	// flush the cache at the top level
	memcache.Delete(c.c, lid.Encode())
	memcache.Delete(c.c, lid.Encode()+"/dish")
	memcache.Delete(c.c, lid.Encode()+"/dish/")
	memcache.Delete(c.c, lid.Encode()+"/ingredient")
	memcache.Delete(c.c, lid.Encode()+"/ingredient/")
	memcache.Delete(c.c, lid.Encode()+"/menu")
	memcache.Delete(c.c, lid.Encode()+"/menu/")
}

redpajama_set_name: RedPajamaGithub


Some interesting moves on Evostik NPL site.
Anthony Howell (ex Mansfield Town ) joins Carlton Town from Alfreton Town.
Aaron Hooton To Coalville from Carlton Town.
Chris Martin to Leek from Mickleover Sports among them.


I like Snoop Dogg – but his latest Instagram rant announcing why he'll boycott the remake of Alex Haley's 1977 miniseries "Roots" makes it apparent that he's still "rollin' down the street smoking indo, sipping on gin and juice," and it's affecting his brain cells.
For an instant, I thought Snoop and I were on the same page. That is, until he said blacks today are taking the "same abuse" as slaves hundreds of years ago. No, I'm serious. The multi-millionaire rap mogul said of the History Channel's upcoming remake of "Roots," "They just want to keep on showing the abuse we took hundreds and hundreds of years ago." He went on to say blacks are taking the "same abuse" today. Just for the record, celebritynetworths.org estimates that Snoop Dogg is worth an estimated $135,000,000. Not too shabby for an abused slave who has been wealthy for more than half of his life.
On one hand, Snoop was right to criticize the miniseries, but for the wrong reason. Ask yourself: Why do filmmakers and television producers continue to resurrect painful memories about slavery, particularly in election years, knowing race relations have been on life support since President Obama entered the White House? Personally, I believe it's a concerted effort to get blacks hot and bothered before the November elections.
Snoop deviated from reality, however, when he claimed blacks suffer the "same abuse" today. I'm not a fan of the Democratic Party, but I haven't heard of them whipping my people and forcing us to pick cotton since the Emancipation Proclamation was signed into law by Republican President Abraham Lincoln. Have you? If I were to guess what motivated the rapper to make such an idiotic statement, I can only imagine that he's frustrated with the media-crafted narrative that all white cops are out to get blacks. Couple that with the fact that Snoop Dogg has been extremely vocal about what he perceives as an unjust black incarceration rate compared to that of whites and Latinos, and you've got a recipe for stupidity. I suppose it's never occurred to Snoop that maybe, just maybe, blacks commit more acts of crime than other races because there are fewer daddies in the home to spank their behinds when they get out of line.
If Snoop Dogg wants to take action against something that's abusing blacks, perhaps he ought to consider leading a nationwide boycott on visits to Chicago, Illinois. The murder rate in Chicago hasn't been so bad in over two decades, and it's blacks that are disproportionately affected. Why doesn't Snoop talk about this? Because it's overwhelmingly black-on-black crime! And, if we're being honest, we have to ask how much his style of music has contributed to soaring crime rates all across America that adversely affect minorities.
During Memorial Day weekend alone, 12 people were murdered in Chicago, and at least 43 were injured in shootings. Who should be blamed for this? Cops? Whites? Republicans? America is great because the Constitution made room for national repentance through an amendment process. Snoop Dogg may be inspiring the choir – Black Lives Matter comes to mind – when he speaks up about racial injustice, but black racism fatigue is real. More and more non-black Americans are growing tired of being compared to racist slave owners.
Ironically, this partially explains the rise of Donald Trump. Conservatives are tired of being picked on and blamed for America's problems by delusional left-wingers like Snoop Dogg. His comments will do nothing to help the black community – just like his music.


Is This What The iPhone 6 Will Look Like?
Chinese site CTech (C科技) posted pics of this alleged iPhone 6 case, which appears to be slimmer than its predecessors. Apple has a habit of launching new products in September, but that hasn't stopped the rumor mill from speculating on the design and features early on in the past.
Adding to the conjecture, is Apple's estimated expense of $578 million on sapphire glass that could lead to a bigger display; rumors are circulating about it ranging from 4.7in to 5.7in. Sapphire glass is currently integrated into the iPhone 5's Touch ID Home button as well as the cover of the of the rear-facing camera–the technology is said to be "virtually scratch free." Some speculation claims that the display will even be stretched to completely cover the front of the phone, making it borderless.
So the phone may be extremely thin, extremely durable, and extremely light. Unfortunately, we will all have to wait until the WWDC in June, at least–possibly even later–to substantiate any of the hearsay.


Have a love of quilting? Enjoy the nostalgia of America Folk Art? Try this quilt block design: the Cactus Basket, also known as Texas Flower. This quilt block design originated in Ladies' Art Company in 1898. Show off your love of quilting, sewing, or your love for a classic in american arts and crafts. Use this pendant to show off your newly made work of art derived from an old classic.


Decorating how to build a wine rack cabinet insert unique barrel furniture. Oak barrel table bar your choice for and chair rentals unique wine furniture. Reclaimed wine barrel table with cabinet storage unique furniture. The barrel bar fishbio fisheries research monitoring and unique wine furniture. Wine barrel furniture stave bar height unique.
Reclaimed wine barrel coffee table with unique lift top furniture.


The 43-year-old woman had been causing a disturbance at Mt. Calvary Apostolic Church, 6635 E. 42nd St., IMPD said.
Indianapolis police were arresting a woman when they say she stopped breathing and was rushed to the hospital Wednesday night.
The 43-year-old woman had been causing a disturbance at Mt. Calvary Apostolic Church, 6635 E. 42nd St., just before 8:30 p.m., Indianapolis Metropolitan Police Department Officer Genae Cook said in a news release.
A behavioral health officer who was a church member tried unsuccessfully to calm the woman, Cook said.
"Officers arrived and were advised of a female in the church who was possibly having a mental health crisis and became combative with the congregation," Cook said.
The woman, Cook said, then assaulted the approaching officers.
"The officers physically restrained her and placed her in handcuffs," Cook said. "Shortly thereafter officers observed she was not breathing."
Officers removed the handcuffs, called for medics and began CPR, Cook said. The woman was taken to Eskenazi Hospital in critical condition.
More than 20 people in the church witnessed the incident and were cooperating with investigators, Cook said.
The officers will be placed on administrative leave while the incident is under investigation. IMPD did not release names of the officers or the woman.
April 22, 2019, 10:31 a.m.


text:
Home » Top executives to new roles at Milner, Pendleton
Top executives to new roles at Milner, Pendleton
By Eric Schroeder
CHATTANOOGA, TENN. — Several organizational changes have been announced for Milner Milling and Pendleton Flour Mills.
Effective Jan. 1, 2013, Charles B. Stout has been named chairman of the board and chief executive officer. Mr. Stout currently is president of Milner Milling and Pendleton Flour Mills.
Succeeding Mr. Stout as president will be Peter Frederick. Mr. Frederick currently is vice-president of sales.
Kirk Stehr, currently senior director of national accounts at Milner Milling, has been named vice-president of sales, also effective Jan. 1, 2013.
The company also announced that Alan Koenig, vice-president of grain and logistics, has been named chief operating officer, assuming responsibility for all mill operations. His promotion takes effect immediately.
Earlier, Donna Osbourn was named chief financial officer.
"We look forward to continued success as this team's combination of strengths and level of dedication further grow and sustain Milner Milling and Pendleton Flour Mills for many years to come," the company said. "Let us all congratulate Charlie, Pete, Kirk, Alan and Donna on their appointments and promotions and offer them our support as they transition to and assume their new roles and responsibilities."
According to the Grain & Milling Annual 2012, Milner Milling operates three wheat flour mills with total wheat flour capacity of 39,000 cwts in Birmingham, Ala.; Barnesville, Ga.; and Rome, Ga. Pendleton Flour Mills operates three wheat flour mills with total wheat flour capacity of 24,800 cwts in Honolulu; Blackfoot, Idaho; and Pendleton, Ore.
Two to new executive roles at Hain Celestial
Milner Milling and Pendleton Flour add to sales teams


The EU should take an active part by setting common rules to ensure stringent protection of children and their rights.
Demand preventive measures against child abuse and domestic violence. Measures to protect victims of child abuse and domestic violence.
Thank you so much for putting forward this very difficult subject. I am part of an association in the South of France that helps women who are victims of sexuel abuse and domestic violence. We try to inform doctors, social workers, police, teachers etc etc but the resistence to realize the depth of the problem is astounding. I was a victim of domestic violence and this should become a European cause. I am involved with politics in France and unfortunately the politicians are the most difficult people to convince, but step by step we will. Please don't hesitate to contact me by mail. As this is one of the subjects we can get support for across Europe by a petition, perhaps the first to reach the 1 million signatures.
I hope that something constructuve will finaly happen to make our national governments take drastic measures to change human nature and to protect our dignity and lives. In ones country of origin it is very difficult to be a battered wife but when one resides in another European Country it is even worse as there are so many differences in our legal rights etc.
Thank you and you can count on me.
Let us get more people from outside the political sphere to have a fresh look. The problemsolvers might be out there in the comunities, give them some space.
The EU should stay out of national issues. Child abuse and domestic violence are wrong, but this is not an area for the EU and, considering the EU's appalling record in other areas: the environment, fishing protection, fraud, and corruption, EU involvement would almost certainly do more harm than good.
I agree with Simon North. Essentially "Protection for children and victims of domestic violence" should be an issue which should be settled on the national level.
What? The EU has certainly no worse record on this issues then the average European country.
The protection of children and victims of domestic violence is an issue of human rights, and it is right that the EU try to set a supranational policy on that front to raise standards across the whole of the EU. Good proposal!
Clearly it is an issue of human rights, but again: The detailed laws and the executive implementation is an issue for the countires to settle on their own.
The human rights part is already fixed by the signing of the Charter of Human rights and thats it.
Let me emphasize here that I totally support strong protection for children and victims of domestic violence. But I also strongly belive that the best results can be achived on the national level.
From the moment that we are a community, the problem of a country community is also of community and this is of course a serious problem for all parents of the world.
It is right that the EU try to set a supranational policy on that front to raise standards across the whole of the EU. Now is late, tomorrow can be too late from many people.
For example: let's say you (RZ) live in country X, just across the border from country Y. There are no EU minimum standards in, say, child protection, so it turns out tat country Y has 'laxer' standards in this domain than your own country.
So people who would be considered criminals in your country are not in country Y. They are free to cross the border and visit you, RZ, in your country. And visit your kids' school.
They're not criminals in country Y, so you country's police have no way of protecting your family from them, as noone knows they exist.
Wouldn't you prefer some minimum standards now?
your argument is so nonsensical, I do not even know where to start in my answer.
As I understand it, this thread is about domestic violence against children and it makes perfect sense to talk about the need for a European Human rights standard in this regard. It hasn't always be clear that parents can not beat up there children at will, so it is important to codify special protections for children in the context of inner family violence into human rights standards.
What you are alluding to is child molestation, the most despicable crime imaginable. I really wonder where you live that you believe that no strong actions are taken against child molesters on the national level.
The European Union has no power, and should have no power to make criminal law. Ever. Maybe you can roll out next that we should let the EU draw up some minimum standards for prosecution of terrorists…otherwise they will BLOW UP MY KIDS!!!
they can protect and love them.
Maybe it is an issue that countries should settle on their own, however EU should have an improved legal structure so the population could really access justice when it is not possible at the national level.
Brilliant to put this item on the agenda. We try very hard to make the Dutch government and population clear what kind of impact relational violence has on -mostly- women and children. What it distrois for their future.
Unfortunately is this item a great tabu what makes the approach from an different point of view (innovation) by women who experienced violence, as my partner and her kids did, so hard.
There is far too little money to start serious programms for this group!
let there be peace, respect ,harmony and freedom for all .
I was thinking of selling my artwork and give half the proceeds to a child abuse organization. But I need help. Can anyone help me?


text:
Movie Review: Mars Needs Moms (2011)
Marco Duran
Try as he may, Robert Zemekis cannot find his way out of the uncanny valley — that deep gorge where his other forays into motion-capture like The Polar Express, Beowulf and A Christmas Carol have fallen. For those who are unaware of what this valley is, look at the "human" faces in any of those films and see if they don't creep you out. Apparently, if the face is not human — a creature, alien, monster — then things are fine because we relegate the inconsistencies in muscle ticks and facial nuances to something more cartoonish. However, when the filmmakers want a person to look like a real person, there is always something off about them, something they have been unable to perfect. Though they look real, they don't move like we expect them to; the little twitches, the subtleties — it's like they were injected with too much Botox. It doesn't help that in Mars needs Moms, the on screen representations were modeled after the actors who lent them their movement and voices. I spent the beginning of the film thinking "Boy, that looks an awful lot like Joan Cusack, but in a disturbing way." If he has not yet, I wonder why Zemekis, who seems determined to conquer this motion-capture way of making films, hasn't joined forces with James Cameron or Peter Jackson or stolen some of their notes. Not that I approve of this style of filmmaking nor am I looking forward to seeing their next attempt (that goes for you too, Lucas), but if they're gonna do it, then they should work together and get us there faster. That all said, I was not as bothered by the weirdness of the people in this film as I usually am and, in fact, found myself halfway through not caring about it at all and even, dare I say, enjoying the film.
Nine year old, Milo (Seth Green) finds out just how much he needs his mom (Joan Cusack) when Martians, who plan on taking her memories and mental capacities to power their nanny-bots, kidnap her. Milo hitches a ride on the space ship and finds a friend in the only other human on Mars, Gribble (Dan Fogler). There, with the help of a rebel female Martian, Ki (Elizabeth Harnois) they plan a way to get back Milo's mom and get back home.
The Martians pick out Milo's mom out of all the other mothers they've scanned because she is the rarest of creatures on earth — a mother whose son obeys her. However, if they would have only continued watching just a little longer, they would have seen that Milo does not obey his mother, at least not without a fight. But that's of course, because he needs to have some sort of story arc; he can't be perfect from the beginning, people! He has to have somewhere to grow.
The Martian young pop up out of the ground like potatoes or groundhogs, which is a nice way to skirt any of the questions the children in the audience may have about where Martian babies come from. The nanny bots raise only the Martian females, though. All of males are banished to the trash heaps to be raised by other males which means this planet is entirely ruled by women. We'll get back to that later. The alien designs are . . . interesting. All the women have some serious child bearing hips (ironic since, as was previously stated, they do not bear the children) and all the males have dreadlocked hair and Rasta colors . . . and are rather dim-witted. They all, male and female, however, have long, flat heads and therefore look like ET's taller cousins.
The Martian's world in Mars needs Moms is colorless and cold with large screens adorning the walls where the supreme leader, or in this case, the Supervisor (Mindy Sterling), looks down upon all her servants and yells slogans and propaganda. Basically, the Martians, advanced in technology as they are, have slipped and fallen into some sort of Orwellian world. It's not until our motley crew happen upon these deep underground caves and tunnels where the aliens used to live that we see that the Martian's lives used to be filled with color and that they used to have families. Ah, now we see the violence inherent in the system! So how did things get to where they are now? Why did the females take over the planet and banish the males to the dumps? It all becomes clear in the end as Ki confronts the Supervisor with the pictures taken in the underground caves and Supervisor responds she made all this happen because the females don't have time to raise the young and that the males never helped with the care of the young because they were always too busy having fun. Really?!? It appears that Disney is now taking a stand for the power of the two-parent family saying that what is needed to raise children properly is the love and security that can only be found in a family. Well, that's a nice thought. Good for Disney!
They could also be saying that the women's liberation movement may ultimately lead our society into to a dull autocracy, but let's stay positive.
Movie Review: The Resident (2011)
Movie Review: Halloween II (2009)
About Marco Duran
Marco wrote, directed and produced the feature film Within. He has lived in the Los Angeles area his whole life. Top 10 Favorite Movies: Fight Club, The Fountain, Eternal Sunshine of the Spotless Mind, Oldboy, Pulp Fiction, Children of Men, City of God, Ferris Bueller's Day Off, The Shawshank Redemption and Memento. Top 5 Favorite Directors: Spike Jonze, Darren Aronofsky, Alfonso Cuaron, Quentin Tarantino and Billy Wilder. Top 3 Favorite Film Composers: Clint Mansell, John Williams and Howard Shore. You can follow his 140 character movie reviews on Twitter Or friend him on Facebook Or watch some short films of his on YouTube
Movie Review: The Help (2011)
Movie Review: Another Earth (2011)
Movie Review: The Perfect Host (2010)
Movie Review: Summer Children (1965)
Movie Review: Pirates of the Caribbean: On Stranger Tides (2011)
Movie Review: Dream Home (2010)
'Movie Review: Mars Needs Moms (2011)' has 1 comment
March 11, 2011 @ 2:34 pm Bryton
That motion capture shit freaks me out. My hope is they abandon it entirely.
Genre(s): Adventure, Animation, Comedy, Family
Director(s): Simon Wells
Actor(s): Dan Fogler, Elisabeth Harnois, Joan Cusack, Mindy Serling, Seth Green
IMDb Info: Mars Needs Moms
Movie Review: Frances Ha (2012)
Movie Review: Star Wars: The Clone Wars (2008)
<\/iframe><\/div>"); } })(); var ABDSettings = { cssSelectors: '', enableIframe: "yes", enableDiv: "yes", enableJsFile: "yes", statsAjaxNonce: "db7fb7822d", ajaxUrl: "https://thecriticalcritics.com/review/wp-admin/admin-ajax.php" } //	Make sure ABDSettings.cssSelectors is an array... might be a string if(typeof ABDSettings.cssSelectors == 'string') { ABDSettings.cssSelectors = [ABDSettings.cssSelectors]; }


The production of antimicrobial peptides (AMPs) is arguably the most conserved aspect of innate immunity in all organisms. For the last few years, much of our research has been focused on understanding the regulation of the related nlp and cnc AMP gene families in C. elegans. This has turned out to be surprisingly complex. They generally have very dynamic developmental expression profiles. This may be one reason why AMP genes frequently appear in lists of differentially regulated genes when two strains of worms are compared: even minor difference in the speed of development are sufficient to result in marked differences in AMP gene expression when samples are harvested at the same time rather than at a precise developmental stage.
Various stimuli affect the expression of different AMP genes. We've worked most with nlp-29, often relying on a standard reporter transgene, with GFP under the control of the nlp-29 promoter. Like the other members of the family, nlp-29 is expressed in hyp7. In young adults, nlp-29 expression is induced by infection with the fungus Drechmeria coniospora and by physical injury (Pujol et al., 2008). It is also induced by osmotic shock (Pujol et al., 2008). On the other hand, many stimuli that trigger the expression of stress-response genes, including starvation, heat-shock, heavy metals, or drugs like tunicamycin that induce an unfolded protein response do not up-regulate nlp-29 expression in young adults (Couillault et al., 2012). It is also, and this is a point we have tried to rectify in the literature (Wong et al., 2007), not induced by intestinal bacterial pathogens such as Serratia marcescens.
We have found that incubation of worms in M9 can also induce the expression of the nlp-29 reporter gene. After as little as 4 hours, GFP levels are increased by 2-fold, and leaving worms in M9 (with OP50) for 24 hours can provoke an increase of up to 20-fold (Figure 1). We carried out tests to see whether this increase was attributable to a single component of M9. Preliminary assays suggest that this isn't the case (Figure 2), but we haven't pursued our investigation further. Nor have we measured the expression level of other AMPs, but note that several of the genes in the nlp cluster appear to be controlled in the same way as nlp-29 (Pujol et al., 2008).
Our results do, however, suggest that as far as AMP gene expression is concerned, caution is needed when interpreting the results of any studies that involve incubation of worms in M9 for prolonged periods. We've reviewed our previously published results and do not believe it has been a problem. Nevertheless, we now routinely replace M9 with 50 mM NaCl.
Figure 1: Red and green fluorescence visualized simultaneously in transgenic worms (wt;frIs7) carrying pnlp-29::GFP and pcol-12::dsRed reporter constructs after incubation in water (left) and M9 (right) for 24 hr.
Figure 2: Ratio of green to red fluorescence of wt;frIs7 worms incubated in water, 50 mM NaCl or solutions containing the different components of M9 buffer.


text:
Q: Distcp to webHDFS brings down job tracker We are having a strange issue while trying to pump large amount of data using distcp to another cluster .
To give out some numbers,
Data size = 320GB
Number of Mappers = ~70
Total number of nodes in our cluster 82
src cluster : hadoop 0.20
Destination cluster : hadoop 2.0.2
When we kick off this job, All the mappers complete successfully but the last one takes too long and when it completes/fails it basically freezes the Job tracker for close to 15 mins after which all the task trackers get restarted thereby restarting all the jobs that were running at that time in the cluster.
We have multiple distcp jobs transferring data to S3 as well as other clusters with same hadoop setupand have not faced this issue. The only difference between this process and other is that here we are using webhdfs, Is webhdfs the bottleneck?
We also tried reducing the file size, check network bandwidth for saturation,load on machines but still could not get around this issue.
Also, is there any other way for data transfer instead of using webhdfs when the two hadoop versions are not the same
Thanks

A: After setting up ganglia to collect stats and using jconsole, we narrowed down the problem to blocking threads.
The resolution was to increase the
mapred.job.tracker.handler.count from current value of 64 to 128
Our best assumption for the issue was that,All the Distcp mapper tend to complete at the same time, thereby blocking a lot of threads in cleanup process and freezing Job tracker for a good 10-15 minutes

redpajama_set_name: RedPajamaStackExchange


text:
Bengaluru to Thrissur: Kerala SRTC Garuda King Class Volvo B9R
Diwali Weekend. I was sure the rush would be the highest. I decided to play it safe and book my ticket the day the reservation opened - I missed the opening day narrowly, and remembered it only the next morning. I booked on the Kerala RTC Garuda King Class Volvo B9R service to Ernakulam - the best among the Kerala RTC services that operate out of Bangalore towards Central and South Kerala. I had looked at the options from Karnataka RTC as well before I did this booking - the reason for this booking was that the Kerala bus generally reaches quite early in the morning - and I had to be at my home quite early in the morning to attend a wedding later in the day.
Circumstances changed as the day for journey came closer - roads turned pathetic in Kerala following torrential rains, long traffic snarls at the infamous Kuthiran pass became the order of the day. I did not want to be too late for the wedding, and searched for alternatives. Trains were my call - but all of them had long waiting lists. I looked at some afternoon departures from Bengaluru - needless to say, shockingly, they were sold out as well. I tried the tatkal option - decided to take the risk, and tried booking through the IRCTC app a day before my journey - I succeeded to log in right before the server jammed up, and managed to get through the booking page - I received my ticket at 1003hrs (three minutes after booking opened) - all the 100 odd seats were sold off, and I managed to get a WL43 ticket! I took a decision to wait and watch - left the ticket as it is until that evening, when the ticket had fallen down to WL19. Changes in circumstances again - guests in the office next day meant it would be really difficult for me to get to the railway station in time for the train I had booked on, and opted to cancel my ticket instead, and retain my bus booking.
Guests in the office that day kept me occupied - and it was busy day until late afternoon. Things turned lighter a little past lunch time - managed to finish my work for the day soon later, and left the office an hour earlier than the regular check-out time. This helped me finish packing my bag and also get fresh before I commenced my journey to Thrissur. Getting transportation to reach the bus station was getting difficult - peak evening hours,plus a fairy heavy downpour added to my misery. After fiddling around the two big cab aggregator apps, I managed to get a taxi on one of them - the driver took his time to get to my place. Wading through traffic, he managed to get to my boarding point - the deserted, Basaveshwara Bus Station (Peenya) by around 1745hrs.
The bus (Archives)
The bus was being prepared by the crew - it was brought to the departure bay by around 1800hrs - three other Kerala RTC buses were lined up there already. The bus station is completely deserted now - all the shops have shut down, and there were no passengers except for the Kerala bound departures. Boarding started soon after the crew got their boarding chart - the conductor quickly checked with passengers who hadn't boarded - we waited until 1815hrs for one passenger - the conductor wasn't able to connect to this passenger due to some network issues. Although the bus started off from the bus station exactly at 1815hrs - we waited outside on the road for some more time as the office staff tried connecting to the passenger. The passenger called the conductor a little later, and confirmed that he would board at a later point - we got moving at 1822hrs.
It was getting dark - rain seemed imminent. The conductor was quickly calling up passengers who were to board at Bommanhalli and Electronic City - places that were over 2 hours away! He confirmed that they were travelling, their boarding point and added a warning that we might be late due to traffic. In the mean time, the bus crawled through the outer ring road - traffic thickened as we neared Mysore road, and we came to a standstill after Deepanjali nagar. It took quite a while before we could reach the satellite bus station - meanwhile, the conductor called up passengers who had to board here, and made sure they were available, so that we could, perhaps, depart earlier and thereby neutralise the effect of traffic. We got to the bus station (Mysore Road Satellite bus station) at 1927hrs - managed to find an empty bay and quickly began boarding.
Passengers who were already on board were advised to use the restrooms - since the dinner halt was still away. I picked up some snacks and returned to the bus soon later. We started off from the bus station at 1950hrs - 10 minutes early. The bus was completely reserved - and all reserved passengers were already on board - therefore, an early departure was permitted. It took about 2 minutes to pull out of the platform - it was traffic all the way as we started off. I started watching a movie on my phone as we got back to the main road. We managed to get to Shantinagar by 2040hrs - acceptable running time considering evening traffic. Boarding took a while - we started off at 2050hrs. Traffic flowed fast till we reached NIMHANS - traffic came to a complete standstill on the dairy circle flyover - here began our crawl.
We crawled our way to Christ University bus stop - picked passengers, and continued crawling (2120hrs). The traffic was terrible - it took a long time to get to Madiwala from there. We got to St. John's hospital by 2212hrs - almost an hour to get there from Christ, a distance of just a kilometre and a half! It took us time to find the passengers, get them on board and start - starting off at 2217hrs. The bus proceeded quite fast till we turned towards Madiwala market - coming to a complete standstill again! My movie finished in the mean time - lights in the cabin were turned off already. We passed Madiwala police station at 2318hrs - an hour just to travel 2.5kms! The conductor's mobile was ringing continuously - he had arranged all passengers who were to board at Bommanahalli to board at Roopena Agrahara (the starting point of the elevated highway) - we got there by 2322hrs - quickly picked passengers and rushed towards Electronic City. I was half asleep by now - we got to Electronic City toll gate by 2337hrs.
News about terrible traffic snarl around Attibele toll gate was pouring in already - and I was mentally prepared for a delayed arrival at Thrissur. I slept soon after we left Electronic city. I had a nice long sleep, until the crew woke up passengers - announcing that we had reached our dinner halt - the clock read 0100hrs! I was groggy - wanted to use the restroom, and got off the bus. I hadn't taken by dinner - had a quick dinner and returned to the bus soon later. The crew stocked up tea as they prepared for a non-stop run overnight. We started off at 0122hrs - I overheard the crew that they had to enter Coimbatore drop a passenger (and pick one). I vaguely remember the bus stopped at Coimbatore - I did not notice the time though. I woke up a little past 0615hrs - as I received a call from home enquiring my whereabouts. We were just past Walayar then. The bus reached Palakkad at 0643hrs - the crew had a sense of urgency, as they went about their work quickly here. Everybody in the bus eagerly looked on to see whether the bus would take the dreaded Kuthiran route, or go via Ottapalam.
The Kuthiran route showed a 16 minute delay - but that was not dependable. We started off from the bus station at 0651hrs - the bus turned left - audible sighs of relief were everywhere. We had turned towards Ottapalam - Although a longer route, its reliable and predictable. The driver picked pace soon after we left town limits - it began raining a little later. The road is windy - making for an unsettled ride. The driver was quite fast - he was pushing the bus to make up some time. Passengers were dropped on the way. Rain got heavier as we neared Thrissur - but it took a short break as we entered Thrissur town. I got off near Sakthan nagar bus station at 0837hrs - over 4 hours behind scheduled arrival time, and about 3 hours behind normal arrival time.
Remarks: The bus, KL-15-A-287 (RS789) of Ernakulam depot had clocked about 11.99 Lakh Kilometres - the maintenance is a little behind its pairing bus. There was quite a bit of rattles from the rear suspension - but was otherwise in great shape. The bus is getting old - and that is a cause for concern. But, Volvo does prove its reliability time and again! The crew were great - the service is a great example of how great crew can make a service successful. Despite all the limitations Kerala RTC has, this service has been kept really well, and the buses are in better shape than all the other buses of Kerala RTC. As I have always maintained, the timings set for this service is unachievable, and delays upto an hour (as compared to the scheduled displayed on their website) are normal. The delay on this day was understandable - we lost close to three hours in Bengaluru itself - and that delay continued throughout. Overall a great experience with the crew - minus the delay, though.
Blanket: Yes
Water: No
Snacks: No
Charging Point: Available, Worked throughout.
Entertainment: Available - not used.
Maintenance: 4.5/5 [Rattles]
Cleanliness: 5/5
Driving: 5/5
Crew behaviour: 5/5
Punctuality: 3/5 [Delays due to reasons beyond crew control]
Overall: 4/5
Pros: Great Service, Excellent crew.
Cons: Ageing bus
Will I take this service again? Absolutely - the age of the bus is a concern though.
Busfanning
rahulvijayev said…
1815hrs Peenya
2337hrs Electronic City
Five and a half hours to travel from one end in Bangalore to another...
Words isn't enough to explain what is the situation related to traffic in Bangalore!!
10 November 2019 at 12:30:00 GMT+5:30
Rameswaram to Madurai - my longest in a TNSTC bus
October 01, 2012 was a very special day for the railfan in me – I got the opportunity to visit Rameshwaram – this meant crossing the Pamban bridge by train and even take some photos of a train passing the bridge later on. But sleepless nights and intense heat coupled with high humidity took a toll on me – I was dead tired by afternoon, and we had no option but to beat retreat. After lunch (which I barely managed to eat – was too exhausted even for that), we (I was accompanied by Jayasankar on the trip) headed to the bus station (we took a town bus). We were heading back to Madurai – there was a TATA bus standing ready, but both of us wanted a Leyland. The next bus in queue was a Leyland. We decided to take this one. We headed towards the bus – TN-63N-1546 from Thirupattur depot of TNSTC-Karaikudi. We took seat in the front of the bus – the driver came around and suggested that we could take a seat at the back, which would be more comfortable. I confirmed that the seats at th
First ride on Airavat Diamond Class: Bangalore to Thrissur
Scania was launched in India about two years back. The initial product as only the 14.5M variant, followed by the 12M and the 13.7M variants. The first institutional buyer to purchase the 13.7m variant was the Karnataka State Road Transport Corporation. KSRTC went in for a new brand name for the Scanias, and called them the Airavat Diamond Class . The basic question, like everyone asked, was - what is the difference between the Diamond Class and the Club Class. One primary difference was that Club Class used Volvo B9Rs and Mercedes Benz Multi-Axle buses, while Diamond Class used newer Scania Metrolink HD 13.7m multi-axle buses. Club Class buses have a seating capacity of 49 (44 semi-sleeper seats and 5 regular 'executive' seats), while Diamond Class buses have only 46 seats - all semi-sleeper. The fares are the same in both the classes. Airavat Diamond Class was first inducted into the KSRTC fleet sometime during the end of June 2015. They initially replaced the first set of
The evolution of bus travels in India - Part-1
Sometime in early 2000s: It was about 2 years since we had moved to Mumbai from Coimbatore. It was perhaps the first time we were traveling to our hometown in Kerala after moving to Mumbai. We were traveling by road - my brother at the wheels of our Omni - he was the only driver in the family back then. We traveled via Ratnagiri, Panaji, Karwar, Mangalore, Kasaragod and Kozhikode. On the highway, spotted quite a lot of buses - owned by an operator called "Benzy". Those days, Benzy was the leading operator on the Mumbai-Thrissur route - buses took about 24 hours those days to cover the distance from Mumbai to Mangalore - and another 10 hrs or so to reach Thrissur! How do people travel such long distances by bus was the question I had in my mind back then. Buses were mostly used for short distances then. The longest journey I've experienced those days was between Coimbatore and Alappuzha - a distance of about 6 hours then. Premium buses of the yesteryears... The
Copyright 2006-2020, Binai Sankar
Binai K Sankar
Kodungallur, Thrissur, Kerala, India
a die-hard railfan and an even enthusiastic bus lover....
MSRTC 'Shivneri' Volvo B7R: To Gateway of India, f...
Yeshwantpur to Pune: Karnataka Sampark Kranti Express
Chennai to Bengaluru: UST AC Sleeper
Bengaluru to Chennai: TranZking AC Sleeper
Palakkad to Bengaluru: Airavat Club Class Volvo B9R
Bengaluru to Thrissur: Kerala SRTC Garuda King Cla...
Teacher Life
A Pharmacy teacher, a bus-and-train enthusiast, a photographer.. welcome to my blog - Platform7. This blog will have some random ramblings, travel experiences and some comment on not-so-important issues. Platform7 is where all my madness started - hence this name for my blog.
Visitors now online
footfalls till date


Hellenic Petroleum SA engages in the energy sector business. It operates through the following segments: Refining, marketing, Petro-Chemicals, Gas and Power, and Other. It also engages in the exploration and production of hydrocarbons. The company was founded in 1975 and is headquartered in Athens, Greece.


Should a Homeowner be Concerned About a Stipulation for Substitution of Counsel in a Foreclosure Case?
A stipulation for substitution of counsel is a common motion filed during foreclosure proceedings to signal that a new attorney has taken over the plaintiff's case. Though a motion to change counsel is generally no source for concern, chances are the new attorney will look at the case with fresh vigor, which means you should be prepared to respond in kind.
First, it's a good idea to have your lawyer review the motion to ensure that everything is in order. Though unlikely, mistakes do happen and if a mistake was made, your lawyer will find it. The change in counsel may also be a good opportunity to reevaluate your options. In the ideal scenario, your foreclosure never goes to summary judgment and you are able to reach a reasonable agreement with your lender out of court.
A loan modification is the most common way homeowners avoid foreclosure sale. Other options are to do a short sale or deed-in-lieu. In a short sale your lender agrees to sell the property for less than the mortgage debt, while a deed-in-lieu allows you to transfer your interest in the property back to your lender. In the event you do reach an agreement, be sure to make the release of any deficiency a stipulation in your contract.
When it comes to foreclosure, the most important thing to remember is that you should always have expert legal counsel. Consult with an experienced Foreclosure Attorney to explore your options and ensure your interests are protected.


A French luxurious brand founded by Yves Saint Laurant, one of the greatest and most celebrated icons in fashion industry. In this collection a man is striving for extreme sensation and freedom. This black white cotton summer printed backpack from Saint Laurent featuring two straps, one side zipped compartment and one internal zipped compartment.


text:
Q: What does this mean "!somePointer"? So reading some code, and there is a syntax I don't understand.
The code is like this
int * aPtr = new int();
if(!aPtr)               // this part I don't understand
{
 //some code here
}

I'm guessing the syntax is asking whether the pointer is pointing to null, but
in most of the books I read, usually are stated like this
if(aPtr == NULL)
{

}

A: There're three important points in your question

1. Is it null ?
A null pointer evaluates to zero:

A null pointer constant is an integral constant expression (5.19)
  prvalue of integer type that evaluates to zero ... (§ 4.10 /1)

So to check if a pointer is null or not, you can check it against zero.
Traditional way (legacy from C) to check a variable against zero is
if (!var)  // if (var == 0)

2. What is macro NULL?
It is an integral constant expression which evaluates to zero, but.. forget using NULL, use 0 or nullptr instead. For more information read "Should I use NULL or 0?"

3. How to check new failed or not?

... it is called by a placement
  version of a new-expression when a C++ program prefers a null pointer
  result as an error indication, instead of a bad_alloc exception.
  (18.6.1.1 / 5)

int *aPtr = new int();
if(!aPtr)

It seems you want to check whether new succeeded or failed. It's wrong, because if it fails it throws an exception and the program will not reach to the if (!aPtr). Therefore, you should handle it by try/catch.
Also, you can force compiler to stop throwing exception and return null instead. For this, you should try:
int* aPtr = new(std::nothrow) int();

A: aptr will be non-zero if it is something other than nullptr. It's basically a shorter way of saying:
if (aptr == nullptr)

A: ! is for logical NOT operator. when attached to a pointer, it returns true if the pointer is null.

A: operator ! negates its argument
NULL value in most c++ compilers/libraries is defined as integer zero (0), which is not quite right, but anyway
so operator ! negates integer value, and if this value is 0 (ie pointer is NULL) - then we have true
but in general case - it is bad practice to depend on this, you should compare with nullptr
UPDATE: as per comments and standard - you can expect that NULL is evaluated as 0, so you can safely use if (pointer) or if (!pointer), but I personally prefer to compare it with proper consts, as it then clearly seen that it is pointer and not just integral value


text:
Sept. 9 to Oct. 4 at Round House Theatre Bethesda
by Glen Weldon September 18th, 2009 August 29th, 2020
Playwright Roberto Aguirre-Sacasa's D.C.-fu is mighty: He grew up in Bethesda, went to Georgetown, flacked for Shakespeare Theater, wrote arts pieces for City Paper, and had his stuff staged by Woolly, Rorschach and Source. Now a New Yorker, the 37-year-old returns to his hometown in September with plenty of Off-Broadway, television (Big Love), and Marvel comic book experience under his utility belt. (He's written for the Sensational Spiderman and the Fantastic Four, and he's currently writing a defiantly odd book called Marvel Divas, which is exactly what it sounds like.) Round House commissioned him to adapt The Picture of Dorian Gray, and although I haven't seen the script, I'm reasonably confident of a couple things: 1) As in the Wilde novella, there'll be plenty of talk about the nature of Art and Beauty; 2) Very unlike the Wilde novella, which sounds homoerotic themes but remains remarkably cagey on the precise nature of Gray's "debauchery," there'll be Hot Man-on-Man Action. How do we know this? Well, the Round House folks are talking up the production's "provocative contemporary spin" (it's set in 1988) and cautioning their subscribers about adult situations/nudity. And Aguirre-Sacasa's had lots of practice tackling gay themes in a variety of media (Marvel Divas, hello!). What'll be interesting to see—no matter where you come down on the issue of dramaturgical manflesh—is how a more direct exploration of Dorian Gray's gay subtext squares with Wilde's slyly ambivalent critique of hedonism.
The play runs Sept. 9 to Oct. 4 at Round House Theatre Bethesda, 4545 East-West Highway, Bethesda. $25–$55. (240) 644-1100.


text:
Antelope Hill Publishing
Shop in House
Shop Arktos
Publish Me
Home / Arktos Books / Oswald Spengler: Man and Technics
Oswald Spengler: Man and Technics
In this new and revised edition of Oswald Spengler's classic, Man and Technics, Spengler makes a number of predictions that today, more than eighty years after the book was first published, have turned out to be remarkably accurate. Spengler predicted that industrialisation would lead to serious environmental problems and that countless species would become extinct. He also predicted that labour from Third World countries would increasingly outcompete Western workers by doing the same work for much lower wages, and that industrial production would therefore move to other parts of the world, such as East Asia, India, and South America.
According to Spengler, technology has not only made it possible for man to harness the forces of nature; it has also alienated him from nature. Modern technology now dominates our culture instead of that which is natural and organic. After having made himself the master of nature, man has himself become technology's slave. 'The victor, crashed, is dragged to death by the team', Spengler summarises.
Finally, Spengler foresaw that Western man would eventually grow weary of his increasingly artificial lifestyle and begin to hate the civilisation he himself created. There is no way out of this conundrum as the unrelenting progress of technological development cannot be halted. The current high-tech culture of the West is therefore doomed, destined to be consumed from within and destroyed. A time will come, Spengler writes, when our giant cities and skyscrapers have fallen in ruins and lie forgotten 'just like the palaces of old Memphis and Babylon'. It remains to be seen if this last, and most dire, of Spengler's prophecies will also come true.
Oswald Spengler: Man and Technics quantity
SKU: 6050 Category: Arktos Books
Be the first to review "Oswald Spengler: Man and Technics" Cancel reply
Jason Reza Jorgani: Prometheism
Arktos Books	$24.50
Julius Evola: Notes on the Third Reich
Julius Evola: A Traditionalist Confronts Fascism
Guillaume Faye: Archeofuturism
Copyright © 2022 Antelope Hill Publishing
Privacy Policy | Terms & Conditions | Fulfillment & Refund Policy
Twitter Telegram Frog
Subscribe To New Release Emails