text:
Exclusive: your guide to the most generous cruise cancellation policies
Vanessa Wu 20 Mar 2020
Tips & Advice3 Comments 0
Cancellation policies, the small print everyone once ignored, have suddenly become a major tool to woo cruisers back onto ships. In a new age of insecurity, making travellers feel comfortable that they can pull out if external forces make journey impossible is critical.
But how do you work out which is best for you?
Weighing up the value of a cruise cancellation policy means you need to consider the length of time you are given to book against how late in the day you can pull out. So a policy that gives you, say, six weeks to book but allows you to switch in 48 hours is great value.
The lines are eager to retain your money so they can pay their crews and keep cruising when the time comes. So you will probably be offered a "Future Cruise Credit". So the next thing you need to consider is: on what cruises can it be used and when will it expire?
Some lines are offering bookings up to 2022. Others require you use your cruise credit one year after issue.
Carnival Australia, Ponant and Dream Cruises have recently released new cancellation policies, while lines like Holland America Line and Seabourn have expanded theirs.
New bookings are also able to benefit from the relaxed cancellation options.
Cancellation policies are as complex as telephone plans. So we've created a chart to help you compare your cancellation timeframe, how long the offer is valid for, what you get back and how you're expected to use Future Cruise Credits.
Most lines are offering 100 per cent Future Cruise Credits to guests who choose to cancel. Where things get complicated is in the fine print.
"Many of our clients are using their future cruise credits on a particular departure. If it's cruises from Australia they will consider 2020, if overseas they are swaying towards deferring to 2021," says Barry Downs, Sales and Marketing Manager of Bicton Travel, a leading agency with years of expertise.
"Given today's DFAT recommendation not to travel, my recommendation would be to just pause for a moment. But don't stop dreaming and don't stop planning for the future.
"Once this settles down, there will be a lot of pent up demand to book the holidays. Plan that bucket list trip in the coming weeks, whilst your advisor has the time and tools to find you the right holiday of a lifetime. And if you have the ability and resources to travel in 2020, do so here in Australia or on a cruise from Australia, lets support local where we can."
Lines like Princess Cruises, Crystal Cruises, Hurtigruten and Ponant are also offering incentives like reduced deposits, full refund of deposits and later final payments for new bookings.
See how to make the most out of cruise cancellation policies below:
Cancellation timeframe
Viking takes the lead for the shortest cancellation timeframe of 24 hours before departure. However, most other lines are offering cancellations of up to 48 hours prior at the moment.
Meanwhile, Crystal Cruises is offering cancellations up to seven days prior, while Ponant is offering cancellation up to 30 days prior. And on other lines, like Holland America Line and Princess Cruises, it depends on when you're sailing.
Both Seabourn and Holland America Line offer 48-hour and 30-day prior cancellation depending on departure dates, while Princess Cruises has up to 72-hour on some sailings and on others, guests have to cancel by March 31.
The cruise lines are making very generous offers which are valid for different amounts of time.
Book fast with lines such as Viking, Oceania, Regent Seven Seas, Hurtigruten as their offer is only valid for all reservations made through April 30, 2020. And among them, the offer is valid on cruises departing in different periods of 2020. For example, Viking's offer is valid for any of their cruises, but on Oceania, the offer is only valid for cruises through September 2020.
Norwegian Cruise Line and Cunard are offering among the longest on validity. On NCL, guests can book up to September 30, 2020 to enjoy cancellation 48-hour prior. And Cunard's offer is valid on all existing and new booking departing before August 31, 2020.
Not all Future Cruise Credits are the same
Some lines require guests to use the Future Cruise Credits on either 2020, 2021 or even up to 2022 sailings. However, guests need to take note of when the credits must be used by, or it will be forfeited. For example on Oceania and Regent Seven Seas, the line allows the credit to be used on 2022 sailings but the credit must be used within one year from date of issue.
Lines that allow you to rebook up to 2021 sailings include: Royal Caribbean, Celebrity Cruises, Azamara, Silversea, Seabourn, Hurtigruten, Princess Cruises.
Lines that allow you to rebook up to 2022 sailings include: Viking, Oceania Cruises, Regent Seven Seas, Norwegian Cruise Line, Cunard, Crystal Cruises.
Viking 24-hours before departure All current reservations with Viking and for all new reservations made through April 30, 2020 Cancelled reservations will be reimbursed in the form of a Future Cruise Voucher in the amount of 100% of all funds paid to Viking. Future Cruise Vouchers may be used toward any future river, ocean or expedition cruise with Viking and will be valid for 24 months from issuance.
Royal Caribbean 48-hours before departure The policy applies to both new and existing cruise bookings with a sailing date on or before July 31, 2020 Guests will receive a full credit for their fare, usable on any future sailing of the guest's choice in 2020 or 2021.
Celebrity Cruises 48-hours before departure The policy applies to both new and existing cruise bookings with a sailing date on or before July 31, 2020 Guests will receive a full credit for their fare, usable on any future sailing of the guest's choice in 2020 or 2021.
Silversea 48-hours before departure The policy applies to both new and existing cruise bookings with a sailing date on or before July 31, 2020 Guests will receive a full credit for their fare, usable on any future sailing of the guest's choice in 2020 or 2021.
Azamara 48-hours before departure The policy applies to both new and existing cruise bookings with a sailing date on or before July 31, 2020 Guests will receive a full credit for their fare, usable on any future sailing of the guest's choice in 2020 or 2021.
Oceania Cruises 48-hours before departure Valid for all existing reservations for voyages departing from March 10, 2020 through September 30, 2020. Valid for all new reservations through April 30th for voyages departing from March 10, 2020 through September 30, 2020 Receive a Future Cruise Credit equal to 100% of the cruise fare paid, valid for redemption for one year from date of issue for travel departing no later than December 31, 2022.
Regent Seven Seas 48-hours before departure All Regent voyages departing from 10 March 2020 through 30 September 2020, provided you make final payment by April 30 Receive a 100% Future Cruise Credit, which can be applied to any new booking within one year on any Regent voyage that embarks between now and 31 December 2022.
Seabourn 48-hours prior, for existing and new bookings made through July 31, 2020, 30 days prior for bookings departing between August 1, 2020 and October 15, 2020 For existing and new bookings up to October 15, 2020 For existing and new bookings up to October 15, 2020
Norwegian Cruise Line 48-hours before departure For all sailings booked through September 30, 2020 Receive a 100% future cruise credit to be used for sailings that embark through December 31, 2022. All future cruise credits must be redeemed within one year from issue date.
Hurtigruten 48-hours before departure For all guests booked on departures between March 12 and June 30, 2020 and any new bookings made by April 30, 2020 Free rebooking to any future Hurtigruten cruise – expedition or Norwegian coastal – from July 1, 2020, to July 1, 2021. A changed reservation will be reimbursed as a 100 per cent future cruise voucher and a 10 per cent discount on the guest's future cruise, including fees. The voucher will also cover flights booked through Hurtigruten.
Cunard 48-hours before departure All existing and new bookings departing before August 31, 2020 Transfer your booking and unlimited number of times prior to final payment to any Cunard voyage currently on sale, free of charge. Cancel and receive a Future Cruise Credit equivalent to the cancellation fees and refunds will be given on any remaining monies paid. The Future Cruise Credit can be redeemed against any sailing until end of March 2022 (bookings to be made before December 31, 2021).
Dream Cruises 48-hours before departure All new and existing bookings made for any departures prior to or on 31 July 2020 Receive 100% future cruise credit to be redeemed on any Dream Cruises sailing embarking on or before 31st December 2020.
Crystal Cruises 7 days prior to first service (First service refers to any pre-cruise product such as hotel or land programs booked prior to the voyage. If no such service was booked, it refers to the departure.) Applicable to all 2020 Ocean, River, Yacht and Expedition Voyages Receive a 100% credit for cruise fare monies paid that may be redeemed on any future voyage through the end of 2022. Credit will be posted to the guests' profile within 30 days and must be applied by 31 December, 2020. The line has also reduced deposits for new bookings to only $100 to $500 per person (previously 25% of cruise fare). Later final payment is also offered for existing and new bookings to 90 days prior to first service, from 120 days.
Princess Cruises 72-hours prior for cruises and cruisetours departing through April 3, 2020. Cancel by March 31, 2020 for cruises departing between April 4 and May 31, 2020 For cruises and cruise tours departing through May 31, 2020. Receive Future Cruise Credit (FCC) for 100% of cancellation fees, to be applied to any new or existing Princess cruise booking and departing on or before December 31, 2021. Credits may take up to 10 business days to be processed. Later final payment for June departures, now due 60 days prior to sailing. Full refund of deposit up until final payment on standard deposit bookings departing July to October 2020.
Holland America Line 48-hours prior for departures before July 31, 2020, 30 days prior for departures between August 1 and October 15, 2020 The 48-hours prior offer is available for new and existing bookings made on or before July 31, 2020 and departing through July 31, 2020. The 30 day prior offer is available for new bookings only made between March 1, 2020 and April 30, 2020, for Holland America Line cruises sailing between August 1, 2020 and October 15, 2020. Receive a Future Cruise Credit in the amount of your cancellation fees, applied to your Mariner number in approximately two weeks. You have until December 31, 2020 to redeem the credit on cruises sailing in 2020 and 2021.
Ponant 30 days prior For any new bookings up to 90 days after confirmation Cancellation of your cruise is fully refundable up to 90 days after confirmation. Make a new booking with a 10% deposit, final payment is due only 30 days before sailing on any 2020 departures.
Carnival Australia 3 days prior for March departures, prior to March 31 for April departures and 30 days prior for sailings between May to September 2020. For guests who have booked before March 11, 2020 on sailings up to September 2020. Receive a Future Cruise Credit valid prior to 31 March 2021 for cancelled March 2020 departure and within one year of original sailing day.
Cruise & Maritime Voyages N/A N/A "CMV will allow guests to transfer all monies paid on existing bookings to another cruise departing in 2020 or 2021 and waive all administrative fees if:
1. A guest has travelled through a highly affected area (i.e. China, Hong Kong, South Korea, Macau, Iran, Japan, or Italy) 30 days prior to embarkation, or
2. A guest has a pre-existing condition and their doctor has advised against travelling
Further terms and conditions apply, so guests should contact their travel agent or CMV to discuss their options."
cruise cancellation policiesFuture Cruise Credits
Previous ArticleMiracle: How the cruise industry got almost 90,000 passengers home
Next ArticleCarnival Australia offers ships as hospitals during coronavirus pandemic
Who has the best small ships? Your guide to boutique vessels
Vanessa Wu 4 Sep 2020
The best cruise deals for spring/summer 2021 season
Vanessa Wu 24 Jul 2020
27 Mar 2020 Frustrated
Why have Cunard closed off all information to their passengers and Travel Agents regarding what is happening to the upcoming cruises on the Queen Elizabeth 12th April and the 9th May from Sydney.
Australians have been forbidden to travel interstate, let alone internationally, plus overseas passengers are not permitted to enter AUSTRALIA !! so how will they be able to sail from Sydney.??
Cunard come to the party like all other cruise companies, please tell us what is going on, do you honestly believe that the QE is sailing from Sydney on these dates or not, we just need the truth so we can cancel flights and hotels if need be, surely that's not too much to ask…..
27 Mar 2020 Cruiser
Cunard have stopped departures for Queen Elizabeth until 11th April. Given that just about all Australian states have closed their borders why has Cunard not cancelled their circumnavigation of Australia cruise leaving on 12th April.
21 Mar 2020 Diddy
Should all cruises leaving any Australian port now be stopped from cruising anywhere around Australia? By doing this you ensure safety for many people. Even if cruise lines do not return deposits / full costs they can pay staff and give all the people who paid for the cruise a credit for 2021.


Jim Hinkle, TwoCor executive director, recently was certified as a trainer of The Adverse Childhood Experiences (ACE) Study. As part of a collaborative research project between the Centers for Disease Control and Prevention and Kaiser Permanente, over 17,000 Kaiser Permanente patients participated in The ACE Study. Jim received his training under Dr. Robert F. Anda, MD, MS, with the Centers for Disease Control and Prevention, one of the co-investigators of the study.
Data resulting from this seminal study reveal staggering proof of the health, social, and economic risks for adults that result from childhood trauma, such as abuse, neglect and serious family dysfunction. On-going analysis of the data continues to this day to reveal new insights into the damaging effects of this phenomenon.
The research from The ACE Study informs the work we do at TwoCor, the only trauma-informed work training program for adolescents in the Pikes Peak Region. Our trauma-informed approaches help to minimize the impact of ACEs and prevent ACEs for future generations. Using tools that screen for trauma directs our youth to interventions that meet their specific needs. Trauma-informed therapy can also help our clinical staff address how trauma impacts the individual and the whole family. Our work training program is designed to mitigate further trauma by instilling a sense of safety and trust in our youth. It also builds the functional brain areas that are compromised by severe trauma and are required to become a valued worker.


text:
/// \file Kokkos_UnorderedMap.hpp
/// \brief Declaration and definition of Kokkos::UnorderedMap.
///
/// This header file declares and defines Kokkos::UnorderedMap and its
/// related nonmember functions.

#ifndef KOKKOS_UNORDERED_MAP_HPP
#define KOKKOS_UNORDERED_MAP_HPP

#include <Kokkos_Core.hpp>
#include <Kokkos_Functional.hpp>

#include <Kokkos_Bitset.hpp>

#include <impl/Kokkos_Traits.hpp>
#include <impl/Kokkos_UnorderedMap_impl.hpp>

#include <iostream>

#include <cstdint>
#include <stdexcept>

namespace Kokkos {

enum { UnorderedMapInvalidIndex = ~0u };

/// \brief First element of the return value of UnorderedMap::insert().
///
/// Inserting an element into an UnorderedMap is not guaranteed to
/// succeed.  There are three possible conditions:
///

///
 <tt>INSERT_FAILED</tt>: The insert failed.  This usually
///      means that the UnorderedMap ran out of space.

///
 <tt>INSERT_SUCCESS</tt>: The insert succeeded, and the key
///      did not exist in the table before.

///
 <tt>INSERT_EXISTING</tt>: The insert succeeded, and the key
///      did exist in the table before.  The new value was
///      ignored and the old value was left in place.

///

class UnorderedMapInsertResult
{
private:
  enum Status{
     SUCCESS = 1u << 31
   , EXISTING = 1u << 30
   , FREED_EXISTING = 1u << 29
   , LIST_LENGTH_MASK = ~(SUCCESS | EXISTING | FREED_EXISTING)
  };

public:
  /// Did the map successful insert the key/value pair
  KOKKOS_FORCEINLINE_FUNCTION
  bool success() const { return (m_status & SUCCESS); }

  /// Was the key already present in the map
  KOKKOS_FORCEINLINE_FUNCTION
  bool existing() const { return (m_status & EXISTING); }

  /// Did the map fail to insert the key due to insufficent capacity
  KOKKOS_FORCEINLINE_FUNCTION
  bool failed() const { return m_index == UnorderedMapInvalidIndex; }

  /// Did the map lose a race condition to insert a dupulicate key/value pair
  /// where an index was claimed that needed to be released
  KOKKOS_FORCEINLINE_FUNCTION
  bool freed_existing() const { return (m_status & FREED_EXISTING); }

  /// How many iterations through the insert loop did it take before the
  /// map returned
  KOKKOS_FORCEINLINE_FUNCTION
  uint32_t list_position() const { return (m_status & LIST_LENGTH_MASK); }

  /// Index where the key can be found as long as the insert did not fail
  KOKKOS_FORCEINLINE_FUNCTION
  uint32_t index() const { return m_index; }

  KOKKOS_FORCEINLINE_FUNCTION
  UnorderedMapInsertResult()
    : m_index(UnorderedMapInvalidIndex)
    , m_status(0)
  {}

  KOKKOS_FORCEINLINE_FUNCTION
  void increment_list_position()
  {
    m_status += (list_position() < LIST_LENGTH_MASK) ? 1u : 0u;
  }

  KOKKOS_FORCEINLINE_FUNCTION
  void set_existing(uint32_t i, bool arg_freed_existing)
  {
    m_index = i;
    m_status = EXISTING | (arg_freed_existing ? FREED_EXISTING : 0u) | list_position();
  }

  KOKKOS_FORCEINLINE_FUNCTION
  void set_success(uint32_t i)
  {
    m_index = i;
    m_status = SUCCESS | list_position();
  }

private:
  uint32_t m_index;
  uint32_t m_status;
};

/// \class UnorderedMap
/// \brief Thread-safe, performance-portable lookup table.
///
/// This class provides a lookup table.  In terms of functionality,
/// this class compares to std::unordered_map (new in C++11).
/// "Unordered" means that keys are not stored in any particular
/// order, unlike (for example) std::map.  "Thread-safe" means that
/// lookups, insertion, and deletion are safe to call by multiple
/// threads in parallel.  "Performance-portable" means that parallel
/// performance of these operations is reasonable, on multiple
/// hardware platforms.  Platforms on which performance has been
/// tested include conventional Intel x86 multicore processors, Intel
/// Xeon Phi ("MIC"), and NVIDIA GPUs.
///
/// Parallel performance portability entails design decisions that
/// might differ from one's expectation for a sequential interface.
/// This particularly affects insertion of single elements.  In an
/// interface intended for sequential use, insertion might reallocate
/// memory if the original allocation did not suffice to hold the new
/// element.  In this class, insertion does not reallocate
/// memory.  This means that it might fail.  insert() returns an enum
/// which indicates whether the insert failed.  There are three
/// possible conditions:
///

///
 <tt>INSERT_FAILED</tt>: The insert failed.  This usually
///      means that the UnorderedMap ran out of space.

///
 <tt>INSERT_SUCCESS</tt>: The insert succeeded, and the key
///      did not exist in the table before.

///
 <tt>INSERT_EXISTING</tt>: The insert succeeded, and the key
///      did exist in the table before.  The new value was
///      ignored and the old value was left in place.

///

///
/// \tparam Key Type of keys of the lookup table.  If \c const, users
///   are not allowed to add or remove keys, though they are allowed
///   to change values.  In that case, the implementation may make
///   optimizations specific to the <tt>Device</tt>.  For example, if
///   <tt>Device</tt> is \c Cuda, it may use texture fetches to access
///   keys.
///
/// \tparam Value Type of values stored in the lookup table.  You may use
///   \c void here, in which case the table will be a set of keys.  If
///   \c const, users are not allowed to change entries.
///   In that case, the implementation may make
///   optimizations specific to the \c Device, such as using texture
///   fetches to access values.
///
/// \tparam Device The Kokkos Device type.
///
/// \tparam Hasher Definition of the hash function for instances of
///   <tt>Key</tt>.  The default will calculate a bitwise hash.
///
/// \tparam EqualTo Definition of the equality function for instances of
///   <tt>Key</tt>.  The default will do a bitwise equality comparison.
///
template <   typename Key
           , typename Value
           , typename Device = Kokkos::DefaultExecutionSpace
           , typename Hasher = pod_hash<typename Impl::remove_const<Key>::type>
           , typename EqualTo = pod_equal_to<typename Impl::remove_const<Key>::type>
        >
class UnorderedMap
{
private:
  typedef typename ViewTraits<Key,Device,void,void>::host_mirror_space host_mirror_space ;
public:
  //! \name Public types and constants
  //@{

  //key_types
  typedef Key declared_key_type;
  typedef typename Impl::remove_const<declared_key_type>::type key_type;
  typedef typename Impl::add_const<key_type>::type const_key_type;

  //value_types
  typedef Value declared_value_type;
  typedef typename Impl::remove_const<declared_value_type>::type value_type;
  typedef typename Impl::add_const<value_type>::type const_value_type;

  typedef Device device_type;
  typedef typename Device::execution_space execution_space;
  typedef Hasher hasher_type;
  typedef EqualTo  equal_to_type;
  typedef uint32_t size_type;

  //map_types
  typedef UnorderedMap<declared_key_type,declared_value_type,device_type,hasher_type,equal_to_type> declared_map_type;
  typedef UnorderedMap<key_type,value_type,device_type,hasher_type,equal_to_type>                   insertable_map_type;
  typedef UnorderedMap<const_key_type,value_type,device_type,hasher_type,equal_to_type>             modifiable_map_type;
  typedef UnorderedMap<const_key_type,const_value_type,device_type,hasher_type,equal_to_type>       const_map_type;

  static const bool is_set = std::is_same<void,value_type>::value;
  static const bool has_const_key = std::is_same<const_key_type,declared_key_type>::value;
  static const bool has_const_value = is_set || std::is_same<const_value_type,declared_value_type>::value;

  static const bool is_insertable_map = !has_const_key && (is_set || !has_const_value);
  static const bool is_modifiable_map = has_const_key && !has_const_value;
  static const bool is_const_map = has_const_key && has_const_value;

  typedef UnorderedMapInsertResult insert_result;

  typedef UnorderedMap<Key,Value,host_mirror_space,Hasher,EqualTo> HostMirror;

  typedef Impl::UnorderedMapHistogram<const_map_type> histogram_type;

  //@}

private:
  enum { invalid_index = ~static_cast<size_type>(0) };

  typedef typename Impl::if_c< is_set, int, declared_value_type>::type impl_value_type;

  typedef typename Impl::if_c<   is_insertable_map
                               , View< key_type *, device_type>
                               , View< const key_type *, device_type, MemoryTraits<RandomAccess> >
                             >::type key_type_view;

  typedef typename Impl::if_c<   is_insertable_map || is_modifiable_map
                               , View< impl_value_type *, device_type>
                               , View< const impl_value_type *, device_type, MemoryTraits<RandomAccess> >
                             >::type value_type_view;

  typedef typename Impl::if_c<   is_insertable_map
                               , View< size_type *, device_type>
                               , View< const size_type *, device_type, MemoryTraits<RandomAccess> >
                             >::type size_type_view;

  typedef typename Impl::if_c<   is_insertable_map
                               , Bitset< execution_space >
                               , ConstBitset< execution_space>
                             >::type bitset_type;

  enum { modified_idx = 0, erasable_idx = 1, failed_insert_idx = 2 };
  enum { num_scalars = 3 };
  typedef View< int[num_scalars], LayoutLeft, device_type> scalars_view;

public:
  //! \name Public member functions
  //@{

  UnorderedMap()
    : m_bounded_insert()
    , m_hasher()
    , m_equal_to()
    , m_size()
    , m_available_indexes()
    , m_hash_lists()
    , m_next_index()
    , m_keys()
    , m_values()
    , m_scalars()
  {}

  /// \brief Constructor
  ///
  /// \param capacity_hint [in] Initial guess of how many unique keys will be inserted into the map
  /// \param hash [in] Hasher function for \c Key instances.  The
  ///   default value usually suffices.
  UnorderedMap(  size_type capacity_hint, hasher_type hasher = hasher_type(), equal_to_type equal_to = equal_to_type() )
    : m_bounded_insert(true)
    , m_hasher(hasher)
    , m_equal_to(equal_to)
    , m_size()
    , m_available_indexes(calculate_capacity(capacity_hint))
    , m_hash_lists(ViewAllocateWithoutInitializing("UnorderedMap hash list"), Impl::find_hash_size(capacity()))
    , m_next_index(ViewAllocateWithoutInitializing("UnorderedMap next index"), capacity()+1) // +1 so that the *_at functions can always return a valid reference
    , m_keys("UnorderedMap keys",capacity()+1)
    , m_values("UnorderedMap values",(is_set? 1 : capacity()+1))
    , m_scalars("UnorderedMap scalars")
  {
    if (!is_insertable_map) {
      throw std::runtime_error("Cannot construct a non-insertable (i.e. const key_type) unordered_map");
    }

    Kokkos::deep_copy(m_hash_lists, invalid_index);
    Kokkos::deep_copy(m_next_index, invalid_index);
  }

  void reset_failed_insert_flag()
  {
    reset_flag(failed_insert_idx);
  }

  histogram_type get_histogram()
  {
    return histogram_type(*this);
  }

  //! Clear all entries in the table.
  void clear()
  {
    m_bounded_insert = true;

    if (capacity() == 0) return;

    m_available_indexes.clear();

    Kokkos::deep_copy(m_hash_lists, invalid_index);
    Kokkos::deep_copy(m_next_index, invalid_index);
    {
      const key_type tmp = key_type();
      Kokkos::deep_copy(m_keys,tmp);
    }
    if (is_set){
      const impl_value_type tmp = impl_value_type();
      Kokkos::deep_copy(m_values,tmp);
    }
    {
      Kokkos::deep_copy(m_scalars, 0);
    }
  }

  /// \brief Change the capacity of the the map
  ///
  /// If there are no failed inserts the current size of the map will
  /// be used as a lower bound for the input capacity.
  /// If the map is not empty and does not have failed inserts
  /// and the capacity changes then the current data is copied
  /// into the resized / rehashed map.
  ///
  /// This is not a device function; it may not be
  /// called in a parallel kernel.
  bool rehash(size_type requested_capacity = 0)
  {
    const bool bounded_insert = (capacity() == 0) || (size() == 0u);
    return rehash(requested_capacity, bounded_insert );
  }

  bool rehash(size_type requested_capacity, bool bounded_insert)
  {
    if(!is_insertable_map) return false;

    const size_type curr_size = size();
    requested_capacity = (requested_capacity < curr_size) ? curr_size : requested_capacity;

    insertable_map_type tmp(requested_capacity, m_hasher, m_equal_to);

    if (curr_size) {
      tmp.m_bounded_insert = false;
      Impl::UnorderedMapRehash<insertable_map_type> f(tmp,*this);
      f.apply();
    }
    tmp.m_bounded_insert = bounded_insert;

    *this = tmp;

    return true;
  }

  /// \brief The number of entries in the table.
  ///
  /// This method has undefined behavior when erasable() is true.
  ///
  /// Note that this is not a device function; it cannot be called in
  /// a parallel kernel.  The value is not stored as a variable; it
  /// must be computed.
  size_type size() const
  {
    if( capacity() == 0u ) return 0u;
    if (modified()) {
      m_size = m_available_indexes.count();
      reset_flag(modified_idx);
    }
    return m_size;
  }

  /// \brief The current number of failed insert() calls.
  ///
  /// This is not a device function; it may not be
  /// called in a parallel kernel.  The value is not stored as a
  /// variable; it must be computed.
  bool failed_insert() const
  {
    return get_flag(failed_insert_idx);
  }

  bool erasable() const
  {
    return is_insertable_map ? get_flag(erasable_idx) : false;
  }

  bool begin_erase()
  {
    bool result = !erasable();
    if (is_insertable_map && result) {
      execution_space::fence();
      set_flag(erasable_idx);
      execution_space::fence();
    }
    return result;
  }

  bool end_erase()
  {
    bool result = erasable();
    if (is_insertable_map && result) {
      execution_space::fence();
      Impl::UnorderedMapErase<declared_map_type> f(*this);
      f.apply();
      execution_space::fence();
      reset_flag(erasable_idx);
    }
    return result;
  }

  /// \brief The maximum number of entries that the table can hold.
  ///
  /// This is a device function; it may be called in a parallel
  /// kernel.
  KOKKOS_FORCEINLINE_FUNCTION
  size_type capacity() const
  { return m_available_indexes.size(); }

  /// \brief The number of hash table "buckets."
  ///
  /// This is different than the number of entries that the table can
  /// hold.  Each key hashes to an index in [0, hash_capacity() - 1].
  /// That index can hold zero or more entries.  This class decides
  /// what hash_capacity() should be, given the user's upper bound on
  /// the number of entries the table must be able to hold.
  ///
  /// This is a device function; it may be called in a parallel
  /// kernel.
  KOKKOS_INLINE_FUNCTION
  size_type hash_capacity() const
  { return m_hash_lists.dimension_0(); }

  //---------------------------------------------------------------------------
  //---------------------------------------------------------------------------

  /// This is a device function; it may be called in a parallel
  /// kernel.  As discussed in the class documentation, it need not
  /// succeed.  The return value tells you if it did.
  ///
  /// \param k [in] The key to attempt to insert.
  /// \param v [in] The corresponding value to attempt to insert.  If
  ///   using this class as a set (with Value = void), then you need not
  ///   provide this value.
  KOKKOS_INLINE_FUNCTION
  insert_result insert(key_type const& k, impl_value_type const&v = impl_value_type()) const
  {
    insert_result result;

    if ( !is_insertable_map || capacity() == 0u || m_scalars((int)erasable_idx) ) {
      return result;
    }

    if ( !m_scalars((int)modified_idx) ) {
      m_scalars((int)modified_idx) = true;
    }

    int volatile & failed_insert_ref = m_scalars((int)failed_insert_idx) ;

    const size_type hash_value = m_hasher(k);
    const size_type hash_list = hash_value % m_hash_lists.dimension_0();

    size_type * curr_ptr   = & m_hash_lists[ hash_list ];
    size_type new_index    = invalid_index ;

    // Force integer multiply to long
    size_type index_hint = static_cast<size_type>( (static_cast<double>(hash_list) * capacity()) / m_hash_lists.dimension_0());

    size_type find_attempts = 0;

    enum { bounded_find_attempts = 32u };
    const size_type max_attempts = (m_bounded_insert && (bounded_find_attempts < m_available_indexes.max_hint()) ) ?
                                    bounded_find_attempts :
                                    m_available_indexes.max_hint();

    bool not_done = true ;

#if defined( __MIC__ )
      #pragma noprefetch
#endif
    while ( not_done ) {

      // Continue searching the unordered list for this key,
      // list will only be appended during insert phase.
      // Need volatile_load as other threads may be appending.
      size_type curr = volatile_load(curr_ptr);

      KOKKOS_NONTEMPORAL_PREFETCH_LOAD(&m_keys[curr != invalid_index ? curr : 0]);
#if defined( __MIC__ )
      #pragma noprefetch
#endif
      while ( curr != invalid_index && ! m_equal_to( volatile_load(&m_keys[curr]), k) ) {
        result.increment_list_position();
        index_hint = curr;
        curr_ptr = &m_next_index[curr];
        curr = volatile_load(curr_ptr);
        KOKKOS_NONTEMPORAL_PREFETCH_LOAD(&m_keys[curr != invalid_index ? curr : 0]);
      }

      //------------------------------------------------------------
      // If key already present then return that index.
      if ( curr != invalid_index ) {

        const bool free_existing = new_index != invalid_index;
        if ( free_existing ) {
          // Previously claimed an unused entry that was not inserted.
          // Release this unused entry immediately.
          if (!m_available_indexes.reset(new_index) ) {
            printf("Unable to free existing\n");
          }

        }

        result.set_existing(curr, free_existing);
        not_done = false ;
      }
      //------------------------------------------------------------
      // Key is not currently in the map.
      // If the thread has claimed an entry try to insert now.
      else {

        //------------------------------------------------------------
        // If have not already claimed an unused entry then do so now.
        if (new_index == invalid_index) {

          bool found = false;
          // use the hash_list as the flag for the search direction
          Kokkos::tie(found, index_hint) = m_available_indexes.find_any_unset_near( index_hint, hash_list );

          // found and index and this thread set it
          if ( !found && ++find_attempts >= max_attempts ) {
            failed_insert_ref = true;
            not_done = false ;
          }
          else if (m_available_indexes.set(index_hint) ) {
            new_index = index_hint;
            // Set key and value
            KOKKOS_NONTEMPORAL_PREFETCH_STORE(&m_keys[new_index]);
            m_keys[new_index] = k ;

            if (!is_set) {
              KOKKOS_NONTEMPORAL_PREFETCH_STORE(&m_values[new_index]);
              m_values[new_index] = v ;
            }

            // Do not proceed until key and value are updated in global memory
            memory_fence();
          }
        }
        else if (failed_insert_ref) {
          not_done = false;
        }

        // Attempt to append claimed entry into the list.
        // Another thread may also be trying to append the same list so protect with atomic.
        if ( new_index != invalid_index &&
             curr ==  atomic_compare_exchange(curr_ptr, static_cast<size_type>(invalid_index), new_index) ) {
          // Succeeded in appending
          result.set_success(new_index);
          not_done = false ;
        }
      }
    } // while ( not_done )

    return result ;
  }

  KOKKOS_INLINE_FUNCTION
  bool erase(key_type const& k) const
  {
    bool result = false;

    if(is_insertable_map && 0u < capacity() && m_scalars((int)erasable_idx)) {

      if ( ! m_scalars((int)modified_idx) ) {
        m_scalars((int)modified_idx) = true;
      }

      size_type index = find(k);
      if (valid_at(index)) {
        m_available_indexes.reset(index);
        result = true;
      }
    }

    return result;
  }

  /// \brief Find the given key \c k, if it exists in the table.
  ///
  /// \return If the key exists in the table, the index of the
  ///   value corresponding to that key; otherwise, an invalid index.
  ///
  /// This is a device function; it may be called in a parallel
  /// kernel.
  KOKKOS_INLINE_FUNCTION
  size_type find( const key_type & k) const
  {
    size_type curr = 0u < capacity() ? m_hash_lists( m_hasher(k) % m_hash_lists.dimension_0() ) : invalid_index ;

    KOKKOS_NONTEMPORAL_PREFETCH_LOAD(&m_keys[curr != invalid_index ? curr : 0]);
    while (curr != invalid_index && !m_equal_to( m_keys[curr], k) ) {
      KOKKOS_NONTEMPORAL_PREFETCH_LOAD(&m_keys[curr != invalid_index ? curr : 0]);
      curr = m_next_index[curr];
    }

    return curr;
  }

  /// \brief Does the key exist in the map
  ///
  /// This is a device function; it may be called in a parallel
  /// kernel.
  KOKKOS_INLINE_FUNCTION
  bool exists( const key_type & k) const
  {
    return valid_at(find(k));
  }

  /// \brief Get the value with \c i as its direct index.
  ///
  /// \param i [in] Index directly into the array of entries.
  ///
  /// This is a device function; it may be called in a parallel
  /// kernel.
  ///
  /// 'const value_type' via Cuda texture fetch must return by value.
  KOKKOS_FORCEINLINE_FUNCTION
  typename Impl::if_c< (is_set || has_const_value), impl_value_type, impl_value_type &>::type
  value_at(size_type i) const
  {
    return m_values[ is_set ? 0 : (i < capacity() ? i : capacity()) ];
  }

  /// \brief Get the key with \c i as its direct index.
  ///
  /// \param i [in] Index directly into the array of entries.
  ///
  /// This is a device function; it may be called in a parallel
  /// kernel.
  KOKKOS_FORCEINLINE_FUNCTION
  key_type key_at(size_type i) const
  {
    return m_keys[ i < capacity() ? i : capacity() ];
  }

  KOKKOS_FORCEINLINE_FUNCTION
  bool valid_at(size_type i) const
  {
    return m_available_indexes.test(i);
  }

  template <typename SKey, typename SValue>
  UnorderedMap( UnorderedMap<SKey,SValue,Device,Hasher,EqualTo> const& src,
                typename Impl::enable_if< Impl::UnorderedMapCanAssign<declared_key_type,declared_value_type,SKey,SValue>::value,int>::type = 0
              )
    : m_bounded_insert(src.m_bounded_insert)
    , m_hasher(src.m_hasher)
    , m_equal_to(src.m_equal_to)
    , m_size(src.m_size)
    , m_available_indexes(src.m_available_indexes)
    , m_hash_lists(src.m_hash_lists)
    , m_next_index(src.m_next_index)
    , m_keys(src.m_keys)
    , m_values(src.m_values)
    , m_scalars(src.m_scalars)
  {}

  template <typename SKey, typename SValue>
  typename Impl::enable_if< Impl::UnorderedMapCanAssign<declared_key_type,declared_value_type,SKey,SValue>::value
                           ,declared_map_type & >::type
  operator=( UnorderedMap<SKey,SValue,Device,Hasher,EqualTo> const& src)
  {
    m_bounded_insert = src.m_bounded_insert;
    m_hasher = src.m_hasher;
    m_equal_to = src.m_equal_to;
    m_size = src.m_size;
    m_available_indexes = src.m_available_indexes;
    m_hash_lists = src.m_hash_lists;
    m_next_index = src.m_next_index;
    m_keys = src.m_keys;
    m_values = src.m_values;
    m_scalars = src.m_scalars;
    return *this;
  }

  template <typename SKey, typename SValue, typename SDevice>
  typename Impl::enable_if< std::is_same< typename Impl::remove_const<SKey>::type, key_type>::value &&
                            std::is_same< typename Impl::remove_const<SValue>::type, value_type>::value
                          >::type
  create_copy_view( UnorderedMap<SKey, SValue, SDevice, Hasher,EqualTo> const& src)
  {
    if (m_hash_lists.ptr_on_device() != src.m_hash_lists.ptr_on_device()) {

      insertable_map_type tmp;

      tmp.m_bounded_insert = src.m_bounded_insert;
      tmp.m_hasher = src.m_hasher;
      tmp.m_equal_to = src.m_equal_to;
      tmp.m_size = src.size();
      tmp.m_available_indexes = bitset_type( src.capacity() );
      tmp.m_hash_lists        = size_type_view( ViewAllocateWithoutInitializing("UnorderedMap hash list"), src.m_hash_lists.dimension_0() );
      tmp.m_next_index        = size_type_view( ViewAllocateWithoutInitializing("UnorderedMap next index"), src.m_next_index.dimension_0() );
      tmp.m_keys              = key_type_view( ViewAllocateWithoutInitializing("UnorderedMap keys"), src.m_keys.dimension_0() );
      tmp.m_values            = value_type_view( ViewAllocateWithoutInitializing("UnorderedMap values"), src.m_values.dimension_0() );
      tmp.m_scalars           = scalars_view("UnorderedMap scalars");

      Kokkos::deep_copy(tmp.m_available_indexes, src.m_available_indexes);

      typedef Kokkos::Impl::DeepCopy< typename device_type::memory_space, typename SDevice::memory_space > raw_deep_copy;

      raw_deep_copy(tmp.m_hash_lists.ptr_on_device(), src.m_hash_lists.ptr_on_device(), sizeof(size_type)*src.m_hash_lists.dimension_0());
      raw_deep_copy(tmp.m_next_index.ptr_on_device(), src.m_next_index.ptr_on_device(), sizeof(size_type)*src.m_next_index.dimension_0());
      raw_deep_copy(tmp.m_keys.ptr_on_device(), src.m_keys.ptr_on_device(), sizeof(key_type)*src.m_keys.dimension_0());
      if (!is_set) {
        raw_deep_copy(tmp.m_values.ptr_on_device(), src.m_values.ptr_on_device(), sizeof(impl_value_type)*src.m_values.dimension_0());
      }
      raw_deep_copy(tmp.m_scalars.ptr_on_device(), src.m_scalars.ptr_on_device(), sizeof(int)*num_scalars );

      *this = tmp;
    }
  }

  //@}
private: // private member functions

  bool modified() const
  {
    return get_flag(modified_idx);
  }

  void set_flag(int flag) const
  {
    typedef Kokkos::Impl::DeepCopy< typename device_type::memory_space, Kokkos::HostSpace > raw_deep_copy;
    const int true_ = true;
    raw_deep_copy(m_scalars.ptr_on_device() + flag, &true_, sizeof(int));
  }

  void reset_flag(int flag) const
  {
    typedef Kokkos::Impl::DeepCopy< typename device_type::memory_space, Kokkos::HostSpace > raw_deep_copy;
    const int false_ = false;
    raw_deep_copy(m_scalars.ptr_on_device() + flag, &false_, sizeof(int));
  }

  bool get_flag(int flag) const
  {
    typedef Kokkos::Impl::DeepCopy< Kokkos::HostSpace, typename device_type::memory_space > raw_deep_copy;
    int result = false;
    raw_deep_copy(&result, m_scalars.ptr_on_device() + flag, sizeof(int));
    return result;
  }

  static uint32_t calculate_capacity(uint32_t capacity_hint)
  {
    // increase by 16% and round to nears multiple of 128
    return capacity_hint ? ((static_cast<uint32_t>(7ull*capacity_hint/6u) + 127u)/128u)*128u : 128u;
  }

private: // private members
  bool              m_bounded_insert;
  hasher_type       m_hasher;
  equal_to_type     m_equal_to;
  mutable size_type m_size;
  bitset_type       m_available_indexes;
  size_type_view    m_hash_lists;
  size_type_view    m_next_index;
  key_type_view     m_keys;
  value_type_view   m_values;
  scalars_view      m_scalars;

  template <typename KKey, typename VValue, typename DDevice, typename HHash, typename EEqualTo>
  friend class UnorderedMap;

  template <typename UMap>
  friend struct Impl::UnorderedMapErase;

  template <typename UMap>
  friend struct Impl::UnorderedMapHistogram;

  template <typename UMap>
  friend struct Impl::UnorderedMapPrint;
};

// Specialization of deep_copy for two UnorderedMap objects.
template <  typename DKey, typename DT, typename DDevice
          , typename SKey, typename ST, typename SDevice
          , typename Hasher, typename EqualTo >
inline void deep_copy(         UnorderedMap<DKey, DT, DDevice, Hasher, EqualTo> & dst
                       , const UnorderedMap<SKey, ST, SDevice, Hasher, EqualTo> & src )
{
  dst.create_copy_view(src);
}

} // namespace Kokkos

#endif //KOKKOS_UNORDERED_MAP_HPP

redpajama_set_name: RedPajamaGithub


Well, I would assume it is one of Oprah's favorite things…but more on that after I introduce myself!
Hi, I'm Jaydee! I'm new here, and a lover of life and so many things in it! Just like the authors of this blog, when I'm really into something, I like to talk about it and get everyone else loving it too. So let me tell you about something Oprah loves other than bread (#weightwatchers).
I am a huge coffee drinker. Like, don't wake me up if it's not on the agenda first thing. However, if I drink too much, have a roast that is too acidic, or drink it late in the day, the effects aren't as favorable. So I've given tea a try, but have never been as into it. It didn't ever have enough body and flavor to keep me interested, and not to mention the lack of caffeine in some tea (it defeats the purpose for me). So it kind of surprised me when I found a tea drink at Starbucks that actually gave me a boost AND tasted delicious. So if you want the energy without the tummy ache, jitters, or late night insomnia, try this slightly caffeinated beverage that I've become obsessed with.
Teavanna Oprah Cinnamon Chai Tea Latte.
What makes this chai different AND delicious?
This grande sized beverage comes with 2 Oprah Cinnamon Chai tea bags, 1/2 hot water & 1/2 steamed milk of your choice, and classic simple syrup. The way I like to doctor it up is with almond milk (it adds a little sweetness) and no classic syrup, I'm not a big fan of added sugar or dairy. As the tea bags steep the cinnamon adds a natural sweetness and full bodied flavor, and it has caffeine! The lackluster teas I had been used to can now take the back seat, because this baby is riding shotgun! Try it at your local Starbucks Coffee (if you live in the Pacific Northwest, you should have no trouble finding one).


text:
How to Disable Night Vision in GTA 5
Night vision goggles are a piece of equipment that can be obtained in Grand Theft Auto 5, however they are not particularly desirable. Even though there are some parts of Grand Theft Auto 5 in which visibility is severely compromised, the vast majority of the game, including the parts that take place at night, has adequate lighting. This post will guide you through the process of turning off Night Vision in GTA 5, including the following steps:
Read Also: How To Add Friends In GTA 5 Online
1 How to Disable Night Vision in GTA 5
2.1 What does Night Vision do in GTA?
2.2 How do you turn off your headlights in GTA?
2.3 What is passive night vision?
2.4 What is the nightshade in GTA 5?
2.5 What GTA was flashing lights in?
2.6 Where is the creepy girl in GTA 5?
If you want to turn off the night vision display, all you have to do is deactivate it in the Accessories option that I mentioned earlier in this paragraph.
1. Simply click on link to bring up the Interaction Menu.
2. Navigate your way to the "Style" tab.
3. Select the "Accessories" option from the menu.
4. Navigate to the "Gear" option in the menu.
5. Locate the option labelled "Night Vision" within the menu.
6. You are able to turn it off by choosing the option to turn it off from the menu that is situated in the lower-right hand corner of the screen.
What does Night Vision do in GTA?
Night vision goggles are available in Grand Theft Auto Online.
Night-Vision Grand Theft Auto: San Andreas and Grand Theft Auto Online both include a tool called goggles in their respective arsenals. When equipped, they give the player's perspective of the world a bluish-green tint, which improves their visibility in low-light conditions.
How do you turn off your headlights in GTA?
Simply pressing right on the D-pad allows you to control whether your lights are on or off in Grand Theft Auto 5. Pro Tip When you enter a vehicle, the lights need to switch on without your having to do anything else. In the majority of automobiles, you have the ability to select between three distinct headlamp settings.
What is passive night vision?
The infrared wavelengths used by passive night vision systems are significantly longer than those used by active systems (which range from 8 to 12 micrometres). The use of thermographic cameras allows for the detection of the thermal radiation given off by both humans and animals. At the temperature of the surrounding atmosphere, they are incapable of sensing any potential obstructions.
What is the nightshade in GTA 5?
In Grand Theft Auto Online, the update known as Executives and Other Criminals includes a muscle car known as the Imponte Nightshade. This vehicle has two doors and is a two-seater.
What GTA was flashing lights in?
Four Grand Theft Auto
It was featured in Grand Theft Auto IV, where it could be heard on the game's version of The Beat 102.7 radio station. The animated feature film "Sing" from 2016 made use of the song in one of its scenes. The song "Flashing Lights" was used in an advertisement for Yahoo! in the year 2010.
Where is the creepy girl in GTA 5?
Her spectre manifests itself as a floating figure on the cliffs of Mount Gordo between the hours of 23:00 and 00:00 at night. It emits a glow that can be seen from the campsite at the base of the mountain. She appears to be permanently frozen in place, with her mouth hanging wide, and there is a breeze blowing all around her.
How to Install YouTube TV App on LG Smart TV
How to Add Channels to YouTube TV
Guide3 mins ago
Movies4 years ago
'Sonic The Hedgehog' Fantasy Movie Release Date Delayed
How to Change Your Discord Username
Guide12 months ago
How To Change Your Yahoo Password For All Android Devices
News1 week ago
Overclocking with "BCLK" is completely disabled on Intel 13th generation non-K processors

redpajama_set_name: RedPajamaCommonCrawl


text:
2689 Брюссель (2689 Bruxelles) — астероїд головного поясу, відкритий 3 лютого 1935 року.

Тіссеранів параметр щодо Юпітера — 3,626.

Названий на честь столиці Бельгії Брюсселя.

Примітки

Див. також
 Список астероїдів (2601-2700)

Посилання

Астрономічні об'єкти, відкриті 1935
Головний пояс астероїдів

redpajama_set_name: RedPajamaWikipedia


Farley, Andrew. The Naked Gospel. Grand Rapids: Zondervan, 2009.
As I mentioned in a previous post, I'm taking a training class for lay counselors through my church. As part of the class we were required to read three books and submit book reports on each one. (You can read the first book report here.) The second book we read had the intriguing title The Naked Gospel, by a pastor named Andrew Farley. It's a present-day explanation of what is often called "The Exchanged Life" view of the Christian life. I had not heard of Farley before, so I was interested to see what he had to say. Here is my summary and response to the book.
Farley begins by telling his own story, saying he started out his Christian life by, one might say, "busting his tail for Jesus." He says he burned out trying to do this and eventually realized he simply couldn't live the Christian life by his own strength. He talks about how he had to unlearn a lot of his misconceptions about Christianity in order to learn what the Bible really teaches.
Farley then explains carefully and systematically how Christians are no longer under the Old Testament law or good works as a means to secure God's favor. He points out what both the apostles Paul and James taught, that if you try to keep the Law, you're responsible for keeping the whole thing, and if you fail to keep even one part of it, you've broken the Law (see Galatians 3:10 and 5:3 and James 2:10). Since no one can keep the Law perfectly then we are incapable of keeping it at all, which is why God provided salvation by a different means—by grace through faith in Jesus Christ. Farley says this is also the means by which we are to live the daily Christian life as well – by grace through faith in Christ.
Farley even extends this to the Ten Commandments. He points out that Paul says "the letter kills" (2 Corinthians 3:6, meaning the letter of the law) and calls the law a "ministry of death" (2 Corinthians 3:7). Farley says this is no less true for the Ten Commandments; even trying to live by the Ten Commandments will bring death to us rather than life, because the Law incites sin (see Paul's discussion of how the Law evokes sin in Romans 7:5-13 and also Romans 3:20 and 1 Corinthians 15:56). Grace is the only means to be free from sin.
Farley goes on to demonstrate in various ways how the New Covenant (Testament) sets us free from the Law. He gives the example discussed in Hebrews 5-7 that the priesthood of Jesus is of the order of Melchizedek, while the Law prescribes a priesthood descended from Levi and Aaron. Moreover, Jesus is from the tribe of Judah, not Levi, so His priesthood does not conform to the Law.
Farley offers more examples of how the Law has been superseded in the New Testament. He sees both the tithe and the Sabbath as Old Testament concepts no longer in force under the New Covenant. The author shows that the Old Testament Sabbath was a picture or precursor of the true Sabbath rest of God spoken about in Hebrews 3-4, in which we are able to rest from our striving for good works because of the once-for-all sacrifice of Christ on our behalf.
Farley talks about how in the New Covenant, instead of trying to keep the Law, we rely on the Holy Spirit, who produces fruit in us that leads to a way of life that satisfies the requirements of the Old Testament law. He shows that through faith in Christ, believers are made truly and actually righteous before God, not just positionally righteous. He talks about how we were born in Adam, but through salvation we are taken out of Adam and placed in Christ. Farley makes much of our identification with Christ. This is the key by which we actually live the Christian life – by Christ living through us.
Farley spends a good bit of time trying to show that the forgiveness we have through Christ is once-for-all, that when we are saved, all our sins–past, present, and future—are forgiven for all time. Therefore we don't have to ask for forgiveness every time we sin because we already have forgiveness once and for all. He even goes to pains to show that 1 John 1:9, which says "If we confess our sins God is faithful…to forgive us…" is for unbelievers, not believers.
This was the part of the book I found least convincing. To begin with I question his exegesis of 1 John 1, though he did help me to see certain aspects of it in a different light. But also there are other passages of Scripture which imply that walking in blatant unrepentant sin hinders our relationship with God, or at least our experience of that relationship. (1 Corinthians 5 comes to mind as an example, in which Paul deals with a case of gross sexual immorality in the Corinthian church.) Even for the Christian, ongoing repentance seems vital for walking in an intimate experience of relationship with God.
Farley claims people are suspicious of grace because they fear an emphasis on grace will give people a license to sin. Therefore Farley emphasizes over and over again that grace does not lead us to sin more, but is actually the only true means to overcome sin. We think the Law will deter us from sinning, but actually Scripture says the Law provokes us to sin (see Romans 7:5-13 as mentioned above). It's grace then, not law, that helps us master sin. This overcoming of sin is entirely dependent on Christ living in us and through us.
There is much more I could say about The Naked Gospel. While there are some parts of it I question, overall I found it to be a very helpful and very Scriptural explanation of the life that is lived by grace through faith in the indwelling Christ.
This entry was posted in book review, Christian, Christianity, Exchanged Life, faith, freedom, grace and tagged Andrew Farley, Exchanged Life, Galatians, grace, Romans 7, sanctification, The Naked Gospel on June 17, 2015 by musicman707.


text:
The Top 7… Tasteful game heroines
By Brett Elston 2009-11-10T05:19:46.313Z
Videogame girls treated with dignity and respect? What an idea
Before Lara Croft, before Alyx Vance, before there was even an argument about women in games, Samus Aran was in deep space blasting aliens into bloody stumps. She's the most feared and respected bounty hunter in the galaxy and remains one of Nintendo's most popular and bankable stars.
Above: Though she shows a lot of skin
When Samus first appeared in the original Metroid, players assumed the person inside the yellow armor was a man, just like every other character on the platform. Eventually, word of mouth spread that a secret ending (and cheaty passwords) revealed Samus as woman, instantly propelling her to the top of a very short list. Even though she loses her clothes as a reward for excellent playing, her in-game persona is all business, suggesting a girl who works tirelessly but still knows how to kick back.
Above: Samus's various end-of-game depictions, plus the blue Zero Suit
For a sense of scale, consider how long Samus has survived when compared to everyone else on this list. Five of the other girls are from the past eight years. Aya Brea goes as far back as 1998. Samus, on the other hand, has been at the forefront since 1986 – that's 23 years of consistent ass kicking.
Most heroic moment: Every game ends with Samus saving the day, but our favorite single moment happens at the end of the criminally obscure Metroid II. After killing the Metroid queen, Samus closes in to finish off the final larva and rid the universe of Metroids altogether. For whatever reason, the sight of the baby blood sucker is too much, and Samus lets it live. Believing Samus to be its mother, the baby Metroid lovingly clings to Samus as she escapes the planet.
If you don't know the ramifications of this act, we won't spoil the surprise. Just know that it leads to the best moment of Super Metroid (and therefore one of the greatest gaming moments of all time), and affects the rest of the series from here on out.
We didn't come to this conclusion lightly. Four other heroines embody the best of videogame girls, and if we had chosen three years ago to do Top 11s instead of Top 7s, they'd be here for sure.
Top 7… irritating female characters
Meet the women who set videogame feminism back 50 years
Ogling through the ages, from Atari to PS3
Revealed: the games your girlfriend HATES
Eight frustrated partners vent about the games slowly driving them mad
Prev Page Page 3
Uncharted 2: Among Thieves


During promotion for her upcoming film Captivity, Elisha Cuthbert answered some 24 questions with surprising candidness. Cuthbert, who has portrayed Kim Bauer on most seasons of FOX's hit real-time thriller 24, discussed the possibility of a 24 movie eventually coming to fruition. She sounded optimistic.
Elisha threw out the possibility that the 24 movie could go into production as early as 2008, when production on the upcoming season 7 is set to end. This is an attractive proposition for 24 fans, especially ones who want to see a rated R version of the their favorite TV show. Although a film might end up being PG-13, we can only hope that FOX goes full-bore. Jack Bauer deserves to work in R-rated territory.
Cuthbert warns, however, that the possibility of a 24 film rests upon the availability of Kiefer Sutherland and the openness of his schedule.
In theory, a 24 movie can only excite fans, but the undertaking is certainly not a slam dunk. Will the film be in real-time? Doubtful. With a 24 film, Kiefer and the powers-that-be would want an increase in scope, a more epic version of the television show, so real-time would be out of the question. Then, accepting that, is 24 still 24 if it isn't in real-time? Or, is it just another action movie? Even with the questions that surround the possible project, fans will take what they can get. A 24 film, if announced, will be a highly-anticipated event.
Who doesn't want to see Jack Bauer, in all his preposterous Jack Bauer-ness, thwart terrorists on the big screen?


It makes sense since these were some of the very first movers in the Barcelona craft coffee scene. And I must say, we're all very grateful to them.
Here's the thing though, in Barcelona there's a cafe, restaurant, and bar on every corner (and plenty in between) that will happily sell you a cafe con leche or cafe solo of questionable quality at best. I'm not one to shoot my coffee back and choke it down with a grimace for the sake of caffeine, so I've made it my mission to drink as many coffees as possible to find the best in Barcelona.
Today I bring you a list of the best places to buy coffee in Gracia, the best neighborhood in Barcelona ;).
Their little door on a small side street is identifiable by their "good coffee here" sign, a no frills statement of their offering. Gotta love their honesty. Syra's modest interior is filled with bright hardwood and white tile giving the room a welcoming feel. If you're lucky, you'll snag one of three stools to perch on as you sip. If not, you'll do as most and take your coffee to go.
Located right near the intersection of Av. Diagonal and Paseig de Gracia, Onna Coffee is a great place to swing by in between shopping or exploring Gaudi's famous Casa Mila and Casa Batlló. Onna's owner Anahí Páe sources the shop's beans from Costa Rica and roasts them right inside Barcelona. The result is one of the smoothest and freshest coffees in town. For an interesting twist on traditional coffee, in the summer try their iced coffee tonic (yes, it's exactly what it sounds like - espresso + tonic water!).
A coffee shop founded on the Slow Movement, Slow Mov is a coffee roaster first, a coffee shop second, and above all, a supporter of the local communities where they source and distribute. Connected to the very famous Café Coutume in Paris, Carmen and François started SlowMov as a way to bring the slow philosophy to Barcelona. Their store is a mix between a cafe and a boutique and they are dedicated to sharing the story behind every artisanal creation.
Alright, I have to admit that Animal Coffee is technically just outside of the Gracia neighborhood in Sant Gervasi, but it shouldn't matter because they serve up some of the best coffee in Barcelona. The coffee shop sources beans from local roasters around the city and, among other things, makes a mean cortado. Their clean and cozy shop is the perfect spot for a quick bite, a conversation with a friend, or a solo working session.
Do you have another favorite in Barcelona? Or better yet, in Gracia?? Let me know and I'll be sure to check it out!
Speaking of Coffee. Want to buy me a cup?


text:
package com.baremetalstudios.minicam.geometry;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Random;

import com.baremetalstudios.minicam.config.OutputConfig;

public class DrillGroup implements Transformable {
    private final List<Point> drills = new ArrayList<Point>();
    private final String id;
    private double diameter;
    private int ordinal;
    private Random random = new Random(0);

    public DrillGroup(String id, double diameter, List<Point> drills) {
        this(id, diameter);
        this.drills.addAll(drills);
    }

    public DrillGroup(String id, double diameter) {
        this.id = id;
        this.diameter = diameter;
    }

    @Override
    public void translate(double dX, double dY) {
        drills.forEach(point -> point.translate(dX, dY));
    }

    @Override
    public void rotate90(Direction direction) {
        drills.forEach(point -> point.rotate90(direction));
    }

    public double getDiameter() {
        return diameter;
    }

    public List<Point> getDrills() {
        return drills;
    }

    public void addDrill(Point point) {
        drills.add(point);
    }

    public void optimize(OutputConfig config) {
        sortDrills();
        optimizeStep1(config);
        optimizeStep2(config);
    }

    private void optimizeStep2(OutputConfig config) {
        List<Point> generation = new ArrayList<>(drills);

        double pathLength = calculatePathLenght(generation);

        int scale = 16 * config.getOptimizationLevel();

        for (int i = 0; i < (generation.size() * scale); i++) {
            List<Point> temp2 = new ArrayList<>(generation);

            int p1 = random.nextInt(temp2.size());
            int p2 = random.nextInt(temp2.size());

            Point save1 = temp2.get(p1);
            Point save2 = temp2.get(p2);
            temp2.set(p1, save2);
            temp2.set(p2, save1);

            double tmpLen = calculatePathLenght(temp2);

            if (tmpLen < pathLength) {
                generation = temp2;
                pathLength = tmpLen;
            }
        }

        drills.clear();
        drills.addAll(generation);
    }

    private void optimizeStep1(OutputConfig config) {
        double pathLength = calculatePathLenght();
        List<Point> generation = new ArrayList<>(drills);
        int totalAttempts =
                            (int) Math.round(generation.size() *
                                             2 *
                                             (config.getOptimizationLevel() / 18.0));
        for (int i = 0; i < totalAttempts; i++) {
            List<Point> newDrills = oneTry(new ArrayList<>(generation));

            double tmpLen = calculatePathLenght(newDrills);

            if (tmpLen < pathLength) {
                generation = newDrills;
                pathLength = tmpLen;
            }
        }

        drills.clear();
        drills.addAll(generation);
    }

    private List<Point> oneTry(List<Point> list) {
        List<Point> generation = new ArrayList<>();

        Point point = list.remove(random.nextInt(list.size()));
        while (!list.isEmpty()) {
            generation.add(point);
            point = list.remove(Point.findNearest(point, list, false));
        }
        generation.add(point);

        return generation;
    }

    private void sortDrills() {
        drills.sort((o1, o2) -> {
            double d = o1.getX() - o2.getX();
            d = (d == 0) ? (o1.getY() - o2.getY()) : d;
            return (int) Math.signum(d);
        });
    }

    public String getId() {
        return id;
    }

    public void setOrdinal(int ordinal) {
        this.ordinal = ordinal;
    }

    public int getOrdinal() {
        return ordinal;
    }

    public void setDiameter(double diameter) {
        this.diameter = diameter;
    }

    public double calculatePathLenght() {
        return calculatePathLenght(drills);
    }

    private double calculatePathLenght(List<Point> list) {
        Point prev = null;
        double result = 0;

        for (Point point : list) {
            if (prev != null) {
                result += Point.distance(prev, point);
            }
            prev = point;
        }
        return result;
    }

    public Point reorder(Point start) {
        int idx = Point.findNearest(start, drills, false);
        if (idx > 0) {
            Collections.rotate(drills, -idx);
        }
        return drills.get(drills.size() - 1);
    }

    public boolean isEmpty() {
        return drills.isEmpty();
    }

	public void scaleDown() {
		for (Point point : drills) {
			point.scaleDown();
		}
	}
}


Could this protect hundreds of children from being raped?
Life Orientation 2.0? Why it may be time for a new take on an old subject.
The youngest children are the ones most at risk — and less likely to report it.
Women and others are coming forward to say #MeToo. Men in general are silent, knowing they, too, could rightly be the next accused.


I've been randomly meeting newly Naturale ladies everywhere I go, at the grocery store, at church, on the street, etc. After I got several requests for advice and pointers about naturale hair, I decided to devote a whole page to natural hair.
– has been natural for a while and has long, thick hair. She still finds new styles to do to it. And she features other naturales and their stories!


On a recent flight, I sat next to the CEO of a Fortune 250 company and we struck up a conversation.
I thought about this for a moment. I often hear leaders express a similar sentiment, the desire for their people to be "real" with them.
"They might be afraid to be authentic with you," I said, "but they're definitely afraid to be vulnerable with you" I answered.
He paused to think about this for a long while.
Vulnerability and I are well acquainted. We are the oldest best friends, but also sworn enemies. We usually fall somewhere in between on this continuum, circling one another uneasily. Vulnerability has gently led me by the hand to my moments of the most authentic expression and has roughly shoved me with both hands on my shoulders, causing me to stagger out of my comfort zone.
I have bowed at the knees of vulnerability, at the power of vulnerability to connect us to our humanity, and the humanity of others, and I have begged vulnerability to leave me alone.
At other times, through tears and clenched fists and crushing fears, I have pleaded with vulnerability not to entreat me to share that story. That part of myself. That experience. Anything but that.
In other words, I struggle mightily with vulnerability. I love other people's vulnerability - their stories of strength and courage in facing down adversity. But when engaging my own vulnerability, I feel a combination of abject terror and insecurity. In this way, I am both the least and most vulnerable person you likely know.
I've found in qualitative data, now known as The Five Practices of Particularly Resilient Leaders, that vulnerability is the first practice; the foundation of resilient leadership.
Vulnerability, as defined by my qualitative research, is the willingness to integrate our experiences holistically. Resilient leaders that engage the practice of vulnerability allow their whole authentic selves to shine forth. They allow their thoughts and feelings to be congruent with the self they project to the world.
So, if vulnerability is so important, what makes it so hard? Good question.
I also uncovered why so many of us have ambivalent relationship with vulnerability: Shame Bias.
Shame bias is the sequoia that stands between our noble efforts to share our truest selves with the world and paralyzing fear that when we do, the world will not accept us.
For example, when a colleague shares that they have been 30 years sober or that they are a survivor of childhood abuse, I bow down to these warriors with admiration for the adversity they have overcome. Yet, on the other side of the vulnerability coin, I fear, and even believe that if I share my story, the vulnerability of my truth will diminish me.
This is Shame Bias: The belief that if you tell your overcoming story, I will think more of you, but if I tell my story, you will think less of me.
There is a struggle in every good life, and within every good life, there is a struggle.
Over the last two years, I've embarked on my own journey to share my leadership resilience research globally and to overcome my own Shame Bias through public vulnerability. I call it my years of "speaking dangerously." In front of keynote audiences of my leadership development and learning colleagues, many numbering in the thousands, I have honestly discussed my diagnosis of dyslexia as well as my trauma survivorship. The closer I brought these stories to my "regular life," the greater the fear, the greater the vulnerability, and the greater the reward. The connection created by sharing my overcoming stories has become deeper.
This past year, my husband and I decided to amicably and respectfully end our marital relationship. We still went on our annual family vacation in Vermont, a family camp surrounded by … you guessed it: families, many of whom we've known for years. Only this time, we were different. We were still a family, but my former husband and I are no longer a couple. We are friends, partners, supporters of one another, and co-parents.
There we were. Different from the family we'd been the year before. Just as I had told my stories of dyslexia and trauma, I once again felt immense fear about sharing the change in our relationship status. Would they be angry? Think we hadn't tried hard enough? Feel uneasy around us? Exclude us because we were no longer married like them? It was my own personal petri dish of vulnerability.
As we shared the news, people pulled me aside. They were not angry or uncomfortable. They'd never seen anything like it, they said. "Classy" that we came together, they said. "Commendable and mature," they said. "A role model for a healthy divorce and how to put the children first," they said.
We were living our vulnerability through the change in our relationship, moment by moment, conversation by conversation, and rather than thinking less of us, as the Shame Bias would have us believe, they thought more of us for having the courage to show up, in a new partnership, wearing our vulnerability on our sleeves.
How do we create space for vulnerability in our own lives and the lives of our leaders?
Allow others' experiences and choices to be different than your own.
Do not parse people. Recognize people as their whole selves, not as parts of pieces.
Recognize you are not alone – many people share your experience. Overcoming the shame of silence and keeping our experience in darkness requires vulnerability, and it builds community.
Don't allow fear of the Shame Bias to keep you silent.
Step out of your comfort zone. Be brave enough tell your story and role model vulnerability. In doing so, you make it safer for others.
Remember that you are not your past – adversity is the very best catalyst for change and growth.
Remember: There is no shame in being honest. There is no shame in being emotional. There is no shame in being hurt. These are, in fact, the very gifts of what it means to be human.
How have you taken the first step or a giant leap in your own leadership toward vulnerability? How has the cultivation of your vulnerability and authenticity contributed to your resilience as a leader?


Registrations for the Downstream Dinner 2019 are now closed online. You are welcome to contact our office on 09 912 3616 or see the registration staff at the event to purchase a ticket.
All registrations for the Network Managers Forum will be subject to an approval process.
The Network Managers Forum is free to attend for network staff who are also registered to attend the main Downstream Strategic Summit. The cost will be removed once your registration has been approved.
A registration fee of $495 plus GST is payable for network staff not attending the Downstream Strategic Summit.
There are also a limited number of $495 tickets available for non-network staff attending the Downstream Strategic Summit.
Fill in your details below and we'll keep in touch with information about this event as details become available.
There are some exclusive opportunities to promote your company, and its products and services, at this leading event. Contact the sponsorship team below to request a prospectus or discuss the options, or view more about event sponsorship.


DV Uploader for. DVUploader is a video converter and upload application for iPhone that compresses your iPhone camera video and uploads it to your server or to the Discover Video server, at the touch of a button. Simply record a video using your iPhone camera, or use many third-party camera apps. Select the video from your "Photo/Camera Roll" folder, and DVUploader compresses it and uploads it automatically. Features: - Simple, easy to use - H264 compression for streaming - FTP upload to virtually any server - Discover Video Arcus Streaming Service upload - Discover Video DEVOS upload .


text:
This prestigious community of high potential, curious learners is creating a strong foundation for career success. Our founding principles:
Potential is not reflected in test scores or grades
Careers are profoundly shaped on the strength of the personal relationships you form along the way
Curiosity and learning capacity are more important to your career than any class
Problem solving skills, collaboration capabilities and curiosity are the true foundation of future success
First Round of 2021 applications due Friday, November 19, 2021.
About the scholarship
The Diamante Scholars program helps high school students with overlooked and unseen potential identify a career path and build the professional skills for success. The Diamante experience starts with a 1.5 unit DVC CAREER 100 Class: College & Career Success.
Apply in the fall
Students apply fall of senior year to begin program in last semester of senior year.
Take one class at DVC in the high school senior spring semester, enroll full time upon graduation.
Career Exploration & Connection
Participate in summer internships, industry visits, and career guest speaker series.
Students will receive a $150 stipend per semester to help with school supplies.
Community & DVC Support
Personalized 1:1 support along your path.
Diamante Scholars program gave me the opportunity for my first internship. It was the best thing I've ever done and was really proud of myself.
— Cecilia Subias, DVC Student and Ygnacio Valley Graduate
This program basically made the way for me to join the college.
— Parwiz Khan, DVC Student and Mount Diablo High Graduate
Honestly, I appreciate everything about the program. The staff have checked up on me since day 1, which I appreciate a lot. I enrolled to college and I'm dedicated thanks to them as well. I would say the check-ins help a lot too at least to see each other once a month or so and them just being there for me.
— Jose Gonzalez, DVC Student and Mount Diablo High Graduate
No one – except me – believed in my potential. At DVC I found the path that led to my career, and built the skills that made me successful.
— Peter Zaballos, former DVC Student
What made the difference in my career were the problem solving skills I learned in college. Not the subjects I studied.
At DVC I was lucky to encounter teachers who saw and nurtured potential in me that I wasn't aware of myself.
Is there a minimum grade point average to be considered?
No. We are looking for students who have talent and potential.
Do I need to know what I want to study or major in?
Not at all. This is where you follow your instincts to your major.
What does the Diamante Scholars Program Coordinator do?
They are there to help guide you and support you.
Why is my family included in the Diamante Scholar events?
Because they will want to see you and your peers succeed.
What if I want to learn a trade and not go to college?
You set the goal; we are here to support you.
Why are there seminars and guest speakers?
Because there are many, many people like you who have gone down this path and found their success
Apply to be a Diamante Scholar today
Have you been told you're not college material? Have people said your grades aren't "good enough" and are somehow an indicator of your potential? Do you know, deep down, you see your successful future? Diamante Scholars is here to help you unlock your potential.
Submit an online application
Participate in a student interview
A senior or mid-year graduate from one of the following high schools: Concord, Mt. Diablo, Olympic, or Ignacio Valley
Determined to graduate from college
Available to attend required programming – approximately 2 to 3 events per semester
Committed to achieving and maintaining a 2.5 GPA or greater
Committed to going to school full-time at DVC (minimum of 12 units in the Fall & Spring)
Required Activities (Spring of H.S. Senior Year)
Speaker Series Event: February, March, April, May
End of the Year Celebration: June
Career 100 – College and Career Success, a 1.5 unit DVC college course
About Diamante Scholars
The Diamante Scholars program is focused on helping high-potential high school students find their path to higher education and career success.
Our belief is that the skills and capabilities that make for a successful career for many people have little to do with academic success and very much to do with a desire and capacity to learn, to be effective problem solvers, and to develop trusted working and personal relationships.
The name "Diamante" speaks to these scholars as diamonds. Diamonds in the rough. And diamonds are tough. We chose the Spanish term for diamond to reflect the heritage of the founder, Peter Zaballos — two generations ago his grandparents Pedro and Juana Zaballos emigrated from Spain to California, working first in the fields and eventually in the Del Monte canneries.


text:
Sh Rasheed demands judicial martial law for three months
Says caretaker PM sans PTI's approval not acceptable
Abrar Saeed
ISLAMABAD - Awami Muslim League Chief Sheikh Rasheed Ahmad has demanded the Chief Justice of Pakistan to impose a 'judicial martial law' for three months and ensure holding of free, fair and transparent elections in the country.
Addressing a press conference here at the National Press Club on Wednesday, the AML chief said that any caretaker prime minister, which was not having the approval of Pakistan Tehreek-i-Insaf would not be acceptable to them. He said that the consultation for appointment of caretaker set-up should not be confined only to the consultation between the Leader of Opposition and Leader of the House but other stakeholders should also be taken on board while picking the candidate for caretaker prime minister.
Under the constitution, Prime Minister and Leader of Opposition in National Assembly were to decide the candidate for caretaker prime minister through mutual consultation.
Terming the appointment of caretaker setups in the centre and provinces as the major issue, Sh.Rasheed Ahmad said that all stakeholders should be taken on board in the process as the candidate for caretaker PM picked by the Prime Minister and Leader of Opposition and not having the approval of other stakeholders would not be acceptable to them.
Sh. Rasheed Ahmad said that former prime minister Nawaz Sharif had levelled serious allegations against him but as the matter is sub judice so he would not comment on it. He further said that government had conducted audit of the projects completed during his tenure as minister several times but could not find any irregularity.
Expressing serious reservations over the fresh delimitations, Sh. Rasheed Ahmad said that the Election Commission has coined a new term 'clockwise' to change the demography of the constituencies' topsy-turvy. He said that they have recorded their concerns at appropriate forums.
Commenting on the recent private visit of Prime Minister Shahid Khaqan Abbasi to the United States in which he had held official meetings with US Vice-President and other officials wherein as per criteria people of Foreign Ministry and Pakistan Ambassador to US were not present.
Terming it a very serious matter, Sh. Rasheed said that the whole nation wanted explanation from the Prime Minister on this count as in what capacity he had held these meeting unilaterally and in complete violation of the set criteria.
Terming the devaluation of the Pakistani currency against the US dollar a conspiracy, Sh. Rasheed Ahmad said that in coming days rupee would further shed to US dollar and foreign currency reserves would shrink drastically only to establish that it was all happening due to the removal of Nawaz Sharif from power.
To a question, Sh.Rasheed said that he would contest upcoming elections, if held from both NA 60 and 62 in alliance with Pakistan Tehreek-i-Insaf.
To another question, Sh.Rasheed said that President Mamnoon Hussain is also to retire this year and in his absence Chairman Senate Sadiq Sanjrani would be the acting president while Deputy Chairman Senate Saleem Mandviwala would perform the duties of Chairman Senate.
He said that Nawaz Sharif wanted to grab the slot of Chairman Senate only to keep hold on the office of President of Pakistan but the wise move of PTI had frustrated the plan of PML-N to get its man installed as chairman in the Upper House.
To a question about former interior minister Ch. Nisar Ali Khan, the AML chief said that although he (Nisar) is his political opponent, yet an upright person and has untainted political career.
PR deficit decreased by Rs4bn: Sheikh Rasheed
5:06 PM | June 24, 2019
PR planning to lay track from Peshawar to Jalalabad: Sheikh Rasheed
PR establishing Quetta-Taftan rail network: Sheikh Rasheed
Haleem demands justice for slain siblings of Hyderabad
lohay ka chana haazir ho nab NAB summons a senior politician in land grabbing case
ECONOMY $
The pulse of the nation
Asadullah Khan Niazi
Spurring radicalisation
Pakistan, Afghanistan and cooperation
Nighat Kamal Aziz
Note –ocracy
All eyes on SC
Taxes for services
Imran Khan: My beloved Sadiq-o-ameen, my would-be prime minister!


text:
/*
 * Description:
 *     What is this file about?
 *
 * Revision history:
 *     xxxx-xx-xx, author, first version
 *     xxxx-xx-xx, author, fix bug about xxx
 */

# include "docker_scheduler.h"
# include "docker_error.h"
# include <stdlib.h>
# include <fstream>

namespace dsn
{
namespace dist
{
docker_scheduler::docker_scheduler()
    :_run_path(""),
     _docker_state_handle(nullptr),
     _docker_deploy_handle(nullptr),
     _docker_undeploy_handle(nullptr),
     _mgr("docker")
{

}

void docker_scheduler::deploy_docker_unit(void* context, int argc, const char** argv, dsn_cli_reply* reply)
{
    auto docker = reinterpret_cast<docker_scheduler*>(context);
    if( argc == 3 )
    {
        std::string name = argv[0];
        std::string ldir = argv[1];
        std::string rdir = argv[2];
        std::function<void(error_code,rpc_address)> cb = [](error_code err,rpc_address addr){
            dinfo("deploy err %s",err.to_string());
        };
        docker->create_containers(name,cb,ldir,rdir);
    }
    reply->message = "";
    reply->size = 0;
    reply->context = nullptr;
}
void docker_scheduler::deploy_docker_unit_cleanup(dsn_cli_reply reply)
{

}

void docker_scheduler::undeploy_docker_unit(void* context, int argc, const char** argv, dsn_cli_reply* reply)
{
    auto docker = reinterpret_cast<docker_scheduler*>(context);
    if( argc == 3 )
    {
        std::string name = argv[0];
        std::string ldir = argv[1];
        std::string rdir = argv[2];
        std::function<void(error_code,const std::string&)> cb = [](error_code err,const std::string& err_msg){
            dinfo("deploy err %s",err.to_string());
        };
        docker->delete_containers(name,cb,ldir,rdir);
    }
    reply->message = "";
    reply->size = 0;
    reply->context = nullptr;
}
void docker_scheduler::undeploy_docker_unit_cleanup(dsn_cli_reply reply)
{

}
error_code docker_scheduler::initialize()
{
    _run_path = dsn_config_get_value_string("apps.client","run_path","","");
    dassert( _run_path != "", "run path is empty");
    dinfo("run path is %s",_run_path.c_str());
#ifndef _WIN32
    int ret;
    FILE *in;
    ret = system("docker version");
    if (ret != 0)
    {
        dinfo("docker is not in the PATH");
        return ::dsn::dist::ERR_DOCKER_BINARY_NOT_FOUND;
    }
    in = popen("service docker status","r");
    if (in == nullptr)
    {
        dinfo("docker daemon is not running");
        return ::dsn::dist::ERR_DOCKER_DAEMON_NOT_FOUND;
    }
    else
    {
        char buff[512];
        while( fgets(buff,sizeof(buff),in) != nullptr)
        {
            constexpr const char * substr = "docker start/running";
            constexpr size_t length = strlen(substr);
            if( strncmp(substr,buff,length) != 0 )
            {
                dinfo("docker daemon is not running");
                return ::dsn::dist::ERR_DOCKER_DAEMON_NOT_FOUND;
            }
        }
    }
    pclose(in);
#endif

    dassert(_docker_deploy_handle == nullptr, "docker deploy is initialized twice");
    _docker_deploy_handle = dsn_cli_app_register("deploy","deploy onto docker scheduler","",this,&deploy_docker_unit,&deploy_docker_unit_cleanup);
    dassert(_docker_deploy_handle != nullptr, "register cli handler failed");

    dassert(_docker_undeploy_handle == nullptr, "docker undeploy is initialized twice");
    _docker_undeploy_handle = dsn_cli_app_register("undeploy","undeploy from docker scheduler","",this,&undeploy_docker_unit,&undeploy_docker_unit_cleanup);
    dassert(_docker_undeploy_handle != nullptr, "register cli handler failed");
    return ::dsn::ERR_OK;
}

void docker_scheduler::get_app_list(std::string& ldir,/*out*/std::vector<std::string>& app_list )
{
    //TODO : 1. Use std file stream instead of command and
    //       2. buffer size set to be 128?
#ifndef _WIN32
    std::string popen_command = "cat " + ldir + "/applist";
    FILE *f = popen(popen_command.c_str(),"r");
    char buffer[128];
    dassert(fgets(buffer,128,f) == buffer, "");
    ::dsn::utils::split_args(buffer, app_list, ' ');
#endif
}

void docker_scheduler::write_machine_list(std::string& name, std::string& ldir)
{
    std::vector<std::string> app_list;

    get_app_list(ldir,app_list);

    for( auto& app : app_list)
    {
        std::string machine_file = ldir + "/" + app + "list";
        std::vector<std::string> machine_list;
        std::vector<std::string> f_list;
        std::vector<std::string> a_list;
        int count = 1;
        //TODO: handle error if machine not enough
        machine_pool_mgr::alloca_options opt;
        opt.allow_partial_allocation = false;
        opt.allow_same_machine_slots = true;
        opt.slot_count = (int)app_list.size();
        _mgr.get_machine(opt, a_list);
        {
            zauto_lock l(_lock);
            _machine_map[name].insert(_machine_map[name].begin(), a_list.begin(), a_list.end());
        }
        std::ofstream fd;
        fd.open(machine_file.c_str(), std::ios_base::app);
        //TODO: handle error if file open failed
        for( auto& machine: a_list )
        {
            fd << machine << std::endl;
        }
        fd.close();
    }
}

void docker_scheduler::return_machines(std::string& name)
{
    _mgr.return_machine(_machine_map[name]);
}

void docker_scheduler::schedule(
                std::shared_ptr<deployment_unit>& unit
                )
{
    int ret = -1;
    bool found = false;
    {
        zauto_lock l(_lock);
        auto it = _deploy_map.find(unit->name);
        found = (it != _deploy_map.end());
    }
    if ( found )
    {
        unit->deployment_callback(::dsn::dist::ERR_DOCKER_DEPLOY_FAILED,rpc_address());
    }
    else
    {
        //TODO : How about writting machine list failed?
        write_machine_list(unit->name, unit->local_package_directory);
        {
            zauto_lock l(_lock);
            _deploy_map.insert(std::make_pair(unit->name,unit));
        }

        dsn::tasking::enqueue(LPC_DOCKER_CREATE,this, [this, unit]() {
            create_containers(unit->name, unit->deployment_callback, unit->local_package_directory, unit->remote_package_directory);
        });
    }

}

void docker_scheduler::create_containers(std::string& name,std::function<void(error_code, rpc_address)>& deployment_callback, std::string& local_package_directory, std::string& remote_package_directory)
{
    int ret;
    std::ostringstream command;
    command << "./run_docker.sh deploy_and_start ";
    command << " -d " << name << " -s " << local_package_directory;
    if( remote_package_directory == "" )
        command << " -t " << local_package_directory;
    else
        command << " -t " << remote_package_directory;
    ret = system(command.str().c_str());
    if( ret == 0 )
    {
#ifndef _WIN32
        std::string popen_command = "IP=`cat "+ local_package_directory +"/metalist`;echo ${IP#*@}";
        FILE *f = popen(popen_command.c_str(),"r");
        char buffer[30];
        dassert(fgets(buffer,30,f) == buffer, "");
        {
            zauto_lock l(_lock);
            auto unit = _deploy_map[name];
            unit->service_url = buffer;
        }
#endif
        deployment_callback(ERR_OK,rpc_address());
    }
    else
    {
        {
            zauto_lock l(_lock);
            return_machines(name);
            _machine_map.erase(name);
            _deploy_map.erase(name);
        }
        deployment_callback(::dsn::dist::ERR_DOCKER_DEPLOY_FAILED,rpc_address());
    }
}

void docker_scheduler::unschedule(
        std::shared_ptr<deployment_unit>& unit
        )
{
    bool found = false;

    _lock.lock();
    auto it = _deploy_map.find(unit->name);
    found = (it != _deploy_map.end());

    if( found )
    {
        return_machines(unit->name);
        _machine_map.erase(unit->name);
        _deploy_map.erase(it);
        _lock.unlock();

        dsn::tasking::enqueue(LPC_DOCKER_DELETE,this, [this, unit]() {
            delete_containers(unit->name, unit->undeployment_callback, unit->local_package_directory, unit->remote_package_directory);
        });
    }
    else
    {
        _lock.unlock();
        unit->undeployment_callback(ERR_DOCKER_UNDEPLOY_FAILED,std::string());
    }
}

void docker_scheduler::delete_containers(std::string& name,std::function<void(error_code, const std::string&)>& undeployment_callback, std::string& local_package_directory, std::string& remote_package_directory)
{
    int ret;
    std::ostringstream command;
    command << "./run_docker.sh stop_and_clean ";
    command << " -d " << name << " -s " << local_package_directory;
    if (remote_package_directory == "")
    {
        command << " -t " << local_package_directory;
    }
    else
    {
        command << " -t " << remote_package_directory;
    }
    ret = system(command.str().c_str());

    // TODO: deal with this error or notice the dev server
    dassert( ret == 0, "docker can't delete pods");

    // ret == 0
    undeployment_callback(::dsn::ERR_OK,std::string());
}

}
}


Sometimes the simplest modifications are the most rewarding.
I'd been dealing with a cracked shifter knob in the TJ for a few years now… and even though I don't need the shift pattern to know how to change gears… it was annoying to hang onto the factory knob without the inset diagram present.
I had debated going with a t-handle like the one I had on my first car (an 89 VW Jetta) which I had installed after getting tired of the make shift tennis ball shifter I had in there for a year or so prior.
Replacing a shift knob is one of the cheapest and easiest modifications you can do to a Jeep; simply unscrew the old knob and screw on the new one. This one came with a nut to go on the shaft first to assure the shift pattern displays correctly. Screw the nut first, then tighten the shift knob and tighten the nut to it, and you're done… New shift knob installed in 2 minutes.
In any regard, I'm very pleased with my green shift knob in the green Jeep!


text:
The 1914 Senboku earthquake (Japanese: 1914年秋田仙北地震) occurred on March 15, 1914, at 04:59 or 05:00 local time (or March 14 at 20:00 UTC) according to various sources in northern Japan. The earthquake had a magnitude of  7.0.

The epicenter was in Akita Prefecture, Japan. Ninety-four people died and 324 were injured. Senboku District (Japanese: 仙北郡) was seriously affected. The earthquake caused liquefaction. Explosions simultaneous with the earthquake were reported in Mount Asama.

References

External links

Further reading

Senboku
1914 in Japan
March 1914 events
Earthquakes of the Taishō period
1914 disasters in Japan


Wanting to place the Google Adsense in your web site?. That's good, you might be in the precise article. In this publish, we'll let you know the way to embrace Google Adsense to your web site. As quickly as you assemble your WordPress web site, then the subsequent step you contemplate producing revenue with that web site.
Don't merely blindly make the most of flashy ads from advert networks that make your web site awkward. It is critical to choose the precise adverts. Google Adsense is the very best common service supplied. Google Adsense is among the strongest methods to monetize your WordPress web site.
Google Adsense is the preferred and highly effective promoting community which is owned by Google and allows you to embrace the Google ads shortly in your WordPress web site to make money.
It is a Cost Per Click (CPC) program that helps you to show ads in your web site. It is like you'll earn cash for each single click on that customers make in your web site ads. It is a problem-free community. You do not have to deal with any advertisers or in regards to the mortgage.
The Google administers protect a relationship with the entrepreneurs. They will collect the fee, and pay cash to you on the proper time. Google will take a small a part of the money because the administration charge.
What type of adverts can we present?
At first, you might have truly developed an Adsense account, and as quickly as your Adsense account is permitted by Google, the Google spiders will crawl your web site to get the educated in regards to the web page choices. Then it helps the Google bots to place the easiest becoming advert in other places in your web site.
Like as an illustration, in case your web site is about clothes, then the Google bots will maintain this as a key phrase and dig its database to discover essentially the most appropriate clothes ads in your web site and it'll immediately place it in your web site.
It is less complicated for the guests who're actually a lot keen in in search of style clothes is almost certainly to buy them. Google Adsense is an especially cool, trusted, versatile, and logical methodology to monetize your WordPress web site.
button. Now, you'll obtain a message from the Adsense group that they're evaluating your web site. Just await them to end the activation process often a few days. Developing Google Adsense Units Action 1: When you get the message from Adsense staff that your account is triggered, now it is possible for you to to entry all of the Adsense choices.
the advert efficiency based mostly upon your web site and it's non-compulsory.
discover any acceptable adverts in your web site. That's it, you might be made with the setup. Now click on"Save and get code"button.
Look > Widgets space. Action 2: To embrace a brand new widget, you want to choose the Text choice and drag and drop to the place anyplace you want to present the ads in your web site.
the content material subject paste the advert code which you might be copied beforehand. Step 4: Everything is completed, then> press the"Conserve button".
Manage web site"choice. Step 5: Lastly, click the" Preview" button to view the pattern adverts. You will discover many markers in numerous sections.