text:
namespace {

void MachTimeValueToTimeval(const time_value& mach, timeval* tv) {
  tv->tv_sec = mach.seconds;
  tv->tv_usec = mach.microseconds;
}

kern_return_t MachVMRegionRecurseDeepest(task_t task,
                                         mach_vm_address_t* address,
                                         mach_vm_size_t* size,
                                         natural_t* depth,
                                         vm_prot_t* protection,
                                         unsigned int* user_tag) {
  vm_region_submap_short_info_64 submap_info;
  mach_msg_type_number_t count = VM_REGION_SUBMAP_SHORT_INFO_COUNT_64;
  while (true) {
    kern_return_t kr = mach_vm_region_recurse(
        task,
        address,
        size,
        depth,
        reinterpret_cast<vm_region_recurse_info_t>(&submap_info),
        &count);
    if (kr != KERN_SUCCESS) {
      return kr;
    }

    if (!submap_info.is_submap) {
      *protection = submap_info.protection;
      *user_tag = submap_info.user_tag;
      return KERN_SUCCESS;
    }

    ++*depth;
  }
}

}  // namespace

namespace crashpad {

ProcessReaderMac::Thread::Thread()
    : thread_context(),
      float_context(),
      debug_context(),
      id(0),
      stack_region_address(0),
      stack_region_size(0),
      thread_specific_data_address(0),
      port(THREAD_NULL),
      suspend_count(0),
      priority(0) {}

ProcessReaderMac::Module::Module() : name(), reader(nullptr), timestamp(0) {}

ProcessReaderMac::Module::~Module() {}

ProcessReaderMac::ProcessReaderMac()
    : process_info_(),
      threads_(),
      modules_(),
      module_readers_(),
      process_memory_(),
      task_(TASK_NULL),
      initialized_(),
#if defined(CRASHPAD_MAC_32_BIT_SUPPORT)
      is_64_bit_(false),
#endif  // CRASHPAD_MAC_32_BIT_SUPPORT
      initialized_threads_(false),
      initialized_modules_(false) {
}

ProcessReaderMac::~ProcessReaderMac() {
  for (const Thread& thread : threads_) {
    kern_return_t kr = mach_port_deallocate(mach_task_self(), thread.port);
    MACH_LOG_IF(ERROR, kr != KERN_SUCCESS, kr) << "mach_port_deallocate";
  }
}

bool ProcessReaderMac::Initialize(task_t task) {
  INITIALIZATION_STATE_SET_INITIALIZING(initialized_);

  if (!process_info_.InitializeWithTask(task)) {
    return false;
  }

  if (!process_memory_.Initialize(task)) {
    return false;
  }

#if defined(CRASHPAD_MAC_32_BIT_SUPPORT)
  is_64_bit_ = process_info_.Is64Bit();
#else  // CRASHPAD_MAC_32_BIT_SUPPORT
  DCHECK(process_info_.Is64Bit());
#endif  // CRASHPAD_MAC_32_BIT_SUPPORT

  task_ = task;

  INITIALIZATION_STATE_SET_VALID(initialized_);
  return true;
}

void ProcessReaderMac::StartTime(timeval* start_time) const {
  bool rv = process_info_.StartTime(start_time);
  DCHECK(rv);
}

bool ProcessReaderMac::CPUTimes(timeval* user_time,
                                timeval* system_time) const {
  INITIALIZATION_STATE_DCHECK_VALID(initialized_);

  // Calculate user and system time the same way the kernel does for
  // getrusage(). See 10.9.2 xnu-2422.90.20/bsd/kern/kern_resource.c calcru().
  timerclear(user_time);
  timerclear(system_time);

  // As of the 10.8 SDK, the preferred routine is MACH_TASK_BASIC_INFO.
  // TASK_BASIC_INFO_64 is equivalent and works on earlier systems.
  task_basic_info_64 task_basic_info;
  mach_msg_type_number_t task_basic_info_count = TASK_BASIC_INFO_64_COUNT;
  kern_return_t kr = task_info(task_,
                               TASK_BASIC_INFO_64,
                               reinterpret_cast<task_info_t>(&task_basic_info),
                               &task_basic_info_count);
  if (kr != KERN_SUCCESS) {
    MACH_LOG(WARNING, kr) << "task_info TASK_BASIC_INFO_64";
    return false;
  }

  task_thread_times_info_data_t task_thread_times;
  mach_msg_type_number_t task_thread_times_count = TASK_THREAD_TIMES_INFO_COUNT;
  kr = task_info(task_,
                 TASK_THREAD_TIMES_INFO,
                 reinterpret_cast<task_info_t>(&task_thread_times),
                 &task_thread_times_count);
  if (kr != KERN_SUCCESS) {
    MACH_LOG(WARNING, kr) << "task_info TASK_THREAD_TIMES";
    return false;
  }

  MachTimeValueToTimeval(task_basic_info.user_time, user_time);
  MachTimeValueToTimeval(task_basic_info.system_time, system_time);

  timeval thread_user_time;
  MachTimeValueToTimeval(task_thread_times.user_time, &thread_user_time);
  timeval thread_system_time;
  MachTimeValueToTimeval(task_thread_times.system_time, &thread_system_time);

  timeradd(user_time, &thread_user_time, user_time);
  timeradd(system_time, &thread_system_time, system_time);

  return true;
}

const std::vector<ProcessReaderMac::Thread>& ProcessReaderMac::Threads() {
  INITIALIZATION_STATE_DCHECK_VALID(initialized_);

  if (!initialized_threads_) {
    InitializeThreads();
  }

  return threads_;
}

const std::vector<ProcessReaderMac::Module>& ProcessReaderMac::Modules() {
  INITIALIZATION_STATE_DCHECK_VALID(initialized_);

  if (!initialized_modules_) {
    InitializeModules();
  }

  return modules_;
}

mach_vm_address_t ProcessReaderMac::DyldAllImageInfo(
    mach_vm_size_t* all_image_info_size) {
  INITIALIZATION_STATE_DCHECK_VALID(initialized_);

  task_dyld_info_data_t dyld_info;
  mach_msg_type_number_t count = TASK_DYLD_INFO_COUNT;
  kern_return_t kr = task_info(
      task_, TASK_DYLD_INFO, reinterpret_cast<task_info_t>(&dyld_info), &count);
  if (kr != KERN_SUCCESS) {
    MACH_LOG(WARNING, kr) << "task_info";
    return 0;
  }

// TODO(mark): Deal with statically linked executables which don't use dyld.
// This may look for the module that matches the executable path in the same
// data set that vmmap uses.

#if __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_7
  // The task_dyld_info_data_t struct grew in 10.7, adding the format field.
  // Don't check this field if it's not present, which can happen when either
  // the SDK used at compile time or the kernel at run time are too old and
  // don't know about it.
  if (count >= TASK_DYLD_INFO_COUNT) {
    const integer_t kExpectedFormat =
        !Is64Bit() ? TASK_DYLD_ALL_IMAGE_INFO_32 : TASK_DYLD_ALL_IMAGE_INFO_64;
    if (dyld_info.all_image_info_format != kExpectedFormat) {
      LOG(WARNING) << "unexpected task_dyld_info_data_t::all_image_info_format "
                   << dyld_info.all_image_info_format;
      DCHECK_EQ(dyld_info.all_image_info_format, kExpectedFormat);
      return 0;
    }
  }
#endif

  if (all_image_info_size) {
    *all_image_info_size = dyld_info.all_image_info_size;
  }
  return dyld_info.all_image_info_addr;
}

void ProcessReaderMac::InitializeThreads() {
  DCHECK(!initialized_threads_);
  DCHECK(threads_.empty());

  initialized_threads_ = true;

  thread_act_array_t threads;
  mach_msg_type_number_t thread_count = 0;
  kern_return_t kr = task_threads(task_, &threads, &thread_count);
  if (kr != KERN_SUCCESS) {
    MACH_LOG(WARNING, kr) << "task_threads";
    return;
  }

  // The send rights in the |threads| array won't have their send rights managed
  // by anything until they're added to |threads_| by the loop below. Any early
  // return (or exception) that happens between here and the completion of the
  // loop below will leak thread port send rights.
  ScopedForbidReturn threads_need_owners;

  base::mac::ScopedMachVM threads_vm(
      reinterpret_cast<vm_address_t>(threads),
      mach_vm_round_page(thread_count * sizeof(*threads)));

  for (size_t index = 0; index < thread_count; ++index) {
    Thread thread;
    thread.port = threads[index];

#if defined(ARCH_CPU_X86_FAMILY)
    const thread_state_flavor_t kThreadStateFlavor =
        Is64Bit() ? x86_THREAD_STATE64 : x86_THREAD_STATE32;
    mach_msg_type_number_t thread_state_count =
        Is64Bit() ? x86_THREAD_STATE64_COUNT : x86_THREAD_STATE32_COUNT;

    // TODO(mark): Use the AVX variants instead of the FLOAT variants?
    const thread_state_flavor_t kFloatStateFlavor =
        Is64Bit() ? x86_FLOAT_STATE64 : x86_FLOAT_STATE32;
    mach_msg_type_number_t float_state_count =
        Is64Bit() ? x86_FLOAT_STATE64_COUNT : x86_FLOAT_STATE32_COUNT;

    const thread_state_flavor_t kDebugStateFlavor =
        Is64Bit() ? x86_DEBUG_STATE64 : x86_DEBUG_STATE32;
    mach_msg_type_number_t debug_state_count =
        Is64Bit() ? x86_DEBUG_STATE64_COUNT : x86_DEBUG_STATE32_COUNT;
#elif defined(ARCH_CPU_ARM64)
    const thread_state_flavor_t kThreadStateFlavor = ARM_THREAD_STATE64;
    mach_msg_type_number_t thread_state_count = ARM_THREAD_STATE64_COUNT;

    const thread_state_flavor_t kFloatStateFlavor = ARM_NEON_STATE64;
    mach_msg_type_number_t float_state_count = ARM_NEON_STATE64_COUNT;

    const thread_state_flavor_t kDebugStateFlavor = ARM_DEBUG_STATE64;
    mach_msg_type_number_t debug_state_count = ARM_DEBUG_STATE64_COUNT;
#endif

    kr = thread_get_state(
        thread.port,
        kThreadStateFlavor,
        reinterpret_cast<thread_state_t>(&thread.thread_context),
        &thread_state_count);
    if (kr != KERN_SUCCESS) {
      MACH_LOG(ERROR, kr) << "thread_get_state(" << kThreadStateFlavor << ")";
      continue;
    }

    kr = thread_get_state(
        thread.port,
        kFloatStateFlavor,
        reinterpret_cast<thread_state_t>(&thread.float_context),
        &float_state_count);
    if (kr != KERN_SUCCESS) {
      MACH_LOG(ERROR, kr) << "thread_get_state(" << kFloatStateFlavor << ")";
      continue;
    }

    kr = thread_get_state(
        thread.port,
        kDebugStateFlavor,
        reinterpret_cast<thread_state_t>(&thread.debug_context),
        &debug_state_count);
    if (kr != KERN_SUCCESS) {
      MACH_LOG(ERROR, kr) << "thread_get_state(" << kDebugStateFlavor << ")";
      continue;
    }

    thread_basic_info basic_info;
    mach_msg_type_number_t count = THREAD_BASIC_INFO_COUNT;
    kr = thread_info(thread.port,
                     THREAD_BASIC_INFO,
                     reinterpret_cast<thread_info_t>(&basic_info),
                     &count);
    if (kr != KERN_SUCCESS) {
      MACH_LOG(WARNING, kr) << "thread_info(THREAD_BASIC_INFO)";
    } else {
      thread.suspend_count = basic_info.suspend_count;
    }

    thread_identifier_info identifier_info;
    count = THREAD_IDENTIFIER_INFO_COUNT;
    kr = thread_info(thread.port,
                     THREAD_IDENTIFIER_INFO,
                     reinterpret_cast<thread_info_t>(&identifier_info),
                     &count);
    if (kr != KERN_SUCCESS) {
      MACH_LOG(WARNING, kr) << "thread_info(THREAD_IDENTIFIER_INFO)";
    } else {
      thread.id = identifier_info.thread_id;

      // thread_identifier_info::thread_handle contains the base of the
      // thread-specific data area, which on x86 and x86_64 is the thread's base
      // address of the %gs segment. 10.9.2 xnu-2422.90.20/osfmk/kern/thread.c
      // thread_info_internal() gets the value from
      // machine_thread::cthread_self, which is the same value used to set the
      // %gs base in xnu-2422.90.20/osfmk/i386/pcb_native.c
      // act_machine_switch_pcb().
      //
      // This address is the internal pthread's _pthread::tsd[], an array of
      // void* values that can be indexed by pthread_key_t values.
      thread.thread_specific_data_address = identifier_info.thread_handle;
    }

    thread_precedence_policy precedence;
    count = THREAD_PRECEDENCE_POLICY_COUNT;
    boolean_t get_default = FALSE;
    kr = thread_policy_get(thread.port,
                           THREAD_PRECEDENCE_POLICY,
                           reinterpret_cast<thread_policy_t>(&precedence),
                           &count,
                           &get_default);
    if (kr != KERN_SUCCESS) {
      MACH_LOG(INFO, kr) << "thread_policy_get";
    } else {
      thread.priority = precedence.importance;
    }

#if defined(ARCH_CPU_X86_FAMILY)
    mach_vm_address_t stack_pointer = Is64Bit()
                                          ? thread.thread_context.t64.__rsp
                                          : thread.thread_context.t32.__esp;
#elif defined(ARCH_CPU_ARM64)
    mach_vm_address_t stack_pointer =
        arm_thread_state64_get_sp(thread.thread_context);
#endif

    thread.stack_region_address =
        CalculateStackRegion(stack_pointer, &thread.stack_region_size);

    threads_.push_back(thread);
  }

  threads_need_owners.Disarm();
}

void ProcessReaderMac::InitializeModules() {
  DCHECK(!initialized_modules_);
  DCHECK(modules_.empty());

  initialized_modules_ = true;

  mach_vm_size_t all_image_info_size;
  mach_vm_address_t all_image_info_addr =
      DyldAllImageInfo(&all_image_info_size);

  process_types::dyld_all_image_infos all_image_infos;
  if (!all_image_infos.Read(this, all_image_info_addr)) {
    LOG(WARNING) << "could not read dyld_all_image_infos";
    return;
  }

  if (all_image_infos.version < 1) {
    LOG(WARNING) << "unexpected dyld_all_image_infos version "
                 << all_image_infos.version;
    return;
  }

  size_t expected_size =
      process_types::dyld_all_image_infos::ExpectedSizeForVersion(
          this, all_image_infos.version);
  if (all_image_info_size < expected_size) {
    LOG(WARNING) << "small dyld_all_image_infos size " << all_image_info_size
                 << " < " << expected_size << " for version "
                 << all_image_infos.version;
    return;
  }

  // Note that all_image_infos.infoArrayCount may be 0 if a crash occurred while
  // dyld was loading the executable. This can happen if a required dynamic
  // library was not found. Similarly, all_image_infos.infoArray may be nullptr
  // if a crash occurred while dyld was updating it.
  //
  // TODO(mark): It may be possible to recover from these situations by looking
  // through memory mappings for Mach-O images.
  //
  // Continue along when this situation is detected, because even without any
  // images in infoArray, dyldImageLoadAddress may be set, and it may be
  // possible to recover some information from dyld.
  if (all_image_infos.infoArrayCount == 0) {
    LOG(WARNING) << "all_image_infos.infoArrayCount is zero";
  } else if (!all_image_infos.infoArray) {
    LOG(WARNING) << "all_image_infos.infoArray is nullptr";
  }

  std::vector<process_types::dyld_image_info> image_info_vector(
      all_image_infos.infoArrayCount);
  if (!process_types::dyld_image_info::ReadArrayInto(this,
                                                     all_image_infos.infoArray,
                                                     image_info_vector.size(),
                                                     &image_info_vector[0])) {
    LOG(WARNING) << "could not read dyld_image_info array";
    return;
  }

  size_t main_executable_count = 0;
  bool found_dyld = false;
  modules_.reserve(image_info_vector.size());
  for (const process_types::dyld_image_info& image_info : image_info_vector) {
    Module module;
    module.timestamp = image_info.imageFileModDate;

    if (!process_memory_.ReadCString(image_info.imageFilePath, &module.name)) {
      LOG(WARNING) << "could not read dyld_image_info::imageFilePath";
      // Proceed anyway with an empty module name.
    }

    std::unique_ptr<MachOImageReader> reader(new MachOImageReader());
    if (!reader->Initialize(this, image_info.imageLoadAddress, module.name)) {
      reader.reset();
    }

    module.reader = reader.get();

    uint32_t file_type = reader ? reader->FileType() : 0;

    module_readers_.push_back(std::move(reader));
    modules_.push_back(module);

    if (all_image_infos.version >= 2 && all_image_infos.dyldImageLoadAddress &&
        image_info.imageLoadAddress == all_image_infos.dyldImageLoadAddress) {
      found_dyld = true;
      LOG(WARNING) << base::StringPrintf(
          "found dylinker (%s) in dyld_all_image_infos::infoArray",
          module.name.c_str());

      LOG_IF(WARNING, file_type != MH_DYLINKER)
          << base::StringPrintf("dylinker (%s) has unexpected Mach-O type %d",
                                module.name.c_str(),
                                file_type);
    }

    if (file_type == MH_EXECUTE) {
      // On Mac OS X 10.6, the main executable does not normally show up at
      // index 0. This is because of how 10.6.8 dyld-132.13/src/dyld.cpp
      // notifyGDB(), the function resposible for causing
      // dyld_all_image_infos::infoArray to be updated, is called. It is
      // registered to be called when all dependents of an image have been
      // mapped (dyld_image_state_dependents_mapped), meaning that the main
      // executable won't be added to the list until all of the libraries it
      // depends on are, even though dyld begins looking at the main executable
      // first. This changed in later versions of dyld, including those present
      // in 10.7. 10.9.4 dyld-239.4/src/dyld.cpp updateAllImages() (renamed from
      // notifyGDB()) is registered to be called when an image itself has been
      // mapped (dyld_image_state_mapped), regardless of the libraries that it
      // depends on.
      //
      // The interface requires that the main executable be first in the list,
      // so swap it into the right position.
      size_t index = modules_.size() - 1;
      if (main_executable_count == 0) {
        std::swap(modules_[0], modules_[index]);
      } else {
        LOG(WARNING) << base::StringPrintf(
            "multiple MH_EXECUTE modules (%s, %s)",
            modules_[0].name.c_str(),
            modules_[index].name.c_str());
      }
      ++main_executable_count;
    }
  }

  LOG_IF(WARNING, main_executable_count == 0) << "no MH_EXECUTE modules";

  // all_image_infos.infoArray doesn't include an entry for dyld, but dyld is
  // loaded into the process' address space as a module. Its load address is
  // easily known given a sufficiently recent all_image_infos.version, but the
  // timestamp and pathname are not given as they are for other modules.
  //
  // The timestamp is a lost cause, because the kernel doesn't record the
  // timestamp of the dynamic linker at the time it's loaded in the same way
  // that dyld records the timestamps of other modules when they're loaded. (The
  // timestamp for the main executable is also not reported and appears as 0
  // even when accessed via dyld APIs, because it's loaded by the kernel, not by
  // dyld.)
  //
  // The name can be determined, but it's not as simple as hardcoding the
  // default "/usr/lib/dyld" because an executable could have specified anything
  // in its LC_LOAD_DYLINKER command.
  if (!found_dyld && all_image_infos.version >= 2 &&
      all_image_infos.dyldImageLoadAddress) {
    Module module;
    module.timestamp = 0;

    // Examine the executable's LC_LOAD_DYLINKER load command to find the path
    // used to load dyld.
    if (all_image_infos.infoArrayCount >= 1 && main_executable_count >= 1) {
      module.name = modules_[0].reader->DylinkerName();
    }
    std::string module_name = !module.name.empty() ? module.name : "(dyld)";

    std::unique_ptr<MachOImageReader> reader(new MachOImageReader());
    if (!reader->Initialize(
            this, all_image_infos.dyldImageLoadAddress, module_name)) {
      reader.reset();
    }

    module.reader = reader.get();

    uint32_t file_type = reader ? reader->FileType() : 0;

    LOG_IF(WARNING, file_type != MH_DYLINKER)
        << base::StringPrintf("dylinker (%s) has unexpected Mach-O type %d",
                              module.name.c_str(),
                              file_type);

    if (module.name.empty() && file_type == MH_DYLINKER) {
      // Look inside dyld directly to find its preferred path.
      module.name = reader->DylinkerName();
    }

    if (module.name.empty()) {
      module.name = "(dyld)";
    }

    // dyld is loaded in the process even if its path can't be determined.
    module_readers_.push_back(std::move(reader));
    modules_.push_back(module);
  }
}

mach_vm_address_t ProcessReaderMac::CalculateStackRegion(
    mach_vm_address_t stack_pointer,
    mach_vm_size_t* stack_region_size) {
  INITIALIZATION_STATE_DCHECK_VALID(initialized_);

  // For pthreads, it may be possible to compute the stack region based on the
  // internal _pthread::stackaddr and _pthread::stacksize. The _pthread struct
  // for a thread can be located at TSD slot 0, or the known offsets of
  // stackaddr and stacksize from the TSD area could be used.
  mach_vm_address_t region_base = stack_pointer;
  mach_vm_size_t region_size;
  natural_t depth = 0;
  vm_prot_t protection;
  unsigned int user_tag;
  kern_return_t kr = MachVMRegionRecurseDeepest(
      task_, &region_base, &region_size, &depth, &protection, &user_tag);
  if (kr != KERN_SUCCESS) {
    MACH_LOG(INFO, kr) << "mach_vm_region_recurse";
    *stack_region_size = 0;
    return 0;
  }

  if (region_base > stack_pointer) {
    // There's nothing mapped at the stack pointer's address. Something may have
    // trashed the stack pointer. Note that this shouldn't happen for a normal
    // stack guard region violation because the guard region is mapped but has
    // VM_PROT_NONE protection.
    *stack_region_size = 0;
    return 0;
  }

  mach_vm_address_t start_address = stack_pointer;

  if ((protection & VM_PROT_READ) == 0) {
    // If the region isn't readable, the stack pointer probably points to the
    // guard region. Don't include it as part of the stack, and don't include
    // anything at any lower memory address. The code below may still possibly
    // find the real stack region at a memory address higher than this region.
    start_address = region_base + region_size;
  } else {
    // If the ABI requires a red zone, adjust the region to include it if
    // possible.
    LocateRedZone(&start_address, &region_base, &region_size, user_tag);

    // Regardless of whether the ABI requires a red zone, capture up to
    // kExtraCaptureSize additional bytes of stack, but only if present in the
    // region that was already found.
    constexpr mach_vm_size_t kExtraCaptureSize = 128;
    start_address = std::max(start_address >= kExtraCaptureSize
                                 ? start_address - kExtraCaptureSize
                                 : start_address,
                             region_base);

    // Align start_address to a 16-byte boundary, which can help readers by
    // ensuring that data is aligned properly. This could page-align instead,
    // but that might be wasteful.
    constexpr mach_vm_size_t kDesiredAlignment = 16;
    start_address &= ~(kDesiredAlignment - 1);
    DCHECK_GE(start_address, region_base);
  }

  region_size -= (start_address - region_base);
  region_base = start_address;

  mach_vm_size_t total_region_size = region_size;

  // The stack region may have gotten split up into multiple abutting regions.
  // Try to coalesce them. This frequently happens for the main thread's stack
  // when setrlimit(RLIMIT_STACK, …) is called. It may also happen if a region
  // is split up due to an mprotect() or vm_protect() call.
  //
  // Stack regions created by the kernel and the pthreads library will be marked
  // with the VM_MEMORY_STACK user tag. Scanning for multiple adjacent regions
  // with the same tag should find an entire stack region. Checking that the
  // protection on individual regions is not VM_PROT_NONE should guarantee that
  // this algorithm doesn't collect map entries belonging to another thread's
  // stack: well-behaved stacks (such as those created by the kernel and the
  // pthreads library) have VM_PROT_NONE guard regions at their low-address
  // ends.
  //
  // Other stack regions may not be so well-behaved and thus if user_tag is not
  // VM_MEMORY_STACK, the single region that was found is used as-is without
  // trying to merge it with other adjacent regions.
  if (user_tag == VM_MEMORY_STACK) {
    mach_vm_address_t try_address = region_base;
    mach_vm_address_t original_try_address;

    while (try_address += region_size,
           original_try_address = try_address,
           (kr = MachVMRegionRecurseDeepest(task_,
                                            &try_address,
                                            &region_size,
                                            &depth,
                                            &protection,
                                            &user_tag) == KERN_SUCCESS) &&
               try_address == original_try_address &&
               (protection & VM_PROT_READ) != 0 &&
               user_tag == VM_MEMORY_STACK) {
      total_region_size += region_size;
    }

    if (kr != KERN_SUCCESS && kr != KERN_INVALID_ADDRESS) {
      // Tolerate KERN_INVALID_ADDRESS because it will be returned when there
      // are no more regions in the map at or above the specified |try_address|.
      MACH_LOG(INFO, kr) << "mach_vm_region_recurse";
    }
  }

  *stack_region_size = total_region_size;
  return region_base;
}

void ProcessReaderMac::LocateRedZone(mach_vm_address_t* const start_address,
                                     mach_vm_address_t* const region_base,
                                     mach_vm_address_t* const region_size,
                                     const unsigned int user_tag) {
#if defined(ARCH_CPU_X86_FAMILY)
  if (Is64Bit()) {
    // x86_64 has a red zone. See AMD64 ABI 0.99.8,
    // https://gitlab.com/x86-psABIs/x86-64-ABI/-/wikis/uploads/01de35b2c8adc7545de52604cc45d942/x86-64-psABI-2021-05-20.pdf#page=23.
    // section 3.2.2, "The Stack Frame".
    constexpr mach_vm_size_t kRedZoneSize = 128;
    mach_vm_address_t red_zone_base =
        *start_address >= kRedZoneSize ? *start_address - kRedZoneSize : 0;
    bool red_zone_ok = false;
    if (red_zone_base >= *region_base) {
      // The red zone is within the region already discovered.
      red_zone_ok = true;
    } else if (red_zone_base < *region_base && user_tag == VM_MEMORY_STACK) {
      // Probe to see if there's a region immediately below the one already
      // discovered.
      mach_vm_address_t red_zone_region_base = red_zone_base;
      mach_vm_size_t red_zone_region_size;
      natural_t red_zone_depth = 0;
      vm_prot_t red_zone_protection;
      unsigned int red_zone_user_tag;
      kern_return_t kr = MachVMRegionRecurseDeepest(task_,
                                                    &red_zone_region_base,
                                                    &red_zone_region_size,
                                                    &red_zone_depth,
                                                    &red_zone_protection,
                                                    &red_zone_user_tag);
      if (kr != KERN_SUCCESS) {
        MACH_LOG(INFO, kr) << "mach_vm_region_recurse";
        *start_address = *region_base;
      } else if (red_zone_region_base + red_zone_region_size == *region_base &&
                 (red_zone_protection & VM_PROT_READ) != 0 &&
                 red_zone_user_tag == user_tag) {
        // The region containing the red zone is immediately below the region
        // already found, it's readable (not the guard region), and it has the
        // same user tag as the region already found, so merge them.
        red_zone_ok = true;
        *region_base -= red_zone_region_size;
        *region_size += red_zone_region_size;
      }
    }

    if (red_zone_ok) {
      // Begin capturing from the base of the red zone (but not the entire
      // region that encompasses the red zone).
      *start_address = red_zone_base;
    } else {
      // The red zone would go lower into another region in memory, but no
      // region was found. Memory can only be captured to an address as low as
      // the base address of the region already found.
      *start_address = *region_base;
    }
  }
#endif
}

}  // namespace crashpad

redpajama_set_name: RedPajamaGithub


text:
Wings News
Red Wings sign Trevor Daley to 3-year, $9-million deal
Photo credit: @TrevorDales
By Adam Laskaris
Well, there it is. The Detroit Red Wings have signed defenceman Trevor Daley to a 3-year deal, worth $3M-year AAV.
Multiple reports had come out earlier in the week that the Red Wings were in contention for Daley's services.
Then, very early this morning, this cryptic tweet came out from Bob McKenzie:
Trevor Daley to DET.
— Bob McKenzie (@TSNBobMcKenzie) July 1, 2017
A 33-year old defenceman from Toronto, Daley had played in the Dallas Stars organization from 2003-15 before being traded to the Chicago Blackhawks in the Patrick Sharp trade in July 2015. He then was dealt to Pittsburgh in December of the same year in a one-for-one deal for Rob Scuderi.
He won his first Stanley Cup this past year with Pittsburgh, playing 21 games in the playoffs, picking up 1 goal and four assists.
Minutes away from being official, Red Wings have agreed to 3 years at $3M AAV for defenseman Trevor Daley.
— Helene St. James (@HeleneStJames) July 1, 2017
Known in the past for being a bit of an offensive d-man, Daley's 19 points this season would have been second amongst Wings defencemen, although that isn't saying a whole lot. However, on a team that is already not great defensively, this signing doesn't seem to make a whole lot of sense. Take a look at the final column in his HERO chart, which tallies shot suppression.
Daley will be 34 by the time the season is less than a week old, and is probably closer to the end of his NHL career than the start of it. Expecting him to be anything more than he's been the last few seasons is just not a thing that's likely to happen.
He probably slots in on the Red Wings second pairing, and in the process bumps either Xavier Ouellet, Nick Jensen, or Ryan Sproul into the 7th man role. Ken Holland's asset management in its most pure form right there. Maybe they give him bottom pairing minutes, but I can't really understand why they wouldn't just promote someone internally.
The Wings didn't really need to sign anyone this free agency, and they ended up with one of the worst defensive players possible. Whatever helps the tank, I guess?
Recent articles from Adam Laskaris
WGD: Game 52: Wings vs Leafs
The Red Wings are paying $46.19 million for 12 players who have totalled 12 goals combined this season
Red Wings Future Stars: Dennis Cholowski
Handing out even more team awards to the 2021–22 Detroit Red Wings
Three former Red Wings draft selections are set to hit free agency
Report: Detroit Red Wings captain Dylan Larkin switches agents
Why Detroit Red Wings defenceman Moritz Seider should win the Calder Trophy
Cossa remains sharp as Oil Kings push Winnipeg to the brink in WHL playoffs

redpajama_set_name: RedPajamaCommonCrawl


I haven't really played hurracan yet so all i can really say is watch out for someone inflicting a lot of damage to you in the first turn lol.
Im the other way round lol I prefer the anime.
Interesting deck. i would personally change Ayah to Rad, Eliska to Annuqa and Ward Hg to Dreadlash.
Got my second ELO top with this same deck.
There are a lot of banned characters in your decks. I presume that next week they may not be playable as well. I would suggest staying away from having 3 two star characters.
In the case of Ongh being banned, Nahema, Zornado, or two 4*s.
The bonuses benefit you the entire time, the threat of pill return or DR allows you to manipulate the game.
Plus the majority of the deck is 7-8 power.
Both deck seem good. You could pick one and then see how many cards you come across which are weak to SOA. If theres not that many use the pussycats if theres a lot use roots.


text:
Q: c++: Split string by delimiter For example I have this string: hello:there:world
How do I split these three words to string array,
I mean the final result will be this:
arr[0] = "hello";
arr[1] = "there";
arr[2] = "world";

Thanks in advance.

redpajama_set_name: RedPajamaStackExchange


Tiger Town has been around for a while now and their song "What You Came Here For" has for some reason been off our radar for quite some time. Under any case, Tiger Town came by us unannounced and we fell in love instantly. Giving us the perfect synths of St. Lucia, they give us the folky feel of Of Monsters and Men along with the hipstery vibe of Little Daylight. Everything about "What You Came Here For" makes for the perfect pop song and we are happy to say that Tiger Town will be at CMJ this year! Along with this, they have been confirmed to be working with NYU Steinhardt's Music Business program for their A&R class called Village Records. The students are excited to be working with such a great band on their record project. We can't wait to see what these Aussies have in store for us with their big jump across the Pacific.


text:
Douglas E. Moore
Title: Douglas E. Moore
Subject: Royal Ice Cream Sit-in, Electoral history of Marion Barry, Charles Kenzie Steele, The Freedom Singers, James Orange
Collection: 1928 Births, Living People, Members of the Council of the District of Columbia
Douglas E. Moore is a Royal Ice Cream Sit-in in Durham, North Carolina. Moore entered the ministry at a young age. After finding himself dissatisfied with what he perceived as a lack of action among his divinity peers, he decided to take a more activist course. Shortly after becoming a pastor in Durham, Moore decided to challenge the city's power structure via the Royal Ice Cream Sit-in, a protest in which he and several others sat down in the white section of an ice cream parlor and asked to be served. The sit-in failed to challenge segregation in the short run, and Moore's actions provoked a myriad of negative reactions from many white and African-American leaders, who considered his efforts far too radical. Nevertheless, Moore continued to press forward with his agenda of activism.
Ultimately, however, Moore's plan of using the sit-in to challenge Durham's sit-in movements that spread all across the South. His work with the sit-in helped to spur the creation of "local movement centers", which facilitated the collective actions of African-Americans seeking to bring about an end to segregation throughout North Carolina and the region in years to come.[1] In addition, Moore's idea of a group that used the power of nonviolence, using Christianity as an ideological base, ultimately became the symbol of a new era of activism and civil rights in the United States.
Early life and education 1
Move to Durham 2
Royal Ice Cream Sit-in 3
Criticism and controversy 4
Durham movement 5
Work with King and regional civil rights activists 6
Later life in Washington, D.C. 7
Douglas Elaine Moore was born in 1928 in Hickory, North Carolina. At an early age, he decided to follow in the footsteps of his grandfather and enter the Methodist ministry. Shortly after earning a Bachelor of Arts from North Carolina College in 1949, Moore enrolled at Boston University as a divinity student in 1951. His political leanings were evident early on, as he joined a radical leftist group on campus and participated in protests of social ills. Moore also temporarily joined a student group called the Dialectical Society, which met every week for dinner and a discussion.[2] However, he found the talks largely dissatisfying, viewing them as far too passive and abstract. In addition, he was not too fond of the leader of the Dialectical Society, the then-unknown Martin Luther King, Jr. Referring to him as "just another Baptist preacher", Moore invited King to join his student group.[3] However, King declined to do so, likely put off by its radicalness and activist agenda. Moore soon parted ways with the Dialectical Society. He earned his Bachelor of Sacred Theology in 1953 and his Master of Sacred Theology in 1958.[4]
Move to Durham
After graduating, Moore moved back to the American South. He served as the minister for two small-town Methodist churches before becoming the pastor of Durham's Asbury Temple Methodist Church in 1956. Soon after arriving in the city, Moore began to look for ways to challenge the its power structure. Despite the fact that Durham was known for having better-than-average race relations for the region, Moore quickly concluded that it was the "same as any other place: They [the whites] wouldn't give up nothing".[3] He made several attempts to desegregate the city's public facilities. After his family was denied admission to the then all-white Long Meadow Park swimming pool in 1957, Moore appealed to Durham recreation officers, to no avail. Other efforts included petitions to the city council to end segregation at the Carolina Theatre and the Durham Public Library.[5] While these also resulted in little to no changes, Moore would make headlines later that year via what came to be known as the Royal Ice Cream Sit-in.
Royal Ice Cream Sit-in
On June 23, 1957, the 28-year-old Moore led three African-American men and three African-American women into the segregated Royal Ice Cream Parlor. They all sat down in the white section and asked to be served.[6] Moore later told a reporter, "We just decided we wanted to cool off, to get some ice cream or milk shakes."[3] The truth, however, was much more far-reaching than that. Moore later said that the parlor was chosen in advance because of its location in a predominantly-African-American neighborhood. He also indicated that he intended the sit-in to serve as a barometer – a way to see how much progress African-American protestors could make, as well as what they needed to achieve more in the future.[7] In the end, after being asked to leave by the owner of the parlor and refusing to do so, all of the protestors, including Moore, were arrested. They were all convicted of trespassing and fined $10 plus court costs.[8] The sit-in soon turned into a protracted court battle: seeking an ally in his fight for the desegregation of public facilities, Moore hired Floyd McKissick, a prominent African-American attorney, to sue Royal Ice Cream.[9] At the same time, he and the other protestors appealed their convictions. The case eventually made its way to the North Carolina Supreme Court, but the defendants ultimately lost.[10]
Criticism and controversy
The Royal Ice Cream Sit-in produced much controversy from the start. Moore failed to communicate to the sit-in participants all of the possible consequences of their actions: Virginia Williams and Mary Clyburn, two of the protestors, claimed in later interviews that they had not expected to be arrested.[11] Nevertheless, the sit-in was carried out anyway, and there was immediate backlash from African-American groups in Durham. The Durham Committee on Negro Affairs and the Durham Ministerial Alliance heavily criticized Moore, calling his efforts "radical".[12] Indeed, Moore's call for immediate change directly opposed the practices of the African-American community in Durham. Previously, it had relied on backroom talks with the white elite to bring about concessions in a deliberate manner. Moore's actions came as a surprise to many and threatened to upset the delicate balance that existed in Durham, resulting in a backlash against the protestors from the city's African-American community. The vitriol shocked the sit-in participants, as they had only expected hostile reactions from Durham's white citizens. Mary Clyburn later recalled, "I didn't hear nobody being happy about what we've done".[13]
Durham movement
Despite the initial backlash to the sit-in, Moore ultimately helped to bring about much change to Durham. He soon found himself some powerful allies in the city's community, including McKissick and outspoken African-American newspaperman and Carolina Times editor Louis Austin, who just one week prior to the sit-in had run an editorial denouncing Durham's elite African-American institutions.[14] With support from these new allies, Moore was able to drum up support for a Durham-wide movement. The Durham Committee on Negro Affairs' Economic Committee, headed by McKissick, debated whether or not to boycott Royal Ice Cream Parlor. As Moore himself later revealed, there was doubt as to whether or not this would be a good idea, due to the fact that the parlor's owner, Louis Coletta, was a Greek American and a minority himself.[13] Nevertheless, the mere presence of such a discussion symbolized the growing activist movement in Durham, which was fueled primarily by the city's young African-Americans. Challenging the conservatism of the African-American elite, the Durham youth embraced Moore's activist agenda. For instance, a group of young girls held regular pickets outside of the parlor under the direction of McKissick, despite being members of the Durham NAACP, which had refused to publicly support Moore.[15] The Durham movement eventually began to pick up steam, leading to a rapid series of reforms in the coming years. In 1960, the city became just the seventh one in North Carolina to desegregate its lunch counter service.[16] After several years of legal action, the Royal Ice Cream Parlor finally desegregated along with the rest of the city's public facilities in 1963.[15]
The pace of the Durham movement surprised even Moore himself. In 1960, four African-American students held their own
Washington, D.C. City Council members
^ Aldon Morris, "Black Southern Student Sit-In Movement: An Indigenous Perspective," CSRO Working Paper 234 (1981): 15, accessed April 13, 2014, doi: 2027.42/51008.
^ Osha Gray Davidson, The Best of Enemies: Race and Redemption in the New South (Chapel Hill: University of North Carolina Press, 2007), 87.
^ a b c Davidson, The Best of Enemies, 88.
^ Ralph Luker and Penny A. Russell, The Papers of Martin Luther King, Jr: Birth of a New Age, December 1955-December 1956 (Berkeley: University of California Press, 1997), 393.
^ "Negroes Fined In Dairy Bar Case," The Durham Morning Herald, June 24, 1957.
^ Christina Greene, Our Separate Ways: Women and the Black Freedom Movement in Durham, North Carolina (Chapel Hill: University of North Carolina Press, 2005), 65-66.
^ Interview of Douglas E. Moore by Elyse Gallo, January 28, 1978, Box 6, Duke University Oral History Program Collection, David M. Rubenstein Rare Book & Manuscript Library, Duke University.
^ "Color Line Cracking Attempt Nets Fines," The Durham Morning Herald, June 25, 1957.
^ Davidson, The Best of Enemies, 91.
^ "Negroes Lose In Trespass Case Appeal," The Durham Morning Herald, January 11, 1958.
^ Greene, Our Separate Ways, 66.
^ a b Greene, Our Separate Ways, 67.
^ Davidson, The Best of Enemies, 89-90.
^ "Durham Counters Integrated," High Point Enterprise, August 2, 1960.
^ Richard A. Hughes, "Boston University School of Theology and the Civil Rights Movement," Methodist History 47 (2009): 149, accessed April 13, 2014, doi: 10516/210.
^ Hughes, "Boston University School of Theology and the Civil Rights Movement," 146.
^ Morris, "Black Southern Student Sit-in Movement: An Indigenous Perspective," 20-21.
^ Hughes, "Boston University School of Theology and the Civil Rights Movement," 149-150.
^ Morris, "Black Southern Student Sit-in Movement: An Indigenous Perspective," 15.
^ Branch, Taylor. Parting the Waters: America in the King Years 1954-1963 (New York: Simon and Schuster, 1988).
^ a b Davidson, The Best of Enemies, 297.
^ Johnson, Cedric. Revolutionaries to Race Leaders: Black Power and the Making of African American Politics (Minneapolis: University of Minnesota Press, 2007), 115.
^ "At-Large Member of the Council of the District of Columbia," DC Board of Elections, accessed April 13, 2014, http://www.dcboee.org/candidate_info/historic_officials/at_large.asp.
^ Yolanda Woodlee, "Oh So Briefly the Candidate to Beat," The Washington Post, September 7, 2002, B01.
^ Woodlee, "Oh So Briefly the Candidate to Beat", B01.
Douglas Moore's legacy is one of an influential civil rights leader in North Carolina and Washington, D.C. Rarely budging from his agenda of activism, which was often perceived as radical, Moore received plenty of criticism from whites and African-Americans alike, especially after the short-term failure that came to be known as the Royal Ice Cream Sit-in. However, his persistence enabled him to help bring about the desegregation of the city of Durham, a cause to which he devoted many years of his life. Moore achieved many successes in his fight against segregation by allying with other prominent civil rights activists and inspiring a new generation of young, African-American student protestors. His efforts as a champion of the sit-in movement helped to popularize its use throughout North Carolina and the South. The sit-in movements had ideological roots in non-violence and Christian ideology, ideas that Moore also circulated throughout the region. Although he rejected some of the causes he had once espoused so fervently later on in his life, by combining his faith with strong leadership, he was able to help bring about much progress in the area of civil rights during a turbulent time in the history of the United States.
Soon after his run-in with the law, Moore concluded that the key to African-American success in America was economics, not politics. He began a career as a "corporate gadfly" and constantly badgered stockholders with questions about the racial biases present in their hiring practices. Later, Moore decided to enter the business world himself. He now owns an energy company that regularly receives multimillion-dollar contracts from the Potomac Electric Power Company and Washington Gas Light Company. Moore currently serves as the pastor of Elijah Methodist Church in Poolesville, Maryland.[27] In 2002, he made a brief return to the political scene by running against Anthony A. Williams for mayor of Washington, D.C. However, he failed to drum up the widespread support necessary to mount a serious challenge in the race, and did not win.[31]
[30]. In 1981, he violated one of its conditions and served six months in jail after refusing to take a court-ordered psychiatric exam.probation a white tow truck driver and put under assaulting His uncompromising attitude won him many friends and enemies alike. During his term, Moore ran into trouble with the law. Exhibiting behavior that contradicted his peaceful teachings of the past, Moore was convicted in 1976 of [29] in 1974.Council of the District of Columbia Moore also ran for – and won – a position on the [28] At the height of the Durham movement he had fostered for so long, Moore suddenly left the city. Along with Lawson, he was forced out of King's
Later life in Washington, D.C.
Moore enlisted the help of other regional leaders such as networks set up by Moore and his allies, whose work also helped to popularize what became known as "local movement centers". These centers can be conceptualized as "micro-social structures" that facilitated the collective actions of African-American activists, especially students, across North Carolina and the rest of the South.[24] As a result, during the spring of 1960, sit-ins spread through these networks and centers to every Southern state except Mississippi.[25] Moore's tireless efforts had paid off, and the era of civil rights in America had begun in full force.
The growing movement in the South soon became impossible for King to ignore. A week after the Durham sit-ins, he received an invitation from Moore to come to the city, which he accepted. The two visited the lunch counters that had been open just a few days earlier and spoke at White Rock Baptist Church. King gave the sit-in movement his blessing, saying that the student activists had made the sit-in action itself "a creative protest that is destined to be one of the glowing epics of our time".[23] With the support of King, the movement continued to grow.
[22] The inspiration behind the Durham movement and the ones it inspired came from an unlikely source. Back in 1955, Moore heard the news that his former classmate at
Work with King and regional civil rights activists
The Durham movement had finally begun to spread beyond the city limits. [19] had joined in the sit-in movement, frightening white store owners by dressing well and staying dignified.Fayetteville, and Winston-Salem, Raleigh, Charlotte, which were also shut down. However, the message had been sent, and by the end of the week, students in Walgreens and S.H. Kress Nevertheless, Moore and his allies soon realized that the time had come to take action, realizing that the student activists in Durham wanted to emulate their Greensboro counterparts. Exactly one week after the Greensboro sit-in, Moore and McKissick led one of their own. They led dozens of college students into the heart of Durham, where they sat down at the lunch counters of Woolworth's. When the manager closed the counter, the students moved on the counters at [18] When McKissick heard about the sit-in, he exclaimed, "Oh my God, these kids have jumped the gun!"[17]
New York City, United States, American Civil War, Hawaii, Western United States
Virginia, Kentucky, Texas, Florida, West Virginia
Martin Luther, Anglicanism, Bible, Lutheranism, Protestantism
Sociology, Internet, Family, Village, Town
Duke University, Raleigh, North Carolina, Durham County, North Carolina, North Carolina, Wake County, North Carolina
North Carolina, Jesus, African American, Douglas E. Moore, Greensboro sit-ins
Electoral history of Marion Barry
Marion Barry, Democratic Party (United States), Democratic Party (United States), Democratic Party (United States), Socialist Workers Party (United States)
Charles Kenzie Steele
Jesus, Coretta Scott King, Malcolm X, Leo Tolstoy, Wayback Machine
The Freedom Singers
Barack Obama, Bob Dylan, Jesus, Joan Baez, Cordell Reagon
James Orange
Southern Christian Leadership Conference, African-American Civil Rights Movement (1954–68), Martin Luther King, Jr., Jesus, South Africa


text:
Nikon launches colorful, feature-packed rugged compact camera
Nikon launches colorful, featu...
The Nikon Coolpix W150 travel compact is available in blue, white and orange, but also in Flower (pictured) and Resort designs
The Coolpix W150 features a 13.2 megapixel image sensor, 3x optical zoom lens and comes with new scene modes and in-camera editing
The Coolpix W150 includes a scene mode to transform captured images into "little planets"
When you're out and about and need to take a photo, chances are pretty good that you just whip out your smartphone and grab the moment. So is there still a market for dedicated compact cameras? The big manufacturers think so, and Nikon has just announced the Coolpix W150 to prove it.
The adult- and child-friendly travel compact is waterproof to 10 meters (33 ft), can survive falls from a height of 1.8 m (5.9 ft), is able to resist chilling temperatures as low as -10° C (14° F), and is dustproof, so users can safely take photos and video at the beach – in the sand or under the waves – or on the snow-covered mountain trails.
The W150 features a 13.2 megapixel image sensor, and though there are smartphones with a bigger pixel count available, Nikon is tempting buyers with the promise of superior image quality. The camera also offers 3x optical zoom from its Nikkor lens, which can be ramped up to 6x with some digital help, without reducing image quality.
The compact is reported easy to use thanks to a modified graphical user interface, and comes with some impressive functionality. Target Finding AF sees the camera detect and focus on the primary subject, it's capable of recording Full HD videos with stereo sound, it has built-in Wi-Fi and Bluetooth, and rocks electronic vibration reduction to help mitigate camera shake issues.
Nikon has also treated the W150 to some powerful new scene modes and in-camera editing capabilities. There are special modes for underwater photography, for example, which optimize processing for capturing images under the waves, look for human faces or adjust for improved clarity.
Users can create images that look as though one photo has been taken on top of another, a voice message can be recorded and added to a photo, images can be made to look like "little planets" (shown above) and frames can be added to photos. Multiple images can be used to make a collage and there's a function to add some curves to photos.
Nikon hasn't revealed pricing or availability information at the time of writing.
Source: Nikon
PhotographyRuggedNikonTravelPhotographyCompact
f8lee April 24, 2019 12:40 PM
Muck as I like and admire Nikon (and have a closet full of gear to boot) this smacks of desperation - understandable as the mass market for stand-alone cameras keeps dropping in the face of the all-powerful smart phone juggernaught.
Nik April 25, 2019 07:02 AM
Seems to me, that by the time anyone has decided which of all the weird features they would like to use, the photo opportunity will have probably passed, but for those who ignore them, and just take quick snaps, its an ideal camera for the traveller.
The best photography of 2020
Retro-inspired instant camera features full manual control
Crew in a Box is made for remote TV interviews in the time of COVID-19
Ilford brings back the point-and-shoot 35mm film camera


text:
Why You Should Be Watching : Pretty Little Liars
Serena Doherty November 27, 2012
TVWhy You Should Be Watching
Audiences are enthralled by the lives and loves of teenagers who are doomed by their misguided intentions, miscommunications and misunderstandings. Whether they're faux Manhattan socialites in Gossip Girl or revamping tried and tested love triangles in The Vampire Diaries, many of us can't help but tune in. Teen angst has now taken a thrilling turn to the dark side with blackmail, arson and underage student/handsome teacher trysts for the latest in guilty pleasure chic, Pretty Little Liars. If you've yet to experience the show there's still time to catch up as it's currently on hiatus until the New Year and the second series is being repeated in the UK on Viva.
The show began with four girls brought back together at the end of summer after they receive ominous anonymous messages from a mysterious "A" about their AWOL Queen B. The group's former leader, Alison DiLaurentis, has been missing for a year and until now the secrets they shared had disappeared with her.
The girls' first assumption is that their favourite witch with a "B" has returned to play more games of mischief and misery until a body is found beneath her former home. The clique continues to get texts, e-mails, letters and videos from an all-seeing adversary who knows their darkest secrets and much more. Now mid-way through its third season the riveting US drama makes product placement look like a valid lifestyle choice, as you cling to the edge of your seat for the next twist in blackmail and sabotage.
The paranoid and clueless pretty little liars were kept in the dark by their scheming alpha mean girl as victims of her abuse and adoration. After years in Alison's shadow her plotting is catching up with them and they're paying for not asking more questions.
Spencer, Hanna, Aria and Emily find out that Alison knew much more than she let on and they race "A" to her secrets. The discoveries send a ripple of shock through their lives when they see hidden camera footage of themselves at a sleepover and Alison meeting an older man. The town is steeped in secrets and filled with untrustworthy opponents who all seem to know a little slice of Alison's meddling.
Each girl is blackmailed into even more trouble by their darkest moment with Alison. They were all party to a prank gone wrong which left a girl blind. Though the anonymous messages don't stop there, the girls all have their own secrets that they thought were shared with Alison alone but are now being used to taunt them.
The only one who ever challenged Alison was the tough and intelligent Spencer who attracts her sister's boyfriends and often likes the attention. Whereas Hanna was the butt of Alison's jokes for being overweight but has now adopted her crown after shedding a few pounds and shoplifting a lot more, but Hanna's mum is no saint either and they will do anything to protect each other. Aria returns to the fold after a year abroad and tries to escape her father's infidelity by drinking underage at a bar where she unwittingly meets her soon-to-be teacher and by the time she finds out it's too late. While innocent Emily was always in love with Alison and she's still dating her jock boyfriend to hide firmly in the closet from her conservative parents.
Secrets are teased out along the way as the girls have to choose where their loyalties lie and "A" tries to crush any semblance of happiness or normality. The parents' messy private lives give them added obstacles and the adults begin to notice that someone is toying with their daughters. The girls become closely entwined by their shared torture and don't know where to turn after trusting the wrong people. They're slowly learning that they only know what "A" wants them to know.
The show paused this summer, only to return for the yearly Halloween horror episode and after seasons of mistaken "A" identities there are now two characters who have been identified as members of the "A" team. The foursome only knows of one of them and it's assumed that she is under lock and key in a mental institution. Being the devious darling that she is, some barred windows don't stop her making a masked appearance. You would think by now the little liars would learn that no good comes from trying to have an uneventful adolescence, especially at a Halloween party on a moving train.
Like most teen dramas you can expect to get frustrated with the characters jumping to conclusions, rushing in and having those "Don't go into the woods!!" moments, but it's worth it. There are still so many unexplained things from the life and death of Alison DiLaurentis and if the show teaches you anything it's that everyone is a little liar but secrets don't stay secret forever.
Pretty Little Liars: 5 Things We Want To Know After 'Along Comes Mary'
Charlotte Regan July 29, 2016
Pretty Little Liars Season 7, Episode 11 Review
Charlotte Regan April 19, 2017
Pretty Little Liars Season 7, Episode 4 Review
Natalie Xenos July 14, 2016
Charlotte Regan August 11, 2016
Pretty Little Liars: 5 Questions After Watching 'Bedlam'
Natalie Xenos June 29, 2016
Pretty Little Liars Season 7, Episode 9 Recap
More Reviews, News & Features
Culturefly on the Wall #66: Films Set In The Future


text:
Cisco Pledges $1B for Supercharged 'Intercloud'
Cisco wants a network of clouds, or Intercloud, which will help support the growing Internet of Everything trend.
https://www.pcmag.com/news/cisco-pledges-1b-for-supercharged-intercloud
Networking giant Cisco today announced a two-year plan to invest $1 billion in the expansion of its cloud infrastructure.
Working with partners, Cisco said it will build a network of clouds - dubbed the Intercloud - which will be used, in part, to support the Internet of Everything.
"The timing is right for Cisco and its partners to invest in a groundbreaking, application-centric global Intercloud to provide broader reach and faster time to market," Robert Lloyd, president of Cisco development and sales, said in a statement.
According to the company, this global Intercloud will include an expanded suite of applications and network-centric cloud services aimed at boosting the connection of people, data, processes, and things that make up the Internet of Everything—a movement expected to become a $19 trillion economic market in the next 10 years. "Together, we have the capability to enable a seamless world of many clouds in which our customers have the choice to enable the right, highly secure cloud for the right workload, while creating strategic advantages for rapid innovation, and ultimately, business growth."
This souped-up Intercloud will be hosted across a global network of Cisco and the data centers of partners like Australian service provider Telstra. Cisco will offer APIs, which the company said will "deliver a new enterprise-class portfolio of cloud IT services for businesses, service providers, and resellers."
Early this year, CEO John Chambers told the crowd at CES that his company is headed in the direction of IP video and Internet/network-connected everything.
In fact, Chambers envisions a future where every gadget and household item is IP-enabled and connected. Smart shopping cards could personalize users' experiences, while Internet-connected street lights could help reduce crime and serve as electric car chargers.
For more, see PCMag's review of the Cisco Connect Cloud and the slideshow above. Also check out this infographic describing the Internet of Things.
Got Business Data? You're Probably Using It Wrong
By Oliver Rist
FTC and DOJ: Have We Been Getting Digital Mergers Wrong? Let Us Know
By Rob Pegoraro
The Best VPNs for Businesses and Teams for 2022
By Max Eddy
The Best Employee Monitoring Software for 2022
By Neil McAllister
About Stephanie Mlot
Stephanie joined PCMag in May 2012, moving to New York City from Frederick, Md., where she worked for four years as a multimedia reporter at the second-largest daily newspaper in Maryland. She has also written about technology, science, culture, and Doctor Who for PCMag sister site Geek.com. She is based in Edinburgh, Scotland.
Read the latest from Stephanie Mlot
Report: Google Is Developing an AR Headset
YouTube Scales Back Original Content Division
More from Stephanie Mlot


text:
Pleased to meet you
A People's History of Gauche
Jul 16, 2019 Music Web Exclusive
History can mutate when we're not looking. Official records will stifle the many voices that spoke; leaders and winners (usually men) take up all the page space; crowds get squashed down into the two or three contemporary mindsets. More
Warner Records
Plenty of artists can bang out hit after hit song, but it's rare when someone is so good at it that they'll pen extra hits just to give them away. Prince, on the other hand, gave away more tracks than a lot of musicians were able to write in their entire careers. More
The Big Bad Fox and Other Tales
Studio: GKIDS / Shout! Factory
Jul 15, 2019 DVDs Web Exclusive
A lightweight, charming animated anthology which will entertain children and their parents alike. More
Don't You Think You Have Enough?
The third album from the Calvin sisters, Jessie and Jennifer, aka Bleached, may not break any new ground, but it certainly has its fair share of pointed and slightly off-beat, and also very good, pop punk. More
Studio: Kino Lorber Studio Classics
If you're beginning to suspect that a movie that valorizes drilling for oil in the Gulf of Mexico doesn't play well in 2019, congratulations, you're a sensible person! More
Showtime, Friday July 12 at 9 p.m.
Jul 12, 2019 TV Web Exclusive
Rick Rubin's career is so eclectic, so influential, so mind-blowingly successful, it's difficult to wrap your head around the fact that it belongs to just one person. It's fitting that the Showtime four-part docu-series Shangri-La is shot primarily at Rubin's mythical studio of the same name. More
Mark Mulcahy
The Gus
Thom Yorke and Michael Stipe's love for Mark Mulcahy's occasionally revived '80s band Miracle Legion has helped his poetic, often stark, tender songs reach a broader audience over the years. More
It was in 2005 that Sam Beam—the man behind Durham, North Carolina-based indie-folkers Iron & Wine—sat down with Tucson, Arizona's Calexico for a spirited meeting of minds and hearts. More
Soul Team Six
Studio: Mill Creek Entertainment
A presentation of six stand-out feature films from across the 1970s which exhibit some of the best and worst of the blaxploitation category. More
"Let's Rock"
Easy Eye Sound/Nonesuch
The Black Keys have been at the top of the blues rock heap since their debut in 2002, laying down a string of hits and eight studio albums along the way, and a collective body of work that has set the expectation bar high. So it's a bit disappointing that their ninth album, "Let's Rock", is nothing special for such a special band. More
1 2 3 > Last »
Mar 01, 2019 Issue #65 - Mitski and boygenius
A People's History of Gauche (Review) — Gauche
Wilco Announce New Album, Share New Song "Love Is Everywhere (Beware)" (News) — Wilco, Jeff Tweedy
One True Pairing (Wild Beasts' Tom Fleming) Announces Album, Shares "I'm Not Afraid" Video (News) — One True Pairing, Wild Beasts
Premiere: Whispering Sons' Welcome to the Village Mixtape (News) — mixtapes, Whispering Sons, Welcome to the Village 2019
The Black Keys Team Up with Funny or Die to Spoof MasterClass in New Video (News) — The Black Keys
Contact Staff About Us Site by Someoddpilot & Methodtree, Inc. © Under The Radar Magazine


Seniors Kiriahna Edeline, Madison York, Dani Rinz, and Ana Lopez Bonilla were among those who expressed a desire for a change in the dress code policy on nose piercings.
A student committee of five La Salle students has worked with the La Salle administration to make a new change to the dress code that now permits a single, small stud nose piercing.
The student committee consisted of seniors Kiriahna Edeline, Dani Rinz, and Madison York, junior Rainy Longoria, and sophomore Stella Mack. They worked with Mr. Devine over a span of two meetings last month, and the approved change was announced by Mr. Devine on Friday, Feb. 8 on Schoology.
The formation of this committee came as a result of Mr. Devine inviting the girls via Schoology message, on Tues. Jan 8, to develop a proposal in a student-led process that would then be shared with the school administration. Conversations between some of the girls and Mr. Devine about their nose piercings, as well as dress code interactions, had previously taken place.
In Mr. Devine's invitation, he "didn't offer that group of students any guarantees, but I did say… if we collectively work together to create a proposal that I could share with Mr. Kuffner, he'd be open to considering that," he said.
Mr. Devine's Schoology update announcing the new dress code change.
Within the two meetings, the girls discussed why they got nose piercings and what changes they wanted to the handbook. Mr. Devine also instructed the student committee to research "some of the practices of other academic institutions and… some of the dress code criteria for some of the professional settings that are here in Portland," he said.
In OHSU's Professional Appearance Policy, it states that "one facial surface piercing with stud jewelry" is permitted. "That was a big thing because you think of doctors and surgeons [being] allowed to have piercings, so why can't we have them in schools now?," York said.
Because of this focus, "there was a general agreement for a number of years that facial piercings weren't reflective of a more academic purpose, or more professional purpose," he said.
Coming back to school, Longoria knew about the past nose piercing policy, but "I did it anyways because I thought that La Salle would be understanding about my culture and my background," she said.
When students would be caught at school with a nose piercing, Mr. Devine would "ask them to remove the nose piercing," he said. "But some information that was new to me this year was that nose piercings take a lot longer to heal than I ever anticipated." In fact, they usually take around 3-6 months to heal.
Two years ago, the administration worked with the student senate to hear student perspectives on the dress code. What emerged from that was the ability to wear athletic pants on Falcon Fridays, and female students could wear leggings with a tunic-length top during the week.
Mr. Devine highlighted the importance of students sharing their opinions and ideas.
"I really try to invite student voice, hear student voice, and allow that to be in consideration when we think about policies and procedures," Mr. Devine said. "This was a pretty rare circumstance and… it sort of laid the groundwork for the possibility of doing something like this again.
Reflecting on the outcome, Mr. Kuffner praised the determination of the group of students who participated in this process.
This is a great article!
Love the progressive changes to the dress code and how students were involved!
What's your favorite kind of cuisine?


The fear of going to prison for Tax Fraud serves as a major deterrent for corrupt politicians.
1) Politicians publish their tax returns.
Politicians standing for government must publish their tax returns for the previous 5 years.
They must reveal how wealthy they intend to be at the end of thir term of office.
Since we, the people, give politicians the right to tax us, it's only fair that the people who tax us should publish their tax returns.
An intended, or actual, increase of personal wealth at the end of a term of office is likely to reduce the chance of election, or re-election.


"Va Va Vo Ringtones" from Mohanlal Ringtones by www.movieringtoness.com. Released: 2018. Track 2. Genre: Malayalam.
"Va Va Vo Ringtone" from Mohanlal Ringtones by www.movieringtoness.com. Released: 2018. Track 2. Genre: Malayalam.
"Va Va Vo Huming-Ringtone" from Mohanlal Ringtones by www.movieringtoness.com. Released: 2018. Track 2. Genre: Malayalam.
"Va Va Vo Huming Ringtone-2" from Mohanlal Ringtones by www.movieringtoness.com. Released: 2018. Track 2. Genre: Malayalam.
"Va Va Vo Flute-Ringtone" from Mohanlal Ringtones by www.movieringtoness.com. Released: 2018. Track 2. Genre: Malayalam.
"Thoovenilla Ringtones-2" from Mohanlal Ringtones by www.movieringtoness.com. Released: 2018. Track 1. Genre: Malayalam.
"Thoovenilla Instrumental Music-Ringtones" from Mohanlal Ringtones by www.movieringtoness.com. Released: 2018. Track 1. Genre: Malayalam.
"Ra Vi Ro Ringtone" from Mohanlal Ringtones by www.movieringtoness.com. Released: 2018. Track 2. Genre: Malayalam.
"Mohanlal Va Va Vo Ringtone" from Mohanlal Ringtones by www.movieringtoness.com. Released: 2018. Track 2. Genre: Malayalam.
"Mohanlal Thoovenilla Insrumental Ringtone" from Mohanlal Ringtones by www.movieringtoness.com. Released: 2018. Track 1. Genre: Malayalam.
"Lalettaa (Title Track) Starting Ringtone" from Mohanlal Ringtones by www.movieringtoness.com. Released: 2018. Track 1. Genre: Malayalam.
"Lalettaa (Title Track) Ringtone" from Mohanlal Ringtones by www.movieringtoness.com. Released: 2018. Track 1. Genre: Malayalam.
"Anuragam Adiroham Thoovenilla Ringtone" from Mohanlal Ringtones by www.movieringtoness.com. Released: 2018. Track 1. Genre: Malayalam.
Mohanlal Malayalam Ringtones is a 2018 Indian Malayalam-language family comedy film directed by Sajid Yahiya and written by Suneesh Varanad from a story by Yahiya. Manju Warrier plays Meenukutty, an ardent, crazy Mohanlal fan, and Indrajith Sukumaran as her husband Sethumadhavan. Principal photography took place between May and December 2017 at locations in Ernakulam, and Palakkad and Thrissur districts. Mohanlal was released in Kerala on 14 April 2018 to highly positive reviews from audience and critics.The film deals with Celebrity Worship Syndrome in a humourous way.
The film was initially reported by media outlets in August 2016 as the second directorial of Sajid Yahiya reportedly entitled Mohanlal, which tells the story of an ardent female fan of actor Mohanlal. Later in that month, Yahiya confirmed the project without divulging much details as it was on its early pre-production phase, and was also reported that the makers are trying to register the film's title as Mohanlal and Manju Warrier and Indrajith Sukumaran were cast in the leading roles.
In May 2017, Indrajith revealed that the film is a humorous "family entertainer" in which he plays a working man in a middle-class family with Warrier playing his wife and how they cope with the issues arising due to his wife's extreme adoration for Mohanlal forms the plot. On Mohanlal's birthday on 21 May, posters were released confirming the title and revealing the character name of Warrier as Meenukutty and Indrajith as Sethumadhavan, both the character names in Mohanlal's early films.


If there's one lesson we learned while at Austin Psych Fest, it's that you should bring a bandana with you. For the whole festival, not just during the daytime when you can see incredible amounts of dust in the air, but at night as well. The weather was great and very summer-like. Hot during the day, and chilly at night. What we might want to consider next year: camping to get the whole Pysch Fest experience.
This year's lineup included some impressive acts that we'll be highlighting in this first part. Including Black Lips, La Femme, Black Angels, Peaking Lights, and Pure X.
The sun had long set on Day One of Austin Psych Fest and many festival goers could be seen with swarming like fireflies in the dark down to the Elevation Amphitheatre stage down on the river at Carson Creek Ranch. Husband and wife duo, Aaron Coyes and Indra Dunis, formally known as Peaking Lights, were taking the tiny stage set on the edge of the river running through the festival grounds. The elements were quite perfect for the duo's fleeting electronic beats, tape loops, and vocal harmonies layered into waves of haunting four track noisy bliss.
Their set was especially mesmerizing given the venue's steep drop off layered with levels of dirt seating area for that overlooks the running river. An alluring video was projected over the river and onto the wooded area backdrop standing tall in the background. Dancing to favorites such as "All the Sun That Shines" in the dark while a blend of warm and cool colors blanketed onlooking trees was both a visually and emotionally arresting experience. The duo mixed in cuts from both 936 (2011) and Lucifer (2012), creating the perfect psychedelic pop soundtrack for a chilly, stoned evening down a haunting river bank while mysterious haunts masqueraded in the forest across the river.
La Femme was interesting band. From their fashion to their adorable broken english. Their favorite phrase had to be, "F#%@ yeah!" because they said it at least once or twice in between sets of songs. The band to the stage at the Levitation Tent promptly at 10:15pm. This guitarist pictured above was my favorite. He looked so crazy, yet so calm. This French psychedelic rock band was very upbeat and let's please not forget their band member who went crowd surfing with a keyboard. Literally, surfing. SERFBORT. Had to. For not being too familiar with this band, it was definitely a good time.
A Pure X set in the mid-to-late Saturday afternoon at Austin Psych Fest may have been the best way to cool off from the peaking temperatures hitting folks at the festival grounds. The sun had long been baking everyone, but while huddled in close to the shade near the stage for the beginning of their set, a breeze as cool as their jams swooped in as soon as their set began. The Austin natives did not disappoint, creating breezy psychedelic dream pop from languid, distorted guitar rhythms that they have come to be recognized for.
The band played a mixture of tracks from their recent albums, most notably the 70's chillout pop influenced songs from their recent album, Angel. A standout from Angel, "Valley of Tears", set the groove for a dip into a pool of hazy late-afternoon bliss. Pure X provided the perfect cool off from an afternoon in the melting sun.
You can find out Austin Psych Fest Pt. II Coverage by clicking here.


text:
Q: Removing class from variable on .click I have searched for this and in all honesty i think the answer is probably there for me but I'm a bit too noob to work it out.
If you could help that would be awesome.
Basically I have got a set of buttons which dynamically add a class to a text field from a CMS and show/hide on request.
Code works but I wondered if anyone could give me a hand tidying it up semantically as there is loads of repetition. The main thing i wanted to work out was applying the .addClass and .removeClass or even .toggleClass? to the variables instead of repeating the function, but I would need to remove an object from the var array each time as far as I can tell.
Anyway, any help is greatly appreciated.
<button class='settings' title="Settings">SPARROWS SETTINGS</button>
<button class="staff" title="Staff">STAFF</button>
<button class="buildings" title="Staff">BUILDINGS</button>
<button class='services' title="Settings">SERVICES</button>
<button class="partners" title="Staff">PARTNERS</button>
<button class="network" title="Staff">NETWORK</button>

<?php perch_content('childcare_text'); ?>

<?php perch_content('childcare_text'); ?>

<?php perch_content('staff_text'); ?>

<?php perch_content('buildings_text'); ?>

<?php perch_content('services_text'); ?>

<?php perch_content('partners_text'); ?>

<?php perch_content('network_text'); ?>

$(document).ready(function(){

text=$('.staff_text, .buildings_text, .settings_text, services_text, partners_text, network_text');
button=$('.staff, .building, .settings, .services, .partners, .network');

$('.settings').click(function(){
    $('.settings_text').addClass("toggle");
    $('.staff_text, .buildings_text, .services_text, .partners_text, .network_text').removeClass("toggle");
});
$('.staff').click(function(){
    $('.staff_text').addClass("toggle");
    $('.buildings_text, .settings_text, .services_text, .partners_text, .network_text').removeClass("toggle");
});
$('.buildings').click(function(){
    $('.buildings_text').addClass("toggle");
    $('.staff_text, .settings_text, .services_text, .partners_text, .network_text').removeClass("toggle");
});
$('.services').click(function(){
    $('.services_text').addClass("toggle");
    $('.staff_text, .buildings_text, .settings_text, .partners_text, .network_text').removeClass("toggle");
});
$('.partners').click(function(){
    $('.partners_text').addClass("toggle");
    $('.staff_text, .buildings_text, .settings_text, .services_text, .network_text').removeClass("toggle");
});
$('.network').click(function(){
    $('.network_text').addClass("toggle");
    $('.staff_text, .buildings_text, .settings_text, .services_text, .partners_text').removeClass("toggle");
});
button.click(function(){
    $('.settings_init').addClass('test');
});

});

A: You can do something like this:
<button onclick="setClass('settings_text')" class='settings' title="Settings">SPARROWS SETTINGS</button>
<button onclick="setClass('staff_text')" class="staff" title="Staff">STAFF</button>
<button onclick="setClass('buildings_text')" class="buildings" title="Staff">BUILDINGS</button>
<button onclick="setClass('services_text')" class='services' title="Settings">SERVICES</button>
<button onclick="setClass('partners_text')" class="partners" title="Staff">PARTNERS</button>
<button onclick="setClass('network_text')" class="network" title="Staff">NETWORK</button>

<?php perch_content('childcare_text'); ?>

<?php perch_content('childcare_text'); ?>

<?php perch_content('staff_text'); ?>

<?php perch_content('buildings_text'); ?>

<?php perch_content('services_text'); ?>

<?php perch_content('partners_text'); ?>

<?php perch_content('network_text'); ?>

A: Or this:
HTML:
<button class="settings" name="button" title="Settings">SPARROWS SETTINGS</button>
<button class="staff" name="button" title="Staff">STAFF</button>
<button class="buildings" name="button" title="Staff">BUILDINGS</button>
<button class="services" name="button" title="Settings">SERVICES</button>
<button class="partners" name="button" title="Staff">PARTNERS</button>
<button class="network" name="button" title="Staff">NETWORK</button>

1

2

3

4

5

6

7

Javascript:
$(document).ready(function () {
    $('[name=button]').click(function () {
        $('.settings_init').addClass('test');
        $('.divs').removeClass('toggle');
        $('.' + $(this).attr('class') + '_text').addClass('toggle');
    });
});

A: You could use these elements list (button and text) :
button.click(function () {
    var cls = this.className; // "staff" or "building" or "settings" or ...
    text.each(function () {
        var $this = $(this);
        $this.toggleClass(
            'toggle', $this.hasClass('.' + cls + '_text')
        );
    });
});

// I assume you want to do the following only one time

button.one('click', function () {
    $('.settings_init').addClass('test');
});

This method should work as long as there is no more than one class per button.

A: I would suggest using data-attributes for this:
<button class='settings' title="Settings" data-target='settings_text'>SPARROWS SETTINGS</button>
<button class="staff" title="Staff" data-target='buildings_text'>STAFF</button>
<button class="buildings" title="Buildings" data-target='buildings_text'>BUILDINGS</button>

<?php perch_content('childcare_text'); ?>

<?php perch_content('childcare_text'); ?>

<?php perch_content('staff_text'); ?>

<?php perch_content('buildings_text'); ?>

Javascript:
$(document).ready(function(){
    var buttons=$('button');
    var targets = $('div[data-role=target]')

    buttons.click(function() {
        var self = $(this),
            targetClass = self.attr('data-target'),
            $target = $('.' + targetClass);

        targets.removeClass("toggle");
        $target.addClass("toggle");
    });
});


text:
Winds of Winter SHOCK: Does THIS prove Sansa Stark will take the Iron Throne in the end?
WINDS OF WINTER and A Dream of Spring could see Sansa Stark on the Iron Throne instead of Jon Snow and Daenerys Targaryen, according to this amazing new Game of Thrones fan theory. Warning spoilers ahead.
By George Simpson
PUBLISHED: 14:17, Fri, Sep 22, 2017 | UPDATED: 14:28, Fri, Sep 22, 2017
How will A Song of Ice and Fire end? Who will win the Game of Thrones and take the Iron Throne?
This is a question that has plagued fans minds for years. One of the most obvious happily-ever-after choices would be Jon Snow and/or Daenerys Targaryen, due to their legitimate claim on the throne.
However a new theory argues that that would be far too obvious for author George RR Martin, who regularly kills of series' favourites.
According to Digital Spy, it will in fact be Sansa Stark, as the shock new Queen at the end A Song of Ice and Fire.
Winds of Winter SHOCK: Will Sansa Stark be REVEALED as a Baratheon?
Winds of Winter: Is THIS a new update on book's release date?
HBO/GETTY
Winds of Winter SHOCK: Does THIS prove Sansa Stark will take the Iron Throne?
Sophie Turner in pictures as Sansa Stark
Sophie Turner in pictures as Sansa Stark: Game of Thrones star's hottest photos/
The convincing theory points out how both Jon and Dany regularly make bad decisions, but even more intriguing is the theory that one of them is Azor Ahai – 'the prince who was promised.'
If this is the case then at least one of them will die, if not both. But with them out of the way, who will rule the Seven Kingdoms?
Well the theory points out how Martin based A Song of Ice and Fire on the Wars of the Roses and its aftermath.
The theory then shows how similar Robert Baratheon is to Henry VIII, who was followed by his son – the boy king – Edward VI (Joffrey and Tommen), before being replaced by Bloody Mary (Cersei).
And who followed? None other than a young redhead, Elizabeth I, who went on to rule her golden age.
Who will take the Iron Throne by the end of A Dream of Spring?
With this in mind, is it possible then that Sansa will take the throne with Tyrion?
After all the two are legally married and are uninterested in taking the throne for themselves.
It's an intriguing theory that would prove a shocking ending to A Song of Ice and Fire, but is it too farfetched?
After all, there are theories that Sansa will die and that she is in fact Robert Baratheon's bastard.
Winds of Winter: PROOF Sansa will DIE in Game of Thrones book 6?
Winds of Winter horror: The DIREWOLVES reveal which Stark children DIE
Winds of Winter SHOCK: Proof Jon Snow will be revealed as Azor Ahai?
Most read in Books
Meghan Markle diary: When is Meghan Markle appearing with baby Archie next?
Love Island 2019: Fans slam Molly-Mae Hague for 'playing games' to split up other couples
Rachel Riley reveals husband Pasha's clever move as she talks 'pregnant married life'
Lucifer season 5 spoilers: Lucifer to battle familiar foe in final season's first episode?
Eclipse 2019 Saudi Arabia LIVE STREAM: Watch Half-Blood Thunder Moon online - How to watch
Winds of Winter release date ODDS: Game of Thrones novel most likely to arrive when?
Game of Thrones: Drogon was NEVER meant for Daenerys – His fate was sealed in FIVE words
Winds of Winter: Daenerys Targaryen is key in original synopsis for Game of Thrones book
Game of Thrones: George RR Martin 'wrestled' with THIS book dilemma - 'It'd be a DISASTER'
Game of Thrones backlash: Where did the Dothraki go? This explains everything
Game of Thrones: The Dothraki are the key to everything that went wrong - Three reasons
Game of Thrones: Is this the REAL reason the final season failed to impress?
Game of Thrones ending: DROGON is the key to everything and THIS proves it
Game of Thrones Season 8 ending: Bran is completely DOOMED from the start
Game of Thrones: George RR Martin on the 'DEADLY' meaning to A Song of Ice and Fire books
Game of Thrones Cersei and Jaime HAD to die like that for ONE shocking reason only
Game of Thrones backlash: George RR Martin has THIS to say to 'TOXIC' fans
George RR Martin Game of Thrones confession: 'I wrote books that could NEVER be filmed'
Game of Thrones: THIS is why Drogon took Daenerys – It's NOT to eat or bring back to life
Game of Thrones: George RR Martin's surprising Daenerys and Jon Snow confession
Game of Thrones: HORRIFYING truth behind THAT breastfeeding scene revealed in the books
Game of Thrones: The ONE thing George RR Martin would CHANGE in the books
Game of Thrones: MAJOR message for George RR Martin ahead of Winds of Winter book release
Game of Thrones: Jon Snow fate SEALED from Book One and COPIED from Lord of The Rings
Game of Thrones TRICKED fans: Sansa's fate was sealed in THIS shocking Book One moment
Dead at First Sight: Detective Superintendent Roy falls from Grace
Game of Thrones: George RR Martin 'throws a lot away' - Winds of Winter delay explained?


I picked up a dozen cupcakes from Trophy for my Hunger Games Pre-Party last night, and was thrilled to go "behind-the-scenes" to learn how to decorate the cupcakes with the founder, Jennifer. Check it out!
Trophy will have the Hunger Games-themed cupcakes all weekend long, so grab some for yourself! (And seriously, they are absolutely delicious.) Find a location near you at trophycupcakes.com.
I have the shirt you're wearing!
Awesome! I love that shirt so much. Cakespy ftw!


Difference between revisions of "Drawing Machine"
Stroke recording apparatus. Two pulleys. Weights. Rotary encoders.
do a john henry with the disembodied hand.
Imprecision as painterly aesthetic. Aikon by Frédéric Fol Leymarie and Patrick Tresset.
no such thing as perfect repetition. no matter what, there is noise in the system.
This page was last modified on 23 May 2014, at 08:29.


Hawthorn is incredibly proud to work alongside some of the UK's most impressive venues. From purpose-built exhibition centres to landmark buildings steeped in heritage, we pride ourselves on being a trusted extension of a venue's team. It's our job to know the spaces inside out, working sensitively within each building to deliver amazing events for every client. Our relationships range from supplying the venue infrastructure and managing the technical delivery of events in-house, to being on a preferred suppliers list.
Hawthorn's experienced team of technical production experts have worked in the majority of the UK's top venues, so wherever you choose to hold your event, you'll be in safe hands with us.