text:
namespace IPC {

class Channel::ChannelImpl : public MessageLoopForIO::Watcher {
 public:
  // Mirror methods of Channel, see ipc_channel.h for description.
  ChannelImpl(const IPC::ChannelHandle& channel_handle, Mode mode,
              Listener* listener);
  virtual ~ChannelImpl();
  bool Connect();
  void Close();
  void set_listener(Listener* listener) { listener_ = listener; }
  bool Send(Message* message);
  int GetClientFileDescriptor();
  int TakeClientFileDescriptor();
  void CloseClientFileDescriptor();
  bool AcceptsConnections() const;
  bool HasAcceptedConnection() const;
  bool GetClientEuid(uid_t* client_euid) const;
  void ResetToAcceptingConnectionState();
  static bool IsNamedServerInitialized(const std::string& channel_id);
#if defined(OS_LINUX)
  static void SetGlobalPid(int pid);
#endif  // OS_LINUX

 private:
  bool CreatePipe(const IPC::ChannelHandle& channel_handle);

  bool ProcessIncomingMessages();
  bool ProcessOutgoingMessages();

  bool AcceptConnection();
  void ClosePipeOnError();
  int GetHelloMessageProcId();
  void QueueHelloMessage();
  bool IsHelloMessage(const Message* m) const;

  // MessageLoopForIO::Watcher implementation.
  virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE;
  virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE;

  Mode mode_;

  // After accepting one client connection on our server socket we want to
  // stop listening.
  MessageLoopForIO::FileDescriptorWatcher server_listen_connection_watcher_;
  MessageLoopForIO::FileDescriptorWatcher read_watcher_;
  MessageLoopForIO::FileDescriptorWatcher write_watcher_;

  // Indicates whether we're currently blocked waiting for a write to complete.
  bool is_blocked_on_write_;
  bool waiting_connect_;

  // If sending a message blocks then we use this variable
  // to keep track of where we are.
  size_t message_send_bytes_written_;

  // File descriptor we're listening on for new connections if we listen
  // for connections.
  int server_listen_pipe_;

  // The pipe used for communication.
  int pipe_;

  // For a server, the client end of our socketpair() -- the other end of our
  // pipe_ that is passed to the client.
  int client_pipe_;
  base::Lock client_pipe_lock_;  // Lock that protects |client_pipe_|.

#if defined(IPC_USES_READWRITE)
  // Linux/BSD use a dedicated socketpair() for passing file descriptors.
  int fd_pipe_;
  int remote_fd_pipe_;
#endif

  // The "name" of our pipe.  On Windows this is the global identifier for
  // the pipe.  On POSIX it's used as a key in a local map of file descriptors.
  std::string pipe_name_;

  Listener* listener_;

  // Messages to be sent are queued here.
  std::queue<Message*> output_queue_;

  // We read from the pipe into this buffer
  char input_buf_[Channel::kReadBufferSize];

  // We assume a worst case: kReadBufferSize bytes of messages, where each
  // message has no payload and a full complement of descriptors.
  static const size_t kMaxReadFDs =
      (Channel::kReadBufferSize / sizeof(IPC::Message::Header)) *
      FileDescriptorSet::kMaxDescriptorsPerMessage;

  // This is a control message buffer large enough to hold kMaxReadFDs
#if defined(OS_MACOSX)
  // TODO(agl): OSX appears to have non-constant CMSG macros!
  char input_cmsg_buf_[1024];
#else
  char input_cmsg_buf_[CMSG_SPACE(sizeof(int) * kMaxReadFDs)];
#endif

  // Large messages that span multiple pipe buffers, get built-up using
  // this buffer.
  std::string input_overflow_buf_;
  std::vector<int> input_overflow_fds_;

  // True if we are responsible for unlinking the unix domain socket file.
  bool must_unlink_;

#if defined(OS_LINUX)
  // If non-zero, overrides the process ID sent in the hello message.
  static int global_pid_;
#endif  // OS_LINUX

  DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelImpl);
};

// The maximum length of the name of a pipe for MODE_NAMED_SERVER or
// MODE_NAMED_CLIENT if you want to pass in your own socket.
// The standard size on linux is 108, mac is 104. To maintain consistency
// across platforms we standardize on the smaller value.
static const size_t kMaxPipeNameLength = 104;

}  // namespace IPC

#endif  // IPC_IPC_CHANNEL_POSIX_H_


text:
from seleniumbase import BaseCase

class MyTestClass(BaseCase):

    def test_non_terminating_checks(self):
        self.open('http://xkcd.com/993/')
        self.wait_for_element('#comic')
        self.check_assert_element('img[alt="Brand Identity"]')
        self.check_assert_element('img[alt="Rocket Ship"]')  # Will Fail
        self.check_assert_element('#comicmap')
        self.check_assert_text('Fake Item', '#middleContainer')  # Will Fail
        self.check_assert_text('Random', '#middleContainer')
        self.check_assert_element('a[name="Super Fake !!!"]')  # Will Fail
        self.process_checks()

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
    <string name="app_name">Nhiệm vụ Lịch</string>
    <string name="widget_name">Nhiệm vụ Lịch</string>
    <string name="widget_instance_name">Tên lối tắt ví dụ</string>
    <string name="yesterday">Ngày hôm qua</string>
    <string name="today">Hôm nay</string>
    <string name="tomorrow">Ngày mai</string>
    <string name="no_upcoming_events">Không có sự kiện sắp tới</string>
    <string name="open_prefs_desc">Mở cài đặt widget lịch</string>
    <string name="add_event_desc">Thêm sự kiện lịch mới</string>
    <string name="indicator_alarm">Báo hiệu nếu một báo động đã được thiết lập</string>
    <string name="indicator_recurring">Báo hiệu nếu các sự kiện là định kỳ</string>
    <string name="no_title">(Không tiêu đề)</string>
    <string name="grant_permissions">Cấp quyền truy cập</string>
    <string name="grant_permissions_verbose">Widget cần cho phép đọc lịch. \nBấm vào đây để cấp quyền.</string>
    <string name="permissions_justification">Xin chào mừng đến Todo Agenda, dễ dàng truy cập lịch. \n\n Để dùng tối đa widget này, cần ccấp quyền đọc lịch.</string>
    <string name="no_widgets_found">Đàu tiên, xin thêm một widget \"Todo Agenda\" từ màn hình chủ của máy.</string>
    <string name="select_a_widget_to_configure">Chọn một Widget để cấu hình nó</string>
    <string name="close">Đóng lại</string>
    <string name="go_to_home_screen">Quay lại màn hình chủ</string>
    <!-- Descriptions for app markets -->
    <string name="app_description_80_chars_max">Widget hiển thị danh sách các sự kiện sắp tới (và quá sứ) từ lịch đã chọn</string>
    <string name="app_description_4000_chars_max_part01">Todo Agenda là widget cho màn hình chủ cho máy Android. Widget hiển thị danh sách các sự kiện sắp tới
để dễ nìn bảo quản các đợt hẹn.</string>
    <string name="app_description_4000_chars_max_part02">Tính năng</string>
    <string name="app_description_4000_chars_max_part03">Hiển tất cả các sự kiện từ các lịch. Có thể hiện sự kiện quá sứ.</string>
    <string name="app_description_4000_chars_max_part04">Tự động cập nhật khi bạn thêm / xóa / sửa đổi một sự kiện. Hoặc bạn có thể cập nhật danh sách ngay lập tức.</string>
    <string name="app_description_4000_chars_max_part05">Chọn caí lịch bạn muốn xem trong widget.</string>
    <string name="app_description_4000_chars_max_part06">Tạo nhiều widget, nếu cần. Mỗi widget sẽ có cài đặt riêng, với bộ lọc và lịch được chọn.</string>
    <string name="app_description_4000_chars_max_part07">Điều chỉnh màu nền và chữ của widget.</string>
    <string name="app_description_4000_chars_max_part08">Cuộn qua danh sách các sự kiện sắp tới.</string>
    <string name="app_description_4000_chars_max_part09">Điều chỉnh cỡ chữ của widget.</string>
    <string name="app_description_4000_chars_max_part10">Widget thay đổi kích thước với hai bố trí chọn được.</string>
    <string name="app_description_4000_chars_max_part11">Báo hiệu cho các cảnh báo và các sự kiện định kỳ.</string>
    <string name="app_description_4000_chars_max_part12">Khóa múi giờ khi đi du lịch đến các múi giờ khác.</string>
    <string name="app_description_4000_chars_max_part13">Tắt Ngày tiêu đề và xem ngày trong cột \"Ngày từ hôm nay\".</string>
    <string name="app_description_4000_chars_max_part14">Hỗ trợ Android 4 đến 7. Hỗ trợ máy tính bảng Android.</string>
    <!-- Preference header: Calendars and Task Lists -->
    <string name="calendars_prefs">Lịch</string>
    <string name="calendars_prefs_desc">Chọn lịch để hiển thị</string>
    <!-- Preference header: Other -->
    <string name="appearance_prefs">Giao diện</string>
    <string name="appearance_prefs_desc">Điều chỉnh giao diện widget</string>
    <string name="appearance_text_size_title">Cỡ chữ</string>
    <string name="appearance_text_size_desc">Điều chỉnh cỡ chữ</string>
    <string name="appearance_text_size_very_small">Rất nhỏ</string>
    <string name="appearance_text_size_small">Nhỏ</string>
    <string name="appearance_text_size_medium">Vừa</string>
    <string name="appearance_text_size_large">Lớn</string>
    <string name="appearance_text_size_very_large">Rất lớn</string>
    <string name="appearance_date_format_desc">Hiển thị thời gian ở định dạng am/pm hoặc 24 giờ</string>
    <string name="appearance_date_format_title">Định dạng ngày tháng</string>
    <string name="appearance_date_format_auto">Tự động</string>
    <string name="appearance_date_format_24">17:00</string>
    <string name="appearance_date_format_12">5:00 pm</string>
    <string name="lock_time_zone_off_desc">Khu vực mở khóa, hiện tại: %s</string>
    <string name="lock_time_zone_on_desc">Bị khóa tại %s</string>
    <string name="lock_time_zone_title">Múi giờ khóa</string>
    <string name="appearance_abbreviate_dates_title">Viết tắt ngày</string>
    <string name="appearance_abbreviate_dates_desc">Sử dụng ba định dạng ngày tháng trong tiêu đề Widget và ngày vv.</string>
    <!-- Preference header: Layout -->
    <string name="pref_event_entry_layout_title">Sự kiện mục bố cục</string>
    <string name="default_multiline_layout">Thời gian bên dưới tiêu đề</string>
    <string name="single_line_layout">Tất cả trong một hàng</string>
    <string name="appearance_day_header_alignment_desc">Căn lề tiêu đề ngày</string>
    <string name="appearance_day_header_alignment_title">Căn lề tiêu đề ngày</string>
    <string name="appearance_day_header_alignment_left">Trái</string>
    <string name="appearance_day_header_alignment_center">Trung tâm</string>
    <string name="appearance_day_header_alignment_right">Phải</string>
    <string name="appearance_multiline_title_title">Nhiều tiêu đề</string>
    <string name="appearance_multiline_title_desc">Tiêu đề sự kiện tràn ra nhiều dòng</string>
    <string name="appearance_show_days_without_events_title">Không hiển thị sự kiện theo ngày</string>
    <string name="appearance_show_days_without_events_desc">Chỉ hiển thị tiêu đề ngày</string>
    <string name="appearance_show_day_headers_title">Hiển thị ngày tiêu đề</string>
    <string name="appearance_show_day_headers_desc">Hiển thị tiêu đề ngày cho tất cả</string>
    <!-- Preference header: Colors -->
    <string name="appearance_group_color_title">Màu sắc</string>
    <string name="appearance_background_color_title">Màu nền</string>
    <string name="appearance_background_color_desc">Điều chỉnh màu nền</string>
    <string name="appearance_past_events_background_color_title">Màu nền những sự kiện đã qua</string>
    <string name="appearance_past_events_background_color_desc">Thay đổi màu nền những sự kiện đã qua</string>
    <string name="appearance_header_theme_title">Đổ bóng tiêu đề widget</string>
    <string name="appearance_header_theme_desc">Đổ bóng tối hoặc sáng cho tiêu đề widget</string>
    <string name="appearance_entries_theme_title">Đổ bóng Sự kiện</string>
    <string name="appearance_entries_theme_desc">Đổ bóng tối hoặc sáng cho Sự kiện</string>
    <string name="appearance_theme_black">Trắng</string>
    <string name="appearance_theme_dark">Sáng</string>
    <string name="appearance_theme_light">Tối</string>
    <string name="appearance_theme_white">Đen</string>
    <!-- Preference header: Event details -->
    <string name="event_details_prefs">Chi tiết sự kiện</string>
    <string name="event_details_prefs_desc">Cài đặt hiển thị chi tiết cho Sự kiện</string>
    <string name="event_details_show_end_time_title">Thời gian kết thúc</string>
    <string name="event_details_show_end_time_desc">Hiển thị thời gian kết thúc sự kiện</string>
    <string name="event_details_show_location_title">Hiển thị vị trí</string>
    <string name="event_details_show_location_desc">Hiển thị hoặc ẩn vị trí sự kiện</string>
    <string name="event_details_fill_all_day_events_title">Đánh dấu sự kiện cả ngày</string>
    <string name="event_details_fill_all_day_events_desc">Hiển thị một mục nhập cho mỗi ngày trong một sự kiện cả ngày</string>
    <string name="event_details_indicators">Biểu thị</string>
    <string name="event_details_indicate_alert_desc">Biểu thị cho các thông báo</string>
    <string name="event_details_indicate_alert_title">Thông báo</string>
    <string name="event_details_indicate_recurring_desc">Biểu thị cho các sự kiện định kỳ</string>
    <string name="event_details_indicate_recurring_title">Sự kiện theo định kỳ</string>
    <!-- Preference header: Event filters -->
    <string name="event_filters_prefs">Bộ lọc sự kiện</string>
    <string name="event_filters_prefs_desc">Hiển thị sự kiện hiện tại, sắp tới và đã qua</string>
    <string name="all_events">Tất cả sự kiện</string>
    <string name="current_and_future_events">Sự kiện hôm nay và sắp tới</string>
    <string name="past_events">Những sự kiện đã qua</string>
    <string name="event_details_event_range_title">Phạm vi ngày</string>
    <string name="event_details_event_range_desc">Cài đặt số lượng các sự kiện để hiển thị</string>
    <string name="event_range_today">Hôm nay</string>
    <string name="event_range_one_day">Một ngày</string>
    <string name="event_range_one_week">Một tuần</string>
    <string name="event_range_two_weeks">Hai tuần</string>
    <string name="event_range_one_month">Một tháng</string>
    <string name="event_range_two_months">Hai tháng</string>
    <string name="event_range_three_months">Ba tháng</string>
    <string name="event_range_six_months">Sáu tháng</string>
    <string name="event_range_one_year">Một năm</string>
    <string name="show_past_events_with_default_color_title">Hiển thị tất cả các sự kiện đã xảy ra có màu mặc định</string>
    <string name="this_option_is_turned_off">(vô hiệu)</string>
    <string name="pref_events_ended_title">Hiển thị sự kiện kết thúc gần đây</string>
    <string name="ended_one_hour_ago">Kết thúc một giờ trước</string>
    <string name="ended_two_hours_ago">Kết thúc hai giờ trước</string>
    <string name="ended_four_hours_ago">Kết thúc bốn giờ trước</string>
    <string name="ended_today">Kết thúc ngày hôm nay</string>
    <string name="ended_yesterday">Đã kết thúc hôm qua</string>
    <string name="pref_hide_based_on_keywords_title">Ẩn dựa vào từ khoá trong tiêu đề</string>
    <string name="show_only_closest_instance_of_recurring_event">Hiển thị chỉ có phần gần gũi nhất của một sự kiện theo định kỳ</string>
    <!-- Preference header: Feedback -->
    <string name="feedback_prefs">Phản hồi</string>
    <string name="feedback_prefs_desc">Liên lạc với chúng tôi</string>
    <string name="feedback_github_desc">Phản hồi trên trang web của dự án</string>
    <string name="feedback_github_title">Ghé thăm widget trên Github</string>
    <string name="feedback_play_store_desc">Đánh giá và bình luận trên Google Play</string>
    <string name="feedback_play_store_title">Ghé thăm trên Google Play</string>
    <string name="refresh_desc">Làm mới</string>
    <string name="share_events_for_debugging_desc">Tạo một báo cáo để giúp khắc phục sự cố các nhà phát triển</string>
    <string name="share_events_for_debugging_title">Chia sẻ các lần bạn bị lỗi ứng dụng</string>
</resources>


text:
<!DOCTYPE html>

  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <title>13 References | Neotoma Paleoecology Manual v2.0</title>
  <meta name="description" content="The manual for the Neotoma Paleoecology Database, including SQL and R code examples." />
  <meta name="generator" content="bookdown 0.27 and GitBook 2.6.7" />

  <meta property="og:title" content="13 References | Neotoma Paleoecology Manual v2.0" />
  <meta property="og:type" content="book" />

  <meta property="og:description" content="The manual for the Neotoma Paleoecology Database, including SQL and R code examples." />

  <meta name="twitter:card" content="summary" />
  <meta name="twitter:title" content="13 References | Neotoma Paleoecology Manual v2.0" />

  <meta name="twitter:description" content="The manual for the Neotoma Paleoecology Database, including SQL and R code examples." />

<meta name="author" content="Simon Goring" />

<meta name="date" content="2022-07-22" />

  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <meta name="apple-mobile-web-app-capable" content="yes" />
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />

<link rel="prev" href="chronology-age-related-tables-1.html"/>

<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />

<link href="libs/anchor-sections-1.1.0/anchor-sections.css" rel="stylesheet" />
<link href="libs/anchor-sections-1.1.0/anchor-sections-hash.css" rel="stylesheet" />

<link href="libs/datatables-css-0.0.0/datatables-crosstalk.css" rel="stylesheet" />

<link href="libs/dt-core-1.11.3/css/jquery.dataTables.min.css" rel="stylesheet" />
<link href="libs/dt-core-1.11.3/css/jquery.dataTables.extra.css" rel="stylesheet" />

<link href="libs/crosstalk-1.2.0/css/crosstalk.min.css" rel="stylesheet" />

<link rel="stylesheet" href="style.css" type="text/css" />

1 Acknowledgements

2 Introduction

2.1 Whence Neotoma

2.2 Rationale

2.3 History of the Constituent Databases

2.3.1 Global Pollen Database

2.3.2 North American Plant Macrofossil Database

2.3.3 FAUNMAP

2.3.4 BEETLE

2.4 Who Will Use Neotoma?

3 SQL Quickly

3.1 SQL Example

3.1.1 SQL Query

3.2 Table Keys

3.3 Data Types

3.3.1 Query

4 Database Design Concepts

4.1 Sites, Collection Units, Analysis Units, Samples, and Datasets

4.2 Taxa and Variables

4.3 Taxonomy and Synonymy

4.4 Taxa and Ecological Groups

4.5 Chronology

4.6 Sediment and Depositional Environments

4.7 Date Fields

5 Neotoma Tables

5.1 Site Related Tables

5.2 Dataset & Collection Related Tables

5.3 Chronology & Age Related Tables

5.4 Sample Related Tables

5.5 Specimen Related Tables

5.6 Taxonomy Related Tables

5.7 Individual Related Tables

5.8 Publication Related Tables

5.9 Supporting Resources

5.10 Isotope Data Management

6 Contact and Individual Related Tables

6.1 collectors

6.1.1 SQL Example

6.2 contacts

6.3 contactstatuses

7 Dataset & Collection Related Tables

7.1 accumulationrates

7.2 aggregatedatasets

7.3 aggregateordertypes

7.4 collectiontypes

7.5 collectionunits

7.6 contextsdatasettypes

7.7 datasetdatabases

7.8 datasetdoi

7.9 datasetpis

7.10 datasetpublications

7.11 datasets

7.11.1 SQL Example

7.11.2 SQL Example

7.12 datasetsubmissions

7.13 datasetsubmissiontypes

7.13.1 SQL Example

7.14 datasettaxagrouptypes

7.15 datasettaxonnotes

7.16 datasettypes

7.17 datasetvariables

7.18 depenvttypes

7.18.1 SQL Example

7.18.2 SQL Example

7.18.3 SQL Example

8 Publication Related Tables

8.1 publicationauthors

8.1.1 SQL Example

8.2 publicationeditors

8.3 publications

8.4 publicationtypes

8.4.1 Legacy

8.4.2 Journal Article

8.4.3 Book Chapter

8.4.4 Authored Book

8.4.5 Edited Book

8.4.6 Master's Thesis

8.4.7 Doctoral Dissertation

8.4.8 Authored Report

8.4.9 Edited Report

8.4.10 Other Authored Publication

8.4.11 Other Edited Publication

9 Sample Related Tables

9.1 aggregatesamples

9.2 analysisunits

9.3 data

9.3.1 SQL Example

9.4 depagents

9.5 depagenttypes

9.6 faciestypes

9.7 keywords

9.8 lithology

9.9 sampleages

9.9.1 SQL Example

9.10 sampleanalysts

9.11 samplekeywords

9.11.1 SQL Example

9.12 samples

9.12.1 SQL Example

10 Site Related Tables

10.1 geopoliticalunits

10.1.1 SQL Example

10.1.2 SQL Example

10.2 lakeparameters

10.2.1 SQL Example

10.3 lakeparametertypes

10.3.1 SQL Example

10.4 sitegeopolitical

10.4.1 SQL Example

10.5 siteimages

10.6 sites

10.6.1 SQL Example

11 Taxonomy Related Tables

11.1 ecolgroups

11.1.1 SQL Example

11.1.2 SQL Example

11.2 ecolgrouptypes

11.3 ecolsettypes

11.4 synonyms

11.5 synonymtypes

11.5.1 SQL Example

11.6 taxa

11.7 taxagrouptypes

11.8 variables

11.8.1 SQL Example

11.8.2 SQL Example

11.8.3 SQL Example

11.9 variablecontexts

11.10 variableelements

11.11 variablemodifications

11.12 variableunits

11.13 repositoryinstitutions

11.14 repositoryspecimens

11.14.1 SQL Example

11.15 specimendates

12 Chronology & Age Related Tables

12.1 agetypes

12.2 aggregatechronologies

12.3 chroncontrols

12.4 chroncontroltypes

12.5 chronologies

12.5.1 SQL Example

12.5.2 SQL Example

12.6 aggregatesampleages

12.6.1 SQL Example

12.6.2 SQL Example

12.7 geochronology

12.7.1 SQL Example

12.8 geochronpublications

12.9 geochrontypes

12.10 relativeagepublications

12.11 relativeages

12.11.1 SQL Example

12.12 radiocarboncalibration

12.13 relativeagescales

12.14 relativeageunits

12.15 relativechronology

12.16 tephrachronology

12.17 tephras

13 References

            Neotoma Paleoecology Manual v2.0

13 References

American Ornithologists' Union. 1983. Check-list of North American
birds, seventh edition. American Ornithologists' Union, Washington,
D.C., USA. \[<http://www.aou.org/checklist/index.php3>\]

Angiosperm Phylogeny Group. 2003. An update of the Angiosperm Phylogeny
Group classification for the orders and families of flowering plants:
APG II. Botanical Journal of the Linnean Society 141:399-436.

Ashworth, A. C. 2001. Perspectives on Quaternary beetles and climate
change. in L. C. Gerhard, W. E. Harrison, and B. M. Hanson, editors.
Geological perspectives of global climate change. AAPG Studies in
Geology 47. American Association of Petroleum Geologists, Tulsa,
Oklahoma, USA.

Ashworth, A. C. 2004. Quaternary Coleoptera of the United States and
Canada. Pages 505-517 in A. R. Gillespie, S. C. Porter, and B. F.
Atwater, editors. The Quaternary Period in the United States.
Developments in Quaternary Science 1. Elsevier, Amsterdam, The
Netherlands.

Asselin, H., and S. Payette. 2005. Late Holocene opening of the forest
tundra landscape in northern Québec, Canada. Global Ecology and
Biogeography 14:307-313.

Barnosky, A. D., E. A. Hadly, and C. J. Bell. 2003. Mammalian response
to global warming on varied temporal scales. Journal of Mammalogy
84:354-368.

Barnosky, A. D., P. L. Koch, R. S. Feranec, S. L. Wing, and A. B.
Shabel. 2004. Assessing the causes of late Pleistocene extinctions on
the continents. Science 306:70-75.

Bartlein, P. J., K. H. Anderson, P. M. Anderson, M. E. Edwards, C. J.
Mock, R. S. Thompson, R. S. Webb, T. Webb, III, and C. Whitlock. 1998.
Paleoclimate simulations for North America over the past 21,000 years:
features of the simulated climate and comparisons with
paleoenvironmental data. Quaternary Science Reviews 17:549-585.

Bartlein, P. J., C. Whitlock, and S. L. Shafer. 1997. Future climate in
the Yellowstone National Park region and its potential impact on
vegetation. Conservation Biology 11:782-792.

Bell, C. J., and A. D. Barnosky. 2000. The microtine rodents from the
Pit locality in Porcupine Cave, Park County, Colorado. Annals of
Carnegie Museum 69:93-134.

Bell, C. J., and J. I. Mead. 1998. Late Pleistocene microtine rodents
from Snake Creek Burial Cave, White Pine County, Nevada. Great Basin
Naturalist 58:82-86.

Berglund, B. E., H. J. B. Birks, M. Ralska-Jasiewiczowa, and H. E.
Wright, editors. 1996. Palaeoecological events during the last 15 000
years: regional syntheses of palaeoecological studies of lakes and mires
in Europe, volumes. John Wiley & Sons, Chichester, England.

Birks, H. H. 2003. The importance of plant macrofossils in the
reconstruction of lateglacial vegetation and climate: examples from
Scotland, western Norway, and Minnesota, USA. Quaternary Science Reviews
22:453-473.

Bronk Ramsey, C. 1995. Radiocarbon calibration and analysis of
stratigraphy: The OxCal program. Radiocarbon 37:425-430.

Bronk Ramsey, C. 2001. Development of the radiocarbon calibration
program OxCal. Radiocarbon 43(2A):355-363.

Brown, J. H., S. K. M. Ernest, J. M. Parody, and J. P. Haskell. 2001.
Regulation of diversity: maintenance of species richness in changing
environments. Oecologia 126:321-332.

Burns, C. E., K. M. Johnson, and O. J. Schmitz. 2003. Global climate
change and mammalian species diversity in U.S. national parks.
Proceedings of the National Academy of Sciences of the United States of
America 100:11474-11477.

Camill, P., C. E. Umbanhowar, Jr., R. Teed, C. E. Geiss, J. Aldinger, L.
Dvorak, J. Kenning, J. Limmer, and K. Walkup. 2003. Late-glacial and
Holocene climatic effects on fire and vegetation dynamics at the
prairie–forest ecotone in south-central Minnesota. Journal of Ecology
91:822-836.

Cannon, M. D., and D. J. Meltzer. 2004. Early Paleoindian foraging:
examining the faunal evidence for large mammal specialization and
regional variability in prey choice. Quaternary Science Reviews
23:1955-1987.

CAPE Project Members. 2001. Holocene paleoclimate data from the Arctic:
testing models of global climate change. Quaternary Science Reviews
20:1275-1287.

Chapman, A. D. 1991. Australian plant name index, 4 volumes. Australian
flora and fauna series 12. Australian Government Publishing Service,
Canberra.

Chiu, T.-C., R. G. Fairbanks, L. Cao, and R. A. Mortlock. 2007. Analysis
of the atmospheric 14C record spanning the past 50,000 years derived
from high-precision 230Th/234U/238U, 231Pa/235U and 14C
dates on fossil corals. Quaternary Science Reviews 26:18-36.

COHMAP Members. 1988. Climatic changes of the last 18,000 years:
observations and model simulations. Science 241:1043-1052.

Cole, K. L., M. B. Davis, F. Stearns, K. Walker, and G. Guntenspergen.
1. Historical landcover changes in the Great Lakes region. Pages
43-50 in T. D. Sisk, editor. Perspectives on the land use history of
North America: a context for understanding our changing environment.
Biological Science Report USGS/BRD/BSR 1998-0003. United States
Geological Survey, Biological Resources Division.

Committee on Ungulate Management in Yellowstone National Park, N. R. C.
1. Ecological dynamics on Yellowstone's northern range. National
Academy Press, Washington, D.C., USA.

Comps, B., D. Gömöry, J. Letouzey, B. Thiébaut, and R. J. Petit. 2001.
Diverging trends between heterozygosity and allelic richness during
postglacial colonization in the European beech. Genetics 157:389-397.

Czaplewski, N. J., J. I. Mead, C. J. Bell, W. D. Peachey, and T.-L. Ku.
1. Papago Springs Cave revisited, part II: vertebrate paleofauna.
Occasional Papers of the Oklahoma Museum of Natural History 5:1-41.

Czaplewski, N. J., W. L. Puckette, and C. Russell. 2002. A Pleistocene
tapir and associated mammals from the southwestern Ozark highland.
Journal of Cave and Karst Studies 64:97-107.

Czerepanov, S. K. 1995. Vascular plants of Russia and adjacent states
(the former USSR). Cambridge University Press, Cambridge, England.

Davis, M. B., C. Douglas, R. Calcote, K. Cole, M. Winkler, and R.
Flakne. 2000. Holocene climate in the western Great Lakes National Parks
and Lakeshores: implications for future climate change. Conservation
Biology 14:968-983.

Eschmeyer, W. N., editor. 1998. Catalog of fishes, 3 volumes. California
Academy of Sciences, San Francisco, California, USA.
\[<http://research.calacademy.org/research/ichthyology/catalog/>\]

Fairbanks, R. G., R. A. Mortlock, T.-C. Chiu, L. Cao, A. Kaplan, T. P.
Guilderson, T. W. Fairbanks, A. L. Bloom, P. M. Grootes, and M.-J.
Nadeau. 2005. Radiocarbon calibration curve spanning 0 to 50,000 years
BP based on paired 230Th/234U/238U and 14C dates on pristine
corals. Quaternary Science Reviews 24:1781-1796.

Farrera, I., S. P. Harrison, I. C. Prentice, G. Ramstein, J. Guiot, P.
J. Bartlein, R. Bonnefille, M. Bush, W. Cramer, U. von Grafenstein, K.
Holmgren, H. Hooghiemstra, G. Hope, D. Jolly, S.-E. Lauritzen, Y. Ono,
S. Pinot, M. Stute, and G. Yu. 1999. Tropical climates at the Last
Glacial Maximum: a new synthesis of terrestrial palaeoclimate data. I.
Vegetation, lake-levels and geochemistry. Climate Dynamics 15:823-856.

FAUNMAP Working Group. 1994. FAUNMAP: a database documenting late
Quaternary distributions of mammal species in the United States.
Illinois State Museum Scientific Papers 35(1-2):1-690.

FAUNMAP Working Group. 1996. Spatial response of mammals to late
Quaternary environmental fluctuations. Science 272:1601-1606.

Fedorov, V. B. 1999. Contrasting mitochondrial DNA diversity estimates
in two sympatric genera of Arctic lemmings (Discrostonyx: Lemmus)
indicate different responses to Quaternary environmental fluctuations.
Proceedings of the Royal Society of London B 266:621-626.

Flora of North America Editorial Committee. 1993+. Flora of North
America north of Mexico, 14+ volumes. Oxford University Press, New York,
New York, USA. \[<http://hua.huh.harvard.edu/FNA/>\]

Futyma, R. P., and N. G. Miller. 2001. Postglacial history of a marl
fen: vegetational stability at Byron-Bergen Swamp, New York. Canadian
Journal of Botany 79:1425-1438.

Gavin, D. G., J. S. McLachlan, L. B. Brubaker, and K. A. Young. 2001.
Postglacial history of subalpine forests, Olympic Peninsula, Washington,
USA. The Holocene 11:177-188.

Good, J. M., and J. Sullivan. 2001. Phylogeography of the red-tailed
chipmunk (Tamias ruficaudus), a northern Rocky Mountain endemic.
Molecular Ecology 2001:2683-2695.

Graham, R. W. 2001. Late Quaternary biogeography and extinction of
Proboscideans in North America. Pages 707-709 in G. Cavarretta, P.
Giola, M. Mussi, and M. R. Palombo, editors. The World of Elephants:
Proceedings of the 1st International Congress, Rome, Italy, 16-20
October 2001. Consiglio Nazionale delle Ricerche, Rome, Italy.

Graham, R. W., and M. A. Graham. 1994. The late Quaternary distribution
of Martes in North America. Pages 26-58 in S. W. Buskirk, A. S.
Harestoel, M. G. Raphael, and R. A. Powell, editors. The biology and
conservation of martens, sables, and fishers. Cornell University Press,
Ithaca, New York, USA.

Grayson, D. K. 2001. The archaeological record of human impacts on
animal populations. Journal of World Prehistory 15:1-68.

Grayson, D. K. in press. Early Americans and Pleistocene mammals in
North America. in Handbook of North American Indians. Volume 3.
Environment, origins, and population. Smithsonian Institution Press,
Washington, D.C., USA.

Grayson, D. K., and D. J. Meltzer. 2002. Clovis hunting and large mammal
extinction: a critical review of the evidence. Journal of World
Prehistory 16:313-359.

Guiot, J., J. J. Boreux, P. Braconnot, F. Torre, and PMIP participants.
1. Data-model comparison using fuzzy logic in paleoclimatology.
Climate Dynamics 15:569-581.

Hallett, D. J., L. V. Hills, and J. J. Clague. 1997. New accelerator
mass spectrometry radiocarbon ages for the Mazama tephra layer from
Kootenay National Park, British Columbia, Canada. Canadian Journal of
Earth Sciences 34:1202-1209.

Haskell, J. 2001. The latitudinal gradient of diversity through the
Holocene as recorded by fossil pollen in Europe. Evolutionary Ecology
Research 3:345-360.

Hewitt, G. M. 2000. The genetic legacy of the Quaternary ice ages.
Nature 405:907-913.

Hewitt, G. M. 2004. Genetic consequences of climatic oscillations in the
Quaternary. Philosophical Transactions of the Royal Society of London B
359:183-195.

International Commission on Zoological Nomenclature. 1999. International
Code of Zoological Nomenclature, fourth edition. International Trust for
Zoological Nomenclature, London, United Kingdom.
\[<http://www.iczn.org/iczn/index.jsp>\]

Iversen, J., and J. Troels-Smith. 1950. Pollenmorfologiske definitioner
og typer. Danmarks Geologiske Undersøgelse Series 4 3(8):1-54.

Jackson, S. T., and R. K. Booth. 2002. The role of late Holocene climate
variability in the expansion of yellow birch in the western Great Lakes
region. Diversity and Distributions 8:275-284.

Jackson, S. T., J. T. Overpeck, T. Webb, III, S. E. Keattch, and K. H.
Anderson. 1997. Mapped plant-macrofossil and pollen records of late
Quaternary vegetation change in eastern North America. Quaternary
Science Reviews 16:1-70.

Jackson, S. T., R. S. Webb, K. H. Anderson, J. T. Overpeck, T. Webb,
III, J. W. Williams, and B. C. S. Hansen. 2000. Vegetation and
environment in eastern North America during the last glacial maximum.
Quaternary Science Reviews 19:489-508.

Jackson, S. T., and C. Weng. 1999. Late Quaternary extinction of a tree
species in eastern North America. Proceedings of the National Academy of
Sciences of the United States of America 96:13847-13852.

Jackson, S. T., and J. W. Williams. 2004. Modern analogs in Quaternary
paleoecology: here today, gone yesterday, gone tomorrow? Annual Review
of Earth and Planetary Sciences 32:495-537.

Kageyama, M., O. Peyron, S. Pinot, P. Tarasov, J. Guiot, S. Joussaume,
and G. Ramstein. 2001. The Last Glacial Maximum climate over Europe and
western Siberia: a PMIP comparison between models and data. Climate
Dynamics 17:23-43.

Kaplan, J. O., N. H. Bigelow, I. C. Prentice, S. P. Harrison, P. J.
Bartlein, T. R. Christensen, W. Cramer, N. V. Matveyeva, A. D. McGuire,
D. F. Murray, V. Y. Razzhivin, B. Smith, D. A. Walker, P. M. Anderson,
A. A. Andreev, L. B. Brubaker, M. E. Edwards, and A. V. Lozhkin. 2003.
Climate change and Arctic ecosystems: 2. Modeling, paleodata-model
comparisons, and future projections. Journal of Geophysical Research
108(D19):8171. DOI:10.1029/2002JD002559.

Kohfeld, K. E., and S. P. Harrison. 2000. How well can we simulate past
climates? Evaluating the models using global palaeoenvironmental
datasets. Quaternary Science Reviews 19:321-346.

Kropf, M., J. W. Kadereit, and H. P. Comes. 2003. Differential cycles of
range contraction and expansion in European high mountain plants during
the Late Quaternary: insights from Pritzelago alpina (L.) O. Kuntze
(Brassicaceae). Molecular Ecology 12:931-949.

Lascoux, M., A. E. Palmé, R. Cheddadi, and R. G. Latta. 2004. Impact of
Ice Ages on the genetic structure of trees and shrubs. Proceedings of
the Royal Society of London B 359:197-207.

Lebrun, J.-P., and A. L. Stork. 1991-1997. Enumération des plantes à
fleurs d'Afrique Tropicale, 4 volumes. Conservatoire et Jardins
Botaniques de la Ville de Genève, Geneva, Switzerland.

Lessa, E. P., J. A. Cook, and J. L. Patton. 2003. Genetic footprints of
demographic expansion in North America, but not Amazonia during the late
Quaternary. Proceedings of the National Academy of Sciences of the
United States of America 100:10331-10334.

Martínez-Meyer, E., A. T. Peterson, and W. W. Hargrove. 2004. Ecological
niches as stable distributional constraints on mammal species, with
implications for Pleistocene extinctions and climate change projections
for biodiversity. Global Ecology and Biogeography 13:305-314.

McNeill, J., F. R. Barrie, H. M. Burdet, V. Demoulin, D. J. Hawksworth,
K. Marhold, D. H. Nicolson, J. Prado, P. C. Silva, J. E. Skog, J. H.
Wiersema, and N. J. Turland. 2006. International code of Botanical
Nomenclature (Vienna Code) adopted by the Seventh International
Botanical Congress Vienna, Austria, July 2005. A.R.G. Gantner Velag,
Ruggell, Liechtenstein. \[<http://ibot.sav.sk/icbn/main.htm>\]

Morgan, A. V., A. Morgan, A. C. Ashworth, and J. V. Matthews, Jr. 1983.
Late Wisconsin fossil beetles in North America. Pages 354-363 in S. C.
Porter, editor. Late-Quaternary environments of the United States.
Volume 1. The late Pleistocene. University of Minnesota Press,
Minneapolis, Minnesota, USA.

Newby, P. E., P. Killoran, M. R. Waldorf, B. N. Shuman, R. S. Webb, and
T. Webb III. 2000. 14,000 years of sediment, vegetation, and water-level
changes at the Makepeace Cedar Swamp, southeastern Massachusetts.
Quaternary Research 53:352-368.

Noss, R. F., R. Graham, D. R. McCullough, F. L. Ramsey, J. Seavey, C.
Whitlock, and M. P. Williams. 2000. Review of scientific material
relevant to the cccurrence, ecosystem role, and tested management
options for mountain goats in Olympic National Park. Fulfillment of
contract #14-01-0001-99-C-05, U. S. Department of Interior.
Conservation Biology Institute, Corvallis, Oregon, USA.
http://www.consbio.org/cbi/professional_services/goat/goat_pdf.htm.

Owen, P. R., C. J. Bell, and E. M. Mead. 2000. Fossils, diet, and
conservation of black-footed ferrets (Mustela nigripes). Journal of
Mammalogy 81:422-433.

Pasenko, M. R., and B. W. Schubert. 2004. Mammuthus jeffersonii
(Proboscidea, Mammalia) from northern Illinois. PaleoBios 24(3):19-24.

Petit, J. R., I. Aguinagalde, J.-L. de Beaulieu, C. Bittkau, S. Brewer,
R. Cheddadi, R. Ennos, S. Fineschi, D. Grivet, M. Lascoux, A. Mohanty,
G. Müller-Starck, B. Demesure-Musch, A. Palmé, J. P. Martin, S. Rendell,
and G. G. Vendramin. 2003. Glacial refugia: hotspots but not melting
pots of genetic diversity. Science 300:1563-1565.

Petit, R. J., R. Bialozyt, P. Garnier-Géré, and A. Hampe. 2004. Ecology
and genetics of tree invasions: from recent introductions to Quaternary
migrations. Forest Ecology and Management 197:117-137.

Petit, R. J., S. Brewer, S. Bordács, K. Burg, R. Cheddadi, E. Coart, J.
Cottrell, U. M. Csaikl, B. van Dam, J. D. Deans, S. Espinel, S.
Fineschi, R. Finkeldey, I. Glaz, P. G. Goicoechea, J. S. Jensen, A. O.
König, A. J. Lowe, S. F. Madsen, G. Mátyás, R. C. Munro, F. Popescu, D.
Slade, H. Tabbener, S. G. M. de Vries, B. Ziegenhagen, J.-L. de
Beaulieu, and A. Kremer. 2002. Identification of refugia and
post-glacial colonisation routes of European white oaks based on
chloroplast DNA and fossil pollen evidence. Forest Ecology and
Management 156:49-74.

Petit, R. J., E. Pineau, B. Demesure, R. Bacilieri, A. Ducousso, and A.
Kremer. 1997. Chloroplast DNA footprints of postglacial recolonization
by oaks. Proceedings of the National Academy of Sciences of the United
States of America 94:9996-10001.

Prentice, I. C., D. Jolly, and BIOME 6000 participants. 2000.
Mid-Holocene and glacial-maximum vegetation geography of the northern
continents and Africa. Journal of Biogeography 27:507-519.

Qian, H., and R. E. Ricklefs. 2000. Large-scale processes and the Asian
bias in species diversity of temperate plants. Nature 407:180-182.

Reimer, P. J., M. G. L. Baillie, E. Bard, A. Bayliss, J. W. Beck, C. J.
H. Bertrand, P. G. Blackwell, C. E. Buck, G. S. Burr, K. B. Cutler, P.
E. Damon, R. L. Edwards, R. G. Fairbanks, M. Friedrich, T. P.
Guilderson, A. G. Hogg, K. A. Hughen, B. Kromer, G. McCormac, S.
Manning, C. B. Ramsey, R. W. Reimer, S. Remmele, J. R. Southon, M.
Stuiver, S. Talamo, F. W. Taylor, J. van der Plicht, and C. E.
Weyhenmeyer. 2004. INTCAL04 terrestrial radiocarbon age calibration,
0-26 cal kyr BP. Radiocarbon 46:1029-1058.

Rosenberg, S. M., I. R. Walker, and R. W. Mathewes. 2003. Postglacial
spread of hemlock (Tsuga) and vegetation history in Mount Revelstoke
National Park, British Columbia, Canada. Canadian Journal of Botany
81:139-151.

Runck, A. M., and J. A. Cook. 2005. Postglacial expansion of the
southern red-backed vole (Clethrionomys gapperi) in North America.
Molecular Ecology 14:1445-1456.

Schauffler, M., and G. L. Jacobson, Jr. 2002. Persistence of coastal
spruce refugia during the Holocene in northern New England, USA,
detected by stand-scale pollen stratigraphies. Journal of Ecology
90:235-250.

Schmitz, O. J., E. Post, C. E. Burns, and K. M. Johnston. 2003.
Ecosystem responses to global climate change: moving beyond color
mapping. Bioscience 53:1199-1205.

Silvertown, J. 1985. History of a latitudinal diversity gradient: woody
plants in Europe 13,000–1,000 years. Journal of Biogeography
12:519-525.

Stevens, P. F. 2007+. Angiosperm Phylogeny Website. Version 8, June
1. \[<http://www.mobot.org/MOBOT/research/APweb/>\]

Stuiver, M., and P. J. Reimer. 1993. Extended 14C database and revised
CALIB radiocarbon calibration program. Radiocarbon 35:215-230.

Telford, R. J., E. Heegaard, and H. J. B. Birks. 2004a. All age-depth
models are wrong: but how badly? Quaternary Science Reviews 23:1-5.

Telford, R. J., E. Heegaard, and H. J. B. Birks. 2004b. The intercept is
a poor estimate of a calibrated radiocarbon age. The Holocene
14:296-298.

Thompson, R. S., and K. H. Anderson. 2000. Biomes of western North
America at 18,000, 6000 and 0 14C yr BP reconstructed from pollen and
packrat midden data. Journal of Biogeography 27:555-584.

Tremblay, N. O., and D. J. Schoen. 1999. Molecular phylogeography of
Dryas integrifolia: glacial refugia and postglacial recolonization.
Molecular Ecology 8:1187-1198.

Turgeon, D. D., J. F. Quinn, Jr., A. E. Bogan, E. V. Coan, F. G.
Hochberg, W. G. Lyons, P. M. Mikkelsen, R. J. Neves, C. F. E. Roper, G.
Rosenberg, B. Roth, A. Scheltema, F. G. Thompson, M. Vecchione, and J.
D. Williams. 1998. Common and scientific names of aquatic invertebrates
from the United States and Canada: mollusks, second edition. American
Fisheries Society, Special Publication 26, Bethesda, Maryland, USA.

Tutin, T. G., et al., editor. 1964-1993. Flora Europaea, 5 volumes.
Cambridge University Press, Cambridge, United Kingdom.
\[<http://rbg-web2.rbge.org.uk/FE/fe.html>\]

Webb, T., III. 1981. The past 11,000 years of vegetational change in
eastern North America. Bioscience 31:501-506.

Webb, T., III. 1987. The appearance and disappearance of major
vegetational assemblages: long-term vegetational dynamics in eastern
North America. Vegetatio 69:177-187.

Webb, T., III. 1988. Eastern North America. Pages 385-414 in B.
Huntley and T. Webb, III, editors. Vegetation history. Handbook of
vegetation science 7. Kluwer Academic Publishers, Dordrecht.

Webb, T., III, B. Shuman, and J. W. Williams. 2004. Climatically forced
vegetation dynamics in eastern North America during the late Quaternary
Period. Pages 459-478 in A. R. Gillespie, S. C. Porter, and B. F.
Atwater, editors. The Quaternary Period in the United States.
Developments in Quaternary science 1. Elsevier, Amsterdam, The
Netherlands.

Whorley, J. R., S. T. Alvarez-Castañeda, and G. J. Kenagy. 2004. Genetic
structure of desert ground squirrels over a 20-degree-latitude transect
from Oregon through the Baja California peninsula. Molecular Ecology
13:2709-2720.

Willard, D. A., T. M. Cronin, and S. Verardo. 2003. Late-Holocene
climate and ecosystem history from Chesapeake Bay sediment cores, USA.
The Holocene 13:201-214.

Williams, J. W. 2003. Variations in tree cover in North America since
the last glacial maximum. Global and Planetary Change 35:1-23.

Williams, J. W., B. N. Shuman, and T. Webb, III. 2001. Dissimilarity
analyses of late-Quaternary vegetation and climate in eastern North
America. Ecology 82:3346-3362.

Williams, J. W., B. N. Shuman, T. Webb, III, P. J. Bartlein, and P. L.
Luduc. 2004. Late-Quaternary vegetation dynamics in North America:
scaling from taxa to biomes. Ecological Monographs 74:309-334.

Williams, J. W., R. L. Summers, and T. Webb, III. 1998. Applying plant
functional types to construct biome maps from eastern North American
pollen data: comparisons with model results. Quaternary Science Reviews
17:607-627.

Williams, J. W., T. Webb, III, P. H. Richard, and P. Newby. 2000. Late
Quaternary biomes of Canada and the eastern United States. Journal of
Biogeography 27:585-607.

Wilson, D. E., and D. M. Reeder. 2005. Mammal species of the world: a
taxonomic and geographic reference, third edition, 2 volumes. The Johns
Hopkins University Press, Baltimore, Maryland, USA.
\[<http://www.bucknell.edu/msw3/>\]

Wroe, S., J. Field, R. Fullagar, and L. S. Jermiin. 2004. Megafaunal
extinction in the late Quaternary and the global overkill hypothesis.
Alcheringa 28:291-331.

Zdanowicz, C. M., G. A. Zielinski, and M. S. Germani. 1999. Mount Mazama
eruption: calendrical age verified and atmospheric impact assessed.
Geology 27:621-624.

Ashworth, A. C. 2004. "The Quaternary Period in the United States." In, edited by A. R. Gillespie, S. C. Porter, and B. F. Atwater. Vol. 1. Developments in Quaternary Science. Amsterdam, The Netherlands: Elsevier.

Ashworth, Allan C. n.d. "Geological Perspectives of Global Climate Change." In. Vol. 47. AAPG Studies in Geology. American Association of Petrolium Geologists.

Bennett, Keith David, and Caitlin E Buck. 2016. "Interpretation of Lake Sediment Accumulation Rates." The Holocene 26 (7): 1092–1102.

Berglund, Björn E, HJB Birks, M Ralska-Jasiewickzowa, and Herbert E Wright. 1996. Palaeoecological Events During the Last 15 000 Years: Regional Synthesis of Palaeoecological Studies of Lakes and Mires in Europe. Wiley.

Birks, H. H. 2003. "The Importance of Plant Macrofossils in the Reconstruction of Lateglacial Vegetation and Climate: Examples from Scotland, Western Norway, and Minnesota, Usa." Journal Article. Quaternary Science Reviews 22: 453–73.

Church, Michael. 1989. "IGCP Project 158: Paleohydrology of the Temperate Zone During the Last 15 000 Years: Introduction." Canadian Journal of Earth Sciences 26: 1809–10.

COHMAP Members. 1988. "Climatic Changes of the Last 18,000 Years: Observations and Model Simulations." Journal Article. Science 24: 1043–52.

FAUNMAP Working Group. 1994. FAUNMAP: A Database Documenting Late Quaternary Distributions of Mammal Species in the United States. Book. Vols. XXV, No. 1. Scientific Papers. Springfield, IL: Illinois State Museum.

Gibbard, Philip L, Martin J Head, Michael JC Walker, and Subcommission on Quaternary Stratigraphy. 2010. "Formal Ratification of the Quaternary System/Period and the Pleistocene Series/Epoch with a Base at 2.58 Ma." Journal of Quaternary Science 25 (2): 96–102. https://doi.org/10.1002/jqs.1338.

Goring, Simon, Andria Dawson, Gavin Simpson, Karthik Ram, Russ Graham, Eric Grimm, and John Williams. 2015. "Neotoma: A Programmatic Interface to the Neotoma Paleoecological Database." Open Quaternary 1 (1).

Goring, Simon James, Russell Graham, Shane Loeffler, Amy Myrbo, James S Oliver, Carol Ormond, and John W Williams. 2018. "The Neotoma Paleoecology Database: A Research Outreach Nexus." Elements of Paleontology.

Goring, S, JW Williams, JL Blois, ST Jackson, CJ Paciorek, RK Booth, JR Marlon, M Blaauw, and JA Christen. 2012. "Deposition Times in the Northeastern United States During the Holocene: Establishing Valid Priors for Bayesian Age Models." Journal Article. Quaternary Science Reviews 48: 54–60.

Graham, Russell. 2006. "Geoinformatics: Collaborative Research - Late Neogene Terrestrial Ecosystem Database." NSF Award. https://www.nsf.gov/awardsearch/showAward?AWD_ID=0622349.

Graham, R. W., and Jr. E. L. Lundelius. 2010. "FAUNMAP Ii: New Data for North America with a Temporal Extension for the Blancan, Irvingtonian and Early Rancholabrean." https://ucmp.berkeley.edu/faunmap.

Grimm, EC. 2008. "Neotoma: An Ecosystem Database for the Pliocene, Pleistocene, and Holocene." Illinois State Museum Scientific Papers E Series 1.

Grimm, Eric C. 2006. "Geoinformatics: Collaborative Research - Late Neogene Terrestrial Ecosystem Database." NSF Award. https://www.nsf.gov/awardsearch/showAward?AWD_ID=0622289.

Group, FAUNMAP Working. 1996. "Spatial Response of Mammals to Late Quaternary Environmental Fluctuations." Journal Article. Science 272: 1601–6.

Huntley, B., and I. C. Prentice. 1993. "Holocene Vegetation and Climates of Europe." Book Section. In Global Climates Since the Last Glacial Maximum, edited by Jr. Wright H. E., J. E. Kutzbach, III Webb T., W. F. Ruddimann, F. A. Street-Perrott, and P. J. Bartlein, 136–68. Minneapolis: University of Minnesota Press.

Jackson, S. T., and R. K. Booth. 2002. "The Role of Late Holocene Climate Variability in the Expansion of Yellow Birch in the Western Great Lakes Region." Journal Article. Diversity and Distributions 8 (5): 275–84. <Go to ISI>://000177738400003.

Jackson, S. T., J. T. Overpeck, III Webb T., S. E. Keattch, and K. H. Anderson. 1997. "Mapped Plant-Macrofossil and Pollen Records of Late Quaternary Vegetation Change in Eastern North America." Journal Article. Quaternary Science Reviews 16: 1–70.

Jackson, S. T., R. S. Webb, K. H. Anderson, J. T. Overpeck, III Webb T., J. W. Williams, and B. C. S. Hansen. 2000. "Vegetation and Environment in Eastern North America During the Last Glacial Maximum." Journal Article. Quaternary Science Reviews 19: 489–508.

Jacobson, George L. 2021. "A Tribute to Eric C. Grimm (1951–2020)." Palynology 45 (2): 187–90. https://doi.org/10.1080/01916122.2020.1870281.

Morgan, AV, A Morgan, AC Ashworth, JV Matthews, and SC Porter. 1983. "Late Wisconsin Fossil Beetles in North America." In Late Quaternary Environments of the United States, 1:354–63. London: Longman.

Webb, III, T. 1981. "The Past 11,000 Years of Vegetational Change in Eastern North America." Journal Article. Bioscience 31: 501–6.

———. 1987. "The Appearance and Disappearance of Major Vegetational Assemblages: Long-Term Vegetational Dynamics in Eastern North America." Journal Article. Vegetatio 69: 177–87.

———. 1988. "Glacial and Holocene Vegetation History: Eastern North America." Book Section. In Vegetation History, edited by B. Huntley and III Webb T., 385–414. Dordrecht: Kluwer Academic.

Williams, John W., Eric C. Grimm, Jessica Blois, Donald F. Charles, Edward Davis, Simon J. Goring, Russell W. Graham, et al. 2018. "The Neotoma Paleoecology Database: A Multi-Proxy, International Community-Curated Data Resource." Quaternary Research 89 (1): 156–77.

Wright, Jr., H. E., J. E. Kutzbach, III Webb T., W. F. Ruddiman, F. A. Street-Perrott, and P. J Bartlein. 1993. Global Climates Since the Last Glacial Maximum. Book. Minneapolis: University of Minnesota Press.


text:
package com.cruzj6.mha.models;

import android.content.Context;

import java.util.List;

/**
 * Created by Joey on 7/5/16.
 */
public class PillTimeItem extends RemovableItem {
    public int hourOfDay;
    public int minute;
    private PillItem pItem;

    public PillTimeItem(int hourOfDay, int minute)
    {
        this.hourOfDay = hourOfDay;
        this.minute = minute;
        this.pItem = pItem;
    }

    @Override
    public void removeFromDatabase(Context context) {

    }
}


text:
<title>pysmvt.templating.jinja</title>

pysmvt.templating.jinja

Covered: 53 lines

Missed: 4 lines

Skipped 25 lines

Percent: 92 %

 1

import logging

 2

from os import path

 3

 4

from jinja2 import Environment, TemplateNotFound, BaseLoader

 5

 6

from pysmvt import settings, user

 7

from pysmvt.hierarchy import FileNotFound, findfile, split_endpoint

 8

import pysmvt.templating as templating

 9

10

log = logging.getLogger(__name__)

11

12

class Translator(templating.EngineBase):

13

14

    def __init__(self):

15

        self.env = Environment(

16

            loader=self.create_loader(),

17

            **self.get_settings()

18

            )

19

        self.init_globals()

20

        self.init_filters()

21

22

    def create_loader(self):

23

        return HierarchyLoader()

24

25

    def get_settings(self):

26

        return settings.jinja.todict()

27

28

    def init_globals(self):

29

        self.env.globals.update(self.get_globals())

30

31

    def init_filters(self):

32

        self.env.filters.update(self.get_filters())

33

34

    def render_string(self, string, context):

35

        raise NotImplementedError('Translor must be subclassed')

36

37

    def render_template(self, endpoint, context):

38

        self.update_context(context)

39

        return self.env.get_template(endpoint).render(context)

40

41

    def update_context(self, context):

42

        context.update({

43

            'user': user._current_obj(),

44

        })

45

46

class HierarchyLoader(BaseLoader):

47

    """

48

        A modification of Jinja's FileSystemLoader to take into account

49

        the hierarchy.

50

    """

51

52

    def __init__(self, encoding=settings.default.charset):

53

        self.encoding = encoding

54

55

    def find_template_path(self, endpoint):

56

        # try module level first

57

        try:

58

            plugin, template = split_endpoint(endpoint)

59

            endpoint = path.join('templates', template)

60

            if plugin:

61

                endpoint = '%s:%s' % (plugin, endpoint)

62

            return findfile(endpoint)

63

        except FileNotFound:

64

            pass

65

        ## try app level second if module wasn't specified

66

        #try:

67

        #    if ':' not in template:

68

        #        endpoint = 'templates/%s' % template

69

        #    return findfile(endpoint)

70

        #except FileNotFound:

71

        #    pass

72

73

    def get_source(self, environment, endpoint):

74

        log.debug('get_source() processing: %s' % endpoint)

75

        fpath = self.find_template_path(endpoint)

76

        if not fpath:

77

            raise TemplateNotFound(endpoint)

78

        with open(fpath) as f:

79

            contents = f.read().decode(self.encoding)

80

        old = path.getmtime(fpath)

81

        return contents, fpath, lambda: path.getmtime(fpath) == old

82


text:
package org.apache.ignite.internal.visor.query;

import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.List;
import org.apache.ignite.cache.QueryIndex;
import org.apache.ignite.cache.QueryIndexType;
import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.internal.visor.VisorDataTransferObject;

/**
 * Data transfer object for {@link QueryIndex}.
 */
public class VisorQueryIndex extends VisorDataTransferObject {
    /** */
    private static final long serialVersionUID = 0L;

    /** Name of index. */
    private String name;

    /** Type of index. */
    private QueryIndexType type;

    /** Fields to create group indexes for. */
    private List<VisorQueryIndexField> fields;

    /**
     * Create data transfer object for given cache type metadata.
     */
    public VisorQueryIndex() {
        // No-op.
    }

    /**
     * Create data transfer object for given cache type metadata.
     *
     * @param idx Actual cache query entity index.
     */
    public VisorQueryIndex(QueryIndex idx) {
        assert idx != null;

        name = idx.getName();
        type = idx.getIndexType();
        fields = VisorQueryIndexField.list(idx);
    }

    /**
     * @return Name of index.
     */
    public String getName() {
        return name;
    }

    /**
     * @return Type of index.
     */
    public QueryIndexType getType() {
        return type;
    }

    /**
     * @return Fields to create group indexes for.
     */
    public List<VisorQueryIndexField> getFields() {
        return fields;
    }

    /** {@inheritDoc} */
    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
        U.writeString(out, name);
        U.writeEnum(out, type);
        U.writeCollection(out, fields);
    }

    /** {@inheritDoc} */
    @Override protected void readExternalData(byte protoVer, ObjectInput in) throws IOException, ClassNotFoundException {
        name = U.readString(in);
        type = QueryIndexType.fromOrdinal(in.readByte());
        fields = U.readList(in);
    }

    /** {@inheritDoc} */
    @Override public String toString() {
        return S.toString(VisorQueryIndex.class, this);
    }
}


text:
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using System.Collections.Generic;
using Entropy;

namespace Tests
{
    [TestClass]
    public class QueueProcessingSystemTests
    {
        [TestMethod]
        public void QueueProcessingSystemSystem_WhenAskedToProcess_ProcessesEachEntityOnceAndRemovesThemFromTheQueue()
        {
            var systemMock = new Mock<QueueProcessingSystem>();
            systemMock.CallBase = true;
            World world = new World();
            Entity[] entities = new Entity[3];
            entities[0] = world.CreateEntity();
            entities[1] = world.CreateEntity();
            entities[2] = world.CreateEntity();

            systemMock.Object.AddEntity(entities[0]);
            systemMock.Object.AddEntity(entities[1]);
            systemMock.Object.AddEntity(entities[2]);

            systemMock.Setup(s => s.DoProcess(entities[0]));
            systemMock.Setup(s => s.DoProcess(entities[1]));
            systemMock.Setup(s => s.DoProcess(entities[2]));

            systemMock.Object.Process();
            systemMock.Verify(s => s.ProcessEntity(entities[0]));
            systemMock.Verify(s => s.ProcessEntity(entities[1]));
            systemMock.Verify(s => s.ProcessEntity(entities[2]));
            Assert.AreEqual(0, systemMock.Object.Entities.Count);
        }
    }
}


text:
require 'samepage/mcollective/client/base'
require 'samepage/mcollective/result/node_summary'

module Samepage
	module MCollective
		module Client

			# Class wrapping Node MCollective client
			class Deploy < Base

				# Initiate deploy on live boot image.
				#
				# @param [String] cloudunit name of the cloudunit configuration
				# @param [String] node name of the node role
				# @param [String] nodeunit name of the node unit
				# @param [Integer] index node index
				# @param [String] distribution name of the distribution to deploy
				# @param [Hash] options hash of optional arguments
				def deploy(cloudunit, node, nodeunit, index, distribution, options = {})
					params = {
						:cloudunit    => cloudunit,
						:node         => node,
						:nodeunit     => nodeunit,
						:index        => index.to_i,
						:distribution => distribution,
						:activemode   => false,
						:erase        => options[:erase] || false,
						:override     => options.fetch(:override, '')
					}

					call(:deploy, params)

					# @todo The return and rescue statement here is a hack to keep
					# {Deploy} client API consistent with former error handling.
					# It should be refactored later on.
					return Samepage::MCollective::Result::ErrorList.new
				rescue Samepage::MCollective::Response::StatusError => e
					return e.errors
				end

				# Check deploy process status
				def summary
					result = Samepage::MCollective::Result::NodeSummary.new
					call(:summary) do |response|
						state = response.results[:data][:state].to_s
						result.send("add_#{state}".intern)
					end
					return result
				end

				# Reboot remote machine. Used for rebooting system running from
				# live boot image into newly deployed system.
				def reboot
					call(:reboot)
				end
			end
		end
	end
end


text:
///////////////////////////////////////////////////////////////////////////////
//  CellDist.scala
//
//  Copyright (C) 2010-2014 Ben Wing, The University of Texas at Austin
//
//  Licensed under the Apache License, Version 2.0 (the "License");
//  you may not use this file except in compliance with the License.
//  You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
//  Unless required by applicable law or agreed to in writing, software
//  distributed under the License is distributed on an "AS IS" BASIS,
//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//  See the License for the specific language governing permissions and
//  limitations under the License.
///////////////////////////////////////////////////////////////////////////////

package opennlp.textgrounder
package gridlocate

import collection.mutable

import util.error.warning
import util.print.errprint

import langmodel.{Gram,LangModel}

/**
 * Probability distribution over cells. Instances of this class are normally
 * generated by `CellDistFactory`.

 * @param cellprobs List of cells and associated probabilities
 * @param normalized Whether the probability distribution is normalized
 */

class CellDist[Co](
  val cellprobs: Iterable[(GridCell[Co], Double)],
  val normalized: Boolean,
  val empty: Boolean
) {
  /**
   * Return a ranked list of all the cells. We may need to add the
   * specified correct cell to the list. See `Ranker.evaluate`.
   */
  def get_ranked_cells(correct: Option[GridCell[Co]],
      include_correct: Boolean): IndexedSeq[(GridCell[Co], Double)] = {
    val probs =
      if (!include_correct)
        cellprobs
      else
        // Elements on right override those on left
        Map(correct.get -> 0.0) ++ cellprobs.toMap
    // sort by second element of tuple, in reverse order
    probs.toIndexedSeq sortWith (_._2 > _._2)
  }
}

/**
 * Factory object for creating CellDists, i.e. objects describing a
 * probability distribution over cells.
 */
class CellDistFactory[Co] {
  /**
   * Create normalized cell dist from unnormalized dist.
   */
  def create_normalized_cell_dist(cellprobs: Iterable[(GridCell[Co], Double)],
    normalize: Boolean = true
  ) = {
    // Normalize the probabilities; but if all probabilities are 0, then
    // we can't normalize, so leave as-is. This will happen, for example,
    // for words never seen in the entire corpus.
    val totalprob = cellprobs.map(_._2).sum
    val (normalized, empty, norm_cellprobs) =
      if (totalprob == 0)
        (false, true, cellprobs)
      else if (!normalize)
        (false, false, cellprobs)
      else
        (true, false, cellprobs.map {
          case (cell, prob) => (cell, prob / totalprob)
        })

    new CellDist[Co](norm_cellprobs, normalized, empty)
  }

  /**
   * Create a distribution over cells from the number of documents in
   * each cell.
   */
  def get_cell_dist_from_doc_count(grid: Grid[Co],
      normalize: Boolean = true) = {
    create_normalized_cell_dist(grid.iter_nonempty_cells.map { cell =>
      (cell, cell.num_docs.toDouble)
    }, normalize)
  }

  /**
   * Create a distribution over cells that is associated with a gram,
   * based on the relative probabilities of the gram in the language models
   * of the various cells.  That is, if we have a set of cells, each with a
   * language model, then we can imagine conceptually inverting the process
   * to generate a cell distribution over grams.  Basically, for a given gram,
   * look to see what its probability is in all cells; normalize, and we have
   * a cell distribution.
   */
  def get_cell_dist(grid: Grid[Co], gram: Gram) = {
    create_normalized_cell_dist(grid.iter_nonempty_cells.map { cell =>
      (cell, cell.grid_lm.gram_prob(gram))
    })
  }

  /**
   * Return a cell distribution over a language model, in the form of a
   * list of pairs of cells and probabilities.  This works
   * by adding up the language models of the individual grams,
   * weighting by the count of the each gram.
   */
  def get_cell_dist_for_lang_model[Co](grid: Grid[Co],
      lang_model: LangModel) = {
    val base_cells = grid.iter_nonempty_cells
    val parallel = !grid.driver.params.no_parallel
    val cells =
      if (parallel)
        base_cells.par
      else
        base_cells

    val norm_factors = lang_model.iter_grams.map { case (gram, count) =>
      val raw_factor =
        cells.map(cell => cell.grid_lm.gram_prob(gram)).sum
      val norm_factor =
        if (raw_factor == 0)
          1.0
        else
          1.0/raw_factor
      (gram, count * norm_factor)
    }
    val cellprobs = cells.map { cell =>
      val cellprob = norm_factors.map { case (gram, factor) =>
        factor * cell.grid_lm.gram_prob(gram)
      }.sum
      (cell, cellprob)
    }
    // Renormalize to produce a probability distribution; but if all
    // probabilities are 0, then we can't normalize, so leave as-is.
    // This will happen, for example, for words never seen in the entire
    // corpus.
    val totalprob = cellprobs.map(_._2).sum
    val (normalized, total_norm_factor) =
      if (totalprob == 0)
        (false, 1.0)
      else
        (true, 1.0/totalprob)
    val normed_cell_probs =
      cellprobs.map { case (cell, cellprob) =>
        (cell, total_norm_factor * cellprob)
      }
    new CellDist[Co](normed_cell_probs.toIndexedSeq, normalized, normalized)
  }
}


text:
/*
 * Do not modify this file. This file is generated from the autoscaling-2011-01-01.normal.json service model.
 */
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;

using Amazon.Runtime;
using Amazon.Runtime.Internal;

namespace Amazon.AutoScaling.Model
{
    /// <summary>
    /// Container for the parameters to the DescribeLaunchConfigurations operation.
    /// Describes one or more launch configurations. If you omit the list of names, then the
    /// call describes all launch configurations.
    /// </summary>
    public partial class DescribeLaunchConfigurationsRequest : AmazonAutoScalingRequest
    {
        private List<string> _launchConfigurationNames = new List<string>();
        private int? _maxRecords;
        private string _nextToken;

        /// <summary>
        /// Gets and sets the property LaunchConfigurationNames.
        /// <para>
        /// The launch configuration names.
        /// </para>
        /// </summary>
        public List<string> LaunchConfigurationNames
        {
            get { return this._launchConfigurationNames; }
            set { this._launchConfigurationNames = value; }
        }

        // Check to see if LaunchConfigurationNames property is set
        internal bool IsSetLaunchConfigurationNames()
        {
            return this._launchConfigurationNames != null && this._launchConfigurationNames.Count > 0;
        }

        /// <summary>
        /// Gets and sets the property MaxRecords.
        /// <para>
        /// The maximum number of items to return with this call. The default is 100.
        /// </para>
        /// </summary>
        public int MaxRecords
        {
            get { return this._maxRecords.GetValueOrDefault(); }
            set { this._maxRecords = value; }
        }

        // Check to see if MaxRecords property is set
        internal bool IsSetMaxRecords()
        {
            return this._maxRecords.HasValue;
        }

        /// <summary>
        /// Gets and sets the property NextToken.
        /// <para>
        /// The token for the next set of items to return. (You received this token from a previous
        /// call.)
        /// </para>
        /// </summary>
        public string NextToken
        {
            get { return this._nextToken; }
            set { this._nextToken = value; }
        }

        // Check to see if NextToken property is set
        internal bool IsSetNextToken()
        {
            return this._nextToken != null;
        }

    }
}


text:
/// <reference path='fourslash.ts' />

////interface IMap<T> {
////    [key: string]: T;
////}
////var map: IMap<string[]>;
////var categories: string[];
////each(categories, category => {
////    var /*1*/changes = map[category];
////    return each(changes, change => {
////    });
////});
////function each<T>(items: T[], handler: (item: T) => void) { }

verify.quickInfoAt("1", "(local var) changes: string[]", undefined);


text:
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                      http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <groupId>com.amazon.emr</groupId>
        <artifactId>shims</artifactId>
        <version>4.7.0-SNAPSHOT</version>
        <relativePath>../</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>hive2-shims</artifactId>
    <packaging>jar</packaging>

    <name>Hive2Shims</name>
    <description>Shims for Hive-2.x compatibility</description>

    <dependencies>
        <dependency>
            <groupId>org.apache.hive</groupId>
            <artifactId>hive-exec</artifactId>
            <version>${hive2.version}</version>
        </dependency>
        <dependency>
            <groupId>com.amazon.emr</groupId>
            <artifactId>shims-common</artifactId>
            <version>${project.parent.version}</version>
        </dependency>
    </dependencies>

</project>


text:
<?php

/**
 * core/MY_Controller.php
 *
 * Default application controller
 */
class Application extends CI_Controller {

    protected $data = array();      // parameters for view components
    protected $id;    // identifier for our content
    protected $choices = array(// our menu navbar
        'Home' => '/', 'Portfolio' => '/portfolio', 'Assembly' => '/assembly');

    /**
     * Constructor.
     * Establish view parameters & load common helpers
     */
    function __construct() {
        parent::__construct();
        $this->data = array();
        $this->data['pagetitle'] = 'Bot Card Collector';
    }

    /**
     * Render this page
     */
    function render() {

//        $cred = $this->session->userdata['username'];
//        if ($cred !== '') {
//            $this->data['username'] = $this->session->userdata['username'];
//            $this->data['credential'] = $this->parser->parse('signout', $this->data, true);
//        } else {
//            $this->data['credential'] = $this->parser->parse('signin', $this->data, true);
//        }
//        $this->data['username'] = $this->session->userdata['username'];
        //$this->data['menubar'] = build_menu_bar($this->choices);
        $this->data['display'] = "";
        if (!empty($this->session->userdata('response'))) {
            $this->data['display'] = $this->session->userdata('response');
            $this->session->unset_userdata('response');
        }

        $this->data['content'] = $this->parser->parse($this->data['pagebody'], $this->data, true);

        if (!empty($this->session->userdata('username'))) {
            if ($this->session->userdata('role') == 99) {
                $this->data['navigation'] = $this->parser->parse('navigation_admin', array(), true);
                $this->logout();
            } else {
                $this->data['navigation'] = $this->parser->parse('navigation_user', array(), true);
                $this->logout();
            }
        } else {
            $this->data['navigation'] = $this->parser->parse('navigation_def', array(), true);
        }
        $this->data['data'] = &$this->data;
        $this->parser->parse('template', $this->data);
    }

    function logout() {

        //Logout button onClick
        if (!is_null($this->input->post('logout'))) {
            $this->session->sess_destroy();
            redirect('');
        }
    }

}

/* End of file MY_Controller.php */
/* Location: application/core/MY_Controller.php */


text:
<?php

namespace Drupal\Tests\outside_in\FunctionalJavascript;

/**
 * Testing opening and saving block forms in the off-canvas tray.
 *
 * @group outside_in
 */
class OutsideInBlockFormTest extends OutsideInJavascriptTestBase {

  /**
   * {@inheritdoc}
   */
  public static $modules = [
    'node',
    'block',
    'system',
    'breakpoint',
    'toolbar',
    'contextual',
    'outside_in',
    'quickedit',
    'search',
  ];

  /**
   * {@inheritdoc}
   */
  protected function setUp() {
    parent::setUp();
    // @todo Ensure that this test class works against bartik and stark:
    //   https://www.drupal.org/node/2784881.
    $this->enableTheme('bartik');
    $user = $this->createUser([
      'administer blocks',
      'access contextual links',
      'access toolbar',
      'administer nodes',
      'access in-place editing',
      'search content',
    ]);
    $this->drupalLogin($user);

    $this->placeBlock('system_powered_by_block', ['id' => 'powered']);
    $this->placeBlock('system_branding_block', ['id' => 'branding']);
    $this->placeBlock('search_form_block', ['id' => 'search']);
  }

  /**
   * Tests opening Offcanvas tray by click blocks and elements in the blocks.
   */
  public function testBlocks() {
    $blocks = [
      [
        'id' => 'block-powered',
        'new_page_text' => 'Can you imagine anyone showing the label on this block?',
        'element_selector' => '.content a',
        'button_text' => 'Save Powered by Drupal',
      ],
      [
        'id' => 'block-branding',
        'new_page_text' => 'The site that will live a very short life.',
        'element_selector' => 'a[rel="home"]:nth-child(2)',
        'button_text' => 'Save Site branding',
      ],
      [
        'id' => 'block-search',
        'element_selector' => '#edit-submit',
        'button_text' => 'Save Search form',
      ],
    ];
    $page = $this->getSession()->getPage();
    foreach ($blocks as $block) {
      $block_selector = '#' . $block['id'];
      $this->drupalGet('user');
      $this->toggleEditingMode();
      $this->openBlockForm($block_selector);

      switch ($block['id']) {
        case 'block-powered':
          // Fill out form, save the form.
          $page->fillField('settings[label]', $block['new_page_text']);
          $page->checkField('settings[label_display]');
          break;

        case 'block-branding':
          // Fill out form, save the form.
          $page->fillField('settings[site_information][site_name]', $block['new_page_text']);
          break;
      }

      if (isset($block['new_page_text'])) {
        $page->pressButton($block['button_text']);
        // Make sure the changes are present.
        $this->getSession()->wait(500);
        $web_assert = $this->assertSession();
        $web_assert->pageTextContains($block['new_page_text']);
      }

      $this->openBlockForm($block_selector);

      $this->toggleEditingMode();
      // Canvas should close when editing module is closed.
      $this->waitForOffCanvasToClose();

      // Go into Edit mode again.
      $this->toggleEditingMode();

      $element_selector = "$block_selector {$block['element_selector']}";
      // Open block form by clicking a element inside the block.
      // This confirms that default action for links and form elements is
      // suppressed.
      $this->openBlockForm($element_selector);

      // Exit edit mode.
      $this->toggleEditingMode();
    }
  }

  /**
   * Enables Editing mode by pressing "Edit" button in the toolbar.
   */
  protected function toggleEditingMode() {
    $this->waitForElement('div[data-contextual-id="block:block=powered:langcode=en|outside_in::langcode=en"] .contextual-links a');

    $this->waitForElement('#toolbar-bar', 3000);

    $edit_button = $this->getSession()->getPage()->find('css', '#toolbar-bar div.contextual-toolbar-tab button');

    $edit_button->press();
  }

  /**
   * Asserts that Off-Canvas block form is valid.
   */
  protected function assertOffCanvasBlockFormIsValid() {
    $web_assert = $this->assertSession();
    // Check that common block form elements exist.
    $web_assert->elementExists('css', 'input[data-drupal-selector="edit-settings-label"]');
    $web_assert->elementExists('css', 'input[data-drupal-selector="edit-settings-label-display"]');
    // Check that advanced block form elements do not exist.
    $web_assert->elementNotExists('css', 'input[data-drupal-selector="edit-visibility-request-path-pages"]');
    $web_assert->elementNotExists('css', 'select[data-drupal-selector="edit-region"]');
  }

  /**
   * Open block form by clicking the element found with a css selector.
   *
   * @param string $block_selector
   *   A css selector selects the block or an element within it.
   */
  protected function openBlockForm($block_selector) {
    $this->click($block_selector);
    $this->waitForOffCanvasToOpen();
    $this->assertOffCanvasBlockFormIsValid();
  }
}


text:
using Microsoft.Azure.Commands.Compute.Automation.Models;
using Microsoft.Azure.Management.Compute;
using Microsoft.Azure.Management.Compute.Models;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation;

namespace Microsoft.Azure.Commands.Compute.Automation
{
    public partial class InvokeAzureComputeMethodCmdlet : ComputeAutomationBaseCmdlet
    {
        protected object CreateImageGetDynamicParameters()
        {
            dynamicParameters = new RuntimeDefinedParameterDictionary();
            var pResourceGroupName = new RuntimeDefinedParameter();
            pResourceGroupName.Name = "ResourceGroupName";
            pResourceGroupName.ParameterType = typeof(string);
            pResourceGroupName.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByDynamicParameters",
                Position = 1,
                Mandatory = true
            });
            pResourceGroupName.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("ResourceGroupName", pResourceGroupName);

            var pImageName = new RuntimeDefinedParameter();
            pImageName.Name = "ImageName";
            pImageName.ParameterType = typeof(string);
            pImageName.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByDynamicParameters",
                Position = 2,
                Mandatory = true
            });
            pImageName.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("ImageName", pImageName);

            var pExpand = new RuntimeDefinedParameter();
            pExpand.Name = "Expand";
            pExpand.ParameterType = typeof(string);
            pExpand.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByDynamicParameters",
                Position = 3,
                Mandatory = false
            });
            pExpand.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("Expand", pExpand);

            var pArgumentList = new RuntimeDefinedParameter();
            pArgumentList.Name = "ArgumentList";
            pArgumentList.ParameterType = typeof(object[]);
            pArgumentList.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByStaticParameters",
                Position = 4,
                Mandatory = true
            });
            pArgumentList.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("ArgumentList", pArgumentList);

            return dynamicParameters;
        }

        protected void ExecuteImageGetMethod(object[] invokeMethodInputParameters)
        {
            string resourceGroupName = (string)ParseParameter(invokeMethodInputParameters[0]);
            string imageName = (string)ParseParameter(invokeMethodInputParameters[1]);
            string expand = (string)ParseParameter(invokeMethodInputParameters[2]);

            if (!string.IsNullOrEmpty(resourceGroupName) && !string.IsNullOrEmpty(imageName))
            {
                var result = ImagesClient.Get(resourceGroupName, imageName, expand);
                WriteObject(result);
            }
            else if (!string.IsNullOrEmpty(resourceGroupName))
            {
                var result = ImagesClient.ListByResourceGroup(resourceGroupName);
                var resultList = result.ToList();
                var nextPageLink = result.NextPageLink;
                while (!string.IsNullOrEmpty(nextPageLink))
                {
                    var pageResult = ImagesClient.ListByResourceGroupNext(nextPageLink);
                    foreach (var pageItem in pageResult)
                    {
                        resultList.Add(pageItem);
                    }
                    nextPageLink = pageResult.NextPageLink;
                }
                WriteObject(resultList, true);
            }
            else
            {
                var result = ImagesClient.List();
                var resultList = result.ToList();
                var nextPageLink = result.NextPageLink;
                while (!string.IsNullOrEmpty(nextPageLink))
                {
                    var pageResult = ImagesClient.ListNext(nextPageLink);
                    foreach (var pageItem in pageResult)
                    {
                        resultList.Add(pageItem);
                    }
                    nextPageLink = pageResult.NextPageLink;
                }
                WriteObject(resultList, true);
            }
        }

    }

    public partial class NewAzureComputeArgumentListCmdlet : ComputeAutomationBaseCmdlet
    {
        protected PSArgument[] CreateImageGetParameters()
        {
            string resourceGroupName = string.Empty;
            string imageName = string.Empty;
            string expand = string.Empty;

            return ConvertFromObjectsToArguments(
                 new string[] { "ResourceGroupName", "ImageName", "Expand" },
                 new object[] { resourceGroupName, imageName, expand });
        }
    }

    [Cmdlet(VerbsCommon.Get, "AzureRmImage", DefaultParameterSetName = "DefaultParameter")]
    [OutputType(typeof(PSImage))]
    public partial class GetAzureRmImage : ComputeAutomationBaseCmdlet
    {
        protected override void ProcessRecord()
        {
            ExecuteClientAction(() =>
            {
                string resourceGroupName = this.ResourceGroupName;
                string imageName = this.ImageName;
                string expand = this.Expand;

                if (!string.IsNullOrEmpty(resourceGroupName) && !string.IsNullOrEmpty(imageName))
                {
                    var result = ImagesClient.Get(resourceGroupName, imageName, expand);
                    var psObject = new PSImage();
                    ComputeAutomationAutoMapperProfile.Mapper.Map<Image, PSImage>(result, psObject);
                    WriteObject(psObject);
                }
                else if (!string.IsNullOrEmpty(resourceGroupName))
                {
                    var result = ImagesClient.ListByResourceGroup(resourceGroupName);
                    var resultList = result.ToList();
                    var nextPageLink = result.NextPageLink;
                    while (!string.IsNullOrEmpty(nextPageLink))
                    {
                        var pageResult = ImagesClient.ListByResourceGroupNext(nextPageLink);
                        foreach (var pageItem in pageResult)
                        {
                            resultList.Add(pageItem);
                        }
                        nextPageLink = pageResult.NextPageLink;
                    }
                    var psObject = new List<PSImageList>();
                    foreach (var r in resultList)
                    {
                        psObject.Add(ComputeAutomationAutoMapperProfile.Mapper.Map<Image, PSImageList>(r));
                    }
                    WriteObject(psObject, true);
                }
                else
                {
                    var result = ImagesClient.List();
                    var resultList = result.ToList();
                    var nextPageLink = result.NextPageLink;
                    while (!string.IsNullOrEmpty(nextPageLink))
                    {
                        var pageResult = ImagesClient.ListNext(nextPageLink);
                        foreach (var pageItem in pageResult)
                        {
                            resultList.Add(pageItem);
                        }
                        nextPageLink = pageResult.NextPageLink;
                    }
                    var psObject = new List<PSImageList>();
                    foreach (var r in resultList)
                    {
                        psObject.Add(ComputeAutomationAutoMapperProfile.Mapper.Map<Image, PSImageList>(r));
                    }
                    WriteObject(psObject, true);
                }
            });
        }

        [Parameter(
            ParameterSetName = "DefaultParameter",
            Position = 1,
            Mandatory = false,
            ValueFromPipelineByPropertyName = true,
            ValueFromPipeline = false)]
        [AllowNull]
        [ResourceManager.Common.ArgumentCompleters.ResourceGroupCompleter()]
        public string ResourceGroupName { get; set; }

        [Parameter(
            ParameterSetName = "DefaultParameter",
            Position = 2,
            Mandatory = false,
            ValueFromPipelineByPropertyName = true,
            ValueFromPipeline = false)]
        [Alias("Name")]
        [AllowNull]
        public string ImageName { get; set; }

        [Parameter(
            ParameterSetName = "DefaultParameter",
            Position = 3,
            Mandatory = false,
            ValueFromPipelineByPropertyName = true,
            ValueFromPipeline = false)]
        [AllowNull]
        public string Expand { get; set; }
    }
}


text:
from __future__ import unicode_literals

import frappe, unittest

from frappe.model.delete_doc import delete_doc
from frappe.utils.data import today, add_to_date
from frappe import _dict
from frappe.utils import get_url
from frappe.core.doctype.user.user import get_total_users
from frappe.core.doctype.user.user import MaxUsersReachedError, test_password_strength
from frappe.core.doctype.user.user import extract_mentions

test_records = frappe.get_test_records('User')

class TestUser(unittest.TestCase):
	def tearDown(self):
		# disable password strength test
		frappe.db.set_value("System Settings", "System Settings", "enable_password_policy", 0)
		frappe.db.set_value("System Settings", "System Settings", "minimum_password_score", "")
		frappe.db.set_value("System Settings", "System Settings", "password_reset_limit", 3)

	def test_user_type(self):
		new_user = frappe.get_doc(dict(doctype='User', email='test-for-type@example.com',
			first_name='Tester')).insert()
		self.assertEqual(new_user.user_type, 'Website User')

		# social login userid for frappe
		self.assertTrue(new_user.social_logins[0].userid)
		self.assertEqual(new_user.social_logins[0].provider, "frappe")

		# role with desk access
		new_user.add_roles('_Test Role 2')
		new_user.save()
		self.assertEqual(new_user.user_type, 'System User')

		# clear role
		new_user.roles = []
		new_user.save()
		self.assertEqual(new_user.user_type, 'Website User')

		# role without desk access
		new_user.add_roles('_Test Role 4')
		new_user.save()
		self.assertEqual(new_user.user_type, 'Website User')

		delete_contact(new_user.name)
		frappe.delete_doc('User', new_user.name)

	def test_delete(self):
		frappe.get_doc("User", "test@example.com").add_roles("_Test Role 2")
		self.assertRaises(frappe.LinkExistsError, delete_doc, "Role", "_Test Role 2")
		frappe.db.sql("""delete from `tabHas Role` where role='_Test Role 2'""")
		delete_doc("Role","_Test Role 2")

		if frappe.db.exists("User", "_test@example.com"):
			delete_contact("_test@example.com")
			delete_doc("User", "_test@example.com")

		user = frappe.copy_doc(test_records[1])
		user.email = "_test@example.com"
		user.insert()

		frappe.get_doc({"doctype": "ToDo", "description": "_Test"}).insert()

		delete_contact("_test@example.com")
		delete_doc("User", "_test@example.com")

		self.assertTrue(not frappe.db.sql("""select * from `tabToDo` where owner=%s""",
			("_test@example.com",)))

		from frappe.core.doctype.role.test_role import test_records as role_records
		frappe.copy_doc(role_records[1]).insert()

	def test_get_value(self):
		self.assertEqual(frappe.db.get_value("User", "test@example.com"), "test@example.com")
		self.assertEqual(frappe.db.get_value("User", {"email":"test@example.com"}), "test@example.com")
		self.assertEqual(frappe.db.get_value("User", {"email":"test@example.com"}, "email"), "test@example.com")
		self.assertEqual(frappe.db.get_value("User", {"email":"test@example.com"}, ["first_name", "email"]),
			("_Test", "test@example.com"))
		self.assertEqual(frappe.db.get_value("User",
			{"email":"test@example.com", "first_name": "_Test"},
			["first_name", "email"]),
				("_Test", "test@example.com"))

		test_user = frappe.db.sql("select * from tabUser where name='test@example.com'",
			as_dict=True)[0]
		self.assertEqual(frappe.db.get_value("User", {"email":"test@example.com"}, "*", as_dict=True),
			test_user)

		self.assertEqual(frappe.db.get_value("User", "xxxtest@example.com"), None)

		frappe.db.set_value("Website Settings", "Website Settings", "_test", "_test_val")
		self.assertEqual(frappe.db.get_value("Website Settings", None, "_test"), "_test_val")
		self.assertEqual(frappe.db.get_value("Website Settings", "Website Settings", "_test"), "_test_val")

	def test_high_permlevel_validations(self):
		user = frappe.get_meta("User")
		self.assertTrue("roles" in [d.fieldname for d in user.get_high_permlevel_fields()])

		me = frappe.get_doc("User", "testperm@example.com")
		me.remove_roles("System Manager")

		frappe.set_user("testperm@example.com")

		me = frappe.get_doc("User", "testperm@example.com")
		self.assertRaises(frappe.PermissionError, me.add_roles, "System Manager")

		frappe.set_user("Administrator")

		me = frappe.get_doc("User", "testperm@example.com")
		me.add_roles("System Manager")

		self.assertTrue("System Manager" in [d.role for d in me.get("roles")])

	# def test_deny_multiple_sessions(self):
	#	from frappe.installer import update_site_config
	# 	clear_limit('users')
	#
	# 	# allow one session
	# 	user = frappe.get_doc('User', 'test@example.com')
	# 	user.simultaneous_sessions = 1
	# 	user.new_password = 'Eastern_43A1W'
	# 	user.save()
	#
	# 	def test_request(conn):
	# 		value = conn.get_value('User', 'first_name', {'name': 'test@example.com'})
	# 		self.assertTrue('first_name' in value)
	#
	# 	from frappe.frappeclient import FrappeClient
	# 	update_site_config('deny_multiple_sessions', 0)
	#
	# 	conn1 = FrappeClient(get_url(), "test@example.com", "Eastern_43A1W", verify=False)
	# 	test_request(conn1)
	#
	# 	conn2 = FrappeClient(get_url(), "test@example.com", "Eastern_43A1W", verify=False)
	# 	test_request(conn2)
	#
	# 	update_site_config('deny_multiple_sessions', 1)
	# 	conn3 = FrappeClient(get_url(), "test@example.com", "Eastern_43A1W", verify=False)
	# 	test_request(conn3)
	#
	# 	# first connection should fail
	# 	test_request(conn1)

	def test_delete_user(self):
		new_user = frappe.get_doc(dict(doctype='User', email='test-for-delete@example.com',
			first_name='Tester Delete User')).insert()
		self.assertEqual(new_user.user_type, 'Website User')

		# role with desk access
		new_user.add_roles('_Test Role 2')
		new_user.save()
		self.assertEqual(new_user.user_type, 'System User')

		comm = frappe.get_doc({
			"doctype":"Communication",
			"subject": "To check user able to delete even if linked with communication",
			"content": "To check user able to delete even if linked with communication",
			"sent_or_received": "Sent",
			"user": new_user.name
		})
		comm.insert(ignore_permissions=True)

		delete_contact(new_user.name)
		frappe.delete_doc('User', new_user.name)
		self.assertFalse(frappe.db.exists('User', new_user.name))

	def test_password_strength(self):
		# Test Password without Password Strenth Policy
		frappe.db.set_value("System Settings", "System Settings", "enable_password_policy", 0)

		# password policy is disabled, test_password_strength should be ignored
		result = test_password_strength("test_password")
		self.assertFalse(result.get("feedback", None))

		# Test Password with Password Strenth Policy Set
		frappe.db.set_value("System Settings", "System Settings", "enable_password_policy", 1)
		frappe.db.set_value("System Settings", "System Settings", "minimum_password_score", 2)

		# Score 1; should now fail
		result = test_password_strength("bee2ve")
		self.assertEqual(result['feedback']['password_policy_validation_passed'], False)

		# Score 4; should pass
		result = test_password_strength("Eastern_43A1W")
		self.assertEqual(result['feedback']['password_policy_validation_passed'], True)

	def test_comment_mentions(self):
		comment = '''

				@Test

		'''
		self.assertEqual(extract_mentions(comment)[0], "test.comment@example.com")

		comment = '''

				Testing comment,

					@Test

				please check

		'''
		self.assertEqual(extract_mentions(comment)[0], "test.comment@example.com")
		comment = '''

				Testing comment for

					@Test

				and

					@Test

				please check

		'''
		self.assertEqual(extract_mentions(comment)[0], "test_user@example.com")
		self.assertEqual(extract_mentions(comment)[1], "test.again@example1.com")

	def test_rate_limiting_for_reset_password(self):
		from frappe.utils.password import delete_password_reset_cache
		delete_password_reset_cache()

		frappe.db.set_value("System Settings", "System Settings", "password_reset_limit", 1)

		user = frappe.get_doc("User", "testperm@example.com")
		link = user.reset_password()
		self.assertRegex(link, "\/update-password\?key=[A-Za-z0-9]*")

		self.assertRaises(frappe.ValidationError, user.reset_password, False)

def delete_contact(user):
	frappe.db.sql("DELETE FROM `tabContact` WHERE `email_id`= %s", user)
	frappe.db.sql("DELETE FROM `tabContact Email` WHERE `email_id`= %s", user)


text:
//-----------------------------------------------------------------------
// <copyright file="PermissionRootWithCriteria.cs" company="Marimer LLC">
//     Copyright (c) Marimer LLC. All rights reserved.
//     Website: https://cslanet.com
// </copyright>
// <summary>no summary</summary>
//-----------------------------------------------------------------------
using System;
using Csla.Rules;

namespace Csla.Test.Authorization
{
  [Serializable()]
  public class PermissionRootWithCriteria : BusinessBase<PermissionRootWithCriteria>
  {
    public static void AddObjectAuthorizationRules() {
      Csla.Rules.BusinessRules.AddRule(
        typeof(PermissionRootWithCriteria),
        new AuthRuleExpectsCriteria(AuthorizationActions.CreateObject));
      Csla.Rules.BusinessRules.AddRule(
        typeof(PermissionRootWithCriteria),
        new AuthRuleExpectsCriteria(AuthorizationActions.GetObject));
      Csla.Rules.BusinessRules.AddRule(
        typeof(PermissionRootWithCriteria),
        new AuthRuleExpectsCriteria(AuthorizationActions.DeleteObject));
    }

    public class Criteria { }
  }
}


text:
{% include home/css/bootstrap.min.css %}
{% include home/css/main.css %}


text:
// Copyright (c) Autofac Project. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using System;
using System.ServiceModel;
using Autofac.Multitenant.Wcf.DynamicProxy;
using Xunit;

namespace Autofac.Multitenant.Wcf.Test.DynamicProxy
{
    public class ServiceHostProxyGeneratorFixture
    {
        [Fact]
        public void Ctor_ProxyBuilderIsServiceHostProxyBuilder()
        {
            var generator = new ServiceHostProxyGenerator();
            Assert.IsType<ServiceHostProxyBuilder>(generator.ProxyBuilder);
        }

        [Fact]
        public void CreateWcfProxy_CustomProxyTypeCanBeHosted()
        {
            var generator = new ServiceHostProxyGenerator();
            object target = new ServiceImplementation();
            Type interfaceToProxy = typeof(IServiceContract);
            var proxy = generator.CreateWcfProxy(interfaceToProxy, target);

            // XUnit does not have "Assert.DoesNotThrow".
            new ServiceHost(proxy.GetType(), new Uri("http://localhost:22111/Foo.svc"));
        }

        [Fact]
        public void CreateWcfProxy_InterfaceToProxyNotInterface()
        {
            var generator = new ServiceHostProxyGenerator();
            object target = new ServiceImplementation();
            Type interfaceToProxy = typeof(ServiceImplementation);
            Assert.Throws<ArgumentException>(() => generator.CreateWcfProxy(interfaceToProxy, target));
        }

        [Fact]
        public void CreateWcfProxy_InterfaceToProxyNotServiceContract()
        {
            var generator = new ServiceHostProxyGenerator();
            object target = new NotAServiceImplementation();
            Type interfaceToProxy = typeof(INotAServiceContract);
            Assert.Throws<ArgumentException>(() => generator.CreateWcfProxy(interfaceToProxy, target));
        }

        [Fact]
        public void CreateWcfProxy_InterfaceToProxyIsGeneric()
        {
            var generator = new ServiceHostProxyGenerator();
            object target = new ServiceImplementation();
            Type interfaceToProxy = typeof(IServiceContractGeneric<>);
            Assert.Throws<ArgumentException>(() => generator.CreateWcfProxy(interfaceToProxy, target));
        }

        [Fact]
        public void CreateWcfProxy_NullInterface()
        {
            var generator = new ServiceHostProxyGenerator();
            object target = new ServiceImplementation();
            Type interfaceToProxy = null;
            Assert.Throws<ArgumentNullException>(() => generator.CreateWcfProxy(interfaceToProxy, target));
        }

        [Fact]
        public void CreateWcfProxy_NullTarget()
        {
            var generator = new ServiceHostProxyGenerator();
            object target = null;
            Type interfaceToProxy = typeof(IServiceContract);
            Assert.Throws<ArgumentNullException>(() => generator.CreateWcfProxy(interfaceToProxy, target));
        }

        [Fact]
        public void CreateWcfProxy_TargetDoesNotImplementInterface()
        {
            var generator = new ServiceHostProxyGenerator();
            object target = new NotAServiceImplementation();
            Type interfaceToProxy = typeof(IServiceContract);
            Assert.Throws<ArgumentException>(() => generator.CreateWcfProxy(interfaceToProxy, target));
        }

        public interface INotAServiceContract
        {
            // Has to be public or Castle.DynamicProxy can't make a proxy.
        }

        [ServiceContract]
        public interface IServiceContract
        {
            // Has to be public or Castle.DynamicProxy can't make a proxy.
            void MethodToProxy();
        }

        [ServiceContract]
        public interface IServiceContractGeneric<T>
        {
            // Has to be public or Castle.DynamicProxy can't make a proxy.
            void MethodToProxy();
        }

        private class ServiceImplementation : IServiceContract
        {
            public bool ProxyMethodCalled { get; set; }

            public void MethodToProxy()
            {
                this.ProxyMethodCalled = true;
            }
        }

        private class NotAServiceImplementation : INotAServiceContract
        {
        }
    }
}