text
stringlengths
1
22.8M
National Defence Party may refer to: National Defence Party (Iceland) 1902–1912 National Defence Party (Palestine) Rashtriya Raksha Dal, a political party in India
```c /* * 86Box A hypervisor and IBM PC system emulator that specializes in * running old operating systems and software designed for IBM * PC systems and compatibles from 1981 through fairly recent * system designs based on the PCI bus. * * This file is part of the 86Box distribution. * * Implementation of the IMD floppy image format. * * * * Authors: Fred N. van Kempen, <decwiz@yahoo.com> * Miran Grca, <mgrca8@gmail.com> * */ #include <stdarg.h> #include <stdint.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <wchar.h> #define HAVE_STDARG_H #include <86box/86box.h> #include <86box/timer.h> #include <86box/plat.h> #include <86box/fdd.h> #include <86box/fdd_86f.h> #include <86box/fdd_imd.h> #include <86box/fdc.h> typedef struct imd_track_t { uint8_t is_present; uint32_t file_offs; uint8_t params[5]; uint32_t r_map_offs; uint32_t c_map_offs; uint32_t h_map_offs; uint32_t n_map_offs; uint32_t data_offs; uint32_t sector_data_offs[255]; uint32_t sector_data_size[255]; uint32_t gap3_len; uint16_t side_flags; uint8_t max_sector_size; uint8_t spt; } imd_track_t; typedef struct imd_t { FILE *fp; char *buffer; uint32_t start_offs; int track_count; int sides; int track; uint16_t disk_flags; int track_width; imd_track_t tracks[256][2]; uint16_t current_side_flags[2]; uint8_t xdf_ordered_pos[256][2]; uint8_t interleave_ordered_pos[256][2]; char *current_data[2]; uint8_t track_buffer[2][25000]; } imd_t; static imd_t *imd[FDD_NUM]; static fdc_t *imd_fdc; #ifdef ENABLE_IMD_LOG int imd_do_log = ENABLE_IMD_LOG; static void imd_log(const char *fmt, ...) { va_list ap; if (imd_do_log) { va_start(ap, fmt); pclog_ex(fmt, ap); va_end(ap); } } #else # define imd_log(fmt, ...) #endif static uint32_t get_raw_tsize(int side_flags, int slower_rpm) { uint32_t size; switch (side_flags & 0x27) { case 0x22: size = slower_rpm ? 5314 : 5208; break; default: case 0x02: case 0x21: size = slower_rpm ? 6375 : 6250; break; case 0x01: size = slower_rpm ? 7650 : 7500; break; case 0x20: size = slower_rpm ? 10629 : 10416; break; case 0x00: size = slower_rpm ? 12750 : 12500; break; case 0x23: size = slower_rpm ? 21258 : 20833; break; case 0x03: size = slower_rpm ? 25500 : 25000; break; case 0x25: size = slower_rpm ? 42517 : 41666; break; case 0x05: size = slower_rpm ? 51000 : 50000; break; } return size; } static int track_is_xdf(int drive, int side, int track) { imd_t *dev = imd[drive]; int effective_sectors; int xdf_sectors; int high_sectors; int low_sectors; int max_high_id; int expected_high_count; int expected_low_count; const uint8_t *r_map; const uint8_t *n_map; effective_sectors = xdf_sectors = high_sectors = low_sectors = 0; for (uint16_t i = 0; i < 256; i++) dev->xdf_ordered_pos[i][side] = 0; if (dev->tracks[track][side].params[2] & 0xC0) return 0; if ((dev->tracks[track][side].params[3] != 16) && (dev->tracks[track][side].params[3] != 19)) return 0; r_map = (uint8_t *) (dev->buffer + dev->tracks[track][side].r_map_offs); if (!track) { if (dev->tracks[track][side].params[4] != 2) return 0; if (!side) { max_high_id = (dev->tracks[track][side].params[3] == 19) ? 0x8B : 0x88; expected_high_count = (dev->tracks[track][side].params[3] == 19) ? 0x0B : 0x08; expected_low_count = 8; } else { max_high_id = (dev->tracks[track][side].params[3] == 19) ? 0x93 : 0x90; expected_high_count = (dev->tracks[track][side].params[3] == 19) ? 0x13 : 0x10; expected_low_count = 0; } for (uint8_t i = 0; i < dev->tracks[track][side].params[3]; i++) { if ((r_map[i] >= 0x81) && (r_map[i] <= max_high_id)) { high_sectors++; dev->xdf_ordered_pos[(int) r_map[i]][side] = i; } if ((r_map[i] >= 0x01) && (r_map[i] <= 0x08)) { low_sectors++; dev->xdf_ordered_pos[(int) r_map[i]][side] = i; } if ((high_sectors == expected_high_count) && (low_sectors == expected_low_count)) { dev->current_side_flags[side] = (dev->tracks[track][side].params[3] == 19) ? 0x08 : 0x28; return ((dev->tracks[track][side].params[3] == 19) ? 2 : 1); } } return 0; } else { if (dev->tracks[track][side].params[4] != 0xFF) return 0; n_map = (uint8_t *) (dev->buffer + dev->tracks[track][side].n_map_offs); for (uint8_t i = 0; i < dev->tracks[track][side].params[3]; i++) { effective_sectors++; if (!(r_map[i]) && !(n_map[i])) effective_sectors--; if (r_map[i] == (n_map[i] | 0x80)) { xdf_sectors++; dev->xdf_ordered_pos[(int) r_map[i]][side] = i; } } if ((effective_sectors == 3) && (xdf_sectors == 3)) { dev->current_side_flags[side] = 0x28; return 1; /* 5.25" 2HD XDF */ } if ((effective_sectors == 4) && (xdf_sectors == 4)) { dev->current_side_flags[side] = 0x08; return 2; /* 3.5" 2HD XDF */ } return 0; } } static int track_is_interleave(int drive, int side, int track) { imd_t *dev = imd[drive]; int effective_sectors; const char *r_map; int track_spt; effective_sectors = 0; for (uint16_t i = 0; i < 256; i++) dev->interleave_ordered_pos[i][side] = 0; track_spt = dev->tracks[track][side].params[3]; r_map = dev->buffer + dev->tracks[track][side].r_map_offs; if (dev->tracks[track][side].params[2] & 0xC0) return 0; if (track_spt != 21) return 0; if (dev->tracks[track][side].params[4] != 2) return 0; for (int i = 0; i < track_spt; i++) { if ((r_map[i] >= 1) && (r_map[i] <= track_spt)) { effective_sectors++; dev->interleave_ordered_pos[(int) r_map[i]][side] = i; } } if (effective_sectors == track_spt) return 1; return 0; } static void sector_to_buffer(int drive, int track, int side, uint8_t *buffer, int sector, int len) { const imd_t *dev = imd[drive]; int type = dev->buffer[dev->tracks[track][side].sector_data_offs[sector]]; uint8_t fill_char; if (type == 0) memset(buffer, 0x00, len); else { if (type & 1) memcpy(buffer, &(dev->buffer[dev->tracks[track][side].sector_data_offs[sector] + 1]), len); else { fill_char = dev->buffer[dev->tracks[track][side].sector_data_offs[sector] + 1]; memset(buffer, fill_char, len); } } } static void imd_seek(int drive, int track) { uint32_t track_buf_pos[2] = { 0, 0 }; uint8_t id[4] = { 0, 0, 0, 0 }; uint8_t type; imd_t *dev = imd[drive]; int sector; int current_pos; int c = 0; int h; int n; int ssize = 512; int track_rate = 0; int track_gap2 = 22; int track_gap3 = 12; int xdf_type = 0; int interleave_type = 0; int is_trackx = 0; int xdf_spt = 0; int xdf_sector = 0; int ordered_pos = 0; int real_sector = 0; int actual_sector = 0; const char *c_map = NULL; const char *h_map = NULL; const char *r_map; const char *n_map = NULL; uint8_t *data; int flags = 0x00; if (dev->fp == NULL) return; if (!dev->track_width && fdd_doublestep_40(drive)) track /= 2; d86f_set_cur_track(drive, track); is_trackx = (track == 0) ? 0 : 1; dev->track = track; dev->current_side_flags[0] = dev->tracks[track][0].side_flags; dev->current_side_flags[1] = dev->tracks[track][1].side_flags; d86f_reset_index_hole_pos(drive, 0); d86f_reset_index_hole_pos(drive, 1); d86f_destroy_linked_lists(drive, 0); d86f_destroy_linked_lists(drive, 1); d86f_zero_track(drive); if (track > dev->track_count) return; for (int side = 0; side < dev->sides; side++) { if (!dev->tracks[track][side].is_present) continue; track_rate = dev->current_side_flags[side] & 7; if (!track_rate && (dev->current_side_flags[side] & 0x20)) track_rate = 4; if ((dev->current_side_flags[side] & 0x27) == 0x21) track_rate = 2; r_map = dev->buffer + dev->tracks[track][side].r_map_offs; h = dev->tracks[track][side].params[2]; if (h & 0x80) c_map = dev->buffer + dev->tracks[track][side].c_map_offs; else c = dev->tracks[track][side].params[1]; if (h & 0x40) h_map = dev->buffer + dev->tracks[track][side].h_map_offs; n = dev->tracks[track][side].params[4]; if (n == 0xFF) { n_map = dev->buffer + dev->tracks[track][side].n_map_offs; track_gap3 = gap3_sizes[track_rate][(int) n_map[0]][dev->tracks[track][side].params[3]]; } else { track_gap3 = gap3_sizes[track_rate][n][dev->tracks[track][side].params[3]]; } if (!track_gap3) track_gap3 = dev->tracks[track][side].gap3_len; xdf_type = track_is_xdf(drive, side, track); interleave_type = track_is_interleave(drive, side, track); current_pos = d86f_prepare_pretrack(drive, side, 0); if (!xdf_type) { for (sector = 0; sector < dev->tracks[track][side].params[3]; sector++) { if (interleave_type == 0) { real_sector = r_map[sector]; actual_sector = sector; } else { real_sector = dmf_r[sector]; actual_sector = dev->interleave_ordered_pos[real_sector][side]; } id[0] = (h & 0x80) ? c_map[actual_sector] : c; id[1] = (h & 0x40) ? h_map[actual_sector] : (h & 1); id[2] = real_sector; id[3] = (n == 0xFF) ? n_map[actual_sector] : n; data = dev->track_buffer[side] + track_buf_pos[side]; type = dev->buffer[dev->tracks[track][side].sector_data_offs[actual_sector]]; type = (type >> 1) & 7; flags = 0x00; if ((type == 2) || (type == 4)) flags |= SECTOR_DELETED_DATA; if ((type == 3) || (type == 4)) flags |= SECTOR_CRC_ERROR; if (((flags & 0x02) || (id[3] > dev->tracks[track][side].max_sector_size)) && !fdd_get_turbo(drive)) ssize = 3; else ssize = 128 << ((uint32_t) id[3]); sector_to_buffer(drive, track, side, data, actual_sector, ssize); current_pos = d86f_prepare_sector(drive, side, current_pos, id, data, ssize, 22, track_gap3, flags); track_buf_pos[side] += ssize; if (sector == 0) d86f_initialize_last_sector_id(drive, id[0], id[1], id[2], id[3]); } } else { xdf_type--; xdf_spt = xdf_physical_sectors[xdf_type][is_trackx]; for (sector = 0; sector < xdf_spt; sector++) { xdf_sector = (side * xdf_spt) + sector; id[0] = track; id[1] = side; id[2] = xdf_disk_layout[xdf_type][is_trackx][xdf_sector].id.r; id[3] = is_trackx ? (id[2] & 7) : 2; ordered_pos = dev->xdf_ordered_pos[id[2]][side]; data = dev->track_buffer[side] + track_buf_pos[side]; type = dev->buffer[dev->tracks[track][side].sector_data_offs[ordered_pos]]; type = ((type - 1) >> 1) & 7; flags = 0x00; if (type & 0x01) flags |= SECTOR_DELETED_DATA; if (type & 0x02) flags |= SECTOR_CRC_ERROR; if (((flags & 0x02) || (id[3] > dev->tracks[track][side].max_sector_size)) && !fdd_get_turbo(drive)) ssize = 3; else ssize = 128 << ((uint32_t) id[3]); sector_to_buffer(drive, track, side, data, ordered_pos, ssize); if (is_trackx) current_pos = d86f_prepare_sector(drive, side, xdf_trackx_spos[xdf_type][xdf_sector], id, data, ssize, track_gap2, xdf_gap3_sizes[xdf_type][is_trackx], flags); else current_pos = d86f_prepare_sector(drive, side, current_pos, id, data, ssize, track_gap2, xdf_gap3_sizes[xdf_type][is_trackx], flags); track_buf_pos[side] += ssize; if (sector == 0) d86f_initialize_last_sector_id(drive, id[0], id[1], id[2], id[3]); } } } } static uint16_t disk_flags(int drive) { const imd_t *dev = imd[drive]; return (dev->disk_flags); } static uint16_t side_flags(int drive) { const imd_t *dev = imd[drive]; int side = 0; uint16_t sflags = 0; side = fdd_get_head(drive); sflags = dev->current_side_flags[side]; return sflags; } static void set_sector(int drive, int side, uint8_t c, uint8_t h, uint8_t r, uint8_t n) { imd_t *dev = imd[drive]; int track = dev->track; int sc; int sh; int sn; const char *c_map = NULL; const char *h_map = NULL; const char *r_map = NULL; const char *n_map = NULL; uint8_t id[4] = { 0, 0, 0, 0 }; sc = dev->tracks[track][side].params[1]; sh = dev->tracks[track][side].params[2]; sn = dev->tracks[track][side].params[4]; if (sh & 0x80) c_map = dev->buffer + dev->tracks[track][side].c_map_offs; if (sh & 0x40) h_map = dev->buffer + dev->tracks[track][side].h_map_offs; r_map = dev->buffer + dev->tracks[track][side].r_map_offs; if (sn == 0xFF) n_map = dev->buffer + dev->tracks[track][side].n_map_offs; if (c != dev->track) return; for (uint8_t i = 0; i < dev->tracks[track][side].params[3]; i++) { id[0] = (sh & 0x80) ? c_map[i] : sc; id[1] = (sh & 0x40) ? h_map[i] : (sh & 1); id[2] = r_map[i]; id[3] = (sn == 0xFF) ? n_map[i] : sn; if ((id[0] == c) && (id[1] == h) && (id[2] == r) && (id[3] == n)) { dev->current_data[side] = dev->buffer + dev->tracks[track][side].sector_data_offs[i]; } } } static void imd_writeback(int drive) { imd_t *dev = imd[drive]; int track = dev->track; const char *n_map = 0; uint8_t h; uint8_t n; uint8_t spt; uint32_t ssize; if (writeprot[drive]) return; for (int side = 0; side < dev->sides; side++) { if (dev->tracks[track][side].is_present) { fseek(dev->fp, dev->tracks[track][side].file_offs, SEEK_SET); h = dev->tracks[track][side].params[2]; spt = dev->tracks[track][side].params[3]; n = dev->tracks[track][side].params[4]; fwrite(dev->tracks[track][side].params, 1, 5, dev->fp); if (h & 0x80) fwrite(dev->buffer + dev->tracks[track][side].c_map_offs, 1, spt, dev->fp); if (h & 0x40) fwrite(dev->buffer + dev->tracks[track][side].h_map_offs, 1, spt, dev->fp); if (n == 0xFF) { n_map = dev->buffer + dev->tracks[track][side].n_map_offs; fwrite(n_map, 1, spt, dev->fp); } for (uint8_t i = 0; i < spt; i++) { ssize = (n == 0xFF) ? n_map[i] : n; ssize = 128 << ssize; fwrite(dev->buffer + dev->tracks[track][side].sector_data_offs[i], 1, ssize, dev->fp); } } } } static uint8_t poll_read_data(int drive, int side, uint16_t pos) { const imd_t *dev = imd[drive]; int type = dev->current_data[side][0]; if ((type == 0) || (type > 8)) return 0xf6; /* Should never happen. */ if (type & 1) return (dev->current_data[side][pos + 1]); else return (dev->current_data[side][1]); } static void poll_write_data(int drive, int side, uint16_t pos, uint8_t data) { const imd_t *dev = imd[drive]; int type = dev->current_data[side][0]; if (writeprot[drive]) return; if ((type & 1) || (type == 0) || (type > 8)) return; /* Should never happen. */ dev->current_data[side][pos + 1] = data; } static int format_conditions(int drive) { const imd_t *dev = imd[drive]; int track = dev->track; int side; int temp; side = fdd_get_head(drive); temp = (fdc_get_format_sectors(imd_fdc) == dev->tracks[track][side].params[3]); temp = temp && (fdc_get_format_n(imd_fdc) == dev->tracks[track][side].params[4]); return temp; } void imd_init(void) { memset(imd, 0x00, sizeof(imd)); } void imd_load(int drive, char *fn) { uint32_t magic = 0; uint32_t fsize = 0; const char *buffer; const char *buffer2; imd_t *dev; int track_spt = 0; int sector_size = 0; int track = 0; int side = 0; int extra = 0; uint32_t last_offset = 0; uint32_t data_size = 512; uint32_t mfm = 0; uint32_t pre_sector = 0; uint32_t track_total = 0; uint32_t raw_tsize = 0; uint32_t minimum_gap3 = 0; uint32_t minimum_gap4 = 0; uint8_t converted_rate; uint8_t type; int size_diff; int gap_sum; d86f_unregister(drive); writeprot[drive] = 0; /* Allocate a drive block. */ dev = (imd_t *) malloc(sizeof(imd_t)); memset(dev, 0x00, sizeof(imd_t)); dev->fp = plat_fopen(fn, "rb+"); if (dev->fp == NULL) { dev->fp = plat_fopen(fn, "rb"); if (dev->fp == NULL) { memset(floppyfns[drive], 0, sizeof(floppyfns[drive])); free(dev); return; } writeprot[drive] = 1; } if (ui_writeprot[drive]) writeprot[drive] = 1; fwriteprot[drive] = writeprot[drive]; if (fseek(dev->fp, 0, SEEK_SET) == -1) fatal("imd_load(): Error seeking to the beginning of the file\n"); if (fread(&magic, 1, 4, dev->fp) != 4) fatal("imd_load(): Error reading the magic number\n"); if (magic != 0x20444D49) { imd_log("IMD: Not a valid ImageDisk image\n"); fclose(dev->fp); free(dev); memset(floppyfns[drive], 0, sizeof(floppyfns[drive])); return; } else imd_log("IMD: Valid ImageDisk image\n"); if (fseek(dev->fp, 0, SEEK_END) == -1) fatal("imd_load(): Error seeking to the end of the file\n"); fsize = ftell(dev->fp); if (fsize <= 0) { imd_log("IMD: Too small ImageDisk image\n"); fclose(dev->fp); free(dev); memset(floppyfns[drive], 0, sizeof(floppyfns[drive])); return; } if (fseek(dev->fp, 0, SEEK_SET) == -1) fatal("imd_load(): Error seeking to the beginning of the file again\n"); dev->buffer = malloc(fsize); if (fread(dev->buffer, 1, fsize, dev->fp) != fsize) fatal("imd_load(): Error reading data\n"); buffer = dev->buffer; buffer2 = memchr(buffer, 0x1A, fsize); if (buffer2 == NULL) { imd_log("IMD: No ASCII EOF character\n"); fclose(dev->fp); free(dev); memset(floppyfns[drive], 0, sizeof(floppyfns[drive])); return; } else { imd_log("IMD: ASCII EOF character found at offset %08X\n", buffer2 - buffer); } buffer2++; if ((buffer2 - buffer) == fsize) { imd_log("IMD: File ends after ASCII EOF character\n"); fclose(dev->fp); free(dev); memset(floppyfns[drive], 0, sizeof(floppyfns[drive])); return; } else { imd_log("IMD: File continues after ASCII EOF character\n"); } dev->start_offs = (buffer2 - buffer); dev->disk_flags = 0x00; dev->track_count = 0; dev->sides = 1; /* Set up the drive unit. */ imd[drive] = dev; while (1) { imd_log("In : %02X %02X %02X %02X %02X\n", buffer2[0], buffer2[1], buffer2[2], buffer2[3], buffer2[4]); track = buffer2[1]; side = buffer2[2]; if (side & 1) dev->sides = 2; extra = side & 0xC0; side &= 0x3F; track_spt = buffer2[3]; dev->tracks[track][side].spt = track_spt; sector_size = buffer2[4]; dev->tracks[track][side].side_flags = (buffer2[0] % 3); if ((track_spt != 0x00) && (!dev->tracks[track][side].side_flags)) dev->disk_flags |= 0x02; dev->tracks[track][side].side_flags |= (!(buffer2[0] - dev->tracks[track][side].side_flags) ? 0 : 8); mfm = dev->tracks[track][side].side_flags & 8; track_total = mfm ? 146 : 73; pre_sector = mfm ? 60 : 42; imd_log("Out : %02X %02X %02X %02X %02X\n", buffer2[0], track, side, track_spt, sector_size); if ((track_spt == 15) && (sector_size == 2)) dev->tracks[track][side].side_flags |= 0x20; if ((track_spt == 16) && (sector_size == 2)) dev->tracks[track][side].side_flags |= 0x20; if ((track_spt == 17) && (sector_size == 2)) dev->tracks[track][side].side_flags |= 0x20; if ((track_spt == 8) && (sector_size == 3)) dev->tracks[track][side].side_flags |= 0x20; if ((dev->tracks[track][side].side_flags & 7) == 1) dev->tracks[track][side].side_flags |= 0x20; if ((dev->tracks[track][side].side_flags & 0x07) == 0x00) dev->tracks[track][side].max_sector_size = 6; else dev->tracks[track][side].max_sector_size = 5; if (!mfm) dev->tracks[track][side].max_sector_size--; imd_log("Side flags for (%02i)(%01i): %02X\n", track, side, dev->tracks[track] [side].side_flags); dev->tracks[track][side].is_present = 1; dev->tracks[track][side].file_offs = (buffer2 - buffer); memcpy(dev->tracks[track][side].params, buffer2, 5); dev->tracks[track][side].r_map_offs = dev->tracks[track][side].file_offs + 5; last_offset = dev->tracks[track][side].r_map_offs + track_spt; if (extra & 0x80) { dev->tracks[track][side].c_map_offs = last_offset; last_offset += track_spt; } if (extra & 0x40) { dev->tracks[track][side].h_map_offs = last_offset; last_offset += track_spt; } if (track_spt == 0x00) { buffer2 = buffer + last_offset; last_offset += track_spt; dev->tracks[track][side].is_present = 0; } else if (sector_size == 0xFF) { dev->tracks[track][side].n_map_offs = last_offset; buffer2 = buffer + last_offset; last_offset += track_spt; dev->tracks[track][side].data_offs = last_offset; for (int i = 0; i < track_spt; i++) { data_size = buffer2[i]; data_size = 128 << data_size; dev->tracks[track][side].sector_data_offs[i] = last_offset; dev->tracks[track][side].sector_data_size[i] = 1; if (dev->buffer[dev->tracks[track][side].sector_data_offs[i]] > 0x08) { /* Invalid sector data type, possibly a malformed HxC IMG image (it outputs data errored sectors with a variable amount of bytes, against the specification). */ imd_log("IMD: Invalid sector data type %02X\n", dev->buffer[dev->tracks[track][side].sector_data_offs[i]]); fclose(dev->fp); free(dev); imd[drive] = NULL; memset(floppyfns[drive], 0, sizeof(floppyfns[drive])); return; } if (buffer[dev->tracks[track][side].sector_data_offs[i]] != 0) dev->tracks[track][side].sector_data_size[i] += (buffer[dev->tracks[track][side].sector_data_offs[i]] & 1) ? data_size : 1; last_offset += dev->tracks[track][side].sector_data_size[i]; if (!(buffer[dev->tracks[track][side].sector_data_offs[i]] & 1)) fwriteprot[drive] = writeprot[drive] = 1; type = dev->buffer[dev->tracks[track][side].sector_data_offs[i]]; if (type != 0x00) { type = ((type - 1) >> 1) & 7; if (data_size > (128 << dev->tracks[track][side].max_sector_size)) track_total += (pre_sector + 3); else track_total += (pre_sector + data_size + 2); } } } else { dev->tracks[track][side].data_offs = last_offset; for (int i = 0; i < track_spt; i++) { data_size = sector_size; data_size = 128 << data_size; dev->tracks[track][side].sector_data_offs[i] = last_offset; dev->tracks[track][side].sector_data_size[i] = 1; if (dev->buffer[dev->tracks[track][side].sector_data_offs[i]] > 0x08) { /* Invalid sector data type, possibly a malformed HxC IMG image (it outputs data errored sectors with a variable amount of bytes, against the specification). */ imd_log("IMD: Invalid sector data type %02X\n", dev->buffer[dev->tracks[track][side].sector_data_offs[i]]); fclose(dev->fp); free(dev); imd[drive] = NULL; memset(floppyfns[drive], 0, sizeof(floppyfns[drive])); return; } if (buffer[dev->tracks[track][side].sector_data_offs[i]] != 0) dev->tracks[track][side].sector_data_size[i] += (buffer[dev->tracks[track][side].sector_data_offs[i]] & 1) ? data_size : 1; last_offset += dev->tracks[track][side].sector_data_size[i]; if (!(buffer[dev->tracks[track][side].sector_data_offs[i]] & 1)) fwriteprot[drive] = writeprot[drive] = 1; type = dev->buffer[dev->tracks[track][side].sector_data_offs[i]]; if (type != 0x00) { type = ((type - 1) >> 1) & 7; if (data_size > (128 << dev->tracks[track][side].max_sector_size)) track_total += (pre_sector + 3); else track_total += (pre_sector + data_size + 2); } } } buffer2 = buffer + last_offset; /* Leaving even GAP4: 80 : 40 */ /* Leaving only GAP1: 96 : 47 */ /* Not leaving even GAP1: 146 : 73 */ raw_tsize = get_raw_tsize(dev->tracks[track][side].side_flags, 0); minimum_gap3 = 12 * track_spt; if ((dev->tracks[track][side].side_flags == 0x0A) || (dev->tracks[track][side].side_flags == 0x29)) converted_rate = 2; else if (dev->tracks[track][side].side_flags == 0x28) converted_rate = 4; else converted_rate = dev->tracks[track][side].side_flags & 0x03; if ((track_spt != 0x00) && (gap3_sizes[converted_rate][sector_size][track_spt] == 0x00)) { size_diff = raw_tsize - track_total; gap_sum = minimum_gap3 + minimum_gap4; if (size_diff < gap_sum) { /* If we can't fit the sectors with a reasonable minimum gap at perfect RPM, let's try 2% slower. */ raw_tsize = get_raw_tsize(dev->tracks[track][side].side_flags, 1); /* Set disk flags so that rotation speed is 2% slower. */ dev->disk_flags |= (3 << 5); size_diff = raw_tsize - track_total; if (size_diff < gap_sum) { /* If we can't fit the sectors with a reasonable minimum gap even at 2% slower RPM, abort. */ imd_log("IMD: Unable to fit the %i sectors in a track\n", track_spt); fclose(dev->fp); free(dev); imd[drive] = NULL; memset(floppyfns[drive], 0, sizeof(floppyfns[drive])); return; } } dev->tracks[track][side].gap3_len = (size_diff - minimum_gap4) / track_spt; } else dev->tracks[track][side].gap3_len = gap3_sizes[converted_rate][sector_size][track_spt]; /* imd_log("GAP3 length for (%02i)(%01i): %i bytes\n", track, side, dev->tracks[track][side].gap3_len); */ if (track > dev->track_count) dev->track_count = track; if (last_offset >= fsize) break; } /* If more than 43 tracks, then the tracks are thin (96 tpi). */ dev->track_count++; imd_log("In : dev->track_count = %i\n", dev->track_count); int empty_tracks = 0; for (int i = 0; i < dev->track_count; i++) { if ((dev->sides == 2) && (dev->tracks[i][0].spt == 0x00) && (dev->tracks[i][1].spt == 0x00)) empty_tracks++; else if ((dev->sides == 1) && (dev->tracks[i][0].spt == 0x00)) empty_tracks++; } imd_log("empty_tracks = %i\n", empty_tracks); if (empty_tracks >= (dev->track_count >> 1)) { for (int i = 0; i < dev->track_count; i += 2) { imd_log("Thick %02X = Thin %02X\n", i >> 1, i); dev->tracks[i >> 1][0] = dev->tracks[i][0]; dev->tracks[i >> 1][1] = dev->tracks[i][1]; } for (int i = (dev->track_count >> 1); i < dev->track_count; i++) { imd_log("Emptying %02X....\n", i); memset(&(dev->tracks[i][0]), 1, sizeof(imd_track_t)); memset(&(dev->tracks[i][1]), 1, sizeof(imd_track_t)); } dev->track_count >>= 1; } imd_log("Out: dev->track_count = %i\n", dev->track_count); dev->track_width = 0; if (dev->track_count > 43) dev->track_width = 1; /* If 2 sides, mark it as such. */ if (dev->sides == 2) dev->disk_flags |= 8; #if 0 imd_log("%i tracks, %i sides\n", dev->track_count, dev->sides); #endif /* Attach this format to the D86F engine. */ d86f_handler[drive].disk_flags = disk_flags; d86f_handler[drive].side_flags = side_flags; d86f_handler[drive].writeback = imd_writeback; d86f_handler[drive].set_sector = set_sector; d86f_handler[drive].read_data = poll_read_data; d86f_handler[drive].write_data = poll_write_data; d86f_handler[drive].format_conditions = format_conditions; d86f_handler[drive].extra_bit_cells = null_extra_bit_cells; d86f_handler[drive].encoded_data = common_encoded_data; d86f_handler[drive].read_revolution = common_read_revolution; d86f_handler[drive].index_hole_pos = null_index_hole_pos; d86f_handler[drive].get_raw_size = common_get_raw_size; d86f_handler[drive].check_crc = 1; d86f_set_version(drive, 0x0063); drives[drive].seek = imd_seek; d86f_common_handlers(drive); } void imd_close(int drive) { imd_t *dev = imd[drive]; if (dev == NULL) return; d86f_unregister(drive); if (dev->fp != NULL) { free(dev->buffer); fclose(dev->fp); } /* Release the memory. */ free(dev); imd[drive] = NULL; } void imd_set_fdc(void *fdc) { imd_fdc = (fdc_t *) fdc; } ```
The 2004–05 season was Football Club Internazionale Milano's 96th in existence and 89th consecutive season in the top flight of Italian football. Season overview The summer of 2004 saw Inter choose a new coach, Roberto Mancini coming from Lazio. Inter started the season qualifying for the Champions League group phase, but also collected many draws in the league. Inter, achieved better results in cups, made a comeback (3–2) in a match against Sampdoria, scoring all three goals in the last six minutes. The derby with Milan was lost 1–0, which broke a winning streak, in May 2004. the rivals also knocked Inter out of the Champions League, tournament in which – during the previous two-legs – Mancini's squad had been beaten by reigning champions Porto. Inter achieved a third-place finish in the league. The win of the Coppa Italia final against Roma, 3–0 on aggregate, closed the season. Players Squad information From youth squad Transfers Winter Competitions Overview Serie A League table Results summary Results by round Matches Coppa Italia Round of 16 Quarter-finals Semi-finals Final UEFA Champions League Qualifying phase Third qualifying round Group stage Knockout phase Round of 16 Quarter-finals Statistics Squad statistics {|class="wikitable" style="text-align: center;" |- ! ! style="width:70px;"|League ! style="width:70px;"|Europe ! style="width:70px;"|Cup ! style="width:70px;"|Total Stats |- |align=left|Games played || 38 || 12 || 8 || 58 |- |align=left|Games won || 18 || 6 || 7 || 31 |- |align=left|Games drawn || 18 || 4 || 1 || 23 |- |align=left|Games lost || 2 || 2 || 0 || 4 |- |align=left|Goals scored || 65 || 23 ||17 || 105 |- |align=left|Goals conceded || 37 || 12 || 4 || 53 |- |align=left|Goal difference || 28 || 11 ||13 || 52 |- |align=left|Clean sheets || 17 || 3 || 4 || 24 |- |align=left|Goal by substitute || – || – || – || – |- |align=left|Total shots || – || – || – || – |- |align=left|Shots on target || – || – || – || – |- |align=left|Corners || – || – || – || – |- |align=left|Players used || 31 || 26 ||28 || – |- |align=left|Offsides || – || – || – || – |- |align=left|Fouls suffered || – || – || – || – |- |align=left|Fouls committed || – || – || – || – |- |align=left|Yellow cards || 55 || 21 || 10|| 86 |- |align=left|Red cards || 1 || 1 || – || 2 |- Appearances and goals As of 15 June 2005 Goalscorers {| class="wikitable sortable" style="font-size: 95%; text-align: center;" |- !width="7%"|No. !width="7%"|Pos. !width="7%"|Nation !width="20%"|Name !Serie A !Coppa Italia !Champions League !Total |- | 10 | FW | | Adriano | 16 | 2 | 10 |28 |- | 30 | FW | | Obafemi Martins | 11 | 6 | 5 |22 |- | 32 | FW | | Christian Vieri | 13 | 3 | 1 |17 |- | 9 | FW | | Julio Cruz | 5 | 2 | 2 |9 |- | 25 | MF | | Dejan Stanković | 3 | 0 | 3 |6 |- | 20 | FW | | Álvaro Recoba | 3 | 2 | 1 |6 |- | 11 | DF | | Siniša Mihajlović | 4 | 1 | 0 |5 |- | 2 | DF | | Iván Córdoba | 3 | 0 | 0 |3 |- | 14 | MF | | Juan Sebastián Verón | 3 | 0 | 0 |3 |- | 19 | MF | | Esteban Cambiasso | 2 | 0 | 0 |2 |- | 5 | MF | | Emre Belözoğlu | 0 | 1 | 0 |1 |- | 7 | MF | | Andy van der Meyde | 0 | 0 | 1 |1 |- | 13 | DF | | Zé Maria | 1 | 0 | 0 |1 |- | # | colspan=3 | Own goals | 1 | 0 | 0 |1 |- |- bgcolor="F1F1F1" | colspan=4 | TOTAL | 65 | 17 | 23 | 105 References External links Official website Inter Milan seasons Internazionale
```python import sys import threading import types import zlib import unittest try: from unittest import mock except ImportError: import mock import mitogen.core import mitogen.utils from mitogen.core import b import testlib import simple_pkg.imports_replaces_self class ImporterMixin(testlib.RouterMixin): modname = None def setUp(self): super(ImporterMixin, self).setUp() self.context = mock.Mock() self.importer = mitogen.core.Importer(self.router, self.context, '') # TODO: this is a horrendous hack. Without it, we can't deliver a # response to find_module() via _on_load_module() since find_module() # is still holding the lock. The tests need a nicer abstraction for # soemthing like "fake participant" that lets us have a mock master # that respects the execution model expected by the code -- probably # (grmph) including multiplexer thread and all. self.importer._lock = threading.RLock() def set_get_module_response(self, resp): def on_context_send(msg): self.context_send_msg = msg self.importer._on_load_module( mitogen.core.Message.pickled(resp) ) self.context.send = on_context_send def tearDown(self): sys.modules.pop(self.modname, None) super(ImporterMixin, self).tearDown() class InvalidNameTest(ImporterMixin, testlib.TestCase): modname = 'trailingdot.' # 0:fullname 1:pkg_present 2:path 3:compressed 4:related response = (modname, None, None, None, None) @unittest.skipIf(sys.version_info < (3, 4), 'Requires ModuleSpec, Python 3.4+') def test_find_spec_invalid(self): self.set_get_module_response(self.response) self.assertEqual(self.importer.find_spec(self.modname, path=None), None) class MissingModuleTest(ImporterMixin, testlib.TestCase): modname = 'missing' # 0:fullname 1:pkg_present 2:path 3:compressed 4:related response = (modname, None, None, None, None) @unittest.skipIf(sys.version_info >= (3, 4), 'Superceded in Python 3.4+') def test_load_module_missing(self): self.set_get_module_response(self.response) self.assertRaises(ImportError, self.importer.load_module, self.modname) @unittest.skipIf(sys.version_info < (3, 4), 'Requires ModuleSpec, Python 3.4+') def test_find_spec_missing(self): """ Importer should optimistically offer itself as a module loader when there are no disqualifying criteria. """ import importlib.machinery self.set_get_module_response(self.response) spec = self.importer.find_spec(self.modname, path=None) self.assertIsInstance(spec, importlib.machinery.ModuleSpec) self.assertEqual(spec.name, self.modname) self.assertEqual(spec.loader, self.importer) @unittest.skipIf(sys.version_info < (3, 4), 'Requires ModuleSpec, Python 3.4+') def test_create_module_missing(self): import importlib.machinery self.set_get_module_response(self.response) spec = importlib.machinery.ModuleSpec(self.modname, self.importer) self.assertRaises(ImportError, self.importer.create_module, spec) @unittest.skipIf(sys.version_info >= (3, 4), 'Superceded in Python 3.4+') class LoadModuleTest(ImporterMixin, testlib.TestCase): data = zlib.compress(b("data = 1\n\n")) path = 'fake_module.py' modname = 'fake_module' # 0:fullname 1:pkg_present 2:path 3:compressed 4:related response = (modname, None, path, data, []) def test_module_added_to_sys_modules(self): self.set_get_module_response(self.response) mod = self.importer.load_module(self.modname) self.assertIs(sys.modules[self.modname], mod) self.assertIsInstance(mod, types.ModuleType) def test_module_file_set(self): self.set_get_module_response(self.response) mod = self.importer.load_module(self.modname) self.assertEqual(mod.__file__, 'master:' + self.path) def test_module_loader_set(self): self.set_get_module_response(self.response) mod = self.importer.load_module(self.modname) self.assertIs(mod.__loader__, self.importer) def test_module_package_unset(self): self.set_get_module_response(self.response) mod = self.importer.load_module(self.modname) self.assertIsNone(mod.__package__) @unittest.skipIf(sys.version_info < (3, 4), 'Requires ModuleSpec, Python 3.4+') class ModuleSpecTest(ImporterMixin, testlib.TestCase): data = zlib.compress(b("data = 1\n\n")) path = 'fake_module.py' modname = 'fake_module' # 0:fullname 1:pkg_present 2:path 3:compressed 4:related response = (modname, None, path, data, []) def test_module_attributes(self): import importlib.machinery self.set_get_module_response(self.response) spec = importlib.machinery.ModuleSpec(self.modname, self.importer) mod = self.importer.create_module(spec) self.assertIsInstance(mod, types.ModuleType) self.assertEqual(mod.__name__, 'fake_module') #self.assertFalse(hasattr(mod, '__file__')) @unittest.skipIf(sys.version_info >= (3, 4), 'Superceded in Python 3.4+') class LoadSubmoduleTest(ImporterMixin, testlib.TestCase): data = zlib.compress(b("data = 1\n\n")) path = 'fake_module.py' modname = 'mypkg.fake_module' # 0:fullname 1:pkg_present 2:path 3:compressed 4:related response = (modname, None, path, data, []) def test_module_package_unset(self): self.set_get_module_response(self.response) mod = self.importer.load_module(self.modname) self.assertEqual(mod.__package__, 'mypkg') @unittest.skipIf(sys.version_info < (3, 4), 'Requires ModuleSpec, Python 3.4+') class SubmoduleSpecTest(ImporterMixin, testlib.TestCase): data = zlib.compress(b("data = 1\n\n")) path = 'fake_module.py' modname = 'mypkg.fake_module' # 0:fullname 1:pkg_present 2:path 3:compressed 4:related response = (modname, None, path, data, []) def test_module_attributes(self): import importlib.machinery self.set_get_module_response(self.response) spec = importlib.machinery.ModuleSpec(self.modname, self.importer) mod = self.importer.create_module(spec) self.assertIsInstance(mod, types.ModuleType) self.assertEqual(mod.__name__, 'mypkg.fake_module') #self.assertFalse(hasattr(mod, '__file__')) @unittest.skipIf(sys.version_info >= (3, 4), 'Superceded in Python 3.4+') class LoadModulePackageTest(ImporterMixin, testlib.TestCase): data = zlib.compress(b("func = lambda: 1\n\n")) path = 'fake_pkg/__init__.py' modname = 'fake_pkg' # 0:fullname 1:pkg_present 2:path 3:compressed 4:related response = (modname, [], path, data, []) def test_module_file_set(self): self.set_get_module_response(self.response) mod = self.importer.load_module(self.modname) self.assertEqual(mod.__file__, 'master:' + self.path) def test_get_filename(self): self.set_get_module_response(self.response) mod = self.importer.load_module(self.modname) filename = mod.__loader__.get_filename(self.modname) self.assertEqual('master:fake_pkg/__init__.py', filename) def test_get_source(self): self.set_get_module_response(self.response) mod = self.importer.load_module(self.modname) source = mod.__loader__.get_source(self.modname) self.assertEqual(source, mitogen.core.to_text(zlib.decompress(self.data))) def test_module_loader_set(self): self.set_get_module_response(self.response) mod = self.importer.load_module(self.modname) self.assertIs(mod.__loader__, self.importer) def test_module_path_present(self): self.set_get_module_response(self.response) mod = self.importer.load_module(self.modname) self.assertEqual(mod.__path__, []) def test_module_package_set(self): self.set_get_module_response(self.response) mod = self.importer.load_module(self.modname) self.assertEqual(mod.__package__, self.modname) def test_module_data(self): self.set_get_module_response(self.response) mod = self.importer.load_module(self.modname) self.assertIsInstance(mod.func, types.FunctionType) self.assertEqual(mod.func.__module__, self.modname) @unittest.skipIf(sys.version_info < (3, 4), 'Requires ModuleSpec, Python 3.4+') class PackageSpecTest(ImporterMixin, testlib.TestCase): data = zlib.compress(b("func = lambda: 1\n\n")) path = 'fake_pkg/__init__.py' modname = 'fake_pkg' # 0:fullname 1:pkg_present 2:path 3:compressed 4:related response = (modname, [], path, data, []) def test_module_attributes(self): import importlib.machinery self.set_get_module_response(self.response) spec = importlib.machinery.ModuleSpec(self.modname, self.importer) mod = self.importer.create_module(spec) self.assertIsInstance(mod, types.ModuleType) self.assertEqual(mod.__name__, 'fake_pkg') #self.assertFalse(hasattr(mod, '__file__')) def test_get_filename(self): import importlib.machinery self.set_get_module_response(self.response) spec = importlib.machinery.ModuleSpec(self.modname, self.importer) _ = self.importer.create_module(spec) filename = self.importer.get_filename(self.modname) self.assertEqual('master:fake_pkg/__init__.py', filename) def test_get_source(self): import importlib.machinery self.set_get_module_response(self.response) spec = importlib.machinery.ModuleSpec(self.modname, self.importer) _ = self.importer.create_module(spec) source = self.importer.get_source(self.modname) self.assertEqual(source, mitogen.core.to_text(zlib.decompress(self.data))) class EmailParseAddrSysTest(testlib.RouterMixin, testlib.TestCase): def initdir(self, caplog): self.caplog = caplog def test_sys_module_not_fetched(self): # An old version of core.Importer would request the email.sys module # while executing email.utils.parseaddr(). Ensure this needless # roundtrip has not reappeared. pass class ImporterBlacklistTest(testlib.TestCase): def test_is_blacklisted_import_default(self): importer = mitogen.core.Importer( router=mock.Mock(), context=None, core_src='', ) self.assertIsInstance(importer.whitelist, list) self.assertIsInstance(importer.blacklist, list) self.assertFalse(mitogen.core.is_blacklisted_import(importer, 'mypkg')) self.assertFalse(mitogen.core.is_blacklisted_import(importer, 'mypkg.mod')) self.assertFalse(mitogen.core.is_blacklisted_import(importer, 'otherpkg')) self.assertFalse(mitogen.core.is_blacklisted_import(importer, 'otherpkg.mod')) self.assertTrue(mitogen.core.is_blacklisted_import(importer, '__builtin__')) self.assertTrue(mitogen.core.is_blacklisted_import(importer, 'builtins')) def test_is_blacklisted_import_just_whitelist(self): importer = mitogen.core.Importer( router=mock.Mock(), context=None, core_src='', whitelist=('mypkg',), ) self.assertIsInstance(importer.whitelist, list) self.assertIsInstance(importer.blacklist, list) self.assertFalse(mitogen.core.is_blacklisted_import(importer, 'mypkg')) self.assertFalse(mitogen.core.is_blacklisted_import(importer, 'mypkg.mod')) self.assertTrue(mitogen.core.is_blacklisted_import(importer, 'otherpkg')) self.assertTrue(mitogen.core.is_blacklisted_import(importer, 'otherpkg.mod')) self.assertTrue(mitogen.core.is_blacklisted_import(importer, '__builtin__')) self.assertTrue(mitogen.core.is_blacklisted_import(importer, 'builtins')) def test_is_blacklisted_import_just_blacklist(self): importer = mitogen.core.Importer( router=mock.Mock(), context=None, core_src='', blacklist=('mypkg',), ) self.assertIsInstance(importer.whitelist, list) self.assertIsInstance(importer.blacklist, list) self.assertTrue(mitogen.core.is_blacklisted_import(importer, 'mypkg')) self.assertTrue(mitogen.core.is_blacklisted_import(importer, 'mypkg.mod')) self.assertFalse(mitogen.core.is_blacklisted_import(importer, 'otherpkg')) self.assertFalse(mitogen.core.is_blacklisted_import(importer, 'otherpkg.mod')) self.assertTrue(mitogen.core.is_blacklisted_import(importer, '__builtin__')) self.assertTrue(mitogen.core.is_blacklisted_import(importer, 'builtins')) def test_is_blacklisted_import_whitelist_and_blacklist(self): importer = mitogen.core.Importer( router=mock.Mock(), context=None, core_src='', whitelist=('mypkg',), blacklist=('mypkg',), ) self.assertIsInstance(importer.whitelist, list) self.assertIsInstance(importer.blacklist, list) self.assertTrue(mitogen.core.is_blacklisted_import(importer, 'mypkg')) self.assertTrue(mitogen.core.is_blacklisted_import(importer, 'mypkg.mod')) self.assertTrue(mitogen.core.is_blacklisted_import(importer, 'otherpkg')) self.assertTrue(mitogen.core.is_blacklisted_import(importer, 'otherpkg.mod')) self.assertTrue(mitogen.core.is_blacklisted_import(importer, '__builtin__')) self.assertTrue(mitogen.core.is_blacklisted_import(importer, 'builtins')) class Python24LineCacheTest(testlib.TestCase): # TODO: mitogen.core.Importer._update_linecache() pass class SelfReplacingModuleTest(testlib.RouterMixin, testlib.TestCase): # issue #590 def test_importer_handles_self_replacement(self): c = self.router.local() self.assertEqual(0, c.call(simple_pkg.imports_replaces_self.subtract_one, 1)) ```
```objective-c #pragma once #include "envoy/extensions/filters/network/generic_proxy/router/v3/router.pb.h" #include "envoy/extensions/filters/network/generic_proxy/router/v3/router.pb.validate.h" #include "source/extensions/filters/network/generic_proxy/interface/filter.h" #include "source/extensions/filters/network/generic_proxy/router/router.h" namespace Envoy { namespace Extensions { namespace NetworkFilters { namespace GenericProxy { namespace Router { class RouterFactory : public NamedFilterConfigFactory { public: FilterFactoryCb createFilterFactoryFromProto(const Protobuf::Message& config, const std::string& stat_prefix, Server::Configuration::FactoryContext& context) override; ProtobufTypes::MessagePtr createEmptyConfigProto() override { return std::make_unique< envoy::extensions::filters::network::generic_proxy::router::v3::Router>(); } ProtobufTypes::MessagePtr createEmptyRouteConfigProto() override { return nullptr; } RouteSpecificFilterConfigConstSharedPtr createRouteSpecificFilterConfig(const Protobuf::Message&, Server::Configuration::ServerFactoryContext&, ProtobufMessage::ValidationVisitor&) override { return nullptr; } bool isTerminalFilter() override { return true; } std::string name() const override { return "envoy.filters.generic.router"; } }; } // namespace Router } // namespace GenericProxy } // namespace NetworkFilters } // namespace Extensions } // namespace Envoy ```
Mehmet Ali Has (1 January 1927 – 28 March 1982) was a Turkish footballer who played as a forward and was best known for his stints at Fenerbahçe and Beykoz in the Turkish Süper Lig. He was nicknamed Tarzan Mehmet Ali because of his long hair. Personal life Has' brother, Şeref Has, was also a Turkish professional footballer. References External links 1927 births 1982 deaths Footballers from Istanbul Turkish men's footballers Turkey men's international footballers Turkey men's youth international footballers Fenerbahçe S.K. footballers Alibeyköy S.K. footballers Süper Lig players Men's association football forwards
Danny O'Neil (born August 4, 1971) is a former American football quarterback. O'Neil was a star high school quarterback at Mater Dei in Orange County, California and was heavily recruited by Alabama and USC but chose to play for Rich Brooks at the University of Oregon. Despite being a four-year starter who set numerous passing records for the Ducks, O'Neil struggled throughout his career in Eugene. However, in 1994 O'Neil led the Ducks to the Pac-10 championship and a berth in the 1995 Rose Bowl, Oregon's first since 1958. Though the Ducks lost to #2 Penn State 38–20, O'Neil set Rose Bowl records for most passes completed (41), most attempts (61), most yardage (465), most plays (74), and most total offense (456 yards), and was named the game's co-MVP with Penn State's Ki-Jana Carter. He was named to the Rose Bowl Hall of Fame in 2003. O'Neil was named first team all-conference as a senior, leading the Ducks to three pivotal come-from-behind victories; defeating #9 Washington, #11 Arizona, and archrival Oregon State in order to win the Pac-10 Conference championship. He passed for 8,301 yards and 62 touchdowns in his career at Oregon and also led the Ducks to the 1992 Independence Bowl. O'Neil was not drafted into the National Football League. He played part of one season with the Anaheim Piranhas of the Arena Football League before retiring from football to become a youth pastor. Through the years he founded a church, Calvary Fellowship, in Eugene, OR. There he met his wife, Kim Nguyen/O'Neil. They soon got married and had two kids, Taylor O'Neil (b. 2004) and Danny Rayden O'Neil (b. 2005). He was a pastor in Eugene, Oregon, where he has ministered to players from his former team. He currently resides in Eugene, Oregon. References Living people Players of American football from Fullerton, California American football quarterbacks Oregon Ducks football players Anaheim Piranhas players American Christian clergy 1971 births
```java /* * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ package org.apache.beam.sdk.values; import java.io.Serializable; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; import java.util.List; import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.Lists; import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.reflect.Invokable; import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.reflect.Parameter; import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.reflect.TypeResolver; import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.reflect.TypeToken; import org.checkerframework.checker.nullness.qual.Nullable; /** * A description of a Java type, including actual generic parameters where possible. * * <p>To prevent losing actual type arguments due to erasure, create an anonymous subclass with * concrete types: * * <pre>{@code * TypeDescriptor<List<String>> typeDescriptor = new TypeDescriptor<List<String>>() {}; * }</pre> * * <p>If the above were not an anonymous subclass, the type {@code List<String>} would be erased and * unavailable at run time. * * @param <T> the type represented by this {@link TypeDescriptor} */ public abstract class TypeDescriptor<T> implements Serializable { // This class is just a wrapper for TypeToken private final TypeToken<T> token; /** * Creates a {@link TypeDescriptor} wrapping the provided token. This constructor is private so * Guava types do not leak. */ private TypeDescriptor(TypeToken<T> token) { this.token = token; } /** * Creates a {@link TypeDescriptor} representing the type parameter {@code T}. To use this * constructor properly, the type parameter must be a concrete type, for example {@code new * TypeDescriptor<List<String>>(){}}. */ protected TypeDescriptor() { token = new TypeToken<T>(getClass()) {}; } /** * Creates a {@link TypeDescriptor} representing the type parameter {@code T}, which should * resolve to a concrete type in the context of the class {@code clazz}. * * <p>Unlike {@link TypeDescriptor#TypeDescriptor(Class)} this will also use context's of the * enclosing instances while attempting to resolve the type. This means that the types of any * classes instantiated in the concrete instance should be resolvable. */ protected TypeDescriptor(Object instance) { TypeToken<?> unresolvedToken = new TypeToken<T>(getClass()) {}; // While we haven't fully resolved the parameters, refine it using the captured // enclosing instance of the object. unresolvedToken = TypeToken.of(instance.getClass()).resolveType(unresolvedToken.getType()); if (hasUnresolvedParameters(unresolvedToken.getType())) { for (Field field : instance.getClass().getDeclaredFields()) { Object fieldInstance = getEnclosingInstance(field, instance); if (fieldInstance != null) { unresolvedToken = TypeToken.of(fieldInstance.getClass()).resolveType(unresolvedToken.getType()); if (!hasUnresolvedParameters(unresolvedToken.getType())) { break; } } } } // Once we've either fully resolved the parameters or exhausted enclosing instances, we have // the best approximation to the token we can get. @SuppressWarnings("unchecked") TypeToken<T> typedToken = (TypeToken<T>) unresolvedToken; token = typedToken; } private static boolean hasUnresolvedParameters(Type type) { if (type instanceof TypeVariable) { return true; } else if (type instanceof ParameterizedType) { ParameterizedType param = (ParameterizedType) type; for (Type arg : param.getActualTypeArguments()) { if (hasUnresolvedParameters(arg)) { return true; } } } return false; } /** * Returns the enclosing instance if the field is synthetic and it is able to access it, or * {@literal null} if not. */ private static @Nullable Object getEnclosingInstance(Field field, Object instance) { if (!field.isSynthetic()) { return null; } boolean accessible = field.isAccessible(); try { field.setAccessible(true); return field.get(instance); } catch (IllegalArgumentException | IllegalAccessException e) { // If we fail to get the enclosing instance field, do nothing. In the worst case, we won't // refine the type based on information in this enclosing class -- that is consistent with // previous behavior and is still a correct answer that can be fixed by returning the correct // type descriptor. return null; } finally { field.setAccessible(accessible); } } /** * Creates a {@link TypeDescriptor} representing the type parameter {@code T}, which should * resolve to a concrete type in the context of the class {@code clazz}. */ @SuppressWarnings("unchecked") protected TypeDescriptor(Class<?> clazz) { TypeToken<T> unresolvedToken = new TypeToken<T>(getClass()) {}; token = (TypeToken<T>) TypeToken.of(clazz).resolveType(unresolvedToken.getType()); } /** Returns a {@link TypeDescriptor} representing the given type. */ public static <T> TypeDescriptor<T> of(Class<T> type) { return new SimpleTypeDescriptor<>(TypeToken.of(type)); } /** Returns a {@link TypeDescriptor} representing the given type. */ @SuppressWarnings("unchecked") public static TypeDescriptor<?> of(Type type) { return new SimpleTypeDescriptor<>((TypeToken<Object>) TypeToken.of(type)); } /** Returns the {@link Type} represented by this {@link TypeDescriptor}. */ public Type getType() { return token.getType(); } /** * Returns the {@link Class} underlying the {@link Type} represented by this {@link * TypeDescriptor}. */ public Class<? super T> getRawType() { return token.getRawType(); } /** Returns the component type if this type is an array type, otherwise returns {@code null}. */ public @Nullable TypeDescriptor<?> getComponentType() { @Nullable TypeToken<?> componentTypeToken = token.getComponentType(); if (componentTypeToken == null) { return null; } else { return new SimpleTypeDescriptor<>(componentTypeToken); } } /** Returns the generic form of a supertype. */ public final TypeDescriptor<? super T> getSupertype(Class<? super T> superclass) { return new SimpleTypeDescriptor<>(token.getSupertype(superclass)); } /** Returns true if this type is known to be an array type. */ public final boolean isArray() { return token.isArray(); } /** * Returns a {@link TypeVariable} for the named type parameter. Throws {@link * IllegalArgumentException} if a type variable by the requested type parameter is not found. * * <p>For example, {@code new TypeDescriptor<List>(){}.getTypeParameter("T")} returns a {@code * TypeVariable<? super List>} representing the formal type parameter {@code T}. * * <p>Do not mistake the type parameters (formal type argument list) with the actual type * arguments. For example, if a class {@code Foo} extends {@code List<String>}, it does not make * sense to ask for a type parameter, because {@code Foo} does not have any. */ public final TypeVariable<Class<? super T>> getTypeParameter(String paramName) { // Cannot convert TypeVariable<Class<? super T>>[] to TypeVariable<Class<? super T>>[] // due to how they are used here, so the result of getTypeParameters() cannot be used // without upcast. Class<?> rawType = getRawType(); for (TypeVariable<?> param : rawType.getTypeParameters()) { if (param.getName().equals(paramName)) { @SuppressWarnings("unchecked") TypeVariable<Class<? super T>> typedParam = (TypeVariable<Class<? super T>>) param; return typedParam; } } throw new IllegalArgumentException( "No type parameter named " + paramName + " found on " + getRawType()); } /** Returns true if this type is assignable from the given type. */ public final boolean isSupertypeOf(TypeDescriptor<?> source) { return token.isSupertypeOf(source.token); } /** Return true if this type is a subtype of the given type. */ public final boolean isSubtypeOf(TypeDescriptor<?> parent) { return token.isSubtypeOf(parent.token); } /** Returns a list of argument types for the given method, which must be a part of the class. */ public List<TypeDescriptor<?>> getArgumentTypes(Method method) { Invokable<?, ?> typedMethod = token.method(method); List<TypeDescriptor<?>> argTypes = Lists.newArrayList(); for (Parameter parameter : typedMethod.getParameters()) { argTypes.add(new SimpleTypeDescriptor<>(parameter.getType())); } return argTypes; } /** * Returns a {@link TypeDescriptor} representing the given type, with type variables resolved * according to the specialization in this type. * * <p>For example, consider the following class: * * <pre>{@code * class MyList implements List<String> { ... } * }</pre> * * <p>The {@link TypeDescriptor} returned by * * <pre>{@code * TypeDescriptor.of(MyList.class) * .resolveType(Mylist.class.getMethod("get", int.class).getGenericReturnType) * }</pre> * * will represent the type {@code String}. */ public TypeDescriptor<?> resolveType(Type type) { return new SimpleTypeDescriptor<>(token.resolveType(type)); } /** * Returns a set of {@link TypeDescriptor TypeDescriptor}, one for each superclass as well as each * interface implemented by this class. */ @SuppressWarnings("rawtypes") public Iterable<TypeDescriptor> getTypes() { List<TypeDescriptor> interfaces = Lists.newArrayList(); for (TypeToken<?> interfaceToken : token.getTypes()) { interfaces.add(new SimpleTypeDescriptor<>(interfaceToken)); } return interfaces; } /** Returns a set of {@link TypeDescriptor}s, one for each interface implemented by this class. */ @SuppressWarnings("rawtypes") public Iterable<TypeDescriptor> getInterfaces() { List<TypeDescriptor> interfaces = Lists.newArrayList(); for (TypeToken<?> interfaceToken : token.getTypes().interfaces()) { interfaces.add(new SimpleTypeDescriptor<>(interfaceToken)); } return interfaces; } /** Returns a set of {@link TypeDescriptor}s, one for each superclass (including this class). */ @SuppressWarnings("rawtypes") public Iterable<TypeDescriptor> getClasses() { List<TypeDescriptor> classes = Lists.newArrayList(); for (TypeToken<?> classToken : token.getTypes().classes()) { classes.add(new SimpleTypeDescriptor<>(classToken)); } return classes; } /** * Returns a new {@code TypeDescriptor} where the type variable represented by {@code * typeParameter} are substituted by {@code type}. For example, it can be used to construct {@code * Map<K, V>} for any {@code K} and {@code V} type: * * <pre>{@code * static <K, V> TypeDescriptor<Map<K, V>> mapOf( * TypeDescriptor<K> keyType, TypeDescriptor<V> valueType) { * return new TypeDescriptor<Map<K, V>>() {} * .where(new TypeParameter<K>() {}, keyType) * .where(new TypeParameter<V>() {}, valueType); * } * }</pre> * * @param <X> The parameter type * @param typeParameter the parameter type variable * @param typeDescriptor the actual type to substitute */ @SuppressWarnings("unchecked") public <X> TypeDescriptor<T> where( TypeParameter<X> typeParameter, TypeDescriptor<X> typeDescriptor) { return where(typeParameter.typeVariable, typeDescriptor.getType()); } /** * A more general form of {@link #where(TypeParameter, TypeDescriptor)} that returns a new {@code * TypeDescriptor} by matching {@code formal} against {@code actual} to resolve type variables in * the current {@link TypeDescriptor}. */ @SuppressWarnings("unchecked") public TypeDescriptor<T> where(Type formal, Type actual) { TypeResolver resolver = new TypeResolver().where(formal, actual); return (TypeDescriptor<T>) TypeDescriptor.of(resolver.resolveType(token.getType())); } /** * Returns whether this {@link TypeDescriptor} has any unresolved type parameters, as opposed to * being a concrete type. * * <p>For example: * * <pre>{@code * TypeDescriptor.of(new ArrayList<String>() {}.getClass()).hasUnresolvedTypeParameters() * => false, because the anonymous class is instantiated with a concrete type * * class TestUtils { * <T> ArrayList<T> createTypeErasedList() { * return new ArrayList<T>() {}; * } * } * * TypeDescriptor.of(TestUtils.<String>createTypeErasedList().getClass()) * => true, because the type variable T got type-erased and the anonymous ArrayList class * is instantiated with an unresolved type variable T. * }</pre> */ public boolean hasUnresolvedParameters() { return hasUnresolvedParameters(getType()); } @Override public String toString() { return token.toString(); } /** Two type descriptor are equal if and only if they represent the same type. */ @Override public boolean equals(@Nullable Object other) { if (!(other instanceof TypeDescriptor)) { return false; } else { @SuppressWarnings("unchecked") TypeDescriptor<?> descriptor = (TypeDescriptor<?>) other; return token.equals(descriptor.token); } } @Override public int hashCode() { return token.hashCode(); } /** * A non-abstract {@link TypeDescriptor} for construction directly from an existing {@link * TypeToken}. */ private static final class SimpleTypeDescriptor<T> extends TypeDescriptor<T> { SimpleTypeDescriptor(TypeToken<T> typeToken) { super(typeToken); } } } ```
```xml import { mockStore, screen, simpleRender } from 'test-utils'; import { fAccounts } from '@fixtures'; import { ClaimState, ClaimType, ITxValue } from '@types'; import { truncate } from '@utils'; import { ClaimTable } from '../components/ClaimTable'; function getComponent() { return simpleRender(<ClaimTable type={ClaimType.UNI} />, { initialState: mockStore({ dataStoreState: { claims: { claims: { [ClaimType.UNI]: [ { address: fAccounts[0].address, state: ClaimState.UNCLAIMED, amount: '403' as ITxValue }, { address: fAccounts[2].address, state: ClaimState.CLAIMED, amount: '403' as ITxValue } ] }, error: false } } }) }); } describe('ClaimTable', () => { test('render the table', async () => { getComponent(); expect(screen.getByText(new RegExp(truncate(fAccounts[0].address), 'i'))).toBeDefined(); }); test("don't show claimed addresses", () => { getComponent(); expect(screen.queryByText(new RegExp(truncate(fAccounts[2].address), 'i'))).toBeNull(); }); }); ```
Émilien Jacquelin (born 11 July 1995) is a French biathlete. He competed in the 2018 Winter Olympics and the 2022 Winter Olympics. Biathlon results All results are sourced from the International Biathlon Union. Olympic Games 2 medals (2 silver) World Championships 8 medals (4 gold, 4 bronze) *The single mixed relay was added as an event in 2019. World Cup World Cup rankings Individual victories 3 victories Relay victories 7 victories *Results are from IBU races which include the Biathlon World Cup, Biathlon World Championships and the Winter Olympic Games. References External links 1995 births Living people French male biathletes Sportspeople from Grenoble Université Savoie Mont Blanc alumni Biathlon World Championships medalists Biathletes at the 2018 Winter Olympics Biathletes at the 2022 Winter Olympics Medalists at the 2022 Winter Olympics Olympic biathletes for France Olympic silver medalists for France Olympic medalists in biathlon
```python """ miscellaneous sorting / groupby utilities """ import numpy as np from pandas.compat import long, string_types, PY3 from pandas.core.dtypes.common import ( _ensure_platform_int, _ensure_int64, is_list_like, is_categorical_dtype) from pandas.core.dtypes.cast import infer_dtype_from_array from pandas.core.dtypes.missing import isna import pandas.core.algorithms as algorithms from pandas._libs import lib, algos, hashtable from pandas._libs.hashtable import unique_label_indices _INT64_MAX = np.iinfo(np.int64).max def get_group_index(labels, shape, sort, xnull): """ For the particular label_list, gets the offsets into the hypothetical list representing the totally ordered cartesian product of all possible label combinations, *as long as* this space fits within int64 bounds; otherwise, though group indices identify unique combinations of labels, they cannot be deconstructed. - If `sort`, rank of returned ids preserve lexical ranks of labels. i.e. returned id's can be used to do lexical sort on labels; - If `xnull` nulls (-1 labels) are passed through. Parameters ---------- labels: sequence of arrays Integers identifying levels at each location shape: sequence of ints same length as labels Number of unique levels at each location sort: boolean If the ranks of returned ids should match lexical ranks of labels xnull: boolean If true nulls are excluded. i.e. -1 values in the labels are passed through Returns ------- An array of type int64 where two elements are equal if their corresponding labels are equal at all location. """ def _int64_cut_off(shape): acc = long(1) for i, mul in enumerate(shape): acc *= long(mul) if not acc < _INT64_MAX: return i return len(shape) def loop(labels, shape): # how many levels can be done without overflow: nlev = _int64_cut_off(shape) # compute flat ids for the first `nlev` levels stride = np.prod(shape[1:nlev], dtype='i8') out = stride * labels[0].astype('i8', subok=False, copy=False) for i in range(1, nlev): if shape[i] == 0: stride = 0 else: stride //= shape[i] out += labels[i] * stride if xnull: # exclude nulls mask = labels[0] == -1 for lab in labels[1:nlev]: mask |= lab == -1 out[mask] = -1 if nlev == len(shape): # all levels done! return out # compress what has been done so far in order to avoid overflow # to retain lexical ranks, obs_ids should be sorted comp_ids, obs_ids = compress_group_index(out, sort=sort) labels = [comp_ids] + labels[nlev:] shape = [len(obs_ids)] + shape[nlev:] return loop(labels, shape) def maybe_lift(lab, size): # pormote nan values return (lab + 1, size + 1) if (lab == -1).any() else (lab, size) labels = map(_ensure_int64, labels) if not xnull: labels, shape = map(list, zip(*map(maybe_lift, labels, shape))) return loop(list(labels), list(shape)) def get_compressed_ids(labels, sizes): """ Group_index is offsets into cartesian product of all possible labels. This space can be huge, so this function compresses it, by computing offsets (comp_ids) into the list of unique labels (obs_group_ids). Parameters ---------- labels : list of label arrays sizes : list of size of the levels Returns ------- tuple of (comp_ids, obs_group_ids) """ ids = get_group_index(labels, sizes, sort=True, xnull=False) return compress_group_index(ids, sort=True) def is_int64_overflow_possible(shape): the_prod = long(1) for x in shape: the_prod *= long(x) return the_prod >= _INT64_MAX def decons_group_index(comp_labels, shape): # reconstruct labels if is_int64_overflow_possible(shape): # at some point group indices are factorized, # and may not be deconstructed here! wrong path! raise ValueError('cannot deconstruct factorized group indices!') label_list = [] factor = 1 y = 0 x = comp_labels for i in reversed(range(len(shape))): labels = (x - y) % (factor * shape[i]) // factor np.putmask(labels, comp_labels < 0, -1) label_list.append(labels) y = labels * factor factor *= shape[i] return label_list[::-1] def decons_obs_group_ids(comp_ids, obs_ids, shape, labels, xnull): """ reconstruct labels from observed group ids Parameters ---------- xnull: boolean, if nulls are excluded; i.e. -1 labels are passed through """ if not xnull: lift = np.fromiter(((a == -1).any() for a in labels), dtype='i8') shape = np.asarray(shape, dtype='i8') + lift if not is_int64_overflow_possible(shape): # obs ids are deconstructable! take the fast route! out = decons_group_index(obs_ids, shape) return out if xnull or not lift.any() \ else [x - y for x, y in zip(out, lift)] i = unique_label_indices(comp_ids) i8copy = lambda a: a.astype('i8', subok=False, copy=True) return [i8copy(lab[i]) for lab in labels] def indexer_from_factorized(labels, shape, compress=True): ids = get_group_index(labels, shape, sort=True, xnull=False) if not compress: ngroups = (ids.size and ids.max()) + 1 else: ids, obs = compress_group_index(ids, sort=True) ngroups = len(obs) return get_group_index_sorter(ids, ngroups) def lexsort_indexer(keys, orders=None, na_position='last'): from pandas.core.categorical import Categorical labels = [] shape = [] if isinstance(orders, bool): orders = [orders] * len(keys) elif orders is None: orders = [True] * len(keys) for key, order in zip(keys, orders): # we are already a Categorical if is_categorical_dtype(key): c = key # create the Categorical else: c = Categorical(key, ordered=True) if na_position not in ['last', 'first']: raise ValueError('invalid na_position: {!r}'.format(na_position)) n = len(c.categories) codes = c.codes.copy() mask = (c.codes == -1) if order: # ascending if na_position == 'last': codes = np.where(mask, n, codes) elif na_position == 'first': codes += 1 else: # not order means descending if na_position == 'last': codes = np.where(mask, n, n - codes - 1) elif na_position == 'first': codes = np.where(mask, 0, n - codes) if mask.any(): n += 1 shape.append(n) labels.append(codes) return indexer_from_factorized(labels, shape) def nargsort(items, kind='quicksort', ascending=True, na_position='last'): """ This is intended to be a drop-in replacement for np.argsort which handles NaNs. It adds ascending and na_position parameters. GH #6399, #5231 """ # specially handle Categorical if is_categorical_dtype(items): return items.argsort(ascending=ascending, kind=kind) items = np.asanyarray(items) idx = np.arange(len(items)) mask = isna(items) non_nans = items[~mask] non_nan_idx = idx[~mask] nan_idx = np.nonzero(mask)[0] if not ascending: non_nans = non_nans[::-1] non_nan_idx = non_nan_idx[::-1] indexer = non_nan_idx[non_nans.argsort(kind=kind)] if not ascending: indexer = indexer[::-1] # Finally, place the NaNs at the end or the beginning according to # na_position if na_position == 'last': indexer = np.concatenate([indexer, nan_idx]) elif na_position == 'first': indexer = np.concatenate([nan_idx, indexer]) else: raise ValueError('invalid na_position: {!r}'.format(na_position)) return indexer class _KeyMapper(object): """ Ease my suffering. Map compressed group id -> key tuple """ def __init__(self, comp_ids, ngroups, levels, labels): self.levels = levels self.labels = labels self.comp_ids = comp_ids.astype(np.int64) self.k = len(labels) self.tables = [hashtable.Int64HashTable(ngroups) for _ in range(self.k)] self._populate_tables() def _populate_tables(self): for labs, table in zip(self.labels, self.tables): table.map(self.comp_ids, labs.astype(np.int64)) def get_key(self, comp_id): return tuple(level[table.get_item(comp_id)] for table, level in zip(self.tables, self.levels)) def get_flattened_iterator(comp_ids, ngroups, levels, labels): # provide "flattened" iterator for multi-group setting mapper = _KeyMapper(comp_ids, ngroups, levels, labels) return [mapper.get_key(i) for i in range(ngroups)] def get_indexer_dict(label_list, keys): """ return a diction of {labels} -> {indexers} """ shape = list(map(len, keys)) group_index = get_group_index(label_list, shape, sort=True, xnull=True) ngroups = ((group_index.size and group_index.max()) + 1) \ if is_int64_overflow_possible(shape) \ else np.prod(shape, dtype='i8') sorter = get_group_index_sorter(group_index, ngroups) sorted_labels = [lab.take(sorter) for lab in label_list] group_index = group_index.take(sorter) return lib.indices_fast(sorter, group_index, keys, sorted_labels) # your_sha256_hash------ # sorting levels...cleverly? def get_group_index_sorter(group_index, ngroups): """ algos.groupsort_indexer implements `counting sort` and it is at least O(ngroups), where ngroups = prod(shape) shape = map(len, keys) that is, linear in the number of combinations (cartesian product) of unique values of groupby keys. This can be huge when doing multi-key groupby. np.argsort(kind='mergesort') is O(count x log(count)) where count is the length of the data-frame; Both algorithms are `stable` sort and that is necessary for correctness of groupby operations. e.g. consider: df.groupby(key)[col].transform('first') """ count = len(group_index) alpha = 0.0 # taking complexities literally; there may be beta = 1.0 # some room for fine-tuning these parameters do_groupsort = (count > 0 and ((alpha + beta * ngroups) < (count * np.log(count)))) if do_groupsort: sorter, _ = algos.groupsort_indexer(_ensure_int64(group_index), ngroups) return _ensure_platform_int(sorter) else: return group_index.argsort(kind='mergesort') def compress_group_index(group_index, sort=True): """ Group_index is offsets into cartesian product of all possible labels. This space can be huge, so this function compresses it, by computing offsets (comp_ids) into the list of unique labels (obs_group_ids). """ size_hint = min(len(group_index), hashtable._SIZE_HINT_LIMIT) table = hashtable.Int64HashTable(size_hint) group_index = _ensure_int64(group_index) # note, group labels come out ascending (ie, 1,2,3 etc) comp_ids, obs_group_ids = table.get_labels_groupby(group_index) if sort and len(obs_group_ids) > 0: obs_group_ids, comp_ids = _reorder_by_uniques(obs_group_ids, comp_ids) return comp_ids, obs_group_ids def _reorder_by_uniques(uniques, labels): # sorter is index where elements ought to go sorter = uniques.argsort() # reverse_indexer is where elements came from reverse_indexer = np.empty(len(sorter), dtype=np.int64) reverse_indexer.put(sorter, np.arange(len(sorter))) mask = labels < 0 # move labels to right locations (ie, unsort ascending labels) labels = algorithms.take_nd(reverse_indexer, labels, allow_fill=False) np.putmask(labels, mask, -1) # sort observed ids uniques = algorithms.take_nd(uniques, sorter, allow_fill=False) return uniques, labels def safe_sort(values, labels=None, na_sentinel=-1, assume_unique=False): """ Sort ``values`` and reorder corresponding ``labels``. ``values`` should be unique if ``labels`` is not None. Safe for use with mixed types (int, str), orders ints before strs. .. versionadded:: 0.19.0 Parameters ---------- values : list-like Sequence; must be unique if ``labels`` is not None. labels : list_like Indices to ``values``. All out of bound indices are treated as "not found" and will be masked with ``na_sentinel``. na_sentinel : int, default -1 Value in ``labels`` to mark "not found". Ignored when ``labels`` is None. assume_unique : bool, default False When True, ``values`` are assumed to be unique, which can speed up the calculation. Ignored when ``labels`` is None. Returns ------- ordered : ndarray Sorted ``values`` new_labels : ndarray Reordered ``labels``; returned when ``labels`` is not None. Raises ------ TypeError * If ``values`` is not list-like or if ``labels`` is neither None nor list-like * If ``values`` cannot be sorted ValueError * If ``labels`` is not None and ``values`` contain duplicates. """ if not is_list_like(values): raise TypeError("Only list-like objects are allowed to be passed to" "safe_sort as values") if not isinstance(values, np.ndarray): # don't convert to string types dtype, _ = infer_dtype_from_array(values) values = np.asarray(values, dtype=dtype) def sort_mixed(values): # order ints before strings, safe in py3 str_pos = np.array([isinstance(x, string_types) for x in values], dtype=bool) nums = np.sort(values[~str_pos]) strs = np.sort(values[str_pos]) return np.concatenate([nums, np.asarray(strs, dtype=object)]) sorter = None if PY3 and lib.infer_dtype(values) == 'mixed-integer': # unorderable in py3 if mixed str/int ordered = sort_mixed(values) else: try: sorter = values.argsort() ordered = values.take(sorter) except TypeError: # try this anyway ordered = sort_mixed(values) # labels: if labels is None: return ordered if not is_list_like(labels): raise TypeError("Only list-like objects or None are allowed to be" "passed to safe_sort as labels") labels = _ensure_platform_int(np.asarray(labels)) from pandas import Index if not assume_unique and not Index(values).is_unique: raise ValueError("values should be unique if labels is not None") if sorter is None: # mixed types (hash_klass, _), values = algorithms._get_data_algo( values, algorithms._hashtables) t = hash_klass(len(values)) t.map_locations(values) sorter = _ensure_platform_int(t.lookup(ordered)) reverse_indexer = np.empty(len(sorter), dtype=np.int_) reverse_indexer.put(sorter, np.arange(len(sorter))) mask = (labels < -len(values)) | (labels >= len(values)) | \ (labels == na_sentinel) # (Out of bound indices will be masked with `na_sentinel` next, so we may # deal with them here without performance loss using `mode='wrap'`.) new_labels = reverse_indexer.take(labels, mode='wrap') np.putmask(new_labels, mask, na_sentinel) return ordered, _ensure_platform_int(new_labels) ```
```python """ Defines utilities useful for performing standard "configuration" style tasks. """ import re import os def configure_file(input_path, output_path, substitutions): """configure_file(input_path, output_path, substitutions) -> bool Given an input and output path, "configure" the file at the given input path by replacing variables in the file with those given in the substitutions list. Returns true if the output file was written. The substitutions list should be given as a list of tuples (regex string, replacement), where the regex and replacement will be used as in 're.sub' to execute the variable replacement. The output path's parent directory need not exist (it will be created). If the output path does exist and the configured data is not different than it's current contents, the output file will not be modified. This is designed to limit the impact of configured files on build dependencies. """ # Read in the input data. f = open(input_path, "rb") try: data = f.read() finally: f.close() # Perform the substitutions. for regex_string,replacement in substitutions: regex = re.compile(regex_string) data = regex.sub(replacement, data) # Ensure the output parent directory exists. output_parent_path = os.path.dirname(os.path.abspath(output_path)) if not os.path.exists(output_parent_path): os.makedirs(output_parent_path) # If the output path exists, load it and compare to the configured contents. if os.path.exists(output_path): current_data = None try: f = open(output_path, "rb") try: current_data = f.read() except: current_data = None f.close() except: current_data = None if current_data is not None and current_data == data: return False # Write the output contents. f = open(output_path, "wb") try: f.write(data) finally: f.close() return True ```
```c++ /*! * \file place_device.cc * \brief Inference the device of each operator given known information. * Insert a copy node automatically when there is a cross device. */ #include <nnvm/pass.h> #include <nnvm/op_attr_types.h> #include <nnvm/graph_attr_types.h> namespace nnvm { namespace pass { namespace { // simply logic to place device according to device_group hint // insert copy node when there is Graph PlaceDevice(Graph src) { CHECK(src.attrs.count("device_group_attr_key")) << "Need graph attribute \"device_group_attr_key\" in PlaceDevice"; CHECK(src.attrs.count("device_assign_map")) << "Need graph attribute \"device_assign_map\" in PlaceDevice"; CHECK(src.attrs.count("device_copy_op")) << "Need graph attribute \"device_copy_op\" in PlaceDevice"; std::string device_group_attr_key = src.GetAttr<std::string>("device_group_attr_key"); const Op* copy_op = Op::Get(src.GetAttr<std::string>("device_copy_op")); auto& device_assign_map = src.GetAttr<DeviceAssignMap>("device_assign_map"); const IndexedGraph& idx = src.indexed_graph(); static auto& is_backward = Op::GetAttr<TIsBackward>("TIsBackward"); DeviceVector device; // copy on write semanatics if (src.attrs.count("device") != 0) { device = src.MoveCopyAttr<DeviceVector>("device"); CHECK_EQ(device.size(), idx.num_nodes()); } else { device.resize(idx.num_nodes(), -1); } // forward pass for (uint32_t nid = 0; nid < idx.num_nodes(); ++nid) { const auto& inode = idx[nid]; auto it = inode.source->attrs.dict.find(device_group_attr_key); if (it != inode.source->attrs.dict.end()) { const std::string& device_group = it->second; auto dit = device_assign_map.find(device_group); CHECK(dit != device_assign_map.end()) << "The device assignment not found for group " << device_group; device[nid] = dit->second; } else { if (!inode.source->is_variable() && is_backward.get(inode.source->op(), false)) { if (device[inode.control_deps[0]] != -1) { device[nid] = device[inode.control_deps[0]]; } } else { for (const IndexedGraph::NodeEntry& e : inode.inputs) { if (device[e.node_id] != -1) { device[nid] = device[e.node_id]; break; } } } } } // backward pass for (uint32_t i = idx.num_nodes(); i != 0; --i) { uint32_t nid = i - 1; const auto& inode = idx[nid]; if (device[nid] == -1) continue; for (const IndexedGraph::NodeEntry& e : inode.inputs) { if (device[e.node_id] == -1) device[e.node_id] = device[nid]; } } int num_dev = 1, other_dev_id = -1; for (int& dev : device) { if (dev == -1) dev = 0; if (dev != other_dev_id) { if (other_dev_id != -1) ++num_dev; other_dev_id = dev; } } if (num_dev == 1) { src.attrs.erase("device_group_attr_key"); src.attrs.erase("device_assign_map"); src.attrs.erase("device_copy_op"); src.attrs["device"] = std::make_shared<any>(std::move(device)); return src; } std::map<std::tuple<uint32_t, uint32_t, int>, NodePtr> copy_map; std::vector<NodePtr> new_node_map(idx.num_nodes(), nullptr); std::unordered_map<const Node*, int> new_device_map; static auto& fmutate_inputs = Op::GetAttr<FMutateInputs>("FMutateInputs"); // insert copy node for (uint32_t nid = 0; nid < idx.num_nodes(); ++nid) { int dev_id = device[nid]; const auto& inode = idx[nid]; // check if mutation is needed bool need_mutate = false; if (!inode.source->is_variable() && fmutate_inputs.count(inode.source->op())) { for (uint32_t index : fmutate_inputs[inode.source->op()](inode.source->attrs)) { auto e = inode.inputs[index]; if (new_node_map[e.node_id] != nullptr || dev_id != device[e.node_id]) { LOG(FATAL) << " mutable state cannot go across device" << " op=" << inode.source->op()->name << " input_state_index=" << index; } } } for (const IndexedGraph::NodeEntry& e : inode.inputs) { if (new_node_map[e.node_id] != nullptr || dev_id != device[e.node_id]) { need_mutate = true; break; } } if (!need_mutate) { for (const uint32_t cid : inode.control_deps) { if (new_node_map[cid] != nullptr) { need_mutate = true; break; } } } if (inode.source->is_variable()) { CHECK(!need_mutate) << "consistency check"; } if (need_mutate) { NodePtr new_node = Node::Create(); new_node->attrs = inode.source->attrs; new_node->inputs.reserve(inode.inputs.size()); for (size_t i = 0; i < inode.inputs.size(); ++i) { const IndexedGraph::NodeEntry& e = inode.inputs[i]; if (dev_id != device[e.node_id]) { auto copy_key = std::make_tuple(e.node_id, e.index, dev_id); auto it = copy_map.find(copy_key); if (it != copy_map.end() && it->first == copy_key) { new_node->inputs.emplace_back( NodeEntry{it->second, 0, 0}); } else { NodePtr copy_node = Node::Create(); std::ostringstream os; os << inode.source->inputs[i].node->attrs.name << "_" << e.index <<"_copy"; copy_node->attrs.op = copy_op; copy_node->attrs.name = os.str(); if (new_node_map[e.node_id] != nullptr) { copy_node->inputs.emplace_back( NodeEntry{new_node_map[e.node_id], e.index, 0}); } else { copy_node->inputs.push_back(inode.source->inputs[i]); } if (copy_node->attrs.op->attr_parser != nullptr) { copy_node->attrs.op->attr_parser(&(copy_node->attrs)); } copy_map[copy_key] = copy_node; new_device_map[copy_node.get()] = dev_id; new_node->inputs.emplace_back( NodeEntry{std::move(copy_node), 0, 0}); } } else { if (new_node_map[e.node_id] != nullptr) { new_node->inputs.emplace_back( NodeEntry{new_node_map[e.node_id], e.index, 0}); } else { new_node->inputs.push_back(inode.source->inputs[i]); } } } new_node->control_deps.reserve(inode.control_deps.size()); for (size_t i = 0; i < inode.control_deps.size(); ++i) { uint32_t cid = inode.control_deps[i]; if (new_node_map[cid] != nullptr) { new_node->control_deps.push_back(new_node_map[cid]); } else { new_node->control_deps.push_back(inode.source->control_deps[i]); } } new_device_map[new_node.get()] = dev_id; new_node_map[nid] = std::move(new_node); } else { new_device_map[inode.source] = dev_id; } } // make the new graph Graph ret; for (const NodeEntry& e : src.outputs) { if (new_node_map[idx.node_id(e.node.get())] != nullptr) { ret.outputs.emplace_back( NodeEntry{new_node_map[idx.node_id(e.node.get())], e.index, e.version}); } else { ret.outputs.emplace_back(e); } } DeviceVector new_device_vec(ret.indexed_graph().num_nodes()); for (uint32_t nid = 0; nid < ret.indexed_graph().num_nodes(); ++nid) { auto source = ret.indexed_graph()[nid].source; if (new_device_map.count(source) == 0) { LOG(FATAL) << "canot find " << source; } new_device_vec[nid] = new_device_map.at(source); } ret.attrs["device"] = std::make_shared<any>(std::move(new_device_vec)); return ret; } NNVM_REGISTER_PASS(PlaceDevice) .describe("Infer the device type of each operator."\ "Insert a copy node when there is cross device copy") .set_body(PlaceDevice) .set_change_graph(true) .provide_graph_attr("device") .depend_graph_attr("device_group_attr_key") .depend_graph_attr("device_assign_map") .depend_graph_attr("device_copy_op"); DMLC_JSON_ENABLE_ANY(DeviceAssignMap, dict_str_int); } // namespace } // namespace pass } // namespace nnvm ```
```objective-c /* * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * You should have received a copy of the GNU Lesser General Public * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef AVDEVICE_OPENGL_ENC_SHADERS_H #define AVDEVICE_OPENGL_ENC_SHADERS_H #include "libavutil/pixfmt.h" static const char * const FF_OPENGL_VERTEX_SHADER = "uniform mat4 u_projectionMatrix;" "uniform mat4 u_modelViewMatrix;" "attribute vec4 a_position;" "attribute vec2 a_textureCoords;" "varying vec2 texture_coordinate;" "void main()" "{" "gl_Position = u_projectionMatrix * (a_position * u_modelViewMatrix);" "texture_coordinate = a_textureCoords;" "}"; /** * Fragment shader for packet RGBA formats. */ static const char * const FF_OPENGL_FRAGMENT_SHADER_RGBA_PACKET = #if defined(GL_ES_VERSION_2_0) "precision mediump float;" #endif "uniform sampler2D u_texture0;" "uniform mat4 u_colorMap;" "varying vec2 texture_coordinate;" "void main()" "{" "gl_FragColor = texture2D(u_texture0, texture_coordinate) * u_colorMap;" "}"; /** * Fragment shader for packet RGB formats. */ static const char * const FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET = #if defined(GL_ES_VERSION_2_0) "precision mediump float;" #endif "uniform sampler2D u_texture0;" "uniform mat4 u_colorMap;" "varying vec2 texture_coordinate;" "void main()" "{" "gl_FragColor = vec4((texture2D(u_texture0, texture_coordinate) * u_colorMap).rgb, 1.0);" "}"; /** * Fragment shader for planar RGBA formats. */ static const char * const FF_OPENGL_FRAGMENT_SHADER_RGBA_PLANAR = #if defined(GL_ES_VERSION_2_0) "precision mediump float;" #endif "uniform sampler2D u_texture0;" "uniform sampler2D u_texture1;" "uniform sampler2D u_texture2;" "uniform sampler2D u_texture3;" "varying vec2 texture_coordinate;" "void main()" "{" "gl_FragColor = vec4(texture2D(u_texture0, texture_coordinate).r," "texture2D(u_texture1, texture_coordinate).r," "texture2D(u_texture2, texture_coordinate).r," "texture2D(u_texture3, texture_coordinate).r);" "}"; /** * Fragment shader for planar RGB formats. */ static const char * const FF_OPENGL_FRAGMENT_SHADER_RGB_PLANAR = #if defined(GL_ES_VERSION_2_0) "precision mediump float;" #endif "uniform sampler2D u_texture0;" "uniform sampler2D u_texture1;" "uniform sampler2D u_texture2;" "varying vec2 texture_coordinate;" "void main()" "{" "gl_FragColor = vec4(texture2D(u_texture0, texture_coordinate).r," "texture2D(u_texture1, texture_coordinate).r," "texture2D(u_texture2, texture_coordinate).r," "1.0);" "}"; /** * Fragment shader for planar YUV formats. */ static const char * const FF_OPENGL_FRAGMENT_SHADER_YUV_PLANAR = #if defined(GL_ES_VERSION_2_0) "precision mediump float;" #endif "uniform sampler2D u_texture0;" "uniform sampler2D u_texture1;" "uniform sampler2D u_texture2;" "uniform float u_chroma_div_w;" "uniform float u_chroma_div_h;" "varying vec2 texture_coordinate;" "void main()" "{" "vec3 yuv;" "yuv.r = texture2D(u_texture0, texture_coordinate).r - 0.0625;" "yuv.g = texture2D(u_texture1, vec2(texture_coordinate.x / u_chroma_div_w, texture_coordinate.y / u_chroma_div_h)).r - 0.5;" "yuv.b = texture2D(u_texture2, vec2(texture_coordinate.x / u_chroma_div_w, texture_coordinate.y / u_chroma_div_h)).r - 0.5;" "gl_FragColor = clamp(vec4(mat3(1.1643, 1.16430, 1.1643," "0.0, -0.39173, 2.0170," "1.5958, -0.81290, 0.0) * yuv, 1.0), 0.0, 1.0);" "}"; /** * Fragment shader for planar YUVA formats. */ static const char * const FF_OPENGL_FRAGMENT_SHADER_YUVA_PLANAR = #if defined(GL_ES_VERSION_2_0) "precision mediump float;" #endif "uniform sampler2D u_texture0;" "uniform sampler2D u_texture1;" "uniform sampler2D u_texture2;" "uniform sampler2D u_texture3;" "uniform float u_chroma_div_w;" "uniform float u_chroma_div_h;" "varying vec2 texture_coordinate;" "void main()" "{" "vec3 yuv;" "yuv.r = texture2D(u_texture0, texture_coordinate).r - 0.0625;" "yuv.g = texture2D(u_texture1, vec2(texture_coordinate.x / u_chroma_div_w, texture_coordinate.y / u_chroma_div_h)).r - 0.5;" "yuv.b = texture2D(u_texture2, vec2(texture_coordinate.x / u_chroma_div_w, texture_coordinate.y / u_chroma_div_h)).r - 0.5;" "gl_FragColor = clamp(vec4(mat3(1.1643, 1.16430, 1.1643," "0.0, -0.39173, 2.0170," "1.5958, -0.81290, 0.0) * yuv, texture2D(u_texture3, texture_coordinate).r), 0.0, 1.0);" "}"; static const char * const FF_OPENGL_FRAGMENT_SHADER_GRAY = #if defined(GL_ES_VERSION_2_0) "precision mediump float;" #endif "uniform sampler2D u_texture0;" "varying vec2 texture_coordinate;" "void main()" "{" "float c = texture2D(u_texture0, texture_coordinate).r;" "gl_FragColor = vec4(c, c, c, 1.0);" "}"; #endif /* AVDEVICE_OPENGL_ENC_SHADERS_H */ ```
```c++ //! \file /* ** Authors: ** Alberto Garcia Illera agarciaillera@gmail.com ** Francisco Oca francisco.oca.gonzalez@gmail.com ** */ #pragma once #include <vector> #include <string> #include <list> #include <ida.hpp> #include <idd.hpp> //This struct is used to define a pending action when a breakpoint is triggered typedef struct { //The address where the breakpoint was set ea_t address; //If we found a previous breakpoint in the same address we should ignore it bool ignore_breakpoint; //This is the callback will be executed when this breakpoint is reached void(*callback)(ea_t); } breakpoint_pending_action; extern std::list<breakpoint_pending_action> breakpoint_pending_actions; bool should_blacklist(ea_t pc, thid_t tid = 0); ```
```go // Code generated by MockGen. DO NOT EDIT. // Source: orm/model/ormtable/hooks.go // Package ormmocks is a generated GoMock package. package ormmocks import ( context "context" reflect "reflect" gomock "github.com/golang/mock/gomock" proto "google.golang.org/protobuf/proto" ) // MockValidateHooks is a mock of ValidateHooks interface. type MockValidateHooks struct { ctrl *gomock.Controller recorder *MockValidateHooksMockRecorder } // MockValidateHooksMockRecorder is the mock recorder for MockValidateHooks. type MockValidateHooksMockRecorder struct { mock *MockValidateHooks } // NewMockValidateHooks creates a new mock instance. func NewMockValidateHooks(ctrl *gomock.Controller) *MockValidateHooks { mock := &MockValidateHooks{ctrl: ctrl} mock.recorder = &MockValidateHooksMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. func (m *MockValidateHooks) EXPECT() *MockValidateHooksMockRecorder { return m.recorder } // ValidateDelete mocks base method. func (m *MockValidateHooks) ValidateDelete(arg0 context.Context, arg1 proto.Message) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ValidateDelete", arg0, arg1) ret0, _ := ret[0].(error) return ret0 } // ValidateDelete indicates an expected call of ValidateDelete. func (mr *MockValidateHooksMockRecorder) ValidateDelete(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateDelete", reflect.TypeOf((*MockValidateHooks)(nil).ValidateDelete), arg0, arg1) } // ValidateInsert mocks base method. func (m *MockValidateHooks) ValidateInsert(arg0 context.Context, arg1 proto.Message) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ValidateInsert", arg0, arg1) ret0, _ := ret[0].(error) return ret0 } // ValidateInsert indicates an expected call of ValidateInsert. func (mr *MockValidateHooksMockRecorder) ValidateInsert(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateInsert", reflect.TypeOf((*MockValidateHooks)(nil).ValidateInsert), arg0, arg1) } // ValidateUpdate mocks base method. func (m *MockValidateHooks) ValidateUpdate(ctx context.Context, existing, new proto.Message) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ValidateUpdate", ctx, existing, new) ret0, _ := ret[0].(error) return ret0 } // ValidateUpdate indicates an expected call of ValidateUpdate. func (mr *MockValidateHooksMockRecorder) ValidateUpdate(ctx, existing, new interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateUpdate", reflect.TypeOf((*MockValidateHooks)(nil).ValidateUpdate), ctx, existing, new) } // MockWriteHooks is a mock of WriteHooks interface. type MockWriteHooks struct { ctrl *gomock.Controller recorder *MockWriteHooksMockRecorder } // MockWriteHooksMockRecorder is the mock recorder for MockWriteHooks. type MockWriteHooksMockRecorder struct { mock *MockWriteHooks } // NewMockWriteHooks creates a new mock instance. func NewMockWriteHooks(ctrl *gomock.Controller) *MockWriteHooks { mock := &MockWriteHooks{ctrl: ctrl} mock.recorder = &MockWriteHooksMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. func (m *MockWriteHooks) EXPECT() *MockWriteHooksMockRecorder { return m.recorder } // OnDelete mocks base method. func (m *MockWriteHooks) OnDelete(arg0 context.Context, arg1 proto.Message) { m.ctrl.T.Helper() m.ctrl.Call(m, "OnDelete", arg0, arg1) } // OnDelete indicates an expected call of OnDelete. func (mr *MockWriteHooksMockRecorder) OnDelete(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnDelete", reflect.TypeOf((*MockWriteHooks)(nil).OnDelete), arg0, arg1) } // OnInsert mocks base method. func (m *MockWriteHooks) OnInsert(arg0 context.Context, arg1 proto.Message) { m.ctrl.T.Helper() m.ctrl.Call(m, "OnInsert", arg0, arg1) } // OnInsert indicates an expected call of OnInsert. func (mr *MockWriteHooksMockRecorder) OnInsert(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnInsert", reflect.TypeOf((*MockWriteHooks)(nil).OnInsert), arg0, arg1) } // OnUpdate mocks base method. func (m *MockWriteHooks) OnUpdate(ctx context.Context, existing, new proto.Message) { m.ctrl.T.Helper() m.ctrl.Call(m, "OnUpdate", ctx, existing, new) } // OnUpdate indicates an expected call of OnUpdate. func (mr *MockWriteHooksMockRecorder) OnUpdate(ctx, existing, new interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnUpdate", reflect.TypeOf((*MockWriteHooks)(nil).OnUpdate), ctx, existing, new) } ```
George Elmer Murk (April 16, 1894 – March 24, 1971) was an American firefighter, businessman, and politician. Murk was born in Minneapolis, Minnesota. He went to the Minneapolis public schools and the Minneapolis Business College. He lived in Minneapolis with his wife and family. Murk was a firefighter with the Minneapolis Fire Department from 1917 to 1939. Murk was also involved with the Minneapolis Musicians Association from 1934 to 1961. Murk served in the Minnesota House of Representatives from 1945 to 1954 and from 1957 to 1962. He died in Minneapolis, Minnesota. References 1894 births 1971 deaths Businesspeople from Minneapolis Politicians from Minneapolis 20th-century American firefighters Members of the Minnesota House of Representatives
```php <?php /* * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the */ namespace Google\Service\ShoppingContent; class MethodQuota extends \Google\Model { /** * @var string */ public $method; /** * @var string */ public $quotaLimit; /** * @var string */ public $quotaMinuteLimit; /** * @var string */ public $quotaUsage; /** * @param string */ public function setMethod($method) { $this->method = $method; } /** * @return string */ public function getMethod() { return $this->method; } /** * @param string */ public function setQuotaLimit($quotaLimit) { $this->quotaLimit = $quotaLimit; } /** * @return string */ public function getQuotaLimit() { return $this->quotaLimit; } /** * @param string */ public function setQuotaMinuteLimit($quotaMinuteLimit) { $this->quotaMinuteLimit = $quotaMinuteLimit; } /** * @return string */ public function getQuotaMinuteLimit() { return $this->quotaMinuteLimit; } /** * @param string */ public function setQuotaUsage($quotaUsage) { $this->quotaUsage = $quotaUsage; } /** * @return string */ public function getQuotaUsage() { return $this->quotaUsage; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(MethodQuota::class, 'Google_Service_ShoppingContent_MethodQuota'); ```
```html <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Function add_console_log</title> <link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Log v2"> <link rel="up" href="../../utilities.html#header.boost.log.utility.setup.console_hpp" title="Header &lt;boost/log/utility/setup/console.hpp&gt;"> <link rel="prev" href="add_console_lo_idp41243680.html" title="Function template add_console_log"> <link rel="next" href="wadd_console_log.html" title="Function wadd_console_log"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table cellpadding="2" width="100%"><tr><td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td></tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="add_console_lo_idp41243680.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../utilities.html#header.boost.log.utility.setup.console_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="wadd_console_log.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> </div> <div class="refentry"> <a name="boost.log.add_console_lo_idp41249184"></a><div class="titlepage"></div> <div class="refnamediv"> <h2><span class="refentrytitle">Function add_console_log</span></h2> <p>boost::log::add_console_log</p> </div> <h2 xmlns:rev="path_to_url~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2> <div xmlns:rev="path_to_url~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../utilities.html#header.boost.log.utility.setup.console_hpp" title="Header &lt;boost/log/utility/setup/console.hpp&gt;">boost/log/utility/setup/console.hpp</a>&gt; </span> <span class="identifier">shared_ptr</span><span class="special">&lt;</span> <span class="identifier">sinks</span><span class="special">::</span><span class="identifier">synchronous_sink</span><span class="special">&lt;</span> <span class="identifier">sinks</span><span class="special">::</span><span class="identifier">text_ostream_backend</span> <span class="special">&gt;&gt;</span> <span class="identifier">add_console_log</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></div> <div class="refsect1"> <a name="idp119078448"></a><h2>Description</h2> <p>The function constructs sink for the <code class="computeroutput">std::clog</code> stream and adds it to the core</p> <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.</p> <p> </p> <div class="variablelist"><table border="0" class="variablelist compact"> <colgroup> <col align="left" valign="top"> <col> </colgroup> <tbody><tr> <td><p><span class="term">Returns:</span></p></td> <td><p>Pointer to the constructed sink. </p></td> </tr></tbody> </table></div> </div> </div> <table xmlns:rev="path_to_url~gregod/boost/tools/doc/revision" width="100%"><tr> <td align="left"></td> file LICENSE_1_0.txt or copy at <a href="path_to_url" target="_top">path_to_url </p> </div></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="add_console_lo_idp41243680.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../utilities.html#header.boost.log.utility.setup.console_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="wadd_console_log.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> </div> </body> </html> ```
```java package app.nzyme.core.events.actions.email; import app.nzyme.core.NzymeNode; import app.nzyme.core.detection.alerts.DetectionType; import app.nzyme.core.events.actions.Action; import app.nzyme.core.events.actions.ActionExecutionResult; import app.nzyme.core.events.types.DetectionEvent; import app.nzyme.core.events.types.SystemEvent; import app.nzyme.core.events.types.SystemEventType; import app.nzyme.core.integrations.smtp.SMTPConfigurationRegistryKeys; import app.nzyme.plugin.RegistryCryptoException; import com.google.common.base.Strings; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import freemarker.template.Template; import freemarker.template.TemplateExceptionHandler; import jakarta.annotation.Nullable; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.simplejavamail.api.email.Email; import org.simplejavamail.api.email.Recipient; import org.simplejavamail.api.mailer.Mailer; import org.simplejavamail.api.mailer.config.TransportStrategy; import org.simplejavamail.email.EmailBuilder; import org.simplejavamail.mailer.MailerBuilder; import javax.mail.Message; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; import java.net.URI; import java.net.URISyntaxException; import java.util.List; import java.util.Map; public class EmailAction implements Action { private static final Logger LOG = LogManager.getLogger(EmailAction.class); private final EmailActionConfiguration configuration; private final String fromAddress; private final URI webInterfaceUrl; private final Mailer mailer; private final freemarker.template.Configuration templateConfig; public EmailAction(NzymeNode nzyme, EmailActionConfiguration configuration) { this.configuration = configuration; String transportStrategy = nzyme.getDatabaseCoreRegistry() .getValueOrNull(SMTPConfigurationRegistryKeys.TRANSPORT_STRATEGY.key()); String hostname = nzyme.getDatabaseCoreRegistry() .getValueOrNull(SMTPConfigurationRegistryKeys.HOST.key()); Integer port = nzyme.getDatabaseCoreRegistry() .getValue(SMTPConfigurationRegistryKeys.PORT.key()) .map(Integer::parseInt) .orElse(null); String username = nzyme.getDatabaseCoreRegistry() .getValueOrNull(SMTPConfigurationRegistryKeys.USERNAME.key()); String webInterfaceUrl = nzyme.getDatabaseCoreRegistry() .getValue(SMTPConfigurationRegistryKeys.WEB_INTERFACE_URL.key()) .orElse(SMTPConfigurationRegistryKeys.WEB_INTERFACE_URL.defaultValue().orElse(null)); String password; try { password = nzyme.getDatabaseCoreRegistry() .getEncryptedValueOrNull(SMTPConfigurationRegistryKeys.PASSWORD.key()); } catch (RegistryCryptoException e) { throw new RuntimeException(e); } this.fromAddress = nzyme.getDatabaseCoreRegistry() .getValueOrNull(SMTPConfigurationRegistryKeys.FROM_ADDRESS.key()); if (Strings.isNullOrEmpty(transportStrategy) || Strings.isNullOrEmpty(hostname) || port == null || Strings.isNullOrEmpty(username) || Strings.isNullOrEmpty(password) || Strings.isNullOrEmpty(this.fromAddress) || Strings.isNullOrEmpty(webInterfaceUrl)) { throw new RuntimeException("Incomplete SMTP configuration. Cannot create Email action."); } // Make sure URL is valid. try { this.webInterfaceUrl = new URI(webInterfaceUrl); } catch (URISyntaxException e) { throw new RuntimeException("Invalid nzyme web interface URL: " + webInterfaceUrl); } TransportStrategy parsedTransportStrategy; switch (transportStrategy) { case "SMTP": parsedTransportStrategy = TransportStrategy.SMTP; break; case "SMTP TLS": parsedTransportStrategy = TransportStrategy.SMTP_TLS; break; case "SMTPS": parsedTransportStrategy = TransportStrategy.SMTPS; break; default: throw new RuntimeException("Unknown/Invalid transport strategy."); } this.mailer = MailerBuilder .withSMTPServer(hostname, port, username, password) .withTransportStrategy(parsedTransportStrategy) .clearEmailAddressCriteria() .buildMailer(); // Set up template engine. this.templateConfig = new freemarker.template.Configuration(freemarker.template.Configuration.VERSION_2_3_30); this.templateConfig.setClassForTemplateLoading(this.getClass(), "/"); this.templateConfig.setDefaultEncoding("UTF-8"); this.templateConfig.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER); this.templateConfig.setLogTemplateExceptions(false); this.templateConfig.setWrapUncheckedExceptions(true); this.templateConfig.setFallbackOnNullLoopVariable(false); } @Override public ActionExecutionResult execute(SystemEvent event) { LOG.info("Executing [{}] for event type [{}].", this.getClass().getCanonicalName(), event.type()); try { List<Recipient> recipients = Lists.newArrayList(); for (String receiverAddress : configuration.receivers()) { recipients.add(new Recipient(receiverAddress, receiverAddress, Message.RecipientType.TO)); } SystemEventType eventType = event.type(); Email email = EmailBuilder.startingBlank() .to(recipients) .from(this.fromAddress) .withSubject(configuration.subjectPrefix() + " " + buildSubject(eventType)) .withPlainText(buildPlainTextBody(event)) .withHTMLText(buildHTMLTextBody(event)) .withEmbeddedImage("header_top", loadResourceFile("email/header_top.png"), "image/png") .withEmbeddedImage("header_bottom", loadResourceFile("email/header_bottom_system_event.png"), "image/png") .buildEmail(); mailer.sendMail(email); } catch(Exception e) { LOG.error("Could not send Email.", e); return ActionExecutionResult.FAILURE; } return ActionExecutionResult.SUCCESS; } @Override public ActionExecutionResult execute(DetectionEvent event) { LOG.info("Executing [{}] for event type [{}].", this.getClass().getCanonicalName(), event.detectionType()); try { List<Recipient> recipients = Lists.newArrayList(); for (String receiverAddress : configuration.receivers()) { recipients.add(new Recipient(receiverAddress, receiverAddress, Message.RecipientType.TO)); } if (recipients.isEmpty()) { return ActionExecutionResult.SUCCESS; } Email email = EmailBuilder.startingBlank() .to(recipients) .from(this.fromAddress) .withSubject(configuration.subjectPrefix() + " " + buildSubject(event.detectionType())) .withPlainText(buildPlainTextBody(event)) .withHTMLText(buildHTMLTextBody(event)) .withEmbeddedImage("header_top", loadResourceFile("email/header_top.png"), "image/png") .withEmbeddedImage("header_bottom", loadResourceFile("email/header_bottom_detection_event.png"), "image/png") .buildEmail(); mailer.sendMail(email); } catch(Exception e) { LOG.error("Could not send Email.", e); return ActionExecutionResult.FAILURE; } return ActionExecutionResult.SUCCESS; } private String buildSubject(DetectionType detectionType) { return "Detection Event: " + detectionType.getTitle(); } private String buildSubject(SystemEventType eventType) { return "System Event: " + eventType.getHumanReadableName(); } private String buildPlainTextBody(SystemEvent event) { SystemEventType eventType = event.type(); String b = "System Event: " + eventType.getHumanReadableName() + " [" + eventType.name() + "]\n\n" + event.details() + "\n\n" + "Event Timestamp: " + event.timestamp(); return b; } private String buildPlainTextBody(DetectionEvent event) { DetectionType detectionType = event.detectionType(); String b = "Detection Event: " + detectionType.getTitle() + " [" + detectionType.name() + "]\n\n" + event.details() + "\n\n" + "Event Timestamp: " + event.timestamp(); return b; } @Nullable private String buildHTMLTextBody(SystemEvent event) { try { SystemEventType eventType = event.type(); Map<String, Object> parameters = Maps.newHashMap(); parameters.put("event_type_name", eventType.name()); parameters.put("event_type_name_human_readable", eventType.getHumanReadableName()); parameters.put("event_details", event.details()); parameters.put("event_timestamp", event.timestamp()); parameters.put("nzyme_url", this.webInterfaceUrl.toString()); StringWriter out = new StringWriter(); Template template = this.templateConfig.getTemplate("email/system_event.ftl"); template.process(parameters, out); return out.toString(); } catch(Exception e) { LOG.error("Could not build HTML text body.", e); return null; } } @Nullable private String buildHTMLTextBody(DetectionEvent event) { try { DetectionType detectionType = event.detectionType(); Map<String, Object> parameters = Maps.newHashMap(); parameters.put("event_type_name", detectionType.name()); parameters.put("event_type_name_human_readable", detectionType.getTitle()); parameters.put("event_details", event.details()); parameters.put("event_timestamp", event.timestamp()); parameters.put("nzyme_url", this.webInterfaceUrl.toString()); StringWriter out = new StringWriter(); Template template = this.templateConfig.getTemplate("email/detection_event.ftl"); template.process(parameters, out); return out.toString(); } catch(Exception e) { LOG.error("Could not build HTML text body.", e); return null; } } private byte[] loadResourceFile(String filename) throws IOException { //noinspection UnstableApiUsage InputStream resource = getClass().getClassLoader().getResourceAsStream(filename); if (resource == null) { throw new RuntimeException("Couldn't load resource file: " + filename); } //noinspection UnstableApiUsage return resource.readAllBytes(); } } ```
The International Customer Service Institute (TICSI) is an international partnership organisation to enable the recognition and sharing of global best practice in customer service. It was founded in 2005 operating out of London and Dubai and has developed The International Standard for Service Excellence (TISSE). It has regional Certification Partners in the UK, India, Australia, New Zealand and the Middle East. See also British Standards Institution (BSI) Canadian Standards Association Countries in International Organization for Standardization Deutsches Institut für Normung, German Institute for Standardization (DIN) European Committee for Standardization (CEN) International Classification for Standards Standardization Standards organization References External links The International Customer Service Institute Customer service International business organizations
George Meade (1815–1872) was a U.S. Army major general. General Meade may also refer to: David C. Meade (1940–2019), U.S. Army major general Henry J. Meade (1925–2006), U.S. Air Force major general John Meade (British Army officer) (c. 1775–1849), British Army lieutenant general Richard John Meade (1821–1894), British Indian Army general See also Owen Mead (1892–1942), New Zealand Military Forces major general
```c /* * */ /* */ #define DT_DRV_COMPAT nxp_imx_flexspi_w956a8mbya #include <zephyr/logging/log.h> #include <zephyr/sys/util.h> #include "memc_mcux_flexspi.h" LOG_MODULE_REGISTER(memc_flexspi_w956a8mbya, CONFIG_MEMC_LOG_LEVEL); enum { READ_DATA, WRITE_DATA, READ_REG, WRITE_REG, }; struct memc_flexspi_w956a8mbya_config { flexspi_port_t port; flexspi_device_config_t config; }; /* Device variables used in critical sections should be in this structure */ struct memc_flexspi_w956a8mbya_data { const struct device *controller; }; static const uint32_t memc_flexspi_w956a8mbya_lut[][4] = { /* Read Data */ [READ_DATA] = { FLEXSPI_LUT_SEQ(kFLEXSPI_Command_DDR, kFLEXSPI_8PAD, 0xA0, kFLEXSPI_Command_RADDR_DDR, kFLEXSPI_8PAD, 0x18), FLEXSPI_LUT_SEQ(kFLEXSPI_Command_CADDR_DDR, kFLEXSPI_8PAD, 0x10, kFLEXSPI_Command_DUMMY_RWDS_DDR, kFLEXSPI_8PAD, 0x07), FLEXSPI_LUT_SEQ(kFLEXSPI_Command_READ_DDR, kFLEXSPI_8PAD, 0x04, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0x00), }, /* Write Data */ [WRITE_DATA] = { FLEXSPI_LUT_SEQ(kFLEXSPI_Command_DDR, kFLEXSPI_8PAD, 0x20, kFLEXSPI_Command_RADDR_DDR, kFLEXSPI_8PAD, 0x18), FLEXSPI_LUT_SEQ(kFLEXSPI_Command_CADDR_DDR, kFLEXSPI_8PAD, 0x10, kFLEXSPI_Command_DUMMY_RWDS_DDR, kFLEXSPI_8PAD, 0x07), FLEXSPI_LUT_SEQ(kFLEXSPI_Command_WRITE_DDR, kFLEXSPI_8PAD, 0x04, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0x00), }, /* Read Register */ [READ_REG] = { FLEXSPI_LUT_SEQ(kFLEXSPI_Command_DDR, kFLEXSPI_8PAD, 0xE0, kFLEXSPI_Command_RADDR_DDR, kFLEXSPI_8PAD, 0x18), FLEXSPI_LUT_SEQ(kFLEXSPI_Command_CADDR_DDR, kFLEXSPI_8PAD, 0x10, kFLEXSPI_Command_DUMMY_RWDS_DDR, kFLEXSPI_8PAD, 0x07), FLEXSPI_LUT_SEQ(kFLEXSPI_Command_READ_DDR, kFLEXSPI_8PAD, 0x04, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0x00), }, /* Write Register */ [WRITE_REG] = { FLEXSPI_LUT_SEQ(kFLEXSPI_Command_DDR, kFLEXSPI_8PAD, 0x60, kFLEXSPI_Command_RADDR_DDR, kFLEXSPI_8PAD, 0x18), FLEXSPI_LUT_SEQ(kFLEXSPI_Command_CADDR_DDR, kFLEXSPI_8PAD, 0x10, kFLEXSPI_Command_WRITE_DDR, kFLEXSPI_8PAD, 0x04), }, }; static int memc_flexspi_w956a8mbya_get_vendor_id(const struct device *dev, uint16_t *vendor_id) { const struct memc_flexspi_w956a8mbya_config *config = dev->config; struct memc_flexspi_w956a8mbya_data *data = dev->data; uint32_t buffer = 0; int ret; flexspi_transfer_t transfer = { .deviceAddress = 0, .port = config->port, .cmdType = kFLEXSPI_Read, .SeqNumber = 1, .seqIndex = READ_REG, .data = &buffer, .dataSize = 4, }; LOG_DBG("Reading id"); ret = memc_flexspi_transfer(data->controller, &transfer); *vendor_id = buffer & 0xffff; return ret; } static int memc_flexspi_w956a8mbya_init(const struct device *dev) { const struct memc_flexspi_w956a8mbya_config *config = dev->config; struct memc_flexspi_w956a8mbya_data *data = dev->data; uint16_t vendor_id; if (!device_is_ready(data->controller)) { LOG_ERR("Controller device not ready"); return -ENODEV; } if (memc_flexspi_set_device_config(data->controller, &config->config, (const uint32_t *) memc_flexspi_w956a8mbya_lut, sizeof(memc_flexspi_w956a8mbya_lut) / MEMC_FLEXSPI_CMD_SIZE, config->port)) { LOG_ERR("Could not set device configuration"); return -EINVAL; } memc_flexspi_reset(data->controller); if (memc_flexspi_w956a8mbya_get_vendor_id(dev, &vendor_id)) { LOG_ERR("Could not read vendor id"); return -EIO; } LOG_DBG("Vendor id: 0x%0x", vendor_id); return 0; } #define CONCAT3(x, y, z) x ## y ## z #define CS_INTERVAL_UNIT(unit) \ CONCAT3(kFLEXSPI_CsIntervalUnit, unit, SckCycle) #define AHB_WRITE_WAIT_UNIT(unit) \ CONCAT3(kFLEXSPI_AhbWriteWaitUnit, unit, AhbCycle) #define MEMC_FLEXSPI_DEVICE_CONFIG(n) \ { \ .flexspiRootClk = DT_INST_PROP(n, spi_max_frequency), \ .isSck2Enabled = false, \ .flashSize = DT_INST_PROP(n, size) / 8 / KB(1), \ .CSIntervalUnit = \ CS_INTERVAL_UNIT( \ DT_INST_PROP(n, cs_interval_unit)), \ .CSInterval = DT_INST_PROP(n, cs_interval), \ .CSHoldTime = DT_INST_PROP(n, cs_hold_time), \ .CSSetupTime = DT_INST_PROP(n, cs_setup_time), \ .dataValidTime = DT_INST_PROP(n, data_valid_time), \ .columnspace = DT_INST_PROP(n, column_space), \ .enableWordAddress = DT_INST_PROP(n, word_addressable), \ .AWRSeqIndex = WRITE_DATA, \ .AWRSeqNumber = 1, \ .ARDSeqIndex = READ_DATA, \ .ARDSeqNumber = 1, \ .AHBWriteWaitUnit = \ AHB_WRITE_WAIT_UNIT( \ DT_INST_PROP(n, ahb_write_wait_unit)), \ .AHBWriteWaitInterval = \ DT_INST_PROP(n, ahb_write_wait_interval), \ .enableWriteMask = true, \ } \ #define MEMC_FLEXSPI_W956A8MBYA(n) \ static const struct memc_flexspi_w956a8mbya_config \ memc_flexspi_w956a8mbya_config_##n = { \ .port = DT_INST_REG_ADDR(n), \ .config = MEMC_FLEXSPI_DEVICE_CONFIG(n), \ }; \ \ static struct memc_flexspi_w956a8mbya_data \ memc_flexspi_w956a8mbya_data_##n = { \ .controller = DEVICE_DT_GET(DT_INST_BUS(n)), \ }; \ \ DEVICE_DT_INST_DEFINE(n, \ memc_flexspi_w956a8mbya_init, \ NULL, \ &memc_flexspi_w956a8mbya_data_##n, \ &memc_flexspi_w956a8mbya_config_##n, \ POST_KERNEL, \ CONFIG_MEMC_INIT_PRIORITY, \ NULL); DT_INST_FOREACH_STATUS_OKAY(MEMC_FLEXSPI_W956A8MBYA) ```
Robert Lee Hammond (born February 20, 1952) is a former American professional football player and coach. He was a running back in the National Football League (NFL) for five seasons with the New York Giants and Washington Redskins after playing collegiately at Morgan State University. Hammond also was an assistant coach in the NFL for 11 years and served as head coach for the London Monarchs of the World League of American Football (WLAF) from 1995 to 1996. Early years Hammond played high school football at Bayside High School in Bayside, New York. External links 1952 births Living people American football running backs London Monarchs coaches Morgan State Bears football players New York Giants players New York Jets coaches People from Orangeburg, South Carolina Philadelphia Eagles coaches Phoenix Cardinals coaches Washington Redskins players Bayside High School (Queens) alumni
Jane E. Taylour (born c.1827 - died 1905) was a Scottish suffragist and women's movement campaigner, and one of the first women to give lectures in public. She travelled around Scotland and northern England as a suffrage lecturer, and was a key figure in spreading the message of the women's suffrage throughout Scotland and inspiring others to join the National Society for Women's Suffrage. Life Taylour was born in 1827 or 1828, in Belmont, Stranraer, Scotland, to Maria Angus and Nathaniel Taylor. She lived in Balfour. In 1861 she moved to Saffron Walden in Essex, where in 1901 she was recorded as living with Rachel P. Robson. Her income was probably inherited from her parents' estate in Jamaica, which included enslaved people, income which enabled her to cover the cost to travelled widely for the National Society for Women's Suffrage. Taylour died in Saffron Walden on 25 February 1905. She was interred in the Society of Friends' burial ground. Campaigning for women's suffrage Jane Taylour addressed gave public lectures and lecture tours on women's suffrage in London, the North-East of England and in Scotland. In 1869 Clementia Taylor asked Taylour to undertake a lecture tour, and from 1870 she gave public lectures throughout Scotland and Northeast England campaigning for women's equality and suffrage, as the honorary secretary of the Galloway Branch of the National Society for Women's Suffrage. Within a year, Taylour had spoken in a voluntary capacity at 41 public meetings, as stated by Priscilla McLaren at a London women's suffrage conference. These meetings were chaired by local magistrates, county sheriffs, clergy or influential men, and the outcomes were petitions to Parliament for women's votes for women. Taylour sent in a petition in favour of Jacob Bright's Bill to remove women's electoral disabilities. She was described by women's rights activist Clementia Taylor as "the energetic little woman from Stranraer". But she was also described after a talk in Wigtown that "her composition is chaste and elegant, her voice is distinct and agreeable, and her manner attractive and graceful." Taylour did not believe that women were aiming to compete with men, but was aware that women could be exploited by 'wicked and unprincipled men' for example by losing their rights upon marriage. She saidWe do not want to usurp anything, or do anything unseemly or out of order, but to do our proper part in helping on the world's reform - helping with a woman's power, in a woman's way, with all that is wise, elevating, humane and holy.Her talk at Kirkwall was so convincing that the chairperson, Provost Bain whose belief that parliament would look after women's interests without their enfranchisement, was 'considerably shaken' as he said when he thanked Taylour for the 'tact, eloquence, and singularly lucid manner in which she has advanced the claims of her sex.' By 1873 she had delivered over 150 lectures in Scotland. Women's suffrage committees were formed in the Highlands and Moray towns of Tain, Dingwall, Forres, Elgin, Banff, Invergordon, Nairn and Dunkeld as a result of Taylour and McLaren's campaigns. For example of the content of her speeches, in Edinburgh in 1873, Taylour was putting forward the suffragists' case using"the argument of simple justice; the evidence that women had voted in a greater proportion than men in the English municipal elections in 1872 and voted in School Board elections; the franchise, attached to property, constitutionally should include women as taxpayers; the argument of lack of education did not prevent illiterate men from having the vote, and in any case the franchise was based on property; women, in a country ruled by a queen, should not be prohibited from public life; religious objections depended on narrow interpretations of Christian principles. Taylour’s lecture was followed by a resolution which emphasised that taxation was the basis of representation." Lecture tour impact She was accompanied on some of her lecture tours in Scotland by fellow campaigners Mary Hill Burton and Agnes McLaren. McLaren and Taylour travelled to the north of Scotland because "everything that could be done in Edinburgh had been done", as members of the Edinburgh National Society for Women's Suffrage and county members had voted and petitioned, and the Town Council had petitioned in favour of votes for women. The meetings were popular, and in some cases people had to be turned away. Taylour's lectures were given extensive media coverage; The Orkney Herald gave her lectures in Orkney full coverage and reproduced her speeches in full, and her speech in Lerwick in Shetland on 12 September 1873 was fully reported in The Shetland Times. Her arguments were based on logic statements “Firstly, the ladies claim the right to the electoral suffrage as it is consistent and logical; secondly, as taxes can only be levied by Parliament, elected by the tax-payers, we hold it unconstitutional to impose a barrier on [tax-paying] women.” The Women's Suffrage Journal commented about one of her lectures that "Miss Taylour has all the requisites of a public lecturer. Her composition is chaste and elegant, her voice distinct and agreeable, and her manner attractive and graceful". Taylour delivered a number of lectures in Gainsborough, Lincolnshire. On 12 March 1885 she was one of several speakers at the Temperance Hall, along with Florence Balgarnie, Jessie Tod, and Ann Radford McCormick. She returned two years later on 18 January 1887 to give a lecture on allowing women greater political and social equality with men, and returned to Gainsborough again on 31 May 1885 on women and politics at the Primitive Methodist Mutual Improvement Association. Official roles Taylour was the First Honorary Secretary of the Galloway branch of the National Society for Women's Suffrage from 1870 to 1872. She was joint Secretary of the Edinburgh National Society for Women's Suffrage, one of the first three suffrage societies to be formed in Britain, with Agnes McLaren from 1873 to 1876, and an executive member of the central committee of the national Society. In 1901 she was a vice-president of the National Union of Women's Suffrage Societies. In Saffron Walden, in 1895, she was Secretary of the local branch of the British Women's Temperance Association, and was influential in getting women appointed to the local Board of Guardians. Recognition In recognition of her voluntary efforts for the cause of women's suffrage in Scotland, Taylour was presented with jewellery and 150 guineas. The Workers' Education Association included Taylour in their history of Scottish Suffragists webpage. On the centenary of the right of some women to vote, Representation of the People Act 1918, Jane Taylour featured on the Glasgow Women's Library website with an animated video on her impact as one of the first woman to lecture in public. She also was mentioned on the University of Edinburgh Information Services Celebrating 100 years of votes for women. Taylour is one of the activists included in Scotland's Suffragette Trumps and educational packs sent to Scottish schools. See also Suffragette Women's suffrage in the United Kingdom Women's suffrage in Scotland References 1905 deaths 1827 births Scottish suffragists People from Stranraer People from Saffron Walden
```c++ /** * This file is part of DSO. * * Developed by Jakob Engel <engelj at in dot tum dot de>, * for more information see <path_to_url * If you use this code, please cite the respective publications as * listed on the above website. * * DSO is free software: you can redistribute it and/or modify * (at your option) any later version. * * DSO is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * along with DSO. If not, see <path_to_url */ #include <sstream> #include <fstream> #include <iostream> #include <Eigen/Core> #include <iterator> #include "util/settings.h" #include "util/globalFuncs.h" #include "IOWrapper/ImageDisplay.h" #include "IOWrapper/ImageRW.h" #include "util/Undistort.h" namespace dso { PhotometricUndistorter::PhotometricUndistorter( std::string file, std::string noiseImage, std::string vignetteImage, int w_, int h_) { valid=false; vignetteMap=0; vignetteMapInv=0; w = w_; h = h_; output = new ImageAndExposure(w,h); if(file=="" || vignetteImage=="") { printf("NO PHOTOMETRIC Calibration!\n"); } // read G. std::ifstream f(file.c_str()); printf("Reading Photometric Calibration from file %s\n",file.c_str()); if (!f.good()) { printf("PhotometricUndistorter: Could not open file!\n"); return; } { std::string line; std::getline( f, line ); std::istringstream l1i( line ); std::vector<float> Gvec = std::vector<float>( std::istream_iterator<float>(l1i), std::istream_iterator<float>() ); GDepth = Gvec.size(); if(GDepth < 256) { printf("PhotometricUndistorter: invalid format! got %d entries in first line, expected at least 256!\n",(int)Gvec.size()); return; } for(int i=0;i<GDepth;i++) G[i] = Gvec[i]; for(int i=0;i<GDepth-1;i++) { if(G[i+1] <= G[i]) { printf("PhotometricUndistorter: G invalid! it has to be strictly increasing, but it isnt!\n"); return; } } float min=G[0]; float max=G[GDepth-1]; for(int i=0;i<GDepth;i++) G[i] = 255.0 * (G[i] - min) / (max-min); // make it to 0..255 => 0..255. } if(setting_photometricCalibration==0) { for(int i=0;i<GDepth;i++) G[i]=255.0f*i/(float)(GDepth-1); } printf("Reading Vignette Image from %s\n",vignetteImage.c_str()); MinimalImage<unsigned short>* vm16 = IOWrap::readImageBW_16U(vignetteImage.c_str()); MinimalImageB* vm8 = IOWrap::readImageBW_8U(vignetteImage.c_str()); vignetteMap = new float[w*h]; vignetteMapInv = new float[w*h]; if(vm16 != 0) { if(vm16->w != w ||vm16->h != h) { printf("PhotometricUndistorter: Invalid vignette image size! got %d x %d, expected %d x %d\n", vm16->w, vm16->h, w, h); if(vm16!=0) delete vm16; if(vm8!=0) delete vm8; return; } float maxV=0; for(int i=0;i<w*h;i++) if(vm16->at(i) > maxV) maxV = vm16->at(i); for(int i=0;i<w*h;i++) vignetteMap[i] = vm16->at(i) / maxV; } else if(vm8 != 0) { if(vm8->w != w ||vm8->h != h) { printf("PhotometricUndistorter: Invalid vignette image size! got %d x %d, expected %d x %d\n", vm8->w, vm8->h, w, h); if(vm16!=0) delete vm16; if(vm8!=0) delete vm8; return; } float maxV=0; for(int i=0;i<w*h;i++) if(vm8->at(i) > maxV) maxV = vm8->at(i); for(int i=0;i<w*h;i++) vignetteMap[i] = vm8->at(i) / maxV; } else { printf("PhotometricUndistorter: Invalid vignette image\n"); if(vm16!=0) delete vm16; if(vm8!=0) delete vm8; return; } if(vm16!=0) delete vm16; if(vm8!=0) delete vm8; for(int i=0;i<w*h;i++) vignetteMapInv[i] = 1.0f / vignetteMap[i]; printf("Successfully read photometric calibration!\n"); valid = true; } PhotometricUndistorter::~PhotometricUndistorter() { if(vignetteMap != 0) delete[] vignetteMap; if(vignetteMapInv != 0) delete[] vignetteMapInv; delete output; } void PhotometricUndistorter::unMapFloatImage(float* image) { int wh=w*h; for(int i=0;i<wh;i++) { float BinvC; float color = image[i]; if(color < 1e-3) BinvC=0.0f; else if(color > GDepth-1.01f) BinvC=GDepth-1.1; else { int c = color; float a = color-c; BinvC=G[c]*(1-a) + G[c+1]*a; } float val = BinvC; if(val < 0) val = 0; image[i] = val; } } template<typename T> void PhotometricUndistorter::processFrame(T* image_in, float exposure_time, float factor) { int wh=w*h; float* data = output->image; assert(output->w == w && output->h == h); assert(data != 0); if(!valid || exposure_time <= 0 || setting_photometricCalibration==0) // disable full photometric calibration. { for(int i=0; i<wh;i++) { data[i] = factor*image_in[i]; } output->exposure_time = exposure_time; output->timestamp = 0; } else { for(int i=0; i<wh;i++) { data[i] = G[image_in[i]]; } if(setting_photometricCalibration==2) { for(int i=0; i<wh;i++) data[i] *= vignetteMapInv[i]; } output->exposure_time = exposure_time; output->timestamp = 0; } if(!setting_useExposure) output->exposure_time = 1; } template void PhotometricUndistorter::processFrame<unsigned char>(unsigned char* image_in, float exposure_time, float factor); template void PhotometricUndistorter::processFrame<unsigned short>(unsigned short* image_in, float exposure_time, float factor); Undistort::~Undistort() { if(remapX != 0) delete[] remapX; if(remapY != 0) delete[] remapY; } Undistort* Undistort::getUndistorterForFile(std::string configFilename, std::string gammaFilename, std::string vignetteFilename) { printf("Reading Calibration from file %s",configFilename.c_str()); std::ifstream f(configFilename.c_str()); if (!f.good()) { f.close(); printf(" ... not found. Cannot operate without calibration, shutting down.\n"); f.close(); return 0; } printf(" ... found!\n"); std::string l1; std::getline(f,l1); f.close(); float ic[10]; Undistort* u; // for backwards-compatibility: Use RadTan model for 8 parameters. if(std::sscanf(l1.c_str(), "%f %f %f %f %f %f %f %f", &ic[0], &ic[1], &ic[2], &ic[3], &ic[4], &ic[5], &ic[6], &ic[7]) == 8) { printf("found RadTan (OpenCV) camera model, building rectifier.\n"); u = new UndistortRadTan(configFilename.c_str(), true); if(!u->isValid()) {delete u; return 0; } } // for backwards-compatibility: Use Pinhole / FoV model for 5 parameter. else if(std::sscanf(l1.c_str(), "%f %f %f %f %f", &ic[0], &ic[1], &ic[2], &ic[3], &ic[4]) == 5) { if(ic[4]==0) { printf("found PINHOLE camera model, building rectifier.\n"); u = new UndistortPinhole(configFilename.c_str(), true); if(!u->isValid()) {delete u; return 0; } } else { printf("found ATAN camera model, building rectifier.\n"); u = new UndistortFOV(configFilename.c_str(), true); if(!u->isValid()) {delete u; return 0; } } } // clean model selection implementation. else if(std::sscanf(l1.c_str(), "KannalaBrandt %f %f %f %f %f %f %f %f", &ic[0], &ic[1], &ic[2], &ic[3], &ic[4], &ic[5], &ic[6], &ic[7]) == 8) { u = new UndistortKB(configFilename.c_str(), false); if(!u->isValid()) {delete u; return 0; } } else if(std::sscanf(l1.c_str(), "RadTan %f %f %f %f %f %f %f %f", &ic[0], &ic[1], &ic[2], &ic[3], &ic[4], &ic[5], &ic[6], &ic[7]) == 8) { u = new UndistortRadTan(configFilename.c_str(), false); if(!u->isValid()) {delete u; return 0; } } else if(std::sscanf(l1.c_str(), "EquiDistant %f %f %f %f %f %f %f %f", &ic[0], &ic[1], &ic[2], &ic[3], &ic[4], &ic[5], &ic[6], &ic[7]) == 8) { u = new UndistortEquidistant(configFilename.c_str(), false); if(!u->isValid()) {delete u; return 0; } } else if(std::sscanf(l1.c_str(), "FOV %f %f %f %f %f", &ic[0], &ic[1], &ic[2], &ic[3], &ic[4]) == 5) { u = new UndistortFOV(configFilename.c_str(), false); if(!u->isValid()) {delete u; return 0; } } else if(std::sscanf(l1.c_str(), "Pinhole %f %f %f %f %f", &ic[0], &ic[1], &ic[2], &ic[3], &ic[4]) == 5) { u = new UndistortPinhole(configFilename.c_str(), false); if(!u->isValid()) {delete u; return 0; } } else { printf("could not read calib file! exit."); exit(1); } u->loadPhotometricCalibration( gammaFilename, "", vignetteFilename); return u; } void Undistort::loadPhotometricCalibration(std::string file, std::string noiseImage, std::string vignetteImage) { photometricUndist = new PhotometricUndistorter(file, noiseImage, vignetteImage,getOriginalSize()[0], getOriginalSize()[1]); } template<typename T> ImageAndExposure* Undistort::undistort(const MinimalImage<T>* image_raw, float exposure, double timestamp, float factor) const { if(image_raw->w != wOrg || image_raw->h != hOrg) { printf("Undistort::undistort: wrong image size (%d %d instead of %d %d) \n", image_raw->w, image_raw->h, w, h); exit(1); } photometricUndist->processFrame<T>(image_raw->data, exposure, factor); ImageAndExposure* result = new ImageAndExposure(w, h, timestamp); photometricUndist->output->copyMetaTo(*result); if (!passthrough) { float* out_data = result->image; float* in_data = photometricUndist->output->image; float* noiseMapX=0; float* noiseMapY=0; if(benchmark_varNoise>0) { int numnoise=(benchmark_noiseGridsize+8)*(benchmark_noiseGridsize+8); noiseMapX=new float[numnoise]; noiseMapY=new float[numnoise]; memset(noiseMapX,0,sizeof(float)*numnoise); memset(noiseMapY,0,sizeof(float)*numnoise); for(int i=0;i<numnoise;i++) { noiseMapX[i] = 2*benchmark_varNoise * (rand()/(float)RAND_MAX - 0.5f); noiseMapY[i] = 2*benchmark_varNoise * (rand()/(float)RAND_MAX - 0.5f); } } for(int idx = w*h-1;idx>=0;idx--) { // get interp. values float xx = remapX[idx]; float yy = remapY[idx]; if(benchmark_varNoise>0) { float deltax = getInterpolatedElement11BiCub(noiseMapX, 4+(xx/(float)wOrg)*benchmark_noiseGridsize, 4+(yy/(float)hOrg)*benchmark_noiseGridsize, benchmark_noiseGridsize+8 ); float deltay = getInterpolatedElement11BiCub(noiseMapY, 4+(xx/(float)wOrg)*benchmark_noiseGridsize, 4+(yy/(float)hOrg)*benchmark_noiseGridsize, benchmark_noiseGridsize+8 ); float x = idx%w + deltax; float y = idx/w + deltay; if(x < 0.01) x = 0.01; if(y < 0.01) y = 0.01; if(x > w-1.01) x = w-1.01; if(y > h-1.01) y = h-1.01; xx = getInterpolatedElement(remapX, x, y, w); yy = getInterpolatedElement(remapY, x, y, w); } if(xx<0) out_data[idx] = 0; else { // get integer and rational parts int xxi = xx; int yyi = yy; xx -= xxi; yy -= yyi; float xxyy = xx*yy; // get array base pointer const float* src = in_data + xxi + yyi * wOrg; // interpolate (bilinear) out_data[idx] = xxyy * src[1+wOrg] + (yy-xxyy) * src[wOrg] + (xx-xxyy) * src[1] + (1-xx-yy+xxyy) * src[0]; } } if(benchmark_varNoise>0) { delete[] noiseMapX; delete[] noiseMapY; } } else { memcpy(result->image, photometricUndist->output->image, sizeof(float)*w*h); } applyBlurNoise(result->image); return result; } template ImageAndExposure* Undistort::undistort<unsigned char>(const MinimalImage<unsigned char>* image_raw, float exposure, double timestamp, float factor) const; template ImageAndExposure* Undistort::undistort<unsigned short>(const MinimalImage<unsigned short>* image_raw, float exposure, double timestamp, float factor) const; void Undistort::applyBlurNoise(float* img) const { if(benchmark_varBlurNoise==0) return; int numnoise=(benchmark_noiseGridsize+8)*(benchmark_noiseGridsize+8); float* noiseMapX=new float[numnoise]; float* noiseMapY=new float[numnoise]; float* blutTmp=new float[w*h]; if(benchmark_varBlurNoise>0) { for(int i=0;i<numnoise;i++) { noiseMapX[i] = benchmark_varBlurNoise * (rand()/(float)RAND_MAX); noiseMapY[i] = benchmark_varBlurNoise * (rand()/(float)RAND_MAX); } } float gaussMap[1000]; for(int i=0;i<1000;i++) gaussMap[i] = expf((float)(-i*i/(100.0*100.0))); // x-blur. for(int y=0;y<h;y++) for(int x=0;x<w;x++) { float xBlur = getInterpolatedElement11BiCub(noiseMapX, 4+(x/(float)w)*benchmark_noiseGridsize, 4+(y/(float)h)*benchmark_noiseGridsize, benchmark_noiseGridsize+8 ); if(xBlur < 0.01) xBlur=0.01; int kernelSize = 1 + (int)(1.0f+xBlur*1.5); float sumW=0; float sumCW=0; for(int dx=0; dx <= kernelSize; dx++) { int gmid = 100.0f*dx/xBlur + 0.5f; if(gmid > 900 ) gmid = 900; float gw = gaussMap[gmid]; if(x+dx>0 && x+dx<w) { sumW += gw; sumCW += gw * img[x+dx+y*this->w]; } if(x-dx>0 && x-dx<w && dx!=0) { sumW += gw; sumCW += gw * img[x-dx+y*this->w]; } } blutTmp[x+y*this->w] = sumCW / sumW; } // y-blur. for(int x=0;x<w;x++) for(int y=0;y<h;y++) { float yBlur = getInterpolatedElement11BiCub(noiseMapY, 4+(x/(float)w)*benchmark_noiseGridsize, 4+(y/(float)h)*benchmark_noiseGridsize, benchmark_noiseGridsize+8 ); if(yBlur < 0.01) yBlur=0.01; int kernelSize = 1 + (int)(0.9f+yBlur*2.5); float sumW=0; float sumCW=0; for(int dy=0; dy <= kernelSize; dy++) { int gmid = 100.0f*dy/yBlur + 0.5f; if(gmid > 900 ) gmid = 900; float gw = gaussMap[gmid]; if(y+dy>0 && y+dy<h) { sumW += gw; sumCW += gw * blutTmp[x+(y+dy)*this->w]; } if(y-dy>0 && y-dy<h && dy!=0) { sumW += gw; sumCW += gw * blutTmp[x+(y-dy)*this->w]; } } img[x+y*this->w] = sumCW / sumW; } delete[] noiseMapX; delete[] noiseMapY; } void Undistort::makeOptimalK_crop() { printf("finding CROP optimal new model!\n"); K.setIdentity(); // 1. stretch the center lines as far as possible, to get initial coarse quess. float* tgX = new float[100000]; float* tgY = new float[100000]; float minX = 0; float maxX = 0; float minY = 0; float maxY = 0; for(int x=0; x<100000;x++) {tgX[x] = (x-50000.0f) / 10000.0f; tgY[x] = 0;} distortCoordinates(tgX, tgY,tgX, tgY,100000); for(int x=0; x<100000;x++) { if(tgX[x] > 0 && tgX[x] < wOrg-1) { if(minX==0) minX = (x-50000.0f) / 10000.0f; maxX = (x-50000.0f) / 10000.0f; } } for(int y=0; y<100000;y++) {tgY[y] = (y-50000.0f) / 10000.0f; tgX[y] = 0;} distortCoordinates(tgX, tgY,tgX, tgY,100000); for(int y=0; y<100000;y++) { if(tgY[y] > 0 && tgY[y] < hOrg-1) { if(minY==0) minY = (y-50000.0f) / 10000.0f; maxY = (y-50000.0f) / 10000.0f; } } delete[] tgX; delete[] tgY; minX *= 1.01; maxX *= 1.01; minY *= 1.01; maxY *= 1.01; printf("initial range: x: %.4f - %.4f; y: %.4f - %.4f!\n", minX, maxX, minY, maxY); // 2. while there are invalid pixels at the border: shrink square at the side that has invalid pixels, // if several to choose from, shrink the wider dimension. bool oobLeft=true, oobRight=true, oobTop=true, oobBottom=true; int iteration=0; while(oobLeft || oobRight || oobTop || oobBottom) { oobLeft=oobRight=oobTop=oobBottom=false; for(int y=0;y<h;y++) { remapX[y*2] = minX; remapX[y*2+1] = maxX; remapY[y*2] = remapY[y*2+1] = minY + (maxY-minY) * (float)y / ((float)h-1.0f); } distortCoordinates(remapX, remapY,remapX, remapY,2*h); for(int y=0;y<h;y++) { if(!(remapX[2*y] > 0 && remapX[2*y] < wOrg-1)) oobLeft = true; if(!(remapX[2*y+1] > 0 && remapX[2*y+1] < wOrg-1)) oobRight = true; } for(int x=0;x<w;x++) { remapY[x*2] = minY; remapY[x*2+1] = maxY; remapX[x*2] = remapX[x*2+1] = minX + (maxX-minX) * (float)x / ((float)w-1.0f); } distortCoordinates(remapX, remapY,remapX, remapY,2*w); for(int x=0;x<w;x++) { if(!(remapY[2*x] > 0 && remapY[2*x] < hOrg-1)) oobTop = true; if(!(remapY[2*x+1] > 0 && remapY[2*x+1] < hOrg-1)) oobBottom = true; } if((oobLeft || oobRight) && (oobTop || oobBottom)) { if((maxX-minX) > (maxY-minY)) oobBottom = oobTop = false; // only shrink left/right else oobLeft = oobRight = false; // only shrink top/bottom } if(oobLeft) minX *= 0.995; if(oobRight) maxX *= 0.995; if(oobTop) minY *= 0.995; if(oobBottom) maxY *= 0.995; iteration++; printf("iteration %05d: range: x: %.4f - %.4f; y: %.4f - %.4f!\n", iteration, minX, maxX, minY, maxY); if(iteration > 500) { printf("FAILED TO COMPUTE GOOD CAMERA MATRIX - SOMETHING IS SERIOUSLY WRONG. ABORTING \n"); exit(1); } } K(0,0) = ((float)w-1.0f)/(maxX-minX); K(1,1) = ((float)h-1.0f)/(maxY-minY); K(0,2) = -minX*K(0,0); K(1,2) = -minY*K(1,1); } void Undistort::makeOptimalK_full() { // todo assert(false); } void Undistort::readFromFile(const char* configFileName, int nPars, std::string prefix) { photometricUndist=0; valid = false; passthrough=false; remapX = 0; remapY = 0; float outputCalibration[5]; parsOrg = VecX(nPars); // read parameters std::ifstream infile(configFileName); assert(infile.good()); std::string l1,l2,l3,l4; std::getline(infile,l1); std::getline(infile,l2); std::getline(infile,l3); std::getline(infile,l4); // l1 & l2 if(nPars == 5) // fov model { char buf[1000]; snprintf(buf, 1000, "%s%%lf %%lf %%lf %%lf %%lf", prefix.c_str()); if(std::sscanf(l1.c_str(), buf, &parsOrg[0], &parsOrg[1], &parsOrg[2], &parsOrg[3], &parsOrg[4]) == 5 && std::sscanf(l2.c_str(), "%d %d", &wOrg, &hOrg) == 2) { printf("Input resolution: %d %d\n",wOrg, hOrg); printf("In: %f %f %f %f %f\n", parsOrg[0], parsOrg[1], parsOrg[2], parsOrg[3], parsOrg[4]); } else { printf("Failed to read camera calibration (invalid format?)\nCalibration file: %s\n", configFileName); infile.close(); return; } } else if(nPars == 8) // KB, equi & radtan model { char buf[1000]; snprintf(buf, 1000, "%s%%lf %%lf %%lf %%lf %%lf %%lf %%lf %%lf %%lf %%lf", prefix.c_str()); if(std::sscanf(l1.c_str(), buf, &parsOrg[0], &parsOrg[1], &parsOrg[2], &parsOrg[3], &parsOrg[4], &parsOrg[5], &parsOrg[6], &parsOrg[7]) == 8 && std::sscanf(l2.c_str(), "%d %d", &wOrg, &hOrg) == 2) { printf("Input resolution: %d %d\n",wOrg, hOrg); printf("In: %s%f %f %f %f %f %f %f %f\n", prefix.c_str(), parsOrg[0], parsOrg[1], parsOrg[2], parsOrg[3], parsOrg[4], parsOrg[5], parsOrg[6], parsOrg[7]); } else { printf("Failed to read camera calibration (invalid format?)\nCalibration file: %s\n", configFileName); infile.close(); return; } } else { printf("called with invalid number of parameters.... forgot to implement me?\n"); infile.close(); return; } if(parsOrg[2] < 1 && parsOrg[3] < 1) { printf("\n\nFound fx=%f, fy=%f, cx=%f, cy=%f.\n I'm assuming this is the \"relative\" calibration file format," "and will rescale this by image width / height to fx=%f, fy=%f, cx=%f, cy=%f.\n\n", parsOrg[0], parsOrg[1], parsOrg[2], parsOrg[3], parsOrg[0] * wOrg, parsOrg[1] * hOrg, parsOrg[2] * wOrg - 0.5, parsOrg[3] * hOrg - 0.5 ); // rescale and substract 0.5 offset. // the 0.5 is because I'm assuming the calibration is given such that the pixel at (0,0) // contains the integral over intensity over [0,0]-[1,1], whereas I assume the pixel (0,0) // to contain a sample of the intensity ot [0,0], which is best approximated by the integral over // [-0.5,-0.5]-[0.5,0.5]. Thus, the shift by -0.5. parsOrg[0] = parsOrg[0] * wOrg; parsOrg[1] = parsOrg[1] * hOrg; parsOrg[2] = parsOrg[2] * wOrg - 0.5; parsOrg[3] = parsOrg[3] * hOrg - 0.5; } // l3 if(l3 == "crop") { outputCalibration[0] = -1; printf("Out: Rectify Crop\n"); } else if(l3 == "full") { outputCalibration[0] = -2; printf("Out: Rectify Full\n"); } else if(l3 == "none") { outputCalibration[0] = -3; printf("Out: No Rectification\n"); } else if(std::sscanf(l3.c_str(), "%f %f %f %f %f", &outputCalibration[0], &outputCalibration[1], &outputCalibration[2], &outputCalibration[3], &outputCalibration[4]) == 5) { printf("Out: %f %f %f %f %f\n", outputCalibration[0], outputCalibration[1], outputCalibration[2], outputCalibration[3], outputCalibration[4]); } else { printf("Out: Failed to Read Output pars... not rectifying.\n"); infile.close(); return; } // l4 if(std::sscanf(l4.c_str(), "%d %d", &w, &h) == 2) { if(benchmarkSetting_width != 0) { w = benchmarkSetting_width; if(outputCalibration[0] == -3) outputCalibration[0] = -1; // crop instead of none, since probably resolution changed. } if(benchmarkSetting_height != 0) { h = benchmarkSetting_height; if(outputCalibration[0] == -3) outputCalibration[0] = -1; // crop instead of none, since probably resolution changed. } printf("Output resolution: %d %d\n",w, h); } else { printf("Out: Failed to Read Output resolution... not rectifying.\n"); valid = false; } remapX = new float[w*h]; remapY = new float[w*h]; if(outputCalibration[0] == -1) makeOptimalK_crop(); else if(outputCalibration[0] == -2) makeOptimalK_full(); else if(outputCalibration[0] == -3) { if(w != wOrg || h != hOrg) { printf("ERROR: rectification mode none requires input and output dimenstions to match!\n\n"); exit(1); } K.setIdentity(); K(0,0) = parsOrg[0]; K(1,1) = parsOrg[1]; K(0,2) = parsOrg[2]; K(1,2) = parsOrg[3]; passthrough = true; } else { if(outputCalibration[2] > 1 || outputCalibration[3] > 1) { printf("\n\n\nWARNING: given output calibration (%f %f %f %f) seems wrong. It needs to be relative to image width / height!\n\n\n", outputCalibration[0],outputCalibration[1],outputCalibration[2],outputCalibration[3]); } K.setIdentity(); K(0,0) = outputCalibration[0] * w; K(1,1) = outputCalibration[1] * h; K(0,2) = outputCalibration[2] * w - 0.5; K(1,2) = outputCalibration[3] * h - 0.5; } if(benchmarkSetting_fxfyfac != 0) { K(0,0) = fmax(benchmarkSetting_fxfyfac, (float)K(0,0)); K(1,1) = fmax(benchmarkSetting_fxfyfac, (float)K(1,1)); passthrough = false; // cannot pass through when fx / fy have been overwritten. } for(int y=0;y<h;y++) for(int x=0;x<w;x++) { remapX[x+y*w] = x; remapY[x+y*w] = y; } distortCoordinates(remapX, remapY, remapX, remapY, h*w); for(int y=0;y<h;y++) for(int x=0;x<w;x++) { // make rounding resistant. float ix = remapX[x+y*w]; float iy = remapY[x+y*w]; if(ix == 0) ix = 0.001; if(iy == 0) iy = 0.001; if(ix == wOrg-1) ix = wOrg-1.001; if(iy == hOrg-1) ix = hOrg-1.001; if(ix > 0 && iy > 0 && ix < wOrg-1 && iy < wOrg-1) { remapX[x+y*w] = ix; remapY[x+y*w] = iy; } else { remapX[x+y*w] = -1; remapY[x+y*w] = -1; } } valid = true; printf("\nRectified Kamera Matrix:\n"); std::cout << K << "\n\n"; } UndistortFOV::UndistortFOV(const char* configFileName, bool noprefix) { printf("Creating FOV undistorter\n"); if(noprefix) readFromFile(configFileName, 5); else readFromFile(configFileName, 5, "FOV "); } UndistortFOV::~UndistortFOV() { } void UndistortFOV::distortCoordinates(float* in_x, float* in_y, float* out_x, float* out_y, int n) const { float dist = parsOrg[4]; float d2t = 2.0f * tan(dist / 2.0f); // current camera parameters float fx = parsOrg[0]; float fy = parsOrg[1]; float cx = parsOrg[2]; float cy = parsOrg[3]; float ofx = K(0,0); float ofy = K(1,1); float ocx = K(0,2); float ocy = K(1,2); for(int i=0;i<n;i++) { float x = in_x[i]; float y = in_y[i]; float ix = (x - ocx) / ofx; float iy = (y - ocy) / ofy; float r = sqrtf(ix*ix + iy*iy); float fac = (r==0 || dist==0) ? 1 : atanf(r * d2t)/(dist*r); ix = fx*fac*ix+cx; iy = fy*fac*iy+cy; out_x[i] = ix; out_y[i] = iy; } } UndistortRadTan::UndistortRadTan(const char* configFileName, bool noprefix) { printf("Creating RadTan undistorter\n"); if(noprefix) readFromFile(configFileName, 8); else readFromFile(configFileName, 8,"RadTan "); } UndistortRadTan::~UndistortRadTan() { } void UndistortRadTan::distortCoordinates(float* in_x, float* in_y, float* out_x, float* out_y, int n) const { // RADTAN float fx = parsOrg[0]; float fy = parsOrg[1]; float cx = parsOrg[2]; float cy = parsOrg[3]; float k1 = parsOrg[4]; float k2 = parsOrg[5]; float r1 = parsOrg[6]; float r2 = parsOrg[7]; float ofx = K(0,0); float ofy = K(1,1); float ocx = K(0,2); float ocy = K(1,2); for(int i=0;i<n;i++) { float x = in_x[i]; float y = in_y[i]; // RADTAN float ix = (x - ocx) / ofx; float iy = (y - ocy) / ofy; float mx2_u = ix * ix; float my2_u = iy * iy; float mxy_u = ix * iy; float rho2_u = mx2_u+my2_u; float rad_dist_u = k1 * rho2_u + k2 * rho2_u * rho2_u; float x_dist = ix + ix * rad_dist_u + 2.0 * r1 * mxy_u + r2 * (rho2_u + 2.0 * mx2_u); float y_dist = iy + iy * rad_dist_u + 2.0 * r2 * mxy_u + r1 * (rho2_u + 2.0 * my2_u); float ox = fx*x_dist+cx; float oy = fy*y_dist+cy; out_x[i] = ox; out_y[i] = oy; } } UndistortEquidistant::UndistortEquidistant(const char* configFileName, bool noprefix) { printf("Creating Equidistant undistorter\n"); if(noprefix) readFromFile(configFileName, 8); else readFromFile(configFileName, 8,"EquiDistant "); } UndistortEquidistant::~UndistortEquidistant() { } void UndistortEquidistant::distortCoordinates(float* in_x, float* in_y, float* out_x, float* out_y, int n) const { // EQUI float fx = parsOrg[0]; float fy = parsOrg[1]; float cx = parsOrg[2]; float cy = parsOrg[3]; float k1 = parsOrg[4]; float k2 = parsOrg[5]; float k3 = parsOrg[6]; float k4 = parsOrg[7]; float ofx = K(0,0); float ofy = K(1,1); float ocx = K(0,2); float ocy = K(1,2); for(int i=0;i<n;i++) { float x = in_x[i]; float y = in_y[i]; // EQUI float ix = (x - ocx) / ofx; float iy = (y - ocy) / ofy; float r = sqrt(ix * ix + iy * iy); float theta = atan(r); float theta2 = theta * theta; float theta4 = theta2 * theta2; float theta6 = theta4 * theta2; float theta8 = theta4 * theta4; float thetad = theta * (1 + k1 * theta2 + k2 * theta4 + k3 * theta6 + k4 * theta8); float scaling = (r > 1e-8) ? thetad / r : 1.0; float ox = fx*ix*scaling + cx; float oy = fy*iy*scaling + cy; out_x[i] = ox; out_y[i] = oy; } } UndistortKB::UndistortKB(const char* configFileName, bool noprefix) { printf("Creating KannalaBrandt undistorter\n"); if(noprefix) readFromFile(configFileName, 8); else readFromFile(configFileName, 8,"KannalaBrandt "); } UndistortKB::~UndistortKB() { } void UndistortKB::distortCoordinates(float* in_x, float* in_y, float* out_x, float* out_y, int n) const { const float fx = parsOrg[0]; const float fy = parsOrg[1]; const float cx = parsOrg[2]; const float cy = parsOrg[3]; const float k0 = parsOrg[4]; const float k1 = parsOrg[5]; const float k2 = parsOrg[6]; const float k3 = parsOrg[7]; const float ofx = K(0,0); const float ofy = K(1,1); const float ocx = K(0,2); const float ocy = K(1,2); for(int i=0;i<n;i++) { float x = in_x[i]; float y = in_y[i]; // RADTAN float ix = (x - ocx) / ofx; float iy = (y - ocy) / ofy; const float Xsq_plus_Ysq = ix*ix + iy*iy; const float sqrt_Xsq_Ysq = sqrtf(Xsq_plus_Ysq); const float theta = atan2f( sqrt_Xsq_Ysq, 1 ); const float theta2 = theta*theta; const float theta3 = theta2*theta; const float theta5 = theta3*theta2; const float theta7 = theta5*theta2; const float theta9 = theta7*theta2; const float r = theta + k0*theta3 + k1*theta5 + k2*theta7 + k3*theta9; if(sqrt_Xsq_Ysq < 1e-6) { out_x[i] = fx * ix + cx; out_y[i] = fy * iy + cy; } else { out_x[i] = (r / sqrt_Xsq_Ysq) * fx * ix + cx; out_y[i] = (r / sqrt_Xsq_Ysq) * fy * iy + cy; } } } UndistortPinhole::UndistortPinhole(const char* configFileName, bool noprefix) { if(noprefix) readFromFile(configFileName, 5); else readFromFile(configFileName, 5,"Pinhole "); } UndistortPinhole::~UndistortPinhole() { } void UndistortPinhole::distortCoordinates(float* in_x, float* in_y, float* out_x, float* out_y, int n) const { // current camera parameters float fx = parsOrg[0]; float fy = parsOrg[1]; float cx = parsOrg[2]; float cy = parsOrg[3]; float ofx = K(0,0); float ofy = K(1,1); float ocx = K(0,2); float ocy = K(1,2); for(int i=0;i<n;i++) { float x = in_x[i]; float y = in_y[i]; float ix = (x - ocx) / ofx; float iy = (y - ocy) / ofy; ix = fx*ix+cx; iy = fy*iy+cy; out_x[i] = ix; out_y[i] = iy; } } } ```
Ferdinand "Ferd" Wirtz (26 November 1885 – 18 April 1947) was a Luxembourgian gymnast who competed in the 1912 Summer Olympics. He was born in Luxembourg City. In 1912 he was a member of the Luxembourgian team which finished fourth in the team, European system competition and fifth in the team, free system event. References External links Sports Reference profile List of Luxembourgian gymnasts 1885 births 1947 deaths Sportspeople from Luxembourg City Luxembourgian male artistic gymnasts Olympic gymnasts for Luxembourg Gymnasts at the 1912 Summer Olympics 20th-century Luxembourgian people
```php <?php declare(strict_types=1); namespace App\Entity\Fixture; use App\Entity\Podcast; use App\Entity\PodcastCategory; use App\Entity\Station; use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\DependentFixtureInterface; use Doctrine\Persistence\ObjectManager; final class PodcastFixture extends AbstractFixture implements DependentFixtureInterface { public function load(ObjectManager $manager): void { /** @var Station $station */ $station = $this->getReference('station'); $podcastStorage = $station->getPodcastsStorageLocation(); $podcast = new Podcast($podcastStorage); $podcast->setTitle('The AzuraTest Podcast'); $podcast->setLink('path_to_url $podcast->setLanguage('en'); $podcast->setDescription('The unofficial testing podcast for the AzuraCast development team.'); $podcast->setAuthor('AzuraCast'); $podcast->setEmail('demo@azuracast.com'); $manager->persist($podcast); $category = new PodcastCategory($podcast, 'Technology'); $manager->persist($category); $manager->flush(); $this->setReference('podcast', $podcast); } /** * @return string[] */ public function getDependencies(): array { return [ StationFixture::class, ]; } } ```
```c /* ------------------------------------------------------------- */ /* support for tcc_run() */ #ifdef __leading_underscore # define _(s) s #else # define _(s) _##s #endif #ifndef _WIN32 extern void (*_(_init_array_start)[]) (int argc, char **argv, char **envp); extern void (*_(_init_array_end)[]) (int argc, char **argv, char **envp); static void run_ctors(int argc, char **argv, char **env) { int i = 0; while (&_(_init_array_start)[i] != _(_init_array_end)) (*_(_init_array_start)[i++])(argc, argv, env); } #endif extern void (*_(_fini_array_start)[]) (void); extern void (*_(_fini_array_end)[]) (void); static void run_dtors(void) { int i = 0; while (&_(_fini_array_end)[i] != _(_fini_array_start)) (*_(_fini_array_end)[--i])(); } static void *rt_exitfunc[32]; static void *rt_exitarg[32]; static int __rt_nr_exit; void __run_on_exit(int ret) { int n = __rt_nr_exit; while (n) --n, ((void(*)(int,void*))rt_exitfunc[n])(ret, rt_exitarg[n]); } int on_exit(void *function, void *arg) { int n = __rt_nr_exit; if (n < 32) { rt_exitfunc[n] = function; rt_exitarg[n] = arg; __rt_nr_exit = n + 1; return 0; } return 1; } int atexit(void (*function)(void)) { return on_exit(function, 0); } typedef struct rt_frame { void *ip, *fp, *sp; } rt_frame; __attribute__((noreturn)) void __rt_exit(rt_frame *, int); void exit(int code) { rt_frame f; run_dtors(); __run_on_exit(code); f.fp = 0; f.ip = exit; __rt_exit(&f, code); } #ifndef _WIN32 int main(int, char**, char**); int _runmain(int argc, char **argv, char **envp) { int ret; run_ctors(argc, argv, envp); ret = main(argc, argv, envp); run_dtors(); __run_on_exit(ret); return ret; } #endif ```
```php <?php /************************************************************************* Generated via "php artisan localization:missing" at 2018/04/26 11:05:24 *************************************************************************/ return array ( //==================================== Translations ====================================// 'action' => 'Akcja', 'affiliates' => 'Wsplnicy', 'attendees' => 'Uczestnicy', 'back_to_login' => 'back_to_login', 'back_to_page' => 'Wr Do :page', 'cancel' => 'Anuluj', 'customize' => 'Dostosuj', 'dashboard' => 'Panel Sterowania', 'days' => 'dni', 'disable' => 'Wycz', 'disabled' => 'Wyczony', 'drag_to_reorder' => 'Przecignij by zmieni kolejno', 'edit' => 'Edytuj', 'enable' => 'Wcz', 'enabled' => 'Wczony', 'error_404' => 'Wyglda na to, e strona ktrej szukasz nie istnieje, lub zostaa przesunita.', 'event_dashboard' => 'Panel Sterowania Wydarzenia', 'event_page_design' => 'Wygld Strony Wydarzenia', 'export' => 'Eksport', 'general' => 'Gwne', 'hello' => 'Witaj', 'hours' => 'godziny', 'main_menu' => 'Menu Gwne', 'manage' => 'Zarzdzaj', 'message' => 'Wiadomo', 'minutes' => 'minuty', 'months_short' => '|Sty|Lut|Mar|Kwi|Maj|Cze|Lip|Sie|Wrz|Pa|Lis|Gru|', 'no' => 'Nie', 'order_form' => 'Formularz Zamwienia', 'orders' => 'Zamwienia', 'promote' => 'Promuj', 'save_changes' => 'Zapisz zmiany', 'save_details' => 'Zapisz', 'service_fees' => 'Opaty Serwisowe', 'social' => 'Spoecznoci', 'submit' => 'Wylij', 'success' => 'Sukces', 'ticket_design' => 'Wygld Biletw', 'tickets' => 'Bilety', 'thank_you' => 'Thank you', 'total' => 'razem', 'TOP' => 'GRA', 'whoops' => 'Ups!', 'yes' => 'Tak', /* * Lines below will turn obsolete in localization helper, it is declared in app/Helpers/macros. * If you run it, it will break file input fields. */ 'upload' => 'Zaaduj', 'browse' => 'Przegldaj', //================================== Obsolete strings ==================================// 'LLH:obsolete' => array ( 'months_long' => 'Stycze|Luty|Marzec|Kwiecie|Maj|Czerwiec|Lipiec|Sierpie|Wrzesie|Padziernik|Listopad|Grudzie', ), ); ```
Büyükevren is a village in the Enez District of Edirne Province in Turkey. The village had a population of 745 in 2022. References Villages in Enez District
Pete McMahon (born October 15, 1981) is a former American football offensive lineman. He was drafted by the Oakland Raiders in the sixth round of the 2005 NFL Draft. He played college football at Iowa. McMahon has also been a member of the Cleveland Browns, New York Jets, Jacksonville Jaguars, Chicago Rush, New York Dragons and New England Patriots. Early years McMahon attended Wahlert High School in Dubuque, Iowa, where he played football as an offensive and defensive lineman. College career McMahon played at the University of Iowa as a walk-on offensive lineman from 2000 through 2004. Professional career Oakland Raiders McMahon was drafted by the Raiders in the sixth round of the 2005 NFL Draft. He suffered a knee injury in the team's 2005 training camp and was waived/injured on August 29, 2005, cleared waivers, and was placed on injured reserve on September 1, 2005. He was then released from the injured reserve with an injury settlement the same day. Cleveland Browns On September 5, 2005, McMahon was signed to the Browns' practice squad, where he stayed through the 2005 season. He was re-signed to a future contract on January 2, 2006, but was waived on July 21, 2006. New York Jets McMahon was signed by the Jets on July 27, 2006, and waived on August 27, 2006. First stint with Jaguars The Jaguars signed McMahon to their practice squad on December 12, 2006. He was re-signed to a future contract on January 2, 2007 and assigned to NFL Europa as a member of the Hamburg Sea Devils for their 2007 season. He was waived by the Jaguars on September 1, 2007. New York Dragons McMahon was signed by the New York Dragons of the Arena Football League on December 21, 2007 and waived on January 14, 2008. Second stint with the Jaguars McMahon was signed to a future contract by the Jaguars on January 22, 2008, but was waived by the team on July 25, 2008. New England Patriots McMahon was signed by the Patriots on July 30, 2008, but was waived on August 13, 2008. Third stint with the Jaguars On August 14, 2008, the Jaguars signed McMahon once again. He was waived by the team on August 30, 2008. References External links Just Sports Stats Iowa Hawkeyes bio Jacksonville Jaguars bio New England Patriots bio 1981 births Living people Players of American football from Dubuque, Iowa American football offensive tackles American football offensive guards Iowa Hawkeyes football players Oakland Raiders players Cleveland Browns players New York Jets players Jacksonville Jaguars players Hamburg Sea Devils players Chicago Rush players New York Dragons players New England Patriots players
Pothunuru is a village in Denduluru mandal of Eluru district, Andhra Pradesh, India. Demographics Census of India, Pothunuru had a population of 7177. The total population constitute, 3619 males and 3558 females with a sex ratio of 993 females per 1000 males. 684 children are in the age group of 0–6 years, with sex ratio of 1024. The average literacy rate stands at 74.51%. Eminent persons Kommareddi Suryanarayana - a parliamentarian was born here. Parvathaneni Upendra, a parliamentarian and Ex Central minister was born here. Maganti Varalaksmi Devi, Ex Member of Legislature Assembly was born here. References Villages in Eluru district
Lucille Marie Miller (née Maxwell) (January 17, 1930 – November 4, 1986) was a Canadian-American housewife and mother who was convicted of first-degree murder in the death of her husband. Prosecutors alleged Miller was inspired by the eponymous plot device of the film Double Indemnity, a provision in which the proceeds of a life insurance policy pay double the face value for accidental deaths. Joan Didion wrote a 1966 essay about the case, "Some Dreamers of the Golden Dream", which appeared originally in The Saturday Evening Post as "How Can I Tell Them There's Nothing Left" (a quote from Lucille Miller the morning of the fire); it was included in her 1968 book Slouching Towards Bethlehem. Background At the time of the murder, Lucille Miller was just a few months shy of 35 years old, married to dentist Dr. Gordon "Cork" Miller, a mother of three, and pregnant with their fourth child. The Millers were Seventh-day Adventists (SDA), and had met and married when they attended the SDA-owned Walla Walla College. The family had recently moved from Oregon to a new house at 8488 Bella Vista Drive in the then-unincorporated Alta Loma area of San Bernardino County, California, due to Cork's stated desire to attend the medical college at the nearby SDA-owned Loma Linda University Medical Center so he could move from dentistry to general medicine. Their oldest child, Debra J. Miller, recalled that her father wanted to be an airline pilot, but had reluctantly followed her grandfather into dentistry in order not to have college funding cut off. Cork had also showed signs of depression and suicidal behavior, including one incident where Lucille hid the keys to the couple's 1964 Volkswagen Beetle with Debra, and had been taking sedatives to help him sleep at night. Case history On October 7, 1964, Lucille Miller had poured Cork a glass of milk to settle his stomach, and discovered she needed to make a late night trip to the store to purchase milk so the children would have it for breakfast. Cork asked to come along. He was sleeping next to the passenger door, which she locked to ensure he didn't fall out. They went to an all-night Mayfair Market where she purchased the milk. At about 12:30 AM on October 8 on the way home, Lucille claimed, the Beetle had a tire blow out, causing the car to catch fire as she drove off Banyan Street above a lemon grove. She claimed she tried to break a window but the fire was too hot to reach in and unlock the door, and that she then used a big tree branch to try to move her husband out of the car, but he was fast asleep. She then went to get help on the deserted section of Banyan Street and finally found a house from which she called the police. The initial evidence matched her story, until authorities more closely examined the skid marks, which were much shorter than they would be in a loss of control as Lucille reported. They also noticed an empty can of gasoline lying on its side on the back seat, while the charred milk cartons were still standing upright and not jostled by the sudden stop. The car was still in low gear (unusual for a 35mph crash), and was also dug in, implying that someone had tried to push it the rest of the way over the embankment. Miller was arrested later that day and held pending charges. A complaint was filed on October 13, and an indictment for first-degree murder was returned October 20. Further investigation led to the discovery of a $125,000 (some sources say $140,000) life insurance policy with a double indemnity clause for accidental death. The couple was also found to be roughly $64,000 in debt, including a nearly $30,000 mortgage on the Bella Vista house. Lucille was also discovered to have had an affair with lawyer Arthwell Hayton, a widower father of three, one of them a friend of Debra, who said Hayton's wife, Elaine, had died under mysterious circumstances. Both Lucille and Hayton told police that the affair had ended several months before Cork's death. Trial, conviction and appeal Miller was convicted on March 5, 1965, and sentenced to life imprisonment. Her conviction was upheld on appeal to the California Supreme Court in 1966, and also by the U.S. Supreme Court in 1968 (with F. Lee Bailey as part of her legal team). After serving seven years of her sentence, she was paroled in 1972. Her attorneys, convinced of her absolute innocence, continued to appeal her conviction. Aftermath In addition to the trial, Didion's essay contains details of the fire, the Hayton affair, and a biographical sketch of Lucille and Cork Miller. Didion would later meet Lucille Miller's daughter Debra in 1996. Arthwell Hayton later married Wenche Berg, his children's governess. San Bernardino County authorities never further investigated the death of Elaine Hayton, which had been ruled an accidental overdose of sedatives, despite the discovery of the affair between Hayton and Lucille Miller and the fact that both their spouses had had high levels of sedatives in their systems when they died. Debra, Guy and Ron Miller all married, but had no children. Debra and Ron both became teachers (Ron is also a writer), and Guy became a third-generation Miller dentist. Kimi Kai Miller, born in June 1965 during their mother's incarceration at California Institution for Women in Corona, CA, died at age 25 from lung cancer. Debra and Ron were two of the on-camera interviewees for "Accident on Banyan St.," an episode of A Crime to Remember that dealt with the case. It first aired on December 16, 2014, on Investigation Discovery. Death Little has been revealed about Lucille Miller's post-parole life, except that the prison-educated stenographer and model prisoner had three job offers in Los Angeles upon her release from prison and that she planned to change her name. Lucille was also "hopelessly entangled" with her kids until she died of breast cancer on November 4, 1986, as Debra reported in a 2006 newspaper article she wrote about her mother's case. References External links Case summary from crimefeed.com "The California Room" from theparisreview.org 1930 births 1986 deaths 20th-century American criminals American female murderers American people convicted of murder American prisoners sentenced to life imprisonment People convicted of murder by California Place of death missing People from Winnipeg Prisoners sentenced to life imprisonment by California Walla Walla Community College alumni American Seventh-day Adventists Mariticides Naturalized citizens of the United States
Clackmannanshire South is one of the five wards used to elect members of the Clackmannanshire council. It elects four Councillors. Councillors Election Results 2022 Election 2022 Clackmannanshire Council election 2017 Election 2017 Clackmannanshire Council election 2012 Election 2012 Clackmannanshire Council election 2007 Election 2007 Clackmannanshire Council election References Wards of Clackmannanshire
```go // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. //go:build cgo && sqlite_unlock_notify // +build cgo,sqlite_unlock_notify package sqlite3 /* #cgo CFLAGS: -DSQLITE_ENABLE_UNLOCK_NOTIFY #include <stdlib.h> #include "sqlite3-binding.h" extern void unlock_notify_callback(void *arg, int argc); */ import "C" import ( "fmt" "math" "sync" "unsafe" ) type unlock_notify_table struct { sync.Mutex seqnum uint table map[uint]chan struct{} } var unt unlock_notify_table = unlock_notify_table{table: make(map[uint]chan struct{})} func (t *unlock_notify_table) add(c chan struct{}) uint { t.Lock() defer t.Unlock() h := t.seqnum t.table[h] = c t.seqnum++ return h } func (t *unlock_notify_table) remove(h uint) { t.Lock() defer t.Unlock() delete(t.table, h) } func (t *unlock_notify_table) get(h uint) chan struct{} { t.Lock() defer t.Unlock() c, ok := t.table[h] if !ok { panic(fmt.Sprintf("Non-existent key for unlcok-notify channel: %d", h)) } return c } //export unlock_notify_callback func unlock_notify_callback(argv unsafe.Pointer, argc C.int) { for i := 0; i < int(argc); i++ { parg := ((*(*[(math.MaxInt32 - 1) / unsafe.Sizeof((*C.uint)(nil))]*[1]uint)(argv))[i]) arg := *parg h := arg[0] c := unt.get(h) c <- struct{}{} } } //export unlock_notify_wait func unlock_notify_wait(db *C.sqlite3) C.int { // It has to be a bufferred channel to not block in sqlite_unlock_notify // as sqlite_unlock_notify could invoke the callback before it returns. c := make(chan struct{}, 1) defer close(c) h := unt.add(c) defer unt.remove(h) pargv := C.malloc(C.sizeof_uint) defer C.free(pargv) argv := (*[1]uint)(pargv) argv[0] = h if rv := C.sqlite3_unlock_notify(db, (*[0]byte)(C.unlock_notify_callback), unsafe.Pointer(pargv)); rv != C.SQLITE_OK { return rv } <-c return C.SQLITE_OK } ```
```go /* path_to_url Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ // Code generated by client-gen. DO NOT EDIT. package fake import ( "context" v1beta1 "k8s.io/api/authorization/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" testing "k8s.io/client-go/testing" ) // FakeSelfSubjectRulesReviews implements SelfSubjectRulesReviewInterface type FakeSelfSubjectRulesReviews struct { Fake *FakeAuthorizationV1beta1 } var selfsubjectrulesreviewsResource = v1beta1.SchemeGroupVersion.WithResource("selfsubjectrulesreviews") var selfsubjectrulesreviewsKind = v1beta1.SchemeGroupVersion.WithKind("SelfSubjectRulesReview") // Create takes the representation of a selfSubjectRulesReview and creates it. Returns the server's representation of the selfSubjectRulesReview, and an error, if there is any. func (c *FakeSelfSubjectRulesReviews) Create(ctx context.Context, selfSubjectRulesReview *v1beta1.SelfSubjectRulesReview, opts v1.CreateOptions) (result *v1beta1.SelfSubjectRulesReview, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(selfsubjectrulesreviewsResource, selfSubjectRulesReview), &v1beta1.SelfSubjectRulesReview{}) if obj == nil { return nil, err } return obj.(*v1beta1.SelfSubjectRulesReview), err } ```
```css @keyframes elementor-animation-buzz-out { 10% { transform: translateX(3px) rotate(2deg); } 20% { transform: translateX(-3px) rotate(-2deg); } 30% { transform: translateX(3px) rotate(2deg); } 40% { transform: translateX(-3px) rotate(-2deg); } 50% { transform: translateX(2px) rotate(1deg); } 60% { transform: translateX(-2px) rotate(-1deg); } 70% { transform: translateX(2px) rotate(1deg); } 80% { transform: translateX(-2px) rotate(-1deg); } 90% { transform: translateX(1px) rotate(0); } 100% { transform: translateX(-1px) rotate(0); } } .elementor-animation-buzz-out:active, .elementor-animation-buzz-out:focus, .elementor-animation-buzz-out:hover { animation-name: elementor-animation-buzz-out; animation-duration: 0.75s; animation-timing-function: linear; animation-iteration-count: 1; } ```
Erik Reece is an American writer, the author of two books of nonfiction - Lost Mountain: A Year in the Vanishing Wilderness: Radical Strip Mining and the Devastation of Appalachia (New York: Riverhead Books, 2006) and An American Gospel: On Family, History, and The Kingdom of God (New York: Riverhead Books, 2009), and numerous essays and magazine articles, published in Harper's Magazine, The Nation, and Orion magazine. He also maintains a blog The Future We Want for True/Slant. He is writer-in-residence at the University of Kentucky in Lexington, where he teaches environmental journalism, writing, and literature. Life Reece was born and raised in Louisville, Kentucky. He received two degrees from the University of Kentucky, where he studied with Guy Davenport. Work Prose Reece's first book-length prose was a companion essay to Guy Davenport's collection of his drawings and paintings, A Balance of Quinces. Before that, he published a collection of poems, My Muse Was Supposed to Meet Me Here. Reece's 2006 book Lost Mountain: A Year in the Vanishing Wilderness (New York: Riverhead Books, 2006), with photos by John J. Cox and a foreword by Wendell Berry, chronicles the devastating effects of mountaintop removal mining in Appalachia from October 2003 through November 2004. The book grew out of an essay for Harper's Magazine entitled "Death of a Mountain: Radical Strip Mining and the Leveling of Appalachia," which was published in the April 2005 edition and which would win the John B. Oakes Award for Distinguished Environmental Journalism from the Columbia University Graduate School of Journalism. In 2009, Reece published An American Gospel: On Family, History, and The Kingdom of God (New York: Riverhead Books, 2009), a book about Reece's upbringing as the son and grandson of Baptist preachers, his father's suicide, and his own subsequent struggle to find a form of Christianity with which he would feel comfortable—and the guidance he received from the writings of Thomas Jefferson, Walt Whitman and other American geniuses. This book, too, grew out of an essay for Harper's Magazine, "Jesus Without the Miracles: Thomas Jefferson's Bible and the Gospel of Thomas". Poetry Reece's first published book was a collection of poems, My Muse Was Supposed to Meet Me Here. He edited the 2007 anthology Field Work: Modern Poems from Eastern Forests (Lexington, KY: The University of Press of Kentucky, 2007), an anthology of poems about the landscape and ecology of the eastern United States. It includes the work of modern American poets (among them, Robert Frost, Wendell Berry, Hayden Carruth, Charles Wright) plus that of four classical Chinese poets, who wandered and wrote about an area of southeastern China that is similar in landscape and ecology to the eastern woodlands of the United States. Awards In addition to the John B. Oakes Award for Distinguished Environmental Journalism from the Columbia University Graduate School of Journalism, in 2006 Erik Reece received the Sierra Club's David R. Brower Award for Environmental Journalism. References The Future We Want Erik Reece's blog at True/Slant Erik Reece's website Lost Mountain website Erik Reece interview Fresh Air with Terry Gross Erik Reece interview via buzzflash Reece, Erik. Death of a Mountain: Radical strip mining and the leveling of Appalachia via Harper's Magazine Reece, Erik (February 9, 2006 [February 27, 2006 issue]) Who Killed the Miners? The Nation Reece, Erik (April 3, 2009) Save Jesus, Ignore Easter Controversial "On Faith" column in The Washington Post Reece, Erik (October 4, 2013) The End of Illth: In search of an economy that won't kill us. Harper's Magazine. University of Kentucky faculty American investigative journalists American environmentalists Living people Environmental bloggers Writers from Louisville, Kentucky Year of birth missing (living people)
```php <?php /* * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the */ namespace Google\Service\CloudNaturalLanguage; class XPSTrainResponse extends \Google\Collection { protected $collection_key = 'explanationConfigs'; /** * @var string */ public $deployedModelSizeBytes; protected $errorAnalysisConfigsType = XPSVisionErrorAnalysisConfig::class; protected $errorAnalysisConfigsDataType = 'array'; protected $evaluatedExampleSetType = XPSExampleSet::class; protected $evaluatedExampleSetDataType = ''; protected $evaluationMetricsSetType = XPSEvaluationMetricsSet::class; protected $evaluationMetricsSetDataType = ''; protected $explanationConfigsType = XPSResponseExplanationSpec::class; protected $explanationConfigsDataType = 'array'; protected $imageClassificationTrainRespType = XPSImageClassificationTrainResponse::class; protected $imageClassificationTrainRespDataType = ''; protected $imageObjectDetectionTrainRespType = XPSImageObjectDetectionModelSpec::class; protected $imageObjectDetectionTrainRespDataType = ''; protected $imageSegmentationTrainRespType = XPSImageSegmentationTrainResponse::class; protected $imageSegmentationTrainRespDataType = ''; /** * @var string */ public $modelToken; protected $speechTrainRespType = XPSSpeechModelSpec::class; protected $speechTrainRespDataType = ''; protected $tablesTrainRespType = XPSTablesTrainResponse::class; protected $tablesTrainRespDataType = ''; protected $textToSpeechTrainRespType = XPSTextToSpeechTrainResponse::class; protected $textToSpeechTrainRespDataType = ''; protected $textTrainRespType = XPSTextTrainResponse::class; protected $textTrainRespDataType = ''; protected $translationTrainRespType = XPSTranslationTrainResponse::class; protected $translationTrainRespDataType = ''; protected $videoActionRecognitionTrainRespType = XPSVideoActionRecognitionTrainResponse::class; protected $videoActionRecognitionTrainRespDataType = ''; protected $videoClassificationTrainRespType = XPSVideoClassificationTrainResponse::class; protected $videoClassificationTrainRespDataType = ''; protected $videoObjectTrackingTrainRespType = XPSVideoObjectTrackingTrainResponse::class; protected $videoObjectTrackingTrainRespDataType = ''; /** * @param string */ public function setDeployedModelSizeBytes($deployedModelSizeBytes) { $this->deployedModelSizeBytes = $deployedModelSizeBytes; } /** * @return string */ public function getDeployedModelSizeBytes() { return $this->deployedModelSizeBytes; } /** * @param XPSVisionErrorAnalysisConfig[] */ public function setErrorAnalysisConfigs($errorAnalysisConfigs) { $this->errorAnalysisConfigs = $errorAnalysisConfigs; } /** * @return XPSVisionErrorAnalysisConfig[] */ public function getErrorAnalysisConfigs() { return $this->errorAnalysisConfigs; } /** * @param XPSExampleSet */ public function setEvaluatedExampleSet(XPSExampleSet $evaluatedExampleSet) { $this->evaluatedExampleSet = $evaluatedExampleSet; } /** * @return XPSExampleSet */ public function getEvaluatedExampleSet() { return $this->evaluatedExampleSet; } /** * @param XPSEvaluationMetricsSet */ public function setEvaluationMetricsSet(XPSEvaluationMetricsSet $evaluationMetricsSet) { $this->evaluationMetricsSet = $evaluationMetricsSet; } /** * @return XPSEvaluationMetricsSet */ public function getEvaluationMetricsSet() { return $this->evaluationMetricsSet; } /** * @param XPSResponseExplanationSpec[] */ public function setExplanationConfigs($explanationConfigs) { $this->explanationConfigs = $explanationConfigs; } /** * @return XPSResponseExplanationSpec[] */ public function getExplanationConfigs() { return $this->explanationConfigs; } /** * @param XPSImageClassificationTrainResponse */ public function setImageClassificationTrainResp(XPSImageClassificationTrainResponse $imageClassificationTrainResp) { $this->imageClassificationTrainResp = $imageClassificationTrainResp; } /** * @return XPSImageClassificationTrainResponse */ public function getImageClassificationTrainResp() { return $this->imageClassificationTrainResp; } /** * @param XPSImageObjectDetectionModelSpec */ public function setImageObjectDetectionTrainResp(XPSImageObjectDetectionModelSpec $imageObjectDetectionTrainResp) { $this->imageObjectDetectionTrainResp = $imageObjectDetectionTrainResp; } /** * @return XPSImageObjectDetectionModelSpec */ public function getImageObjectDetectionTrainResp() { return $this->imageObjectDetectionTrainResp; } /** * @param XPSImageSegmentationTrainResponse */ public function setImageSegmentationTrainResp(XPSImageSegmentationTrainResponse $imageSegmentationTrainResp) { $this->imageSegmentationTrainResp = $imageSegmentationTrainResp; } /** * @return XPSImageSegmentationTrainResponse */ public function getImageSegmentationTrainResp() { return $this->imageSegmentationTrainResp; } /** * @param string */ public function setModelToken($modelToken) { $this->modelToken = $modelToken; } /** * @return string */ public function getModelToken() { return $this->modelToken; } /** * @param XPSSpeechModelSpec */ public function setSpeechTrainResp(XPSSpeechModelSpec $speechTrainResp) { $this->speechTrainResp = $speechTrainResp; } /** * @return XPSSpeechModelSpec */ public function getSpeechTrainResp() { return $this->speechTrainResp; } /** * @param XPSTablesTrainResponse */ public function setTablesTrainResp(XPSTablesTrainResponse $tablesTrainResp) { $this->tablesTrainResp = $tablesTrainResp; } /** * @return XPSTablesTrainResponse */ public function getTablesTrainResp() { return $this->tablesTrainResp; } /** * @param XPSTextToSpeechTrainResponse */ public function setTextToSpeechTrainResp(XPSTextToSpeechTrainResponse $textToSpeechTrainResp) { $this->textToSpeechTrainResp = $textToSpeechTrainResp; } /** * @return XPSTextToSpeechTrainResponse */ public function getTextToSpeechTrainResp() { return $this->textToSpeechTrainResp; } /** * @param XPSTextTrainResponse */ public function setTextTrainResp(XPSTextTrainResponse $textTrainResp) { $this->textTrainResp = $textTrainResp; } /** * @return XPSTextTrainResponse */ public function getTextTrainResp() { return $this->textTrainResp; } /** * @param XPSTranslationTrainResponse */ public function setTranslationTrainResp(XPSTranslationTrainResponse $translationTrainResp) { $this->translationTrainResp = $translationTrainResp; } /** * @return XPSTranslationTrainResponse */ public function getTranslationTrainResp() { return $this->translationTrainResp; } /** * @param XPSVideoActionRecognitionTrainResponse */ public function setVideoActionRecognitionTrainResp(XPSVideoActionRecognitionTrainResponse $videoActionRecognitionTrainResp) { $this->videoActionRecognitionTrainResp = $videoActionRecognitionTrainResp; } /** * @return XPSVideoActionRecognitionTrainResponse */ public function getVideoActionRecognitionTrainResp() { return $this->videoActionRecognitionTrainResp; } /** * @param XPSVideoClassificationTrainResponse */ public function setVideoClassificationTrainResp(XPSVideoClassificationTrainResponse $videoClassificationTrainResp) { $this->videoClassificationTrainResp = $videoClassificationTrainResp; } /** * @return XPSVideoClassificationTrainResponse */ public function getVideoClassificationTrainResp() { return $this->videoClassificationTrainResp; } /** * @param XPSVideoObjectTrackingTrainResponse */ public function setVideoObjectTrackingTrainResp(XPSVideoObjectTrackingTrainResponse $videoObjectTrackingTrainResp) { $this->videoObjectTrackingTrainResp = $videoObjectTrackingTrainResp; } /** * @return XPSVideoObjectTrackingTrainResponse */ public function getVideoObjectTrackingTrainResp() { return $this->videoObjectTrackingTrainResp; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(XPSTrainResponse::class, 'Google_Service_CloudNaturalLanguage_XPSTrainResponse'); ```
```objective-c //your_sha256_hash----------- #ifndef HttpH #define HttpH //your_sha256_hash----------- #include <memory> //your_sha256_hash----------- struct ne_session_s; struct ne_request_s; struct ne_ssl_certificate_s; struct ssl_st; //your_sha256_hash----------- class THttp; typedef void __fastcall (__closure * THttpDownloadEvent)(THttp * Sender, __int64 Size, bool & Cancel); typedef void __fastcall (__closure * THttpErrorEvent)(THttp * Sender, int Status, const UnicodeString & Message); //your_sha256_hash----------- extern const int BasicHttpResponseLimit; //your_sha256_hash----------- class THttp { public: THttp(); ~THttp(); void Get(); void Post(const UnicodeString & Request); bool IsCertificateError(); __property UnicodeString URL = { read = FURL, write = FURL }; __property UnicodeString ProxyHost = { read = FProxyHost, write = FProxyHost }; __property int ProxyPort = { read = FProxyPort, write = FProxyPort }; __property TStrings * RequestHeaders = { read = FRequestHeaders, write = FRequestHeaders }; __property UnicodeString Response = { read = GetResponse }; __property RawByteString ResponseRaw = { read = FResponse }; __property TStrings * ResponseHeaders = { read = FResponseHeaders }; __property __int64 ResponseLength = { read = GetResponseLength }; __property __int64 ResponseLimit = { read = FResponseLimit, write = FResponseLimit }; __property THttpDownloadEvent OnDownload = { read = FOnDownload, write = FOnDownload }; __property THttpErrorEvent OnError = { read = FOnError, write = FOnError }; __property UnicodeString Certificate = { read = FCertificate, write = FCertificate }; private: UnicodeString FURL; UnicodeString FProxyHost; int FProxyPort; RawByteString FResponse; __int64 FResponseLimit; std::unique_ptr<Exception> FException; THttpDownloadEvent FOnDownload; THttpErrorEvent FOnError; UnicodeString FHostName; UnicodeString FCertificateError; TStrings * FRequestHeaders; TStrings * FResponseHeaders; UnicodeString FCertificate; static int NeonBodyReader(void * UserData, const char * Buf, size_t Len); int NeonBodyReaderImpl(const char * Buf, size_t Len); void SendRequest(const char * Method, const UnicodeString & Request); UnicodeString GetResponse(); __int64 GetResponseLength(); void InitSslSession(ssl_st * Ssl, ne_session_s * Session); static int NeonServerSSLCallback(void * UserData, int Failures, const ne_ssl_certificate_s * Certificate); int NeonServerSSLCallbackImpl(int Failures, const ne_ssl_certificate_s * Certificate); }; //your_sha256_hash----------- #endif ```
Viper is a Brazilian heavy metal band formed in 1985 initially influenced by Iron Maiden and the new wave of British heavy metal, later developing a very particular sound. History Viper recorded their first demo tape in 1985, The Killera Sword, and in 1987, they released their first album, Soldiers of Sunrise — which, despite the simple production, and the somewhat flawed English in the lyrics, showcased the degree of talent and skill of the band's members, all of them teenagers at the time. In 1989, they released Theatre of Fate, notable for the metal and classical music mix, with a song based on Beethoven's Moonlight Sonata; another noteworthy song is Living for the Night – possibly the favorite one of most Viper fans. This album was released in several countries and granted them international fame – especially in Japan, where it outsold renowned groups like Nirvana and Van Halen. Not long after that, however, singer Andre Matos left Viper to go to complete his education in music at a University in Germany. Upon returning to Brazil he joined the band Angra. Rather than look for another singer, bassist (and main composer) Pit Passarel took over the microphone. This led to the first major change in the band's style, noticeable in their next album, Evolution, released in 1992 – heavier, more direct, with a more thrash metal sounding. Again, it is a commercial success with good reviews. On 18 April 1993, Viper played in Club Cittá, Tokyo; this concert's record was later released as Maniacs in Japan. In 1995, they released their next album, Coma Rage, in which a punk influence is quite strong – as the presence of a cover version of "I Fought the Law" makes very clear. Despite mixed reviews, it is again a fine seller. However, the band has stated later that, in hindsight, they are far from satisfied with the album's mixing. 1996 was possibly the band's darkest moment: soon after the release of Tem Pra Todo Mundo – their first album with lyrics in Portuguese, and a lighter, pop-like sound – their record label at the time (the Brazilian arm of Castle Communications) went bankrupt; legal disputes and the disappearance of the album's masters prevented the re-release of the album by some other label, or the recording of another album by Viper. The band's activities came to a halt, despite never officially breaking up. In 1999, the compilation Everybody Everybody – The Best of Viper was released to celebrate fifteen years of Viper. In 2001, the band officially returned to their activities, doing some concerts around the Brazil. Soon after, guitarist Yves Passarel left Viper to keep his focus on his new band, Capital Inicial, a renowned Brazilian pop-rock band; his brother Pit also works with this band as a composer. In 2004, with a new singer, Ricardo Bocci, Viper resumed touring in Brazil, and in 2005 they released a DVD documentary, 20 Years Living for the Night. In December 2005, the band released a "20 years of Viper" DVD, detailing the history of the band. They also started working in the pre-production of a new album, and recorded a demo; in February 2006 they started recording the album. All My Life was finally released in June 2007. After a tour in Brazil, Viper went into hiatus again; in February 2010, Bocci announced that, given the band's inactive status, he had left it to work in his solo career. Andre Matos joined the band again in 2012 for a new Brazilian tour. Commenting on this reunion, he said: Members Current Pit Passarell – bass (1985–present), lead vocals (1991–2004) Felipe Machado – guitars (1985–present) Guilherme Martin – drums (1989–1990, 2004–2005, 2012–present) Leandro Caçoilo – vocals (2017–present) Kiko Shred (2021–present) Former Andre Matos – lead vocals (1985–1990, 2012–2016; died 2019) Yves Passarell – guitars (1985–1996) Cassio Audi – drums (1985–1989) Gustavo Rodrigues – drums (2000–2004) Val Santos – guitars (2004–2007), drums (1989) Ricardo Bocci – lead vocals (2004–2009) Marcelo Mello – guitars (2007–2009) Renato Graccia – drums (1991–1996, 2005–2009) Hugo Mariutti – guitars (2012–2020) Timeline Discography Studio albums Soldiers of Sunrise (1987) Theatre of Fate (1989) Evolution (1992) Coma Rage (1995) Tem Pra Todo Mundo (1996) All My Life (2007) Timeless (2022) Other releases The Killera Sword (demo, 1985) Vipera Sapiens (EP, 1992) Maniacs in Japan (live album, 1993) Everybody Everybody (compilation, 1999) Do It All Again (demo, 2005) To Live Again – 25 Years (live album, 2015) "The Spreading Soul Forever" (single, 2020) Documentaries 20 Years Living for the Night (2005) See also Angra Shaman References External links Official website YouTube channel Musical groups established in 1985 Brazilian power metal musical groups English-language musical groups from Brazil Brazilian musical quartets Musical groups disestablished in 1996 Musical groups reestablished in 2004 Musical groups from São Paulo 1985 establishments in Brazil
```java /* * */ package io.debezium.connector.binlog; import java.nio.ByteBuffer; import java.nio.ByteOrder; /** * A simple parser API for binlog-based connector geometry data types. * * @author Omar Al-Safi * @author Robert Coup * @author Chris Cranford */ public class BinlogGeometry { // WKB constants from path_to_url private static final int WKB_POINT_SIZE = (1 + 4 + 8 + 8); // fixed size // WKB for a GEOMETRYCOLLECTION EMPTY object // 0x010700000000000000 private static final byte[] WKB_EMPTY_GEOMETRYCOLLECTION = { 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; /** * Open Geospatial Consortium Well-Known-Binary representation of the Geometry. * path_to_url */ private final byte[] wkb; /** * Coordinate reference system identifier. While it's technically user-defined, the standard/common values * in use are the EPSG code list path_to_url null if unset/unknown */ private final Integer srid; /** * Create a BinlogGeometry using the supplied wkb, note this should be the cleaned wkb * * @param wkb the Well-Known binary representation of the coordinate in the standard format */ private BinlogGeometry(byte[] wkb, Integer srid) { this.wkb = wkb; this.srid = srid; } /** * Create a BinlogGeometry from the original byte array from binlog event * * @param mysqlBytes he original byte array from binlog event * * @return a {@link BinlogGeometry} which represents a BinlogGeometry API */ public static BinlogGeometry fromBytes(final byte[] mysqlBytes) { ByteBuffer buf = ByteBuffer.wrap(mysqlBytes); buf.order(ByteOrder.LITTLE_ENDIAN); // first 4 bytes are SRID Integer srid = buf.getInt(); if (srid == 0) { // Debezium uses null for an unset/unknown SRID srid = null; } // remainder is WKB byte[] wkb = new byte[buf.remaining()]; buf.get(wkb); return new BinlogGeometry(wkb, srid); } /** * Returns the standard well-known binary representation. * * @return {@link byte[]} which represents the standard well-known binary */ public byte[] getWkb() { return wkb; } /** * Returns the coordinate reference system identifier (SRID) * @return srid */ public Integer getSrid() { return srid; } /** * Returns whether this geometry is a 2D POINT type. * @return true if the geometry is a 2D Point. */ public boolean isPoint() { return wkb.length == WKB_POINT_SIZE; } /** * Create a GEOMETRYCOLLECTION EMPTY BinlogGeometry * * @return a {@link BinlogGeometry} which represents a BinlogGeometry API */ public static BinlogGeometry createEmpty() { return new BinlogGeometry(WKB_EMPTY_GEOMETRYCOLLECTION, null); } } ```
The diocese of Cagli e Pergola was a Roman Catholic ecclesiastical territory in the Marche, central Italy, in the province of Pesaro and Urbino. Up until 1563 it was under the direct supervision of the Roman pontiff. In that year, the diocese of Urbino was elevated to metropolitan status, and Cagli became a suffragan see of Urbino. The diocese was abolished as an independent entity in 1986, when it was incorporated into the diocese of Fano-Fossombrone-Cagli-Pergola. It was still a suffragan of the archdiocese of Urbino. The historical diocese of Cagli was renamed in 1819. Pergola, which had been in the diocese of Urbino, was raised to the rank of an episcopal city and united to the See of Cagli. History The diocese of Cagli does not appear in the evidence until the 8th century. Louis Duchesne believed that it might have been a "resurrection" of the diocese of Pitinum Mergens. Only one bishop of Pitinum is known, Romanus in 499. Bishop Egidio (1233–1259) had many controversies with the municipality of Gubbio. Under his successor Bishop Morandus, the Ghibellines revolted against the papal power. After the death of Bishop Jacopo (1276), the Ghibelline canons wished to elect a noble, Berardo Berardi, while the Guelphs elected Rinaldo Sicardi, Abbot of San Pietro di Massa. As a result the see remained vacant for some years. Finally Berardo was made bishop of Osimo in 1283, and Sicardi died, whereupon Guglielmo Saxonis was elected bishop (1285) and approved by Pope Honorius IV. Civil discords, however, did not cease, and after a terrible massacre, Cagli was burned by its own citizens. The town was immediately rebuilt on the plain of St. Angelo, and, on 10 March 1289, Pope Nicholas IV (1288–1292) named it S. Angelo papale. After his death, however, the original name of Cagli was restored. In 1297 the first stone of the new cathedral was laid by the Bishop Lituardo Cervati, and in 1398 Niccolò Marciari brought the building to completion. It was dedicated to the Virgin Mary, under the title Assumption. The cathedral was staffed and administered by a corporation called the Chapter, consisting of two dignities (the Provost, and the Archdeacon) and eleven canons, one of whom was the Theologus (preacher). There were also twelve chaplains, who were not members of the Chapter. In 1503 the partisans of Cesare Borgia killed the Franciscan bishop Gasparo Golfi. His successor on 8 March 1503, a Spanish Dominican, Ludovico de Lagoria, who was a promoter of Borgia's outrages, was nearly killed by the people of Cagli during his first entry into the city. To restore order, Pope Julius II transferred Langoria to the diocese of Lavelli in the Kingdom of Naples on 23 February 1504. On 4 June 1563, Pope Pius IV signed the bull "Super Universas", by which he elevated the diocese of Urbino to the status of metropolitan archdiocese. He assigned as suffragan dioceses of the new ecclesiastical province Cagli, Sinigaglia, Pesaro, Fossombrone, Montefeltro, and Gubbio. The diocese of Cagli was no longer directly dependent upon the papacy. The territory of Cagli suffered a major earthquake on 3 June 1781. Practically the entire city was ruined. The cupola of the cathedral collapsed, causing the death of the celebrant of a Mass which was in progress, Canon Ugolinucci, and sixty-five attendees. The church of Palcano was destroyed, causing the death of twenty-two persons; the church of S. Cristoforo della Carda registered six deaths; the church of S. Donato dei Pecorari lost its parish priest and some sixty parishioners. Bishop Lodovico Agostino Bertozzi (1754-1802) wrote a detailed letter to Cardinal Leonardo Antonelli, the Prefect of the Congregation of the Propaganda of the Faith and Protector of the diocese of Cagli, revealing the extent of the catastrophe. Pope Pius VI responded with generous funds, allowing not only for the rebuilding of the cathedral and much of the city, but also for the foundation of useful institutions, a hospital for the sick and an orphanage for poor girls. Bertozzi was also responsible for the foundation of a seminary, sufficient for 40 students. The bishop's assistant in the reconstruction over the succeeding twenty-five years was his Vicar-General and eventual successor, Alfonso Cingari. French occupation When the forces of the revolutionary French Republic invaded the Romagna in 1797, they obtained the Romagna, including Cagli, by the Treaty of Tolentino of 19 February 1797. When they arrived at Cagli, the Vicar General Cingari in a kindly spirit welcomed the commander and accompanied him to the episcopal palace to meet the ninety-four year old Bishop Bertozzi. They mollified the French with their accommodating attitude and prudence, a policy which was several times approved of by Pope Pius VI. Bishop Bertozzi had asked the pope several times to accept his resignation on grounds of ill health and great age, but the presence of the French made it inadvisable. Circumstances in Rome were not so favorable, and on 15 February 1798, the French general Louis Berthier proclaimed the Roman Republic and deposed the pope. Pius was sent to Siena and then to Florence. On 28 March 1799, the pope was deported to France, where he died on 29 August. The Papal States and papal ecclesiastical control ceased to exist. When a new pope, Pius VII was elected on 14 March 1800, Bishop Bertozzi again requested permission to resign, but he was able to have Msgr. Cingari appointed Apostolic Commissary. to administer the diocese. Bertozzi died on 20 September 1802, at the age of 97. The Vicar General, Msgr. Cingari, pronounced Bertozzi's funeral oration on the 30th day commemorative Mass, on 20 October 1802. Cingari was promoted bishop of Cagli on 31 March 1806, and consecrated on 7 April. In February 1808, Napoleon, Emperor of the French, occupied the Papal States, and, on 17 May 1809, annexed them to metropolitan France, creating new "departements," Tibère and Toscane. Cagli, formerly a subject of the pope, became a canton in the District of Urbino, in the Department of Ancona, in the Kingdom of Italy. In the same year, Napoleon, King of Italy, demanded oaths of allegiance to his kingdom and the Code Napoleon of the bishops of the Marches, Urbino, Camerino, and Macerata, who had formerly sworn their oaths to the pope. On 28 May 1808, the bishop was sent a notice, requiring him to appear in person in Milan before 15 July to swear his oath to the Viceroy. Bishop Cingari refused the oath, and was deported, first to Mantua, and then to Bergamo, where he was held in confinement in the convent of the Cappucini, and then again to Mantua. In mid-November 1813, he was ordered to be taken to Turin. He was carried to Milan, where he arrived on 18 November 1813, too ill to be taken any farther. He was in Milan for several months, until news of French defeats by the allies brought his release. He was able to return to Cagli in May 1814. He had been in exile for nearly five years. Pergola Pope Pius VII, who excommunicated Napoleon on 11 June 1809 in the bull "Quum memoranda", was arrested by the French on 5 July 1809 and deported to Savona. Pius refused thereafter to perform any papal acts whatever, and the bishops nominated by Napoleon never received canonical approval or installation. After the fall of Napoleon, he was able to return to Rome, on 24 May 1814, to face a major task of political and ecclesiastical reconstruction and repair. The ecclesiastical situation in Pergola had been confused for some time. Much of the city was in the diocese of Gubbio, but individual parishes belonged to the monastery of Nonantola, the monastery of Sitria, the monastery of Fonte Avellana, and the diocese of Cagli. Other parts belonged to the diocese of Nocera. Having consulted with the prelates concerned and with members of the College of Cardinals, Pius VII issued the bull "Romani pontifices" on 31 January 1818, granting all the jurisdictions in the territory of Pergola to the diocese of Cagli. To compensate the bishop of Gubbio for his loss of income, the people of Pergola were required to pay the bishop an annual sum of fifty scudi. On 25 May 1818, Msgr. Carlo Monti, Bishop of Sarsina, was transferred to the diocese of Cagli. On 18 January 1819, Pope Pius VII issued the bull "Commissa tenuitati", by which he raised the territory of Pergola to the status of a diocese, which was permanently attached, aeque personaliter, to the bishop of Cagli. The collegiate church of S. Andrea was chosen as the new cathedral of Pergola; the college of canons was suppressed, and its Augustinian Canons moved to the vacant church and monastery of the Conventual Franciscans at S. Francesco. A new Chapter of canons was established to staff and administer the cathedral, consisting of three dignities (the Provost, the Archdeacon, and the Archpriest) and eleven secular canons. The bishop was required to live in Pergola for four months out of the year. The establishment of a seminary for training priests was ordered, in accordance with the decrees of the Council of Trent; initially it was to be housed in the former convent of the Canons Regular at S. Andrea, along with the bishop's residence, and the diocesan offices. On 18 January 1819, Bishop Carlo Monti of Cagli became Bishop of Cagli e Pergola. End of the diocese In a decree of the Second Vatican Council, it was recommended that dioceses be reorganized to take into account modern developments. A project begun on orders from Pope John XXIII, and continued under his successors, was intended to reduce the number of dioceses in Italy and to rationalize their borders in terms of modern population changes and shortages of clergy. The change was made urgent because of changes made to the Concordat between the Italian State and the Holy See on 18 February 1984, and embodied in a law of 3 June 1985. The reorganization was approved by Pope John Paul II in an audience of 27 September 1986, and by a decree of the Sacred Congregation of Bishops of the Papal Curia on 30 September 1986. The diocese of Fano was united to the dioceses of Cagli e Pergola and of Fossombrone. Its name was to be Fanensis-Forosemproniensis-Calliensis-Pergulanus. The seat of the diocese was to be in Fano. The former cathedral in Cagli and the former cathedral in Fossombrone were to have the honorary title of co-cathedral, and their chapters were to be called the "Capitulum Concathedralis". There was to be only one episcopal curia, one seminary, one ecclesiastical tribunal; and all the clergy were to be incardinated in the diocese of Fano-Fossombrone-Caglia-Pergola. The combined diocese was suffragan of the Archdiocese of Urbino-Urbania-Sant'Angelo in Vado. The diocese of Cagli ceased to exist. Bishops Diocese of Cagli Latin Name: Calliensis to 1429 [Gratianus (ca. 359)] ... [Viticianus (ca. 500)] ... [Anastasius (ca. 731)] ...? Rodulphus (ca. 761) Juvianus (attested 769) [Aldefredus] (774] ... Passivo (attested 826) ... Andreas (attested 853) ... Justinus / Martinus (attested 861)<ref>Two manuscript lists of the subscriptions of bishops attending the Roman council of Pope Nicholas I on 18 November 861 show: "Justinus Gallicanus" and "Martinus Calli": Mansi, Sacrorum Conciliorum nova et amplissima collectio Tomus 15, pp. 602 and 604. Cappelletti (p. 237) prefers Justinus (Giustino). Wilfried Hartmann (ed.), Monumenta Germaniae Historica: Die Konzilien der karolingischen Teilreiche 860-874 (Hannover, 1998), pp. 64-65, prefers Martinus.</ref> ... Joannes (attested 881) ... Martinus (attested 898) ... Joannes (attested 967–968) ... Luitulphus ( – 1045) Marcus (by 1050 – 1058) Hugo, O.S.B. (1059 – ) Joannes ? (attested 1068) Hugo (attested 1070–1093) Ambrosius (attested 1106 or 1116) Quiricus (1128 – 1156) Ranerius, O.S.B (1156 – 1175) Allodericus (ca. 1175 – 1211) Anselmus (1217 – ) Albertus (1229 – ) Aegidius, O.S.B. (1233 – 1259) Thomas Morandus, O.P. (1259 – 1265) Hugolinus (1266 – ca. 1269) Jacobus (1270 – 1276) Reynaldus Siccardi (1276 – ? ) Guillelmus Saxonis (1285 – 1295) Octavianus, O.S.A. (1296) Angelus de Camerino, O.E.S.A. (1296 – 1298) Liutardus (1298 – 1301 ?) Joannes (attested 1304) Rogerius Todini, O.F.M. (attested 1315 – 1318) Petrus (1319 – 1328) Albertus de Sicardis, O.F.M. (1328 – 1342) Guido de Callio (1342–1347) Petrus, O.P. (1348 – 1353) Thomas Sferrato, O.F.M. (1353 – 1378) Augustinus, O.E.S.A. (1378 – 1395) Roman ObedienceAugustinus (1395 – 1397) Administrator (Roman Obedience) Nicolaus Marciari (1398 – 1413) Roman ObedienceGiovanni Buono de Lutiis (3 November 1413 – 1429) from 1429 to 1842Metropolitan: Archdiocese of Urbino (from 1563)Genesius da Parma (7 December 1429 – 1439) Antonio Severini (14 Dec 1439 - 1444) Simone Pauli (14 Oct 1444 - Oct 1460 Died) Bartolomeo Torelli, O.P. (23 Jul 1494 - 1496 Died) Gaspare Golfi, O.F.M. (5 May 1498 - 1503 Died) Ludovico de Lagoria, O.P. (8 Mar 1503 - 1504) Bernardino de Leis, C.R.L. (23 Feb 1504 - 6 Jan 1506 Died) Antonio Castriani (Antonio Crastini), O.F.M. (17 Mar 1506 - 1507 Giorgio Benigno Salviati, O.F.M. (21 May 1507 - 1513) Tommaso Albini (Tommaso Albizi), O.P. ( 1513 - 1524 Resigned) Cristoforo Guidalotti Ciocchi del Monte (10 Feb 1525 - 1550) Giovanni Ciocchi del Monte (27 Jun 1550 - 10 Aug 1554 Died) Cristoforo Guidalotti Ciocchi del Monte (9 Mar 1556 - 27 Oct 1564 Died) Giovanni Battista Torleoni (7 Feb 1565 - 20 Jul 1567 Died) Paolo Maria della Rovere (8 Oct 1567 - 1591 Died) Ascanio Libertano (Ascanio Libertani) (19 Jul 1591 - 10 Mar 1607 Died) Timocrate Aloigi (Democrate Aloisi) (14 May 1607 - 17 Feb 1610 Died) Filippo Bigli (Bili), C.R. (17 May 1610 - 24 Aug 1629 Died) Giovanni Francesco Passionei (3 Dec 1629 - 1641 Pacifico Trani (Trasi), O.F.M. (24 Mar 1642 - 31 Dec 1659 Died) Castracane De' Castracani (5 May 1660 - 17 Oct 1669 Died) Andrea Tamantini (6 Oct 1670 - Mar 1685 Died) Giulio Giacomo Castellani, O.S.A. (1 Apr 1686 - Jan 1694 Died) Benedetto Luperti (19 Apr 1694 - 23 Sep 1709 Died) Alfonso De' Bellincini (7 Apr 1710 - 12 Jun 1721 Died) Gianfrancesco De’ Bisleti (24 Sep 1721 - 1726) Girolamo Maria Allegri, O.S.M. (9 Dec 1726 - 5 Jul 1744 Died) Silvestro Lodovico Paparelli (7 Sep 1744 - 6 Oct 1754 Died) Lodovico Agostino Bertozzi (16 Dec 1754 - 20 Sep 1802 Retired) Alfonso Cingari (31 Mar 1806 - 14 Jun 1817 Died) Carlo Monti (25 May 1818 - 7 Jan 1842 Died) Diocese of Cagli e PergolaName Changed: 18 January 1819Latin Name: Calliensis e PergulanusMetropolitan: Archdiocese of UrbinoBonifacio Cajani (22 Jul 1842 - 9 Jun 1863 Died) Francesco Andreoli (21 Dec 1863 - 9 May 1875 Died) Luigi Raffaele Zampetti (5 Jul 1875 - 29 Sep 1876} Gioachino Cantagalli (29 Sep 1876 - 10 Nov 1884 Appointed, Bishop of Faenza) Giovanni Battista Scotti (10 Nov 1884 - 18 May 1894 Giuseppe Maria Aldanesi (18 Mar 1895 - 16 May 1906 Resigned) Ettore Fronzi (12 Sep 1908 - 14 Dec 1918 Appointed, Archbishop of Camerino) Augusto Curi (23 Dec 1918 - 5 May 1925 Appointed, Archbishop of Bari-Canosa) Giuseppe Venturi (9 Jul 1926 - 18 Feb 1931 Appointed, Archbishop of Chieti) Filippo Mantini (22 Jun 1931 - 13 Mar 1939 Died) Raffaele Campelli (8 Aug 1939 - 15 Jan 1977 Retired) Costanzo Micci (15 Jan 1977 - 4 Sep 1985 Died) Mario Cecchini (11 Feb 1986 - 30 Sep 1986 Appointed, Bishop of Fano-Fossombrone-Cagli-Pergola)30 September 1986: United with the Diocese of Fano and the Diocese of Fossombrone to form the Diocese of Fano-Fossombrone-Cagli-PergolaReferences Books (in Latin) Studies Baratta, Mario (1896). Sul terremoto di Cagli del 3 giugno 1781. . Roma: presso la Società geografica italiana, 1896. Broers, Michael (2002). Politics and Religion in Napoleonic Italy: The War Against God, 1801-1814. London & New York: Routledge. Ceccarelli, Giuseppe (2005). I vescovi delle diocesi di Fano, Fossombrone, Cagli e Pergola: cronotassi : con brevi cenni storici e artistici sulle origini delle città e delle diocesi. Fano: Fondazione Cassa di risparmio di Fano, 2005. Dromedari, Giuseppe; Presciutti, Gabriele; Presciutti, Maurizio. Il terremoto di Cagli del 3 giugno 1781. Cronache dagli archivi. Youcanprint, 2017. Duchesne, Louis (1903), "Les évêchés d'Italie et l'invasion lombarde," , in: Mélanges d'archéologie et d'histoire 23 (Paris: Fontemoing 1903), pp. 83-116. Lanzoni, Francesco (1927). Le diocesi d'Italia dalle origini al principio del secolo VII (an. 604). Faenza: F. Lega. . Schwartz, Gerhard (1907). Die Besetzung der Bistümer Reichsitaliens unter den sächsischen und salischen Kaisern: mit den Listen der Bischöfe, 951-1122. . Leipzig: B.G. Teubner. pp. 241–242. Tarducci, Antonio (1896). De'Vescovi Di Cagli.'' . Tip. Balloni, 1896. Cagli Roman Catholic dioceses in le Marche Religious organizations established in 1819 1819 establishments in Italy
Ángel de la Torre (30 November 1896 – 28 August 1983) was a Spanish professional golfer and golf instructor. In 1916, he became the first Spanish golfer to turn professional, and in 1920, he was the first Spaniard to compete in The Open Championship, and finished tied for 16th. He was also the first Spanish golfer to complete the U.S. Open in the United States. Perhaps most significant among his competitive accomplishments were his five victories in the Spanish Open between 1916 and 1925 – a record that still stands. Playing in international events, he made the acquaintance of Ernest Jones, who had a major impact on the principles used in de la Torre's teaching. Having taught himself French and English, de la Torre was able to teach in three languages. Introduction to golf Born in Priego de Cordoba, Spain, his uncle, Pedro de la Torre, was the greenskeeper at Club de las Cuarenta Fanegas, which was the first golf course in Spain. His father, Ricardo de la Torre y Torres, worked on the grounds at Real Club de la Puerta de Hierro. At the age of 8, Angel began his golf journey as a caddie under the professional Lucien, at the Club de las Cuarenta Fanegas. In 1910, at age 13, the caddie tournament was his first victory. Career as golf professional In the summer of 1913 the Conde de la Cimera (a principal in developing Puerta de Hierro) sent Angel to St. Jean de Luz in southern France to be assistant to 1907 Open Champion Arnaud Massy at the Le Nivelle Golf Club. Massy also won the Spanish and British Open. While de la Torre was there, Massy was called for military service; and the Golf Committee gave Angel the job of head professional. He was 17 years old. Upon the outbreak of WWI, he returned to Madrid in 1914 and accepted the position of golf professional at the Real Club de la Puerta de Hierro in Madrid. He subsequently set the course record of 65. It was above the pro shop that his wife Juana gave birth to their two sons Luis and Manuel. In 1920 the Conde de la Cimera sponsored Angel so he could play tournaments in France, Belgium and England. This sponsorship continued until 1925. In 1925, he agreed to travel to the United States to play in the U.S. Open. In 1927, upon the recommendations of Captain Allison (a premier architect who he had met in England), he was offered and accepted the position of golf professional at the outstanding new course called Timber Point Country Club in Great River Long Island, New York. His family joined him there. From November through March, he would teach at Passatiempo where he set the course record in 1931. He would continue in these capacities until 1932. When the U.S. Depression set in, he was offered the golf professional position at the new Club de Campo in Madrid Spain where the family remained until 1936, just prior to the war. In May 1936 he traveled to London to take delivery on a set of golf clubs that he had designed. From London, he telephoned his wife and advised that he would travel to the United States to visit his long-time friend Ernest Jones. Subsequently, Jones offered him the position of teaching professional at the Women's National Golf and Tennis club on Long Island, New York. Shortly thereafter the Spanish Civil War broke out. Now being employed in the United States, immigration laws of the time enabled Angel to send for the rest of his family. Leaving everything behind but what they could carry, Angel's wife Juana and sons Manuel and Luis, left via Barcelona, Spain, en route to Paris France. They were reunited with Angel in New York City in October 1936. In December 1936, he was in California where he became a golf instructor at Brookside Municipal Golf Course in Pasadena. Through an introduction from Bill Hickey (golf professional at Brookside), he met Eddie Loos who then offered de la Torre a position as assistant professional at Lake Shore Country Club in Glencoe, Illinois. De la Torre subsequently became the head professional at that club and served in that capacity for 37 years. Thereafter, he would continue teaching. He would teach at Tamarisk Country Club in Palm Springs in the winter months and at Glenview Naval Air Station in Glenview, Illinois, in the summer. Over the duration of his career, Angel had 13 holes-in-one. De la Torre's sons De la Torre's son, Manuel de la Torre, followed in his father's footsteps becoming a golf professional. Manuel established an extensive playing record and has become world-famous as a golf instructor. Angel's other son Luis became a professor at the University of Chicago and pursued a career in photography. Tournament wins (6) Note: This list may be incomplete. 1916 Spanish Open 1917 Spanish Open 1919 Spanish Open 1923 Spanish Open 1925 Spanish Open 1935 Spanish PGA Further reading http://www.rfegolf.es/Noticias/NewsDetails.aspx?NewsId=1093 References Spanish male golfers American male golfers Golfers from Illinois Spanish emigrants to the United States Sportspeople from the Province of Córdoba (Spain) People from Glencoe, Illinois Sportspeople from Cook County, Illinois 1896 births 1983 deaths
"Believe in Me" is a song by American duo The Pierces, released in 2014 as the second single from their fifth studio album Creation. It was written by Catherine Pierce and produced by Christian Langdon. A music video was released on 18 February to promote the single. The song reached No. 66 on the UK Singles Chart and No. 59 on the Scottish Singles Chart. Critical reception Upon release, Matt Collar of AllMusic described the song as "buoyant '60s girl group-infused", which "retain[s] all of the duo's bright and infectious lyricism". David Smyth of the London Evening Standard commented that the song "sounds like a golden hit and a startling departure from the Gothic Americana that made their name". Molloy Woodcraft of The Guardian considered the song "catchy" and highlighted the "Florence-esque bass drum and handclaps". Lisa-Marie Ferla of The Arts Desk commented that the song was a "gorgeous drive-time radio ballad in the best of ways, all hand claps and huge choruses". Lauren James of Contactmusic.com noted the song's use of "handclaps, high production and heart-rending harmony". Andy Baber of MusicOMH wrote: "While tracks such as "Believe in Me" and "Elements" are perfectly serviceable, neither is likely to stick in the mind long after it comes to an end." Chart performance Personnel The Pierces Catherine Pierce - lead vocals Allison Pierce - backing vocals Additional personnel Christian "Leggy" Langdon - acoustic guitar, electric guitar, synthesizer, percussion, producer, programming, engineer Josiah Steinbrick - electric guitar Jonny Cragg - drums, percussion Mark "Spike" Stent - mixing Chris Claypool - engineer Bob Ludwig - mastering References 2014 songs 2014 singles Polydor Records singles
La Chambre obscure (English title: The Dark Room) is a 2000 French drama film directed and written by Marie-Christine Questerbert. Cast Caroline Ducey as Aliénor Melvil Poupaud as Bertrand Mathieu Demy as Thomas Sylvie Testud as Azalaïs Jackie Berroyer as The king Hugues Quester as Ambrogio Alice Houri as Lisotta Pierre Baillot as Maître Gérard de Narbonne Dimitri Rataud as Marc Christian Cloarec as Guillaume Édith Scob as The widow Luis Rego as The confessor Thibault de Montalembert External links French drama films 2000 films 2000s French films
```c++ // The this pointer points to CMainFrame class which extends the CFrameWnd class. if (!m_wndToolBar.CreateEx(this, TBSTYLE_TRANSPARENT) || !m_wndToolBar.LoadToolBar(IDR_MAINFRAME, uiToolbarColdID, uiMenuID, FALSE /* Not locked */, 0, 0, uiToolbarHotID)) { TRACE0("Failed to create toolbar\n"); return -1; // fail to create } ```
```java package com.example.lambda; // snippet-start:[lambda.java2.account.main] // snippet-start:[lambda.java2.account.import] import software.amazon.awssdk.regions.Region; import software.amazon.awssdk.services.lambda.LambdaClient; import software.amazon.awssdk.services.lambda.model.GetAccountSettingsResponse; import software.amazon.awssdk.services.lambda.model.LambdaException; // snippet-end:[lambda.java2.account.import] /** * Before running this Java V2 code example, set up your development * environment, including your credentials. * * For more information, see the following documentation topic: * * path_to_url */ public class GetAccountSettings { public static void main(String[] args) { Region region = Region.US_EAST_1; LambdaClient awsLambda = LambdaClient.builder() .region(region) .build(); getSettings(awsLambda); awsLambda.close(); } public static void getSettings(LambdaClient awsLambda) { try { GetAccountSettingsResponse response = awsLambda.getAccountSettings(); System.out.println( "Total code size for your account is " + response.accountLimit().totalCodeSize() + " bytes"); } catch (LambdaException e) { System.err.println(e.getMessage()); System.exit(1); } } } // snippet-end:[lambda.java2.account.main] ```
Fulidhoo Kandu is the channel to the south of South Male' Atoll and to the north of Vaavu Atoll of the Maldives. References Divehiraajjege Jōgrafīge Vanavaru. Muhammadu Ibrahim Lutfee. G.Sōsanī. Channels of the Maldives Channels of the Indian Ocean
The Fender Lead Series was produced by the Fender/Rogers/Rhodes Division of CBS Musical Instruments. The series comprised Lead I, Lead II, Lead III and Lead Bass models. General features Manufactured Fall 1979 through 1982. Vintage style "Soft C" profile neck with a radius. Neck width at nut , plus applied finish thickness on 1981 models. Truss rod adjustment at the heel of the neck. 2 vintage style string trees. 21 medium frets. "F" tuners (West German-manufactured), and "F" 4 bolt neck plate w/plastic pad. 3 Ply BWB through 1981 and WBW through 1982 pickguard with foil backing. White plastic nut. scale length. Bridge uses a string spacing of . Hardtail through-body mounted strings. The saddle screws used lock nuts, not springs. Comes with a tolex or moulded plastic case. History The original concept for the Lead guitar series, including the name "Lead" came from Dennis Handa, then Marketing director for Fender Guitars. The idea was to have a guitar that was cheaper than the Stratocaster and be attractive to players because of the neck feel as well as the pickup options. The smaller headstock and the neck were both patterned after earlier Fender necks. Originally Steve Morse of the Dixie Dregs was the first endorser of the guitar and premiered it at a NAMM Show show in Atlanta, Georgia. The Lead Guitars were manufactured between 1979 and 1982 by the Fender Musical Equipment Co. under the direction of Gregg Wilson and Freddie Tavares. Gregg Wilson was succeeded by John Page, who eventually headed the Fender Custom Shop. The Lead Series have elements of the Stratocaster and Telecaster in their design with a body that is slightly smaller and with a slightly different shape than the Stratocaster, a Stratocaster-like neck (and headstock), and hardtail bridge with Telecaster-like string ferrules on the back of the body. The Lead Series headstock was smaller than that of the then Stratocaster models and similar though not identical to the 1954 Stratocaster design. The Stratocaster models at the time of the Lead Series release in late 1979 were still using the larger headstock design until the introduction of the Dan Smith Stratocaster in 1981. At some point during 1982 the lower bout of the headstock was shifted towards the body giving the headstock a more elongated look. The Lead Series were manufactured at Fender's Fullerton, California plant and priced below the Stratocaster models of the time (approx. $495.00). They were eventually replaced in Fender's line up by the Squier JV model in 1982 as Fender expanded its operations by starting Fender Japan. In January 2020 Fender reintroduced the Lead II and III as a part of their Player series. These Made in Mexico recreations sport an alder body, two slanted alnico V single coils (Lead II), alnico II humbuckers (Lead III) and a modern C-shaped maple neck with maple or pau ferro fretboard, 9.5” radius, 22 medium jumbo frets. Other features include a synthetic bone nut, "F" tuners and a string-through-body bridge with block saddles. Notable users Notable guitar players who have utilized the Fender Lead series include: Bono of U2 (used during the War Tour in 1983; can be seen playing a black model in the Live at Red Rocks: Under a Blood Red Sky video) Eric Clapton Elliot Easton of The Cars ("Touch and Go" guitar solo from the Panorama album) Roger Miller of Mission of Burma Steve Morse of the Dixie Dregs and Deep Purple ("Punk Sandwich" track from the album Night of the Living Dregs by the Dixie Dregs) Moon Martin's Street Fever sleeve shows a Lead I A. Savage of Parquet Courts Zé Pedro of Xutos & Pontapés Annie Clark of St Vincent Hélder Dias of Flama and Canalha Pablo Mondello of Massacre Palestina HeWhoCannotBeNamed of The Dwarves Pat Place of Bush Tetras Chris Boerner of The Hot at Nights and Hiss Golden Messenger Greg "Bonzo" Bonsignore Alien Love Bobby Dill of The Anniversary Effect Claudio Narea of Los Prisioneros Lynn Gunn of PVRIS (in the official music video for the song “My Way”) Greg Koch Models Lead I, 1979–1982: A single bridge-position split humbucker. Three-position coil selector switch (single coil, both coils, single coil), two-position humbucker series/parallel select switch which operates only when both coils are selected (middle position). Master volume and tone controls. Lead II, 1979–1982: Two X-1 single coil pickups, one at the neck, and the other at the bridge. The X-1 pickup was also used in the bridge position on the "STRAT" and the "Dan Smith Stratocaster" models. Three-position pickup selector switch (neck, neck and bridge, bridge), two-position phase shift switch (in phase, out of phase) which operates only when both pickups are selected (middle position). Master volume and tone controls. Lead III, 1982: Two humbuckers, one at the neck, the other at the bridge. Three-position pickup selector switch (neck, neck and bridge, bridge), three-position coil selector switch (neck single-coil, both coils neck or bridge, bridge single-coil) which determines if a single coil or both coils of each pickup will be selected. Master volume and tone controls. Lead Bass: This instrument never went into production. A photo of a 1979 prototype appears in Klaus Blasquiz's 1990 book The Fender Bass, features two slanted single-coil pickups, and has a 34” scale. Technical information Fender Lead I/III Humbucker Pickup Specifications The DC resistance of the Lead I/III Seth Lover designed humbucker pickup is approximately 13 kΩ. The Lead I/III humbucker pickups have 12 adjustable pole pieces and have a ceramic magnet. Fender Lead II Single Coil Pickup Specifications The DC resistance of the Lead II X-1 single coil pickup is approximately 7.5 kΩ (9600 coil winds) vrs (7600 coil winds) on a Stratocaster. Lead II single coil pickups have flat alnico polepieces. Early Lead II single coil pickups have bobbins formed of green/grey fibreboard and later Lead II single coil pickups have plastic moulded bobbins that are the same as that used on current Stratocasters. Fender Lead Series General Specifications The Lead Series use 250 kΩ volume and tone potentiometers and use 0.05 µF tone capacitors. The body is usually made of 3 pieces of either alder or ash while the necks are maple with a walnut 'skunk stripe' on their backs and a matching plug on the face of the headstock covering the end of the truss rod. Maple fingerboarded necks are made of one piece of maple (no separate fingerboard) while rosewood fingerboarded necks have a thick veneer of rosewood stuck over the pre-radiused face of the neck. While the lead neck is approximately .04 in narrower at the nut than typical Fender Telecasters and Stratocasters of that era, the neck width at the 21st fret is the same as the Stratocaster and Tele (measuring 2.182 inches). The pickup body routing is the same for the Lead I and the Lead II models (humbucker bridge and single coil neck routing). The grounding system in all three of the series didn't stop with the foiled backing on the pickguard. A ground strap was screwed to the body routing pocket between the bridge pickup and the pickup selector switch cavity. The body pockets were covered with a conductive coating. The bridge ground wire was connected here with a common connection to the pickguard ground. Later year Fender Lead models have a more contoured body and there are two subtle variations in headstock shape, one of which (softer contour) used tooling dating back to the 1950s Stratocaster (as with the Dan Smith Stratocaster). Neck profile and headstock thickness varied slightly throughout the production run for all Fender Lead models of different years. Many instruments used a polyurethane finish which is brittle, chips easily, and develops spider cracks if exposed to extremes of heat or cold. The finish is also prone to clouding. Serial Numbers The Fender Lead Series used a modified version of the Fender United States serial number format. The first letter E designated the eighties, and the next two numbers (00, 01, or 02) indicated the year of manufacture. For example, E01XXXX = 1981. Fender Lead Series guitar serial numbers were installed on the headstock, inside body pocket, and back of the pick guard. An all original model may have the same serial number identifier on each of these major parts. References Lead Series Musical instruments invented in the 1970s 1980s in music
Toenut, latterly known as Tyro, was an American alternative rock band of the 1990s, based in Atlanta and signed to the Mute Records label. The band released three records, the last under the name "Tyro", and toured the US and UK between 1995 and 2000. History The band was formed in the summer of 1991 in Atlanta, Georgia, by Skipper Hartley and fellow guitarist Richie Edelson. By January 1992, they were playing shows in clubs in Atlanta with a line-up including vocalist Katie Walters and Elephants Gerald adding sampling effects. Hartley's former bandmate Chris Collins moved from Columbia, South Carolina to join as bassist, and several drummers joined the band for short periods. In 1993, Toenut recorded their first single, "Heyward"/"Information", released on Half Baked Records. The single was heard by Mark Kramer, who invited the band to his Noise New Jersey studio to record a full-length demo, produced by Steve Watson. In 1994, the band recruited their sixth drummer, Colin English, before signing to Mute Records. A modified version of the band's demo from Noise New Jersey was released on Mute in the summer of 1995 as their debut LP, Information. The album received airplay on MTV and made the College Media Journal charts, and was followed by a series of singles, including "Danger! Humans Approach", recorded at the Muscle Shoals Easley Studios. The track received airplay from John Peel on BBC Radio 1. The band's former high-school colleague Eric Holowacz joined the band as stage producer and manager, and the band toured the Southeast, Midwest, and Northeast United States between 1995 and 1997, often with Man or Astro-man?. During this time, Holowacz created a concert-length stageshow in support of Information, using two 16mm film projections and two 35mm still slide projections simultaneously. Toenut's second album, Two in the Piñata, was the next Mute release. On April 5, 1997, bassist Chris Collins was killed in an automobile accident as he drove to a show in Athens, Georgia. Following the accident, Toenut changed its name to Tyro and released Audiocards, before disbanding. Edelson and English joined Man or Astro-man?, Holowacz moved to South Carolina to become executive director of the Arts Council of Beaufort County, and subsequently to Wellington, New Zealand. Hartley and Walters, now married, continue to make music in Atlanta. Edelson works in the music and video production industry in Los Angeles. Discography as Toenut Information (Mute Records 1995) Two in the Piñata (Mute Records 1997) as Tyro Audiocards (Mute Records 2000) References External links Tyro site Two in the Pinata link Chris Collins memorial page Alternative rock groups from Georgia (U.S. state) Musical groups from Atlanta Musical groups established in 1991 Mute Records artists
Canelones () is the capital of the department of Canelones in Uruguay. Its name is derived from a species of cinnamon, which is called "canelón", growing along the banks of the homonymous river. Since 2010, the city is also the seat of the municipality of Canelones. Geography The city is located on Route 5 about North of Montevideo and on its intersection with Route 64. It lies on the west bank of the river Arroyo Canelón Chico. History It was founded on 24 April 1783 under the name "Villa Guadalupe". It became capital of one of the nine earlier Departments of the Republic. The railroad arrived here in 1874, while in 1908 National Route 5 from Montevideo was inaugurated. On 23 March 1916, it was renamed to "Canelones" and its status was elevated to "Ciudad" (city) by the Act of Ley Nº 5.400. Population According to the 2011 census, Canelones had a population of 19,865. In 2010, the Intendencia de Canelones had recorded a population of 25,961 for the municipality during the elections. While Canelones is the capital of the department of the same name, it has a considerably smaller population compared with two other cities in the department, Ciudad de la Costa and Las Piedras. Source: Instituto Nacional de Estadística de Uruguay Economic activity The city and the department have numerous small to large vineyards and wineries. In 1987 the cold-storage facility "Frigorífico Canelones" was founded, which ever since became the principal industry of the city. Government and infrastructure The civil aviation agency of the country, National Civil Aviation and Aviation Infrastructure Direction (DINACIA), has its headquarters in Canelones. Places of worship Cathedral of Our Lady of Guadalupe (Roman Catholic) Noted local people Diego Lugano, captain of the Uruguay national football team Pablo Gabriel García, football player for PAOK F.C. Matías Vecino, footballer Facundo Peraza (born July 27, 1992), footballer Robert Siboldi, Former football player and former manager of Santos Laguna Sebastián Rodríguez (born 1992), footballer Andrea Trujillo, Director of Nursing, Perfect Survey Champion Sister Cities Asunción, Paraguay Loudoun County, United States See also Canelones Department#Main Urban Centres References External links INE map of Canelones, Paso Espinosa and Paso Palomeque Populated places in the Canelones Department Populated places established in 1782 1782 establishments in the Viceroyalty of the Río de la Plata
David Attwood is an American physicist and professor emeritus at the University of California, Berkeley, where he worked in the field of synchrotron radiation and free-electron lasers, developing X-ray microscopy techniques for research and for the industry (EUV lithography). He is the author of a reference book on soft X-rays and extreme ultraviolet radiation. Education and career David Attwood received his Ph.D. in Applied Physics from New York University in 1972. After his Ph.D, he joined Lawrence Livermore National Laboratory to work on laser fusion. He was the first scientific director of the Advanced Light Source (1985–1988) and the founding director of the Center for X-Ray Optics at Lawrence Berkeley National Laboratory, where he pioneered EUV lithography. He co-founded the Applied Science and Technology (AS&T) program within the college of engineering at UC Berkeley and supervised over twenty grad students, among who Regina Soufli and Anne Sakdinawat. He is a Fellow of the American Physical Society. References External links 1941 births Living people American physicists UC Berkeley College of Engineering faculty New York University Tandon School of Engineering alumni Fellows of the American Physical Society
The Proof and Experimental Establishment (PXE) is an Indian defence laboratory of the Defence Research and Development Organisation (DRDO). Located in Balasore, Orissa, India. its main purpose concerns the research and development of technologies and products in the area of medium and large caliber weapons and their ammunition. PXE is organised under the Armament and Combat Engineering Cluster of DRDO. History In March 1894, the first proof testing in India was carried out, with there being fired six inch (152 mm) Bag Loader Howitzers and 12 Pounder Shrapnel shells under the command of Captain R.H. Mahon. He recommended the creation of a dedicated department for this purpose. The Proof Department in India was sanctioned in May 1895. It was established on 7 November 1895, with headquarters at Balasore and Lt. R.T. Moorre as the head. Later, the establishment was renamed to the Proof & Experimental Department, and later still was renamed as PXE. The establishment was organised under the Directorate General of Ordnance Factories (DGOF), India and subsequently came under the supervision of the Inspection Organisation under the DGOF. After Independence, PXE was under the administrative control of DGI up to 1958. On 15 July 1947, Lt. Col. B.N. Mitra became the first Indian to head the organisation. The establishment was brought under the administrative control of the DRDO in October 1958. Areas of work PXE is the main non-Army Proving ground and research establishment for design and developmental trials of guns, mortars, rockets, RCL, tank guns and their ammunition, including Naval guns and ammunition. It also conducts technical evaluation trials for imported weapons and ammunition as well as R&A trials for compilation of Range Tables. PXE also conducts performance evaluation trials for tank armour and ammunition, as well as proof of armour plates, tank turrets, ICVs, proximity fuzes, etc. and also weapons and ammunition produced by the Indian Ordnance Factories. PXE has conducted tests of the Arjun MBT Armour as well as tests of indigenous Explosive reactive armour. The lab has also conducted tests of other armaments such as the Indian Field Gun and the Pinaka Multi Barrel Rocket Launcher System. PXE also conducts comparative propellant and ballistics parameters testing and is involved in the establishment of propellant standards, in their periodical check firing and in Quality Assurance through periodic checks of ammunition that are held in Army and Naval Depots. Facilities The PXE operates large test ranges. The establishment's initial land area was about , that area increasing to when the range was increased in 1949 . The establishment has grown in size, in accordance with its changing role over the years. With the increased range of missiles and ordnance being tested, the test ranges have also been expanded. At present, the establishment has a notified range of 50 km in length along the sea coast and 50 km into the sea. The Range is a natural sea-based range with oscillating tide conditions. During low tide, water recedes to a distance of about 3 km into the sea beach, thus facilitating various range operations. PXE also has test facilities for the measurement of range and accuracy of rockets and projectiles, measurement of armor protection levels, and testing of proximity fuzes. PXE also has labs to measure the ballistic characteristics - Internal, External and Terminal ballistics. Projects and products PXE is an ISO 9001:2008 certified Organisation. Some Achievements of PXE include: Established high speed photography techniques for study of sabot discarding phenomena in sub caliber projectile Spin measurement of projectiles by Doppler Radar and High Speed Photography Technique Ballistic Evaluation of gun propellants by comparative as well as absolute ballistics methods. Measurement of Height of Burst of Proximity fuze by Photography technique Easy and faster method of barrel changing in T-72 Tanks Recovery technique of fired projectiles both over water and over wet sand Recording of full trajectory data of artillery projectiles References External links PXE Home Page Wikimapia Images of PXE 1895 establishments in India Defence Research and Development Organisation laboratories Research institutes in Odisha Research and development in India Research institutes established in 1895
Coleophora horridula is a moth of the family Coleophoridae. It is found in Turkey. References External links horridula Endemic fauna of Turkey Moths described in 2001 Moths of Asia
```php <?php namespace Psalm\Tests; use Psalm\Tests\Traits\InvalidCodeAnalysisTestTrait; use Psalm\Tests\Traits\ValidCodeAnalysisTestTrait; use const DIRECTORY_SEPARATOR; class ReferenceTest extends TestCase { use InvalidCodeAnalysisTestTrait; use ValidCodeAnalysisTestTrait; public function providerValidCodeParse(): iterable { return [ 'referenceAssignmentToNonReferenceCountsAsUse' => [ 'code' => '<?php $b = &$a; $b = 2; echo $a; ', 'assertions' => [ '$b===' => '2', '$a===' => '2', ], ], 'updateReferencedTypes' => [ 'code' => '<?php $a = 1; $b = &$a; $b = 2; $c = 3; $b = &$c; $b = 4; ', 'assertions' => [ '$a===' => '2', '$b===' => '4', '$c===' => '4', ], ], 'changingReferencedVariableChangesReference' => [ 'code' => '<?php $a = 1; $b = &$a; $a = 2; ', 'assertions' => [ '$a===' => '2', '$b===' => '2', ], ], 'unsetReference' => [ 'code' => '<?php $a = 1; $b = &$a; $b = 2; unset($b); $b = 3; ', 'assertions' => [ '$a===' => '2', '$b===' => '3', ], ], 'recursiveReference' => [ 'code' => '<?php $a = 1; $b = &$a; $a = &$b; $b = 2; ', 'assertions' => [ '$a===' => '2', '$b===' => '2', ], ], 'SKIPPED-referenceToArrayItemChangesArrayType' => [ 'code' => '<?php /** @var list<int> */ $arr = []; assert(isset($arr[0])); $int = &$arr[0]; $int = (string) $int; ', 'assertions' => [ '$arr' => 'list<int|string>', ], ], 'referenceToReference' => [ 'code' => '<?php $a = 1; $b = &$a; $c = &$b; $c = 2; $d = 3; $b = &$d; ', 'assertions' => [ '$a===' => '2', '$b===' => '3', '$c===' => '2', '$d===' => '3', ], ], 'referenceToSubsequentCatch' => [ 'code' => '<?php $a = null; $b = &$a; try { throw new \Exception(); } catch (\Exception $a) { takesException($b); } function takesException(\Exception $e): void {} ', ], 'referenceAsSubsequentCatch' => [ 'code' => '<?php $a = null; $b = &$a; try { throw new \Exception(); } catch (\Exception $b) { takesException($a); } function takesException(\Exception $e): void {} ', ], 'referenceToNewVariableInitializesNull' => [ 'code' => '<?php $b = &$a; ', 'assertions' => [ '$a===' => 'null', '$b===' => 'null', ], ], 'referenceShadowedByGlobal' => [ 'code' => '<?php /** @var string */ $a = 0; function foo(): void { $b = 1; $a = &$b; global $a; takesString($a); } function takesString(string $str): void {} ', ], 'unsetPreventsReferenceConfusion' => [ 'code' => '<?php $arr = [1, 2, 3]; foreach ($arr as &$i) { ++$i; } unset($i); for ($i = 0; $i < 10; ++$i) { echo $i; } ', ], 'assignmentAsReferencePreventsReferenceConfusion' => [ 'code' => '<?php $arr = [1, 2, 3]; foreach ($arr as &$i) { ++$i; } $i = &$foo; for ($i = 0; $i < 10; ++$i) { echo $i; } ', ], 'assignmentAsReferenceInForeachPreventsReferenceConfusion' => [ 'code' => '<?php $arr = [1, 2, 3]; foreach ($arr as &$i) { ++$i; } foreach ($arr as &$i) { ++$i; } ', ], 'referenceToProperty' => [ 'code' => '<?php class Foo { public string $bar = ""; } $foo = new Foo(); $bar = &$foo->bar; $foo->bar = "bar"; ', 'assertions' => [ '$bar===' => "'bar'", ], 'ignored_issues' => ['UnsupportedPropertyReferenceUsage'], ], 'referenceReassignedInLoop' => [ 'code' => '<?php /** @psalm-param list<string> $keys */ function &ensure_array(array &$what, array $keys): array { $arr = & $what; while ($key = array_shift($keys)) { if (!isset($arr[$key]) || !is_array($arr[$key])) { $arr[$key] = array(); } $arr = & $arr[$key]; } return $arr; } ', ], 'dontCrashOnReferenceToMixedVariableArrayOffset' => [ 'code' => '<?php function func(&$a): void { $_ = &$a["f"]; } ', 'assertions' => [], 'ignored_issues' => ['MixedArrayAccess', 'MissingParamType'], ], 'dontCrashOnReferenceToArrayUnknownOffset' => [ 'code' => '<?php function func(array &$a): void { $_ = &$a["f"]; } ', 'assertions' => [], ], 'dontCrashOnReferenceToArrayMixedOffset' => [ 'code' => '<?php /** @param array{f: mixed} $a */ function func(array &$a): void { $_ = &$a["f"]; } ', 'assertions' => [], ], 'allowDocblockTypingOtherVariable' => [ 'code' => '<?php $a = 1; /** @var string $a */ $b = &$a; ', 'assertions' => [ '$b' => 'string', ], ], your_sha256_hashesDueToReconciliation' => [ 'code' => '<?php $a = "a"; $b = false; $doesNotMatter = ["a" => ["id" => 1]]; $reference = &$doesNotMatter[$a]; /** @psalm-suppress TypeDoesNotContainType */ $result = ($a === "not-a" && ($b || false)); ', 'assertions' => [ '$reference===' => 'array{id: 1}', ], ], your_sha256_hashation' => [ 'code' => '<?php $a = "a"; $b = false; $doesNotMatter = ["a" => ["id" => 1]]; $reference1 = &$doesNotMatter[$a]; $reference2 = &$doesNotMatter[$a]; /** @psalm-suppress TypeDoesNotContainType */ $result = ($a === "not-a" && ($b || false)); $reference1["id"] = 2; ', 'assertions' => [ '$reference1===' => 'array{id: 2}', '$reference2===' => 'array{id: 2}', ], ], ]; } public function providerInvalidCodeParse(): iterable { return [ 'referenceReuseForeachValue' => [ 'code' => '<?php /** @var array<int> */ $arr = []; foreach ($arr as &$var) { $var += 1; } $var = "foo"; ', 'error_message' => 'ReferenceReusedFromConfusingScope', ], 'referenceReuseDeclaredInForeach' => [ 'code' => '<?php /** @var array<int> */ $arr = []; foreach ($arr as $val) { $var = &$val; $var += 1; } $var = "foo"; ', 'error_message' => 'ReferenceReusedFromConfusingScope', ], 'referenceReuseDeclaredInFor' => [ 'code' => '<?php /** @var list<int> */ $arr = []; for ($i = 0; $i < count($arr); ++$i) { $var = &$arr[$i]; $var += 1; } $var = "foo"; ', 'error_message' => 'ReferenceReusedFromConfusingScope', ], 'referenceReuseDeclaredInIf' => [ 'code' => '<?php /** @var array<int> */ $arr = []; if (isset($arr[0])) { $var = &$arr[0]; $var += 1; } $var = "foo"; ', 'error_message' => 'ReferenceReusedFromConfusingScope', ], 'referenceReuseDeclaredInElseif' => [ 'code' => '<?php /** @var array<int> */ $arr = []; if (random_int(0, 1)) { } elseif (isset($arr[0])) { $var = &$arr[0]; $var += 1; } $var = "foo"; ', 'error_message' => 'ReferenceReusedFromConfusingScope', ], 'referenceReuseDeclaredInElse' => [ 'code' => '<?php /** @var array<int> */ $arr = []; if (!isset($arr[0])) { } else { $var = &$arr[0]; $var += 1; } $var = "foo"; ', 'error_message' => 'ReferenceReusedFromConfusingScope', ], 'referenceReuseDeeplyNested' => [ 'code' => '<?php /** @var list<list<list<int>>> */ $arr = []; for ($i = 0; $i < count($arr); ++$i) { foreach ($arr[$i] as $inner_arr) { if (isset($inner_arr[0])) { $var = &$inner_arr[0]; $var += 1; } } } $var = "foo"; ', 'error_message' => 'ReferenceReusedFromConfusingScope', ], 'referencesIgnoreVarAnnotation' => [ 'code' => '<?php $a = 1; /** @var int */ $b = &$a; ', 'error_message' => 'InvalidDocblock - src' . DIRECTORY_SEPARATOR . 'somefile.php:4:21 - Docblock type cannot be used for reference assignment', ], 'unsetOnlyPreventsReferenceConfusionAfterCall' => [ 'code' => '<?php $arr = [1, 2, 3]; foreach ($arr as &$i) { ++$i; } for ($i = 0; $i < 10; ++$i) { echo $i; } unset($i); ', 'error_message' => 'ReferenceReusedFromConfusingScope', ], your_sha256_hashnt' => [ 'code' => '<?php $arr = [1, 2, 3]; foreach ($arr as &$i) { ++$i; } for ($i = 0; $i < 10; ++$i) { echo $i; } $i = &$foo; ', 'error_message' => 'ReferenceReusedFromConfusingScope', ], your_sha256_hash => [ 'code' => '<?php /** @var array<string, string> */ $arr = []; /** @var non-empty-list<string> */ $foo = ["foo"]; $bar = &$arr[$foo[0]]; ', 'error_message' => 'UnsupportedReferenceUsage', ], 'unsupportedReferenceUsageContinuesAnalysis' => [ 'code' => '<?php /** @var array<string, string> */ $arr = []; /** @var non-empty-list<string> */ $foo = ["foo"]; /** @psalm-suppress UnsupportedReferenceUsage */ $bar = &$arr[$foo[0]]; /** @psalm-trace $bar */; ', 'error_message' => ' - $bar: string', ], ]; } } ```
```java /* * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ package org.dromara.maxkey.authz.oauth2.provider.endpoint; import java.net.MalformedURLException; import java.net.URL; import java.util.Arrays; import java.util.Collection; import java.util.HashSet; import java.util.Set; import org.dromara.maxkey.authz.oauth2.common.exceptions.InvalidGrantException; import org.dromara.maxkey.authz.oauth2.common.exceptions.InvalidRequestException; import org.dromara.maxkey.authz.oauth2.common.exceptions.OAuth2Exception; import org.dromara.maxkey.authz.oauth2.common.exceptions.RedirectMismatchException; import org.dromara.maxkey.entity.apps.oauth2.provider.ClientDetails; import org.springframework.util.Assert; import org.springframework.util.StringUtils; /** * Default implementation for a redirect resolver. * * @author Ryan Heaton * @author Dave Syer */ public class DefaultRedirectResolver implements RedirectResolver { private Collection<String> redirectGrantTypes = Arrays.asList("implicit", "authorization_code"); private boolean matchSubdomains = true; /** * Flag to indicate that requested URIs will match if they are a subdomain of the registered value. * * @param matchSubdomains the flag value to set (deafult true) */ public void setMatchSubdomains(boolean matchSubdomains) { this.matchSubdomains = matchSubdomains; } /** * Grant types that are permitted to have a redirect uri. * * @param redirectGrantTypes the redirect grant types to set */ public void setRedirectGrantTypes(Collection<String> redirectGrantTypes) { this.redirectGrantTypes = new HashSet<String>(redirectGrantTypes); } public String resolveRedirect(String requestedRedirect, ClientDetails client) throws OAuth2Exception { Set<String> authorizedGrantTypes = client.getAuthorizedGrantTypes(); if (authorizedGrantTypes.isEmpty()) { throw new InvalidGrantException("A client must have at least one authorized grant type."); } if (!containsRedirectGrantType(authorizedGrantTypes)) { throw new InvalidGrantException( "A redirect_uri can only be used by implicit or authorization_code grant types."); } Set<String> redirectUris = client.getRegisteredRedirectUri(); if (redirectUris != null && !redirectUris.isEmpty()) { return obtainMatchingRedirect(redirectUris, requestedRedirect); } else if (StringUtils.hasText(requestedRedirect)) { return requestedRedirect; } else { throw new InvalidRequestException("A redirect_uri must be supplied."); } } /** * @param grantTypes some grant types * @return true if the supplied grant types includes one or more of the redirect types */ private boolean containsRedirectGrantType(Set<String> grantTypes) { for (String type : grantTypes) { if (redirectGrantTypes.contains(type)) { return true; } } return false; } /** * Whether the requested redirect URI "matches" the specified redirect URI. For a URL, this implementation tests if * the user requested redirect starts with the registered redirect, so it would have the same host and root path if * it is an HTTP URL. * <p> * For other (non-URL) cases, such as for some implicit clients, the redirect_uri must be an exact match. * * @param requestedRedirect The requested redirect URI. * @param redirectUri The registered redirect URI. * @return Whether the requested redirect URI "matches" the specified redirect URI. */ protected boolean redirectMatches(String requestedRedirect, String redirectUri) { try { URL req = new URL(requestedRedirect); URL reg = new URL(redirectUri); if (reg.getProtocol().equals(req.getProtocol()) && hostMatches(reg.getHost(), req.getHost())) { return StringUtils.cleanPath(req.getPath()).startsWith(StringUtils.cleanPath(reg.getPath())); } } catch (MalformedURLException e) { } return requestedRedirect.equals(redirectUri); } /** * Check if host matches the registered value. * * @param registered the registered host * @param requested the requested host * @return true if they match */ protected boolean hostMatches(String registered, String requested) { if (matchSubdomains) { return requested.endsWith(registered); } return registered.equals(requested); } /** * Attempt to match one of the registered URIs to the that of the requested one. * * @param redirectUris the set of the registered URIs to try and find a match. This cannot be null or empty. * @param requestedRedirect the URI used as part of the request * @return the matching URI * @throws RedirectMismatchException if no match was found */ private String obtainMatchingRedirect(Set<String> redirectUris, String requestedRedirect) { Assert.notEmpty(redirectUris, "Redirect URIs cannot be empty"); if (redirectUris.size() == 1 && requestedRedirect == null) { return redirectUris.iterator().next(); } for (String redirectUri : redirectUris) { if (requestedRedirect != null && redirectMatches(requestedRedirect, redirectUri)) { return requestedRedirect; } } throw new RedirectMismatchException("Invalid redirect: " + requestedRedirect + " does not match one of the registered values: " + redirectUris.toString()); } } ```
```ruby # frozen_string_literal: true module Decidim module Assemblies # A controller that holds the logic to show Assemblies in a public layout. class AssembliesController < Decidim::Assemblies::ApplicationController include ParticipatorySpaceContext include AssemblyBreadcrumb include FilterResource include Paginable include HasParticipatorySpaceContentBlocks helper_method :collection, :parent_assemblies, :promoted_assemblies, :stats, :assembly_participatory_processes def index enforce_permission_to :list, :assembly respond_to do |format| format.html do raise ActionController::RoutingError, "Not Found" if published_assemblies.none? render "index" end format.js do raise ActionController::RoutingError, "Not Found" if published_assemblies.none? render "index" end format.json do render json: published_assemblies.query.includes(:children).where(parent: nil).collect { |assembly| { name: assembly.title[I18n.locale.to_s], children: assembly.children.collect do |child| { name: child.title[I18n.locale.to_s], children: child.children.collect { |child_of_child| { name: child_of_child.title[I18n.locale.to_s] } } } end } } end end end def show enforce_permission_to :read, :assembly, assembly: current_participatory_space end private def search_collection Assembly.where(organization: current_organization).published.visible_for(current_user) end def default_filter_params { with_any_scope: nil, with_any_area: nil, with_any_type: nil } end def current_participatory_space return unless params[:slug] @current_participatory_space ||= OrganizationAssemblies.new(current_organization).query.where(slug: params[:slug]).or( OrganizationAssemblies.new(current_organization).query.where(id: params[:slug]) ).first! end def published_assemblies @published_assemblies ||= OrganizationPublishedAssemblies.new(current_organization, current_user) end def promoted_assemblies @promoted_assemblies ||= published_assemblies | PromotedAssemblies.new end def parent_assemblies search.result.parent_assemblies.order(weight: :asc, promoted: :desc) end def collection @collection ||= paginate(Kaminari.paginate_array(parent_assemblies)) end def stats @stats ||= AssemblyStatsPresenter.new(assembly: current_participatory_space) end def assembly_participatory_processes @assembly_participatory_processes ||= @current_participatory_space.linked_participatory_space_resources(:participatory_processes, "included_participatory_processes") end end end end ```
Won on the Post is a 1912 Australian silent film directed by Alfred Rolfe set against a backdrop of horseracing. It is considered a lost film. Plot Two brothers love the same girl, but she loves the younger brother. He falls in with some gamblers and to pay them back arranges to nobble his father's race horse. The younger brother falls in love with a bar maid, who overhears a plot to rob him – she is caught but escapes and warns her love. The younger brother fights the robbers and is wounded but recovers to marry the barmaid. The elder brother is reunited with his former sweetheart. Production The film was shot in and around Sydney including at Randwick Racecourse. There were also scenes filmed in the bush. Reception The racing scene at Randwick was especially praised. One reviewer wrote that the film "began well, with excellent pictures of sporting Randwick, but when it got up the country it became somewhat absurd." References External links Won on the Post at AustLit Australian black-and-white films Lost Australian films 1912 films Australian silent short films Films directed by Alfred Rolfe
```javascript /** * @license Apache-2.0 * * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ 'use strict'; // MODULES // var tape = require( 'tape' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var abs = require( '@stdlib/math/base/special/abs' ); var PINF = require( '@stdlib/constants/float64/pinf' ); var NINF = require( '@stdlib/constants/float64/ninf' ); var EPS = require( '@stdlib/constants/float64/eps' ); var mgf = require( './../lib' ); // FIXTURES // var positiveMean = require( './fixtures/julia/positive_mean.json' ); var negativeMean = require( './fixtures/julia/negative_mean.json' ); var largeVariance = require( './fixtures/julia/large_variance.json' ); // TESTS // tape( 'main export is a function', function test( t ) { t.ok( true, __filename ); t.strictEqual( typeof mgf, 'function', 'main export is a function' ); t.end(); }); tape( 'if provided `NaN` for any parameter, the function returns `NaN`', function test( t ) { var y = mgf( NaN, 0.0, 1.0 ); t.equal( isnan( y ), true, 'returns NaN' ); y = mgf( 0.0, NaN, 1.0 ); t.equal( isnan( y ), true, 'returns NaN' ); y = mgf( 0.0, 1.0, NaN ); t.equal( isnan( y ), true, 'returns NaN' ); t.end(); }); tape( 'if provided a nonpositive `b`, the function returns `NaN`', function test( t ) { var y; y = mgf( 2.0, 2.0, -1.0 ); t.equal( isnan( y ), true, 'returns NaN' ); y = mgf( 0.0, 2.0, -1.0 ); t.equal( isnan( y ), true, 'returns NaN' ); y = mgf( 2.0, 2.0, 0.0 ); t.equal( isnan( y ), true, 'returns NaN' ); y = mgf( 0.0, 2.0, 0.0 ); t.equal( isnan( y ), true, 'returns NaN' ); y = mgf( 2.0, 1.0, NINF ); t.equal( isnan( y ), true, 'returns NaN' ); y = mgf( 2.0, PINF, NINF ); t.equal( isnan( y ), true, 'returns NaN' ); y = mgf( 2.0, NINF, NINF ); t.equal( isnan( y ), true, 'returns NaN' ); y = mgf( 2.0, NaN, NINF ); t.equal( isnan( y ), true, 'returns NaN' ); t.end(); }); tape( 'the function returns `NaN` for any `x` outside `(-1/b,1/b)', function test( t ) { var y; y = mgf( -1.0, 0.0, 2.0 ); t.equal( isnan( y ), true, 'returns NaN' ); y = mgf( -0.8, 0.0, 2.0 ); t.equal( isnan( y ), true, 'returns NaN' ); y = mgf( 0.8, 0.0, 2.0 ); t.equal( isnan( y ), true, 'returns NaN' ); y = mgf( 1.0, 0.0, 2.0 ); t.equal( isnan( y ), true, 'returns NaN' ); y = mgf( -0.5, 0.0, 4.0 ); t.equal( isnan( y ), true, 'returns NaN' ); y = mgf( -0.3, 0.0, 4.0 ); t.equal( isnan( y ), true, 'returns NaN' ); y = mgf( 0.5, 0.0, 4.0 ); t.equal( isnan( y ), true, 'returns NaN' ); y = mgf( 0.3, 0.0, 4.0 ); t.equal( isnan( y ), true, 'returns NaN' ); t.end(); }); tape( 'the function evaluates the MGF for `x` given positive `mu`', function test( t ) { var expected; var delta; var tol; var mu; var x; var b; var y; var i; expected = positiveMean.expected; x = positiveMean.x; mu = positiveMean.mu; b = positiveMean.b; for ( i = 0; i < x.length; i++ ) { y = mgf( x[i], mu[i], b[i] ); if ( expected[i] !== null) { if ( y === expected[i] ) { t.equal( y, expected[i], 'x: '+x[i]+', mu:'+mu[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] ); } else { delta = abs( y - expected[ i ] ); tol = 20.0 * EPS * abs( expected[ i ] ); t.ok( delta <= tol, 'within tolerance. x: '+x[ i ]+'. mu: '+mu[i]+'. b: '+b[i]+'. y: '+y+'. E: '+expected[ i ]+'. : '+delta+'. tol: '+tol+'.' ); } } } t.end(); }); tape( 'the function evaluates the MGF for `x` given negative `mu`', function test( t ) { var expected; var delta; var tol; var mu; var x; var b; var y; var i; expected = negativeMean.expected; x = negativeMean.x; mu = negativeMean.mu; b = negativeMean.b; for ( i = 0; i < x.length; i++ ) { y = mgf( x[i], mu[i], b[i] ); if ( expected[i] !== null ) { if ( y === expected[i] ) { t.equal( y, expected[i], 'x: '+x[i]+', mu:'+mu[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] ); } else { delta = abs( y - expected[ i ] ); tol = 60.0 * EPS * abs( expected[ i ] ); t.ok( delta <= tol, 'within tolerance. x: '+x[ i ]+'. mu: '+mu[i]+'. b: '+b[i]+'. y: '+y+'. E: '+expected[ i ]+'. : '+delta+'. tol: '+tol+'.' ); } } } t.end(); }); tape( 'the function evaluates the MGF for `x` given large variance (large `b` )', function test( t ) { var expected; var delta; var tol; var mu; var x; var b; var y; var i; expected = largeVariance.expected; x = largeVariance.x; mu = largeVariance.mu; b = largeVariance.b; for ( i = 0; i < x.length; i++ ) { y = mgf( x[i], mu[i], b[i] ); if ( expected[i] !== null ) { if ( y === expected[i] ) { t.equal( y, expected[i], 'x: '+x[i]+', mu:'+mu[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] ); } else { delta = abs( y - expected[ i ] ); tol = 80.0 * EPS * abs( expected[ i ] ); t.ok( delta <= tol, 'within tolerance. x: '+x[ i ]+'. mu: '+mu[i]+'. b: '+b[i]+'. y: '+y+'. E: '+expected[ i ]+'. : '+delta+'. tol: '+tol+'.' ); } } } t.end(); }); ```
```javascript import React from 'react'; import {Platform, Animated, DatePickerAndroid, Modal, View} from 'react-native'; import Enzyme, {shallow} from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; import Moment from 'moment'; import DatePicker from '../datepicker.js'; Enzyme.configure({adapter: new Adapter()}); import 'jsdom-global/register'; console.error = function () {}; describe('DatePicker', () => { it('initialize', () => { const wrapper = shallow(<DatePicker />); const datePicker = wrapper.instance(); expect(datePicker.props.mode).toEqual('date'); expect(datePicker.props.duration).toEqual(300); expect(datePicker.props.height).toBeGreaterThan(200); expect(datePicker.props.confirmBtnText).toEqual(''); expect(datePicker.props.cancelBtnText).toEqual(''); expect(datePicker.props.customStyles).toMatchObject({}); expect(datePicker.props.showIcon).toEqual(true); expect(datePicker.props.disabled).toEqual(false); expect(wrapper.state('date')).toBeInstanceOf(Date); expect(wrapper.state('modalVisible')).toEqual(false); expect(wrapper.state('animatedHeight')).toBeInstanceOf(Animated.Value); expect(datePicker._renderIcon()).toBeTruthy(); const wrapper1 = shallow( <DatePicker date="2016-05-11" format="YYYY/MM/DD" mode="datetime" duration={400} confirmBtnText="Confirm" cancelBtnText="Cancel" iconSource={{}} customStyles={{testStyle: 123}} disabled={true} showIcon={false} /> ); const datePicker1 = wrapper1.instance(); expect(datePicker1.props.mode).toEqual('datetime'); expect(datePicker1.props.format).toEqual('YYYY/MM/DD'); expect(datePicker1.props.duration).toEqual(400); expect(datePicker1.props.confirmBtnText).toEqual('Confirm'); expect(datePicker1.props.cancelBtnText).toEqual('Cancel'); expect(datePicker1.props.iconSource).toMatchObject({}); expect(datePicker1.props.customStyles).toMatchObject({testStyle: 123}); expect(datePicker1.props.showIcon).toEqual(false); expect(datePicker1.props.disabled).toEqual(true); expect(wrapper1.state('date')).toMatchObject(Moment('2016-05-11', 'YYYY-MM-DD').toDate()); expect(datePicker1._renderIcon()).toEqual(null); // find not work with mount, and defaultProps not work with shallow... const iconComponent = shallow(<View>iconComponent</View>); const wrapper2 = shallow(<DatePicker date={new Date('2016/09/09')} iconComponent={iconComponent}/>); const datePicker2 = wrapper2.instance(); expect(wrapper2.instance().getDateStr()).toEqual('2016-09-09'); expect(datePicker2._renderIcon()).toEqual(iconComponent); const wrapper3 = shallow(<DatePicker showIcon={false} date={{test: 123}} />); expect(wrapper3.find('Image').length).toEqual(0); expect(wrapper3.instance().getDateStr()).toEqual('Invalid date'); expect(datePicker1._renderIcon()).toEqual(null); }); it('default selected Date', () => { var dateStr = null; const wrapper = shallow(<DatePicker date="" onDateChange={(date) => { dateStr = date; }}/>); const datePicker = wrapper.instance(); datePicker.onPressConfirm(); expect(dateStr).toEqual(Moment().format('YYYY-MM-DD')); }); it('default selected Date with minDate and maxDate', () => { var dateStr = null; var dateStrMax = null; var dateStrNormal = null; const wrapper = shallow(<DatePicker date="" minDate="3000-09-09" onDateChange={(date) => { dateStr = date; }}/>); const datePicker = wrapper.instance(); datePicker.onPressConfirm(); expect(dateStr).toEqual('3000-09-09'); const wrapperMax = shallow(<DatePicker date="" maxDate="2016-07-07" onDateChange={(date) => { dateStrMax = date; }}/>); const datePickerMax = wrapperMax.instance(); datePickerMax.onPressConfirm(); expect(dateStrMax).toEqual('2016-07-07'); const wrapperNormal = shallow( <DatePicker date="" minDate="2016-07-07" maxDate="3000-09-09" onDateChange={(date) => {dateStrNormal = date;}}/> ); const datePickerNormal = wrapperNormal.instance(); datePickerNormal.onPressConfirm(); expect(dateStrNormal).toEqual(Moment().format('YYYY-MM-DD')); }); it('setModalVisible', () => { const wrapper = shallow(<DatePicker />); const datePicker = wrapper.instance(); datePicker.setModalVisible(true); expect(wrapper.state('modalVisible')).toEqual(true); expect(wrapper.state('animatedHeight')._animation._toValue).toBeGreaterThan(200); datePicker.setModalVisible(false); expect(wrapper.state('animatedHeight')._animation._toValue).toEqual(0); }); it('onPressCancel', () => { const setModalVisible = jest.fn(); const onCloseModal = jest.fn(); const wrapper = shallow(<DatePicker onCloseModal={onCloseModal}/>); const datePicker = wrapper.instance(); datePicker.setModalVisible = setModalVisible; datePicker.onPressCancel(); expect(setModalVisible).toHaveBeenCalledWith(false); expect(onCloseModal).toHaveBeenCalledTimes(1); }); it('onPressMask', () => { const onPressMask = jest.fn(); const wrapper = shallow(<DatePicker onPressMask={onPressMask}/>); const datePicker = wrapper.instance(); datePicker.onPressMask(); expect(onPressMask).toHaveBeenCalledTimes(1); // call onPressCancel when without onPressMask cb func const onPressCancel = jest.fn(); const wrapper1 = shallow(<DatePicker />); const datePicker1 = wrapper1.instance(); datePicker1.onPressCancel = onPressCancel; datePicker1.onPressMask(); expect(onPressCancel).toHaveBeenCalledTimes(1); }); it('onPressConfirm', () => { const setModalVisible = jest.fn(); const datePicked = jest.fn(); const onCloseModal = jest.fn(); const wrapper = shallow(<DatePicker onCloseModal={onCloseModal}/>); const datePicker = wrapper.instance(); datePicker.setModalVisible = setModalVisible; datePicker.datePicked = datePicked; datePicker.onPressConfirm(); expect(setModalVisible).toHaveBeenCalledWith(false); expect(datePicked).toHaveBeenCalledTimes(1); expect(onCloseModal).toHaveBeenCalledTimes(1); }); it('getDate', () => { const wrapper = shallow(<DatePicker date="2016-06-04"/>); const datePicker = wrapper.instance(); expect(datePicker.getDate()).toMatchObject(Moment('2016-06-04', 'YYYY-MM-DD').toDate()); expect(datePicker.getDate('2016-06-06')).toMatchObject(Moment('2016-06-06', 'YYYY-MM-DD').toDate()); const date = new Date(); expect(datePicker.getDate(date)).toEqual(date); }); it('getDateStr', () => { const wrapper = shallow(<DatePicker date="2016-06-01"/>); const datePicker = wrapper.instance(); expect(datePicker.getDateStr()).toEqual('2016-06-01'); expect(datePicker.getDateStr(new Date('2016-06-02'))).toEqual('2016-06-02'); expect(datePicker.getDateStr('2016-06-03')).toEqual('2016-06-03'); wrapper.setProps({format: 'YYYY/MM/DD'}); expect(datePicker.getDateStr(new Date('2016-06-02'))).toEqual('2016/06/02'); }); it('datePicked', () => { const onDateChange = jest.fn(); const wrapper = shallow(<DatePicker onDateChange={onDateChange}/>); const datePicker = wrapper.instance(); const date = new Date('2016-06-06'); wrapper.setState({date}); datePicker.datePicked(); expect(onDateChange).toHaveBeenCalledWith('2016-06-06', date); }); it('onDatePicked', () => { const onDateChange = jest.fn(); const wrapper = shallow(<DatePicker onDateChange={onDateChange}/>); const datePicker = wrapper.instance(); datePicker.onDatePicked({action: DatePickerAndroid.dismissedAction, year: 2016, month: 5, day: 12}); datePicker.onDatePicked({action: '', year: 2016, month: 5, day: 12}); expect(wrapper.state('date')).toMatchObject(new Date(2016, 5, 12)); expect(onDateChange).toHaveBeenCalledTimes(1); }); it('onTimePicked', () => { const onDateChange = jest.fn(); const wrapper = shallow(<DatePicker onDateChange={onDateChange}/>); const datePicker = wrapper.instance(); datePicker.onTimePicked({action: DatePickerAndroid.dismissedAction, hour: 12, minute: 10}); datePicker.onTimePicked({action: '', hour: 12, minute: 10}); expect(wrapper.state('date').getHours()).toEqual(12); expect(wrapper.state('date').getMinutes()).toEqual(10); expect(onDateChange).toHaveBeenCalledTimes(1); }); it('onDatetimeTimePicked', () => { const onDateChange = jest.fn(); const wrapper = shallow(<DatePicker onDateChange={onDateChange}/>); const datePicker = wrapper.instance(); datePicker.onDatetimePicked({action: DatePickerAndroid.dismissedAction, year: 2016, month: 12, day: 12}); datePicker.onDatetimePicked({action: '', year: 2016, month: 12, day: 12}); datePicker.onDatetimeTimePicked(2016, 6, 1, {action: DatePickerAndroid.dismissedAction, hour: 12, minute: 10}); datePicker.onDatetimeTimePicked(2016, 6, 1, {action: '', hour: 12, minute: 10}); expect(wrapper.state('date').getFullYear()).toEqual(2016); expect(wrapper.state('date').getMonth()).toEqual(6); expect(wrapper.state('date').getDate()).toEqual(1); expect(wrapper.state('date').getHours()).toEqual(12); expect(wrapper.state('date').getMinutes()).toEqual(10); expect(onDateChange).toHaveBeenCalledTimes(1); }); it('onPressDate', () => { Platform.OS = 'ios'; const setModalVisible = jest.fn(); const onOpenModal = jest.fn(); const wrapper = shallow( <DatePicker date="2016-05-06" minDate="2016-04-01" maxDate="2016-06-01" onOpenModal={onOpenModal}/> ); const datePicker = wrapper.instance(); datePicker.setModalVisible = setModalVisible; wrapper.setProps({disabled: true}); datePicker.onPressDate(); expect(setModalVisible).toHaveBeenCalledTimes(0); wrapper.setProps({disabled: false}); datePicker.onPressDate(); expect(wrapper.state('date')).toMatchObject(datePicker.getDate()); expect(setModalVisible).toHaveBeenCalledTimes(1); expect(onOpenModal).toHaveBeenCalledTimes(1); Platform.OS = 'android'; expect(datePicker.onPressDate).not.toThrow(Error); wrapper.setProps({mode: 'datetime'}); expect(datePicker.onPressDate).not.toThrow(Error); wrapper.setProps({mode: 'time'}); expect(datePicker.onPressDate).not.toThrow(Error); wrapper.setProps({mode: 'tttt'}); expect(datePicker.onPressDate).toThrow(Error); }); it('panResponder', () => { Platform.OS = 'ios'; const wrapper = shallow(<DatePicker date="2016-05-06" minDate="2016-04-01" maxDate="2016-06-01"/>); const datePicker = wrapper.instance(); datePicker.onPressDate(); expect(datePicker.onStartShouldSetResponder()).toEqual(true); expect(datePicker.onMoveShouldSetResponder()).toEqual(true); expect(datePicker.props.modalOnResponderTerminationRequest()).toEqual(true); }); it('getTitleElement - with placeholder', () => { const placeholder = 'Please pick a date'; const wrapper = shallow(<DatePicker placeholder={placeholder} />); const datePicker = wrapper.instance(); expect(datePicker.getTitleElement().props.children).toEqual(placeholder); }); it('getTitleElement - without placeholder', () => { const wrapper = shallow(<DatePicker date="2016-06-04" />); const datePicker = wrapper.instance(); expect(datePicker.getTitleElement().props.children).toEqual(datePicker.getDateStr()); }); it('`date` prop changes', () => { const wrapper = shallow(<DatePicker date="2016-06-04" />); expect(wrapper.state('date')).toMatchObject(new Date(2016, 5, 4)); wrapper.setProps({date: '2016-06-05'}); expect(wrapper.state('date')).toMatchObject(new Date(2016, 5, 5)); }); }); describe('Coverage', () => { it('Event: onRequestClose', () => { Platform.OS = 'ios'; const setModalVisible = jest.fn(); const wrapper = shallow(<DatePicker />); const datePicker = wrapper.instance(); datePicker.setModalVisible = setModalVisible; wrapper.find(Modal).simulate('requestClose'); expect(setModalVisible).toHaveBeenCalledTimes(1); }); it('Event: onDateChange', () => { Platform.OS = 'ios'; const wrapper = shallow(<DatePicker />); wrapper.find('DatePickerIOS').simulate('dateChange'); }); }); ```
```php <?php /** * ALIPAY API: alipay.trade.query request * * @author auto create * @since 1.0, 2017-01-09 15:37:43 */ class AlipayTradeQueryRequest { /** * R **/ private $bizContent; private $apiParas = array(); private $terminalType; private $terminalInfo; private $prodCode; private $apiVersion="1.0"; private $notifyUrl; private $returnUrl; private $needEncrypt=false; public function setBizContent($bizContent) { $this->bizContent = $bizContent; $this->apiParas["biz_content"] = $bizContent; } public function getBizContent() { return $this->bizContent; } public function getApiMethodName() { return "alipay.trade.query"; } public function setNotifyUrl($notifyUrl) { $this->notifyUrl=$notifyUrl; } public function getNotifyUrl() { return $this->notifyUrl; } public function setReturnUrl($returnUrl) { $this->returnUrl=$returnUrl; } public function getReturnUrl() { return $this->returnUrl; } public function getApiParas() { return $this->apiParas; } public function getTerminalType() { return $this->terminalType; } public function setTerminalType($terminalType) { $this->terminalType = $terminalType; } public function getTerminalInfo() { return $this->terminalInfo; } public function setTerminalInfo($terminalInfo) { $this->terminalInfo = $terminalInfo; } public function getProdCode() { return $this->prodCode; } public function setProdCode($prodCode) { $this->prodCode = $prodCode; } public function setApiVersion($apiVersion) { $this->apiVersion=$apiVersion; } public function getApiVersion() { return $this->apiVersion; } public function setNeedEncrypt($needEncrypt) { $this->needEncrypt=$needEncrypt; } public function getNeedEncrypt() { return $this->needEncrypt; } } ```
Elio Bertocchi (16 September 1919 – 27 August 1971) was an Italian racing cyclist. He rode in the 1947 Tour de France. References External links 1919 births 1971 deaths Italian male cyclists Sportspeople from Ferrara Cyclists from Emilia-Romagna
Tone control is a type of equalization used to make specific pitches or frequencies in an audio signal softer or louder. It allows a listener to adjust the tone of the sound produced by an audio system to their liking, for example to compensate for inadequate bass response of loudspeakers or earphones, tonal qualities of the room, or hearing impairment. A tone control circuit is an electronic circuit that consists of a network of filters which modify the signal before it is fed to speakers, headphones or recording devices by way of an amplifier. Tone controls are found on many sound systems: radios, portable music players, boomboxes, public address systems, and musical instrument amplifiers. Uses Tone control allows listeners to adjust sound to their liking. It also enables them to compensate for recording deficiencies, hearing impairments, room acoustics or shortcomings with playback equipment. For example, older people with hearing problems may want to increase the loudness of high pitch sounds they have difficulty hearing. Tone control is also used to adjust an audio signal during recording. For instance, if the acoustics of the recording site cause it to absorb some frequencies more than others, tone control can be used to amplify or "boost" the frequencies the room dampens. Types In their most basic form, tone control circuits attenuate the high or low frequencies of the signal. This is called treble or bass "cut". The simplest tone control circuits are passive circuits which utilize only resistors and capacitors or inductors. They rely on the property of capacitive reactance or inductive reactance to inhibit or enhance an AC signal, in a frequency-dependent manner. Active tone controls may also amplify or "boost" certain frequencies. More elaborate tone control circuits can boost or attenuate the middle range of frequencies. The simplest tone control is a single knob that when turned in one direction enhances treble frequencies and the other direction enhances bass frequencies. This was the first type of tone control, typically found on radios and record players from the 1930s to the 1970s. Graphic equalizers used for tone control provide independent elevation or attenuation of individual bands of frequencies. Wide frequency range graphic equalizers of high resolution can provide elevation or attenuation in 1/3 octave bands spanning from approximately 30 Hz to 18 kHz. Parametric equalizers can control not only the amount of boost and cut but also the specific frequency at which the boost and cut takes place and the range of frequencies (bandwidth) affected. Elaborate circuits may also use amplifiers. The most modern analog units use operational amplifiers, resistors and capacitors, abandoning inductors because of their size and sensitivity to ubiquitous electromagnetic interference. Historically, tone control was achieved via analog electronics, and most tone control circuits produced today still use the analog process. Nonetheless, digital approaches are increasingly being implemented through the use of digital signal processing. See also Audio power amplifier Electronic filter Audio crossover External links The James-Baxandall Passive Tone-Control Network Amplifiers and tone controls Audio tone controls Negative-Feedback Tone Control - Independent Variation of Bass and Treble Without Switches by P. J. Baxandall -pdf Simple Tone Control Circuit: Bass and Treble, Cut and Lift, by E.J.James TONE CIRCUITS, PART 3. Fender controls vs hifi controls. Tone control for DJs Analog circuits Tone, EQ and filter
"Livin' for the Weekend" is a song by English singer Dina Carroll, from her second studio album, Only Human (1996). It was co-produced by Nigel Lowis and David Morales. The record was a dance club hit in the UK. Critical reception The single received mixed reviews in Europe. Jon O'Brien from AllMusic described it as "Black Box-esque". Portugal's Manchete commented that Carroll failed to distinguish herself from Mariah Carey even in "Livin' for the Weekend". Vikki Tobak for Vibe wrote that the song and "Mind Body & Soul" are "dance-floor sure shots that complement Dina's smooth, textured vocals." Charts References 1996 songs Songs written by David Morales Dina Carroll songs Mercury Records singles Songs written by Nigel Lowis Songs written by Dina Carroll
Egil Yngvar Olbjørn (3 August 1902 – 1 February 1982) was a Norwegian police leader. He came to prominence during the occupation of Norway by Nazi Germany, as a member of Nasjonal Samling and supporter of Jonas Lie. He headed the police branch Ordenspolitiet. To a certain degree he tried to resist German control, and was imprisoned for a short period in the autumn of 1944. He was saved from prison by Jonas Lie, and Olbjørn stood by Lie's side when they entrenched themselves at Skallum on 8 May 1945 after the Nazi capitulation; however Olbjørn gave up, and left Skallum some days before Lie (who died there on 11 May). Olbjørn is also known as a judge (together with Karl Marthinsen and Egil Reichborn-Kjennerud) in the special court that sentenced Gunnar Eilifsen to death in 1943. During the legal purge in Norway after World War II, Olbjørn was sentenced to 15 years in prison with hard labour, permanent loss of his position, and partial loss of his civil rights for 10 years. On appeal, his prison sentence was reduced to 12 years. Olbjørn was released from prison on 15 December 1950. References 1902 births 1982 deaths Members of Nasjonal Samling Norwegian police chiefs Norwegian police officers convicted of crimes People convicted of treason for Nazi Germany against Norway Police officers convicted of treason
Myitnge () is a town in Amarapura Township in the Mandalay Region of central Burma. It is situated between Amarapura and the Myitnge River and lies along National Highway 1 which connects it to the city of Mandalay in the north. It has one of Burma's main railway workshops for passenger coaches and freight wagons. The General Strike of 1974 started at the Myitnge railway yard at the end of May spreading to the rest of the country including the capital Rangoon where it ended in bloodshed when the army opened fire on workers at Thamaing textile mill and Simmalaik dockyard. Notes External links Satellite map Maplandia.com Populated places in Mandalay District Amarapura Township
```swift import Foundation import UserNotifications public extension UNNotificationContent { var clientEventTitle: String { var eventText = "" if !title.isEmpty { eventText = "\(title)" if !subtitle.isEmpty { eventText += " - \(subtitle)" } } else if let message = (userInfo["aps"] as? [String: Any])?["alert"] as? String { eventText = message } return L10n.ClientEvents.EventType.Notification.title(eventText) } } ```
Ježa () is a formerly independent settlement in the northern part of the capital Ljubljana in central Slovenia. It is part of the traditional region of Upper Carniola and is now included with the rest of the municipality in the Central Slovenia Statistical Region. Geography Ježa is a linear settlement on a terrace above the Sava River east of Črnuče and southeast of the railroad to Kamnik. Most of the houses are along the road to Nadgorica, and a few extend onto the bank towards the plain along the Sava. The soil is sandy, and there are fields to the north and south of the settlement. Name Ježa was attested in written sources in 1364 as Jes (and as Yecz in 1436 and Yess in 1478). The name is derived from the Slovene common noun ježa 'small grassy slope between two flat areas in a valley'. The name therefore refers to the local geography (cf. Ježica). History After the Second World War, an asphalt plant was established in Ježa. A factory producing dissolved acetylene was established in 1967. Ježa annexed the village of Brod in 1952; Ježa itself was annexed by the City of Ljubljana in 1979, ending its existence as an independent settlement. References External links Ježa on Geopedia Localities of Ljubljana Črnuče District
```javascript //your_sha256_hash--------------------------------------- //your_sha256_hash--------------------------------------- if (this.WScript && this.WScript.LoadScriptFile) { // Check for running in ch this.WScript.LoadScriptFile("..\\UnitTestFramework\\UnitTestFramework.js"); } var tests = [ { name: "Deleting of configurable non-indexed properties on Arrays", body: function () { var arr = [1,4,9,16]; arr.non_indexed = 'whatever'; Object.defineProperty(arr, 'with_getter', { get: function() { return 'with getter'; }, configurable: true }); assert.areEqual('whatever', arr.non_indexed, "arr.non_indexed is set to 'whatever'"); assert.areEqual('with getter', arr.with_getter, "arr.with_getter is set to 'with getter'"); assert.areEqual(true, delete arr.non_indexed, "Deleting own property should succeed"); assert.areEqual(undefined, arr.non_indexed, "arr.non_indexed has been deleted"); assert.areEqual(true, delete arr.with_getter, "Deleting own property with a getter should succeed"); assert.areEqual(undefined, arr.with_getter, "arr.with_getter has been deleted"); } }, { name: "Deleting of non-configurable non-indexed properties on Arrays", body: function () { var arr = [1,4,9,16]; var id = 'id'; Object.defineProperty(arr, id, { value: 17, configurable: false }); assert.areEqual(false, delete arr[id]); assert.areEqual(17, arr[id], "arr['id'] value after failed delete"); assert.throws(function () { 'use strict'; delete arr[id]; }, TypeError, "Should throw on delete of non-indexed property in array", "Calling delete on 'id' is not allowed in strict mode"); } }, { name: "Deleting of the 'length' property on Arrays", body: function () { var arr = [1,4,9,16]; assert.areEqual(false, delete arr.length, "delete of arr.length should fail (as noop)"); assert.areEqual(4, arr.length, "arr.length after attempting to delete it"); assert.throws(function () { 'use strict'; delete arr.length; }, TypeError, "Should throw on delete of 'length' property in array", "Calling delete on 'length' is not allowed in strict mode"); assert.areEqual(4, arr.length, "arr.length after attempting to delete it in strict mode"); } }, { name: "Deleting of indexed properties on Arrays", body: function () { var arr = [1,4,9,16]; assert.areEqual(true, delete arr[1], "delete of arr[1] should succeed"); assert.areEqual(undefined, arr[1], "arr[1] value after delete should be undefined"); assert.areEqual(4, arr.length, "the array's lenght should not change"); assert.areEqual(true, delete arr[42], "delete of arr[42] (beyond the array bounds) should succeed"); assert.areEqual(4, arr.length, "the array's length is unchanged"); const last = arr.length - 1; assert.areEqual(true, delete arr[last], "delete of last element should succeed"); assert.areEqual(undefined, arr[last], "arr[last] value after delete should be undefined"); assert.areEqual(4, arr.length, "the array's lenght should not change"); } }, { name: "Deleting of indexed properties on Arrays that are also set on prototypes", body: function () { Object.prototype[4] = "obj.proto"; Array.prototype[1] = "arr.proto"; var arr = [1,4,9,16,25]; assert.areEqual(true, delete arr[1], "delete of arr[1] should succeed"); assert.areEqual("arr.proto", arr[1], "arr[1] after deleting should be picked up from the Array prototype"); assert.areEqual(true, delete arr[4], "delete of arr[4] should succeed"); assert.areEqual("obj.proto", arr[4], "arr[4] after deleting should be picked up from the Object prototype"); assert.areEqual(5, arr.length, "arr.length after deleting of the last element"); } }, { name: "Deleting of properties on frozen Arrays", body: function () { var arr = [42]; arr.foo = 'fourty-two'; Object.freeze(arr); // indexed property assert.areEqual(false, delete arr[0], "delete arr[0] from frozen array"); assert.throws(function () { 'use strict'; delete arr[0]; }, TypeError, "Should throw on delete of non-indexed property in array", "Calling delete on '0' is not allowed in strict mode"); // non-indexed property assert.areEqual(false, delete arr.foo, "delete arr.foo from frozen array"); assert.throws(function () { 'use strict'; delete arr.foo; }, TypeError, "Should throw on delete of non-indexed property in array", "Calling delete on 'foo' is not allowed in strict mode"); } }, { name: "Deleting of indexed properties on sealed Arrays", body: function () { var arr = [42]; arr.foo = 'fourty-two'; Object.seal(arr); // indexed property assert.areEqual(false, delete arr[0], "delete arr[0] from sealed array"); assert.throws(function () { 'use strict'; delete arr[0]; }, TypeError, "Should throw on delete of non-indexed property in array", "Calling delete on '0' is not allowed in strict mode"); // non-indexed property assert.areEqual(false, delete arr.foo, "delete arr.foo from sealed array"); assert.throws(function () { 'use strict'; delete arr.foo; }, TypeError, "Should throw on delete of non-indexed property in array", "Calling delete on 'foo' is not allowed in strict mode"); } }, ]; testRunner.runTests(tests, { verbose: false /*so no need to provide baseline*/ }); ```
```xml <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="path_to_url"> <item android:state_enabled="false"> <shape android:shape="rectangle"> <corners android:radius="2dp"/> <solid android:color="@color/accent"/> </shape> </item> <item android:state_selected="true"> <shape android:shape="rectangle"> <corners android:radius="2dp"/> <solid android:color="@color/material_grey_400"/> </shape> </item> <item android:state_enabled="true"> <shape android:shape="rectangle"> <corners android:radius="2dp"/> <solid android:color="@color/item_color"/> </shape> </item> <item android:state_selected="false"> <shape android:shape="rectangle"> <corners android:radius="2dp"/> <solid android:color="@color/item_color"/> </shape> </item> </selector> ```
```go // // Last.Backend LLC CONFIDENTIAL // __________________ // // [2014] - [2019] Last.Backend LLC // All Rights Reserved. // // NOTICE: All information contained herein is, and remains // the property of Last.Backend LLC and its suppliers, // if any. The intellectual and technical concepts contained // herein are proprietary to Last.Backend LLC // and its suppliers and may be covered by Russian Federation and Foreign Patents, // patents in process, and are protected by trade secret or copyright law. // Dissemination of this information or reproduction of this material // is strictly forbidden unless prior written permission is obtained // from Last.Backend LLC. // package request import ( "encoding/json" "io" "io/ioutil" "github.com/lastbackend/lastbackend/pkg/distribution/errors" ) type RouteRequest struct{} func (RouteRequest) Manifest() *RouteManifest { return new(RouteManifest) } func (r *RouteManifest) Validate() *errors.Err { return nil } func (r *RouteManifest) DecodeAndValidate(reader io.Reader) *errors.Err { if reader == nil { err := errors.New("data body can not be null") return errors.New("route").IncorrectJSON(err) } body, err := ioutil.ReadAll(reader) if err != nil { return errors.New("route").Unknown(err) } err = json.Unmarshal(body, r) if err != nil { return errors.New("route").IncorrectJSON(err) } if err := r.Validate(); err != nil { return err } return nil } func (RouteRequest) RemoveOptions() *RouteRemoveOptions { return new(RouteRemoveOptions) } func (r *RouteRemoveOptions) Validate() *errors.Err { return nil } ```
```xml import { ComponentFixture, TestBed } from '@angular/core/testing'; import { RegisterComponent } from './register.component'; describe('RegisterComponent', () => { let component: RegisterComponent; let fixture: ComponentFixture<RegisterComponent>; beforeEach(async () => { await TestBed.configureTestingModule({ declarations: [ RegisterComponent ] }) .compileComponents(); }); beforeEach(() => { fixture = TestBed.createComponent(RegisterComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy(); }); }); ```
```javascript /* path_to_url path_to_url#background-position Example: path_to_url */ (function() { var elem = document.createElement('a'), eStyle = elem.style, val = "right 10px bottom 10px"; Modernizr.addTest('bgpositionshorthand', function(){ eStyle.cssText = "background-position: " + val + ";"; return (eStyle.backgroundPosition === val); }); }()); ```
The University Medical Center Freiburg (Universitätsklinikum Freiburg) in Freiburg, Germany is the teaching hospital and part of the medical research unit of the University of Freiburg and home to its Faculty of Medicine. The medical center is one of the largest hospitals in Europe. Medical services at the University of Freiburg date back to the university's founding in 1457, as the Faculty of Medicine was one of the four founding faculties. History The Faculty of Medicine was founded together with the University of Freiburg in 1457. In 1751, the medical faculty began charity medical activities and the first general clinic (Allgemeines Kranken-Spital) was established. In the 19th century a medical center was built, followed by an entire campus with different specialized departments. In 1887 the psychiatric clinic was constructed. In 1926 the architect Adolf Lorenz began building a modern hospital complex at the present hospital location. During the bombing raid of 1944, almost all medical center facilities were destroyed. In 1952 the reconstruction of the medical center in accordance with the original plans began. Since then, the medical center has continuously expanded and added many institutes and satellite clinics. Patient care Today, the hospital has 2,189 beds and treats 90,000 in-patients each year. Around 900,000 out-patients are seen annually. The University Medical Center employs approximately 15,000 people, including over 1,800 doctors and around 4,300 nurses. As a tertiary care center and major European hospital, virtually all specialties and subspecialties are represented at the University Medical Center Freiburg. There are numerous large centers which bundle resources and expertise in order to provide optimal treatment, among them the aforementioned Cardiovascular Diseases Center Freiburg–Bad Krozingen, the Center for Chronic Immunodeficiency, the Comprehensive Cancer Center Freiburg, as well as the Liver Center Freiburg, the International Pancreas Carcinoma Center, the Neurocenter, the Center for Geriatrics and Gerontology, or the Epilepsy Center. Aside from the clinics and institutes, the Medical Center also houses extensive research facilities, many lecture halls, and even an own power station. Recognition and affairs Many medical breakthroughs have been achieved in Freiburg, such as the first use of the TIPS procedure on a patient worldwide, the first implantation of the artificial heart Jarvik-2000 in central Europe or the first combined heart-lung transplantation in the state of Baden-Württemberg. In 2010, the Medical Center's International Pancreatic Cancer Center was the first in Germany to perform a laparoscopic pancreaticoduodenectomy. All are procedures available only in a select few hospitals. In 2004, the University Medical Center Freiburg became the first clinic in Germany to perform a blood group incompatible kidney transplantation. With over 40 such transplantations to date, the University Medical Center Freiburg is one of the most experienced centers regarding this new procedure. The annual budget of the University Medical Center amounts to approximately EUR 600 million. In March 2007 the university clinic's Tumorzentrum Ludwig Heilmeyer - Comprehensive Cancer Center Freiburg (CCCF) was named an oncological center of excellence, one of the first four in Germany to be specially funded by the German Cancer Aid. The University Medical Center Freiburg has recently set up a Center for Chronic Immunodeficiency (CCI), selected to be funded with up to 50 Mio EUR over the next 5–10 years as an Integrated Research and Treatment Center by the German Federal Ministry of Education and Research. In 2010, the Medical Center decided to found a Comprehensive Lung Center with regards to the further increasing importance of lung diseases. In April 2012 the Cardiovascular Center at the University Medical Center Freiburg fused with the Heart-Center Bad Krozingen to form the Heart Center Freiburg University (Universitäres Herz- und Kreislaufzentrum Freiburg-Bad Krozingen) which has become the largest heart center in Germany. The University Medical Center Freiburg is the largest hospital to be certified by the (de) (KTQ, Cooperation for Quality and Transparency in Healthcare), the most widespread certification procedure at German hospitals. The aim of KTQ is to make a voluntary certification procedure available to hospitals and to promote continuous improvement and internal quality management. The KTQ certification seal is valid for three years, after which a reevaluation must be performed. The University Medical Center was first certified in 2005 and recently recertified in 2008. Education The University Medical Center Freiburg is home to the University of Freiburg Faculty of Medicine, a top ranking German medical school, and is the faculty's primary teaching hospital. The Medical Center also possesses an Academy for Medical Professions (Akademie für Medizinische Berufe) including a nursing school, a physiotherapist school, and a midwifery school. International Medical Services & International Business Development International Medical Services & International Business Development (short: IMS) was founded in 2000 by the Board of Directors of the University Medical Center Freiburg. IMS offers services for foreign patients and their families who come for medical treatment to the University Medical Center Freiburg. The services include providing visa assistance and cost estimates, scheduling medical appointments, arranging interpreters and travel plans, processing final billing as well as other services. IMS also provides telemedical services, such as teleradiology, teleconsultations and teleteaching as well as consulting services which include assistance with purchasing medical-technical equipment for hospitals, the conception and planning of hospital and rehabilitation unit upgrade projects. It also organizes workshops, seminars and teleteaching sessions for medical and administrative personnel. The IMS staff speaks several languages, including English and Russian. Telemedical services Communication with medical specialists takes place though specially encrypted Internet channels, securing patients' confidential medical data. This service allows patients to get a “second opinion” from a German physician without having to leave their home country. IMS also broadly utilizes this technology for teleteaching. See also List of hospitals in Germany References External links University of Freiburg Hospitals established in the 15th century Freiburg Hospital buildings completed in 1887 Education in Freiburg im Breisgau 1450s establishments in the Holy Roman Empire 1457 establishments in Europe Buildings and structures in Freiburg im Breisgau Medical and health organisations based in Baden-Württemberg
```xml import 'rxjs-compat/add/operator/windowToggle'; ```
The Carpet People is a comic fantasy novel by British writer Terry Pratchett. First published in 1971 and written when Pratchett was 17 years old, it was later re-written by the author when his work became more widespread and well-known. In the Author's Note of the revised edition, published in 1992, Pratchett wrote: "This book had two authors, and they were both the same person." The Carpet People contains a similar mix of humour and serious topics like war, death and religion, which later became a major part of the Discworld series. Before creating the Discworld, Pratchett wrote about two different flat worlds, first in this novel, and then in the novel Strata. Characters Glurk, chief of the Munrungs Snibril, Glurk's younger brother Pismire, the wise man of the Munrung tribe Bane, a Dumii general Brocando, King of the Deftmenes Fray, a natural phenomenon wreaking havoc on the Carpet Mouls, a power-hungry species Wights, who remember the future Camus Cadmes Themes The book explores the conflict between traditions and innovation. There is an established civilization, complete with bureaucrats, taxes imposed and collected, and permits; there are people who resent the establishment; there is a need for both groups to find common ground in order to save their collective civilization. References External links The Carpet People at The L-Space Web 1971 British novels 1992 British novels Novels by Terry Pratchett British fantasy novels Fantasy worlds
Playing House is a 2006 television film that was originally shown on CTV in Canada. It was produced by Blueprint Entertainment. The movie is based on the book of the same name by Patricia Pearson. Plot Frannie and Calvin, a couple in their late twenties in Manhattan, had been dating for a few months when Frannie discovers she is pregnant. Calvin leaves on a tour with his band before Frannie finds the courage to tell him about the pregnancy. Frannie goes home to visit her parents just outside Toronto where her mother convinces her to tell Calvin, though the cell phone signal is weak and distorted and she believes he hung up on her. On her way back to New York a border guard refuses Frannie entrance to the USA as her visa has expired. When she says she has her apartment and job in New York she receives no sympathy. She then confesses to being with child hoping to gain some understanding from the female border guard. The border guard then bars her from entry to the USA for 12 months. Frannie is forced to do her work as a magazine editor from her parents’ home. Calvin shows up a little while later at Frannie's parents' home. Calvin and Frannie soon realise they have no idea how to cook, keep house, or raise a child and their relationship deteriorates. Michael Tate, a famous writer, offers to help Frannie get her visa reinstated because of the difficulties of having Frannie work remotely as his editor. Frannie moves back to Manhattan and begins to develop a relationship with Michael. In the end Frannie realises that the glamour and romance Michael has to offer is not what she wants and she seeks out Calvin who has returned to New York and his experimental jazz band that incorporates 'found instruments'. Cast Joanne Kelly as Frannie McKenzie Lucas Bryant as Calvin Puddie Colin Ferguson as Michael Tate Michael Murphy as Hubbard Rosemary Dunsmore as Madeline Kristin Lehman as Marina Home media Playing House was released on DVD in Australia (Region 4) in 1.78:1 widescreen PAL with a Dolby Digital 2.0 audio track. It is rated PG for mild sexual references and moderate coarse language by Australian rating standards. Playing House has also been released on DVD in South Africa. On April 26, 2011, Playing House was released on Region 1 DVD in the U.S. by A&E Home Video under its Lifetime label. References External links 2006 television films 2006 films 2006 comedy films Films set in Toronto Films directed by Kelly Makin
```objective-c /* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ // vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4: #ident "$Id$" /* COPYING CONDITIONS NOTICE: This program is free software; you can redistribute it and/or modify published by the Free Software Foundation, and provided that the following conditions are met: * Redistributions of source code must retain this COPYING CONDITIONS NOTICE, the COPYRIGHT NOTICE (below), the DISCLAIMER (below), the UNIVERSITY PATENT NOTICE (below), the PATENT MARKING NOTICE (below), and the PATENT RIGHTS GRANT (below). * Redistributions in binary form must reproduce this COPYING CONDITIONS NOTICE, the COPYRIGHT NOTICE (below), the DISCLAIMER (below), the UNIVERSITY PATENT NOTICE (below), the PATENT MARKING NOTICE (below), and the PATENT RIGHTS GRANT (below) in the documentation and/or other materials provided with the distribution. along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. COPYRIGHT NOTICE: TokuDB, Tokutek Fractal Tree Indexing Library. DISCLAIMER: This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU UNIVERSITY PATENT NOTICE: The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it. PATENT MARKING NOTICE: This software is covered by US Patent No. 8,185,551. This software is covered by US Patent No. 8,489,638. PATENT RIGHTS GRANT: "THIS IMPLEMENTATION" means the copyrightable works distributed by Tokutek as part of the Fractal Tree project. "PATENT CLAIMS" means the claims of patents that are owned or licensable by Tokutek, both currently or in the future; and that in the absence of this license would be infringed by THIS IMPLEMENTATION or by using or running THIS IMPLEMENTATION. "PATENT CHALLENGE" shall mean a challenge to the validity, patentability, enforceability and/or non-infringement of any of the PATENT CLAIMS or otherwise opposing any of the PATENT CLAIMS. Tokutek hereby grants to you, for the term and geographical scope of the PATENT CLAIMS, a non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, transfer, and otherwise run, modify, and propagate the contents of THIS IMPLEMENTATION, where such license applies only to the PATENT CLAIMS. This grant does not include claims that would be infringed only as a consequence of further modifications of THIS IMPLEMENTATION. If you or your agent or licensee institute or order or agree to the institution of patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that THIS IMPLEMENTATION constitutes direct or contributory patent infringement, or inducement of patent infringement, then any rights such litigation is filed. If you or your agent or exclusive licensee institute or order or agree to the institution of a PATENT CHALLENGE, then Tokutek may terminate any rights granted to you */ #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." #if !defined(HA_TOKUDB_H) #define HA_TOKUDB_H #include <db.h> #include "hatoku_cmp.h" #define HA_TOKU_ORIG_VERSION 4 #define HA_TOKU_VERSION 4 // // no capabilities yet // #define HA_TOKU_CAP 0 class ha_tokudb; typedef struct loader_context { THD* thd; char write_status_msg[200]; ha_tokudb* ha; } *LOADER_CONTEXT; // // This object stores table information that is to be shared // among all ha_tokudb objects. // There is one instance per table, shared among threads. // Some of the variables here are the DB* pointers to indexes, // and auto increment information. // class TOKUDB_SHARE { public: void init(void); void destroy(void); public: char *table_name; uint table_name_length, use_count; pthread_mutex_t mutex; THR_LOCK lock; ulonglong auto_ident; ulonglong last_auto_increment, auto_inc_create_value; // // estimate on number of rows in table // ha_rows rows; // // estimate on number of rows added in the process of a locked tables // this is so we can better estimate row count during a lock table // ha_rows rows_from_locked_table; DB *status_block; // // DB that is indexed on the primary key // DB *file; // // array of all DB's that make up table, includes DB that // is indexed on the primary key, add 1 in case primary // key is hidden // DB *key_file[MAX_KEY +1]; rw_lock_t key_file_lock; uint status, version, capabilities; uint ref_length; // // whether table has an auto increment column // bool has_auto_inc; // // index of auto increment column in table->field, if auto_inc exists // uint ai_field_index; // // whether the primary key has a string // bool pk_has_string; KEY_AND_COL_INFO kc_info; // // we want the following optimization for bulk loads, if the table is empty, // attempt to grab a table lock. emptiness check can be expensive, // so we try it once for a table. After that, we keep this variable around // to tell us to not try it again. // bool try_table_lock; bool has_unique_keys; bool replace_into_fast; rw_lock_t num_DBs_lock; uint32_t num_DBs; pthread_cond_t m_openclose_cond; enum { CLOSED, OPENING, OPENED, CLOSING, ERROR } m_state; int m_error; int m_initialize_count; uint n_rec_per_key; uint64_t *rec_per_key; }; typedef struct st_filter_key_part_info { uint offset; uint part_index; } FILTER_KEY_PART_INFO; typedef enum { lock_read = 0, lock_write } TABLE_LOCK_TYPE; // the number of rows bulk fetched in one callback grows exponentially // with the bulk fetch iteration, so the max iteration is the max number // of shifts we can perform on a 64 bit integer. #define HA_TOKU_BULK_FETCH_ITERATION_MAX 63 class ha_tokudb : public handler { private: THR_LOCK_DATA lock; ///< MySQL lock TOKUDB_SHARE *share; ///< Shared lock info #ifdef MARIADB_BASE_VERSION // MariaDB version of MRR DsMrr_impl ds_mrr; #elif 50600 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699 // MySQL version of MRR DsMrr_impl ds_mrr; #endif // For ICP. Cache our own copies Item* toku_pushed_idx_cond; uint toku_pushed_idx_cond_keyno; /* The index which the above condition is for */ bool icp_went_out_of_range; // // last key returned by ha_tokudb's cursor // DBT last_key; // // pointer used for multi_alloc of key_buff, key_buff2, primary_key_buff // void *alloc_ptr; // // buffer used to temporarily store a "packed row" // data pointer of a DBT will end up pointing to this // see pack_row for usage // uchar *rec_buff; // // number of bytes allocated in rec_buff // ulong alloced_rec_buff_length; // // same as above two, but for updates // uchar *rec_update_buff; ulong alloced_update_rec_buff_length; uint32_t max_key_length; uchar* range_query_buff; // range query buffer uint32_t size_range_query_buff; // size of the allocated range query buffer uint32_t bytes_used_in_range_query_buff; // number of bytes used in the range query buffer uint32_t curr_range_query_buff_offset; // current offset into the range query buffer for queries to read uint64_t bulk_fetch_iteration; uint64_t rows_fetched_using_bulk_fetch; bool doing_bulk_fetch; bool maybe_index_scan; // // buffer used to temporarily store a "packed key" // data pointer of a DBT will end up pointing to this // uchar *key_buff; // // buffer used to temporarily store a "packed key" // data pointer of a DBT will end up pointing to this // This is used in functions that require the packing // of more than one key // uchar *key_buff2; uchar *key_buff3; uchar *key_buff4; // // buffer used to temporarily store a "packed key" // data pointer of a DBT will end up pointing to this // currently this is only used for a primary key in // the function update_row, hence the name. It // does not carry any state throughout the class. // uchar *primary_key_buff; // // ranges of prelocked area, used to know how much to bulk fetch // uchar *prelocked_left_range; uint32_t prelocked_left_range_size; uchar *prelocked_right_range; uint32_t prelocked_right_range_size; // // individual DBTs for each index // DBT_ARRAY mult_key_dbt_array[2*(MAX_KEY + 1)]; DBT_ARRAY mult_rec_dbt_array[MAX_KEY + 1]; uint32_t mult_put_flags[MAX_KEY + 1]; uint32_t mult_del_flags[MAX_KEY + 1]; uint32_t mult_dbt_flags[MAX_KEY + 1]; // // when unpacking blobs, we need to store it in a temporary // buffer that will persist because MySQL just gets a pointer to the // blob data, a pointer we need to ensure is valid until the next // query // uchar* blob_buff; uint32_t num_blob_bytes; bool unpack_entire_row; // // buffers (and their sizes) that will hold the indexes // of fields that need to be read for a query // uint32_t* fixed_cols_for_query; uint32_t num_fixed_cols_for_query; uint32_t* var_cols_for_query; uint32_t num_var_cols_for_query; bool read_blobs; bool read_key; // // transaction used by ha_tokudb's cursor // DB_TXN *transaction; // external_lock will set this true for read operations that will be closely followed by write operations. bool use_write_locks; // use write locks for reads // // instance of cursor being used for init_xxx and rnd_xxx functions // DBC *cursor; uint32_t cursor_flags; // flags for cursor // // flags that are returned in table_flags() // ulonglong int_table_flags; // // count on the number of rows that gets changed, such as when write_row occurs // this is meant to help keep estimate on number of elements in DB // ulonglong added_rows; ulonglong deleted_rows; uint last_dup_key; // // if set to 0, then the primary key is not hidden // if non-zero (not necessarily 1), primary key is hidden // uint hidden_primary_key; bool key_read, using_ignore; bool using_ignore_no_key; // // After a cursor encounters an error, the cursor will be unusable // In case MySQL attempts to do a cursor operation (such as rnd_next // or index_prev), we will gracefully return this error instead of crashing // int last_cursor_error; // // For instances where we successfully prelock a range or a table, // we set this to true so that successive cursor calls can know // know to limit the locking overhead in a call to the fractal tree // bool range_lock_grabbed; bool range_lock_grabbed_null; // // For bulk inserts, we want option of not updating auto inc // until all inserts are done. By default, is false // bool delay_updating_ai_metadata; // if true, don't update auto-increment metadata until bulk load completes bool ai_metadata_update_required; // if true, autoincrement metadata must be updated // // buffer for updating the status of long insert, delete, and update // statements. Right now, the the messages are // "[inserted|updated|deleted] about %llu rows", // so a buffer of 200 is good enough. // char write_status_msg[200]; //buffer of 200 should be a good upper bound. struct loader_context lc; DB_LOADER* loader; bool abort_loader; int loader_error; bool num_DBs_locked_in_bulk; uint32_t lock_count; bool fix_rec_buff_for_blob(ulong length); bool fix_rec_update_buff_for_blob(ulong length); uchar current_ident[TOKUDB_HIDDEN_PRIMARY_KEY_LENGTH]; ulong max_row_length(const uchar * buf); int pack_row_in_buff( DBT * row, const uchar* record, uint index, uchar* row_buff ); int pack_row( DBT * row, const uchar* record, uint index ); int pack_old_row_for_update( DBT * row, const uchar* record, uint index ); uint32_t place_key_into_mysql_buff(KEY* key_info, uchar * record, uchar* data); void unpack_key(uchar * record, DBT const *key, uint index); uint32_t place_key_into_dbt_buff(KEY* key_info, uchar * buff, const uchar * record, bool* has_null, int key_length); DBT* create_dbt_key_from_key(DBT * key, KEY* key_info, uchar * buff, const uchar * record, bool* has_null, bool dont_pack_pk, int key_length, uint8_t inf_byte); DBT *create_dbt_key_from_table(DBT * key, uint keynr, uchar * buff, const uchar * record, bool* has_null, int key_length = MAX_KEY_LENGTH); DBT* create_dbt_key_for_lookup(DBT * key, KEY* key_info, uchar * buff, const uchar * record, bool* has_null, int key_length = MAX_KEY_LENGTH); DBT *pack_key(DBT * key, uint keynr, uchar * buff, const uchar * key_ptr, uint key_length, int8_t inf_byte); #if TOKU_INCLUDE_EXTENDED_KEYS DBT *pack_ext_key(DBT * key, uint keynr, uchar * buff, const uchar * key_ptr, uint key_length, int8_t inf_byte); #endif bool key_changed(uint keynr, const uchar * old_row, const uchar * new_row); int handle_cursor_error(int error, int err_to_return, uint keynr); DBT *get_pos(DBT * to, uchar * pos); int open_main_dictionary(const char* name, bool is_read_only, DB_TXN* txn); int open_secondary_dictionary(DB** ptr, KEY* key_info, const char* name, bool is_read_only, DB_TXN* txn); int acquire_table_lock (DB_TXN* trans, TABLE_LOCK_TYPE lt); int estimate_num_rows(DB* db, uint64_t* num_rows, DB_TXN* txn); bool has_auto_increment_flag(uint* index); int write_frm_data(DB* db, DB_TXN* txn, const char* frm_name); int verify_frm_data(const char* frm_name, DB_TXN* trans); int remove_frm_data(DB *db, DB_TXN *txn); int write_to_status(DB* db, HA_METADATA_KEY curr_key_data, void* data, uint size, DB_TXN* txn); int remove_from_status(DB* db, HA_METADATA_KEY curr_key_data, DB_TXN* txn); int write_metadata(DB* db, void* key, uint key_size, void* data, uint data_size, DB_TXN* txn); int remove_metadata(DB* db, void* key_data, uint key_size, DB_TXN* transaction); int update_max_auto_inc(DB* db, ulonglong val); int remove_key_name_from_status(DB* status_block, char* key_name, DB_TXN* txn); int write_key_name_to_status(DB* status_block, char* key_name, DB_TXN* txn); int write_auto_inc_create(DB* db, ulonglong val, DB_TXN* txn); void init_auto_increment(); bool can_replace_into_be_fast(TABLE_SHARE* table_share, KEY_AND_COL_INFO* kc_info, uint pk); int initialize_share(const char* name, int mode); void set_query_columns(uint keynr); int prelock_range (const key_range *start_key, const key_range *end_key); int create_txn(THD* thd, tokudb_trx_data* trx); bool may_table_be_empty(DB_TXN *txn); int delete_or_rename_table (const char* from_name, const char* to_name, bool is_delete); int delete_or_rename_dictionary( const char* from_name, const char* to_name, const char* index_name, bool is_key, DB_TXN* txn, bool is_delete); int truncate_dictionary( uint keynr, DB_TXN* txn ); int create_secondary_dictionary( const char* name, TABLE* form, KEY* key_info, DB_TXN* txn, KEY_AND_COL_INFO* kc_info, uint32_t keynr, bool is_hot_index, toku_compression_method compression_method ); int create_main_dictionary(const char* name, TABLE* form, DB_TXN* txn, KEY_AND_COL_INFO* kc_info, toku_compression_method compression_method); void trace_create_table_info(const char *name, TABLE * form); int is_index_unique(bool* is_unique, DB_TXN* txn, DB* db, KEY* key_info, int lock_flags); int is_val_unique(bool* is_unique, uchar* record, KEY* key_info, uint dict_index, DB_TXN* txn); int do_uniqueness_checks(uchar* record, DB_TXN* txn, THD* thd); void set_main_dict_put_flags(THD* thd, bool opt_eligible, uint32_t* put_flags); int insert_row_to_main_dictionary(uchar* record, DBT* pk_key, DBT* pk_val, DB_TXN* txn); int insert_rows_to_dictionaries_mult(DBT* pk_key, DBT* pk_val, DB_TXN* txn, THD* thd); void test_row_packing(uchar* record, DBT* pk_key, DBT* pk_val); uint32_t fill_row_mutator( uchar* buf, uint32_t* dropped_columns, uint32_t num_dropped_columns, TABLE* altered_table, KEY_AND_COL_INFO* altered_kc_info, uint32_t keynr, bool is_add ); // 0 <= active_index < table_share->keys || active_index == MAX_KEY // tokudb_active_index = active_index if active_index < table_share->keys, else tokudb_active_index = primary_key = table_share->keys uint tokudb_active_index; public: ha_tokudb(handlerton * hton, TABLE_SHARE * table_arg); ~ha_tokudb(); const char *table_type() const; const char *index_type(uint inx); const char **bas_ext() const; // // Returns a bit mask of capabilities of storage engine. Capabilities // defined in sql/handler.h // ulonglong table_flags(void) const; ulong index_flags(uint inx, uint part, bool all_parts) const; // // Returns limit on the number of keys imposed by tokudb. // uint max_supported_keys() const { return MAX_KEY; } uint extra_rec_buf_length() const { return TOKUDB_HIDDEN_PRIMARY_KEY_LENGTH; } ha_rows estimate_rows_upper_bound(); // // Returns the limit on the key length imposed by tokudb. // uint max_supported_key_length() const { return UINT_MAX32; } // // Returns limit on key part length imposed by tokudb. // uint max_supported_key_part_length() const { return UINT_MAX32; } const key_map *keys_to_use_for_scanning() { return &key_map_full; } double scan_time(); double read_time(uint index, uint ranges, ha_rows rows); // Defined in mariadb double keyread_time(uint index, uint ranges, ha_rows rows); // Defined in mysql 5.6 double index_only_read_time(uint keynr, double records); int open(const char *name, int mode, uint test_if_locked); int close(void); void update_create_info(HA_CREATE_INFO* create_info); int create(const char *name, TABLE * form, HA_CREATE_INFO * create_info); int delete_table(const char *name); int rename_table(const char *from, const char *to); int optimize(THD * thd, HA_CHECK_OPT * check_opt); int analyze(THD * thd, HA_CHECK_OPT * check_opt); int write_row(uchar * buf); int update_row(const uchar * old_data, uchar * new_data); int delete_row(const uchar * buf); #if MYSQL_VERSION_ID >= 100000 void start_bulk_insert(ha_rows rows, uint flags); #else void start_bulk_insert(ha_rows rows); #endif int end_bulk_insert(); int end_bulk_insert(bool abort); int prepare_index_scan(); int prepare_index_key_scan( const uchar * key, uint key_len ); int prepare_range_scan( const key_range *start_key, const key_range *end_key); void column_bitmaps_signal(); int index_init(uint index, bool sorted); int index_end(); int index_next_same(uchar * buf, const uchar * key, uint keylen); int index_read(uchar * buf, const uchar * key, uint key_len, enum ha_rkey_function find_flag); int index_read_last(uchar * buf, const uchar * key, uint key_len); int index_next(uchar * buf); int index_prev(uchar * buf); int index_first(uchar * buf); int index_last(uchar * buf); int rnd_init(bool scan); int rnd_end(); int rnd_next(uchar * buf); int rnd_pos(uchar * buf, uchar * pos); int read_range_first(const key_range *start_key, const key_range *end_key, bool eq_range, bool sorted); int read_range_next(); void position(const uchar * record); int info(uint); int extra(enum ha_extra_function operation); int reset(void); int external_lock(THD * thd, int lock_type); int start_stmt(THD * thd, thr_lock_type lock_type); ha_rows records_in_range(uint inx, key_range * min_key, key_range * max_key); uint32_t get_cursor_isolation_flags(enum thr_lock_type lock_type, THD* thd); THR_LOCK_DATA **store_lock(THD * thd, THR_LOCK_DATA ** to, enum thr_lock_type lock_type); int get_status(DB_TXN* trans); void init_hidden_prim_key_info(DB_TXN *txn); inline void get_auto_primary_key(uchar * to) { tokudb_pthread_mutex_lock(&share->mutex); share->auto_ident++; hpk_num_to_char(to, share->auto_ident); tokudb_pthread_mutex_unlock(&share->mutex); } virtual void get_auto_increment(ulonglong offset, ulonglong increment, ulonglong nb_desired_values, ulonglong * first_value, ulonglong * nb_reserved_values); bool is_optimize_blocking(); bool is_auto_inc_singleton(); void print_error(int error, myf errflag); uint8 table_cache_type() { return HA_CACHE_TBL_TRANSACT; } bool primary_key_is_clustered() { return true; } bool supports_clustered_keys() { return true; } int cmp_ref(const uchar * ref1, const uchar * ref2); bool check_if_incompatible_data(HA_CREATE_INFO * info, uint table_changes); #ifdef MARIADB_BASE_VERSION // MariaDB MRR introduced in 5.5, API changed in MariaDB 10.0 #if MYSQL_VERSION_ID >= 100000 #define COST_VECT Cost_estimate #endif int multi_range_read_init(RANGE_SEQ_IF* seq, void* seq_init_param, uint n_ranges, uint mode, HANDLER_BUFFER *buf); int multi_range_read_next(range_id_t *range_info); ha_rows multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq, void *seq_init_param, uint n_ranges, uint *bufsz, uint *flags, COST_VECT *cost); ha_rows multi_range_read_info(uint keyno, uint n_ranges, uint keys, uint key_parts, uint *bufsz, uint *flags, COST_VECT *cost); int multi_range_read_explain_info(uint mrr_mode, char *str, size_t size); #else // MySQL MRR introduced in 5.6 #if 50600 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699 int multi_range_read_init(RANGE_SEQ_IF *seq, void *seq_init_param, uint n_ranges, uint mode, HANDLER_BUFFER *buf); int multi_range_read_next(char **range_info); ha_rows multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq, void *seq_init_param, uint n_ranges, uint *bufsz, uint *flags, Cost_estimate *cost); ha_rows multi_range_read_info(uint keyno, uint n_ranges, uint keys, uint *bufsz, uint *flags, Cost_estimate *cost); #endif #endif // ICP introduced in MariaDB 5.5 Item* idx_cond_push(uint keyno, class Item* idx_cond); #if TOKU_INCLUDE_ALTER_56 public: enum_alter_inplace_result check_if_supported_inplace_alter(TABLE *altered_table, Alter_inplace_info *ha_alter_info); bool prepare_inplace_alter_table(TABLE *altered_table, Alter_inplace_info *ha_alter_info); bool inplace_alter_table(TABLE *altered_table, Alter_inplace_info *ha_alter_info); bool commit_inplace_alter_table(TABLE *altered_table, Alter_inplace_info *ha_alter_info, bool commit); private: int alter_table_add_index(TABLE *altered_table, Alter_inplace_info *ha_alter_info); int alter_table_drop_index(TABLE *altered_table, Alter_inplace_info *ha_alter_info); int alter_table_add_or_drop_column(TABLE *altered_table, Alter_inplace_info *ha_alter_info); int alter_table_expand_varchar_offsets(TABLE *altered_table, Alter_inplace_info *ha_alter_info); int alter_table_expand_columns(TABLE *altered_table, Alter_inplace_info *ha_alter_info); int alter_table_expand_one_column(TABLE *altered_table, Alter_inplace_info *ha_alter_info, int expand_field_num); int alter_table_expand_blobs(TABLE *altered_table, Alter_inplace_info *ha_alter_info); void print_alter_info(TABLE *altered_table, Alter_inplace_info *ha_alter_info); int setup_kc_info(TABLE *altered_table, KEY_AND_COL_INFO *kc_info); int new_row_descriptor(TABLE *table, TABLE *altered_table, Alter_inplace_info *ha_alter_info, uint32_t idx, DBT *row_descriptor); public: #endif #if TOKU_INCLUDE_ALTER_55 public: // Returns true of the 5.6 inplace alter table interface is used. bool try_hot_alter_table(); // Used by the partition storage engine to provide new frm data for the table. int new_alter_table_frm_data(const uchar *frm_data, size_t frm_len); #endif private: int tokudb_add_index( TABLE *table_arg, KEY *key_info, uint num_of_keys, DB_TXN* txn, bool* inc_num_DBs, bool* modified_DB ); void restore_add_index(TABLE* table_arg, uint num_of_keys, bool incremented_numDBs, bool modified_DBs); int drop_indexes(TABLE *table_arg, uint *key_num, uint num_of_keys, KEY *key_info, DB_TXN* txn); void restore_drop_indexes(TABLE *table_arg, uint *key_num, uint num_of_keys); public: // delete all rows from the table // effect: all dictionaries, including the main and indexes, should be empty int discard_or_import_tablespace(my_bool discard); int truncate(); int delete_all_rows(); void extract_hidden_primary_key(uint keynr, DBT const *found_key); void read_key_only(uchar * buf, uint keynr, DBT const *found_key); int read_row_callback (uchar * buf, uint keynr, DBT const *row, DBT const *found_key); int read_primary_key(uchar * buf, uint keynr, DBT const *row, DBT const *found_key); int unpack_blobs( uchar* record, const uchar* from_tokudb_blob, uint32_t num_blob_bytes, bool check_bitmap ); int unpack_row( uchar* record, DBT const *row, DBT const *key, uint index ); int prefix_cmp_dbts( uint keynr, const DBT* first_key, const DBT* second_key) { return tokudb_prefix_cmp_dbt_key(share->key_file[keynr], first_key, second_key); } void track_progress(THD* thd); void set_loader_error(int err); void set_dup_value_for_pk(DBT* key); // // index into key_file that holds DB* that is indexed on // the primary_key. this->key_file[primary_index] == this->file // uint primary_key; int check(THD *thd, HA_CHECK_OPT *check_opt); int fill_range_query_buf( bool need_val, DBT const *key, DBT const *row, int direction, THD* thd, uchar* buf, DBT* key_to_compare ); #if TOKU_INCLUDE_ROW_TYPE_COMPRESSION enum row_type get_row_type() const; #endif private: int read_full_row(uchar * buf); int __close(); int get_next(uchar* buf, int direction, DBT* key_to_compare, bool do_key_read); int read_data_from_range_query_buff(uchar* buf, bool need_val, bool do_key_read); // for ICP, only in MariaDB and MySQL 5.6 #if defined(MARIADB_BASE_VERSION) || (50600 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699) enum icp_result toku_handler_index_cond_check(Item* pushed_idx_cond); #endif void invalidate_bulk_fetch(); void invalidate_icp(); int delete_all_rows_internal(); void close_dsmrr(); void reset_dsmrr(); #if TOKU_INCLUDE_WRITE_FRM_DATA int write_frm_data(const uchar *frm_data, size_t frm_len); #endif #if TOKU_INCLUDE_UPSERT private: int fast_update(THD *thd, List<Item> &update_fields, List<Item> &update_values, Item *conds); bool check_fast_update(THD *thd, List<Item> &update_fields, List<Item> &update_values, Item *conds); int send_update_message(List<Item> &update_fields, List<Item> &update_values, Item *conds, DB_TXN *txn); int upsert(THD *thd, List<Item> &update_fields, List<Item> &update_values); bool check_upsert(THD *thd, List<Item> &update_fields, List<Item> &update_values); int send_upsert_message(THD *thd, List<Item> &update_fields, List<Item> &update_values, DB_TXN *txn); #endif public: // mysql sometimes retires a txn before a cursor that references the txn is closed. // for example, commit is sometimes called before index_end. the following methods // put the handler on a list of handlers that get cleaned up when the txn is retired. void cleanup_txn(DB_TXN *txn); private: LIST trx_handler_list; void add_to_trx_handler_list(); void remove_from_trx_handler_list(); private: int do_optimize(THD *thd); int map_to_handler_error(int error); public: void rpl_before_write_rows(); void rpl_after_write_rows(); void rpl_before_delete_rows(); void rpl_after_delete_rows(); void rpl_before_update_rows(); void rpl_after_update_rows(); bool rpl_lookup_rows(); private: bool in_rpl_write_rows; bool in_rpl_delete_rows; bool in_rpl_update_rows; }; #if TOKU_INCLUDE_OPTION_STRUCTS struct ha_table_option_struct { uint row_format; }; struct ha_index_option_struct { bool clustering; }; static inline bool key_is_clustering(const KEY *key) { return (key->flags & HA_CLUSTERING) || (key->option_struct && key->option_struct->clustering); } #else static inline bool key_is_clustering(const KEY *key) { return key->flags & HA_CLUSTERING; } #endif #endif ```
```c++ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! #include "config.h" #include "V8HTMLSourceElement.h" #include "bindings/core/v8/ExceptionState.h" #include "bindings/core/v8/V8DOMConfiguration.h" #include "bindings/core/v8/V8ObjectConstructor.h" #include "core/HTMLNames.h" #include "core/dom/ContextFeatures.h" #include "core/dom/Document.h" #include "core/dom/custom/CustomElementProcessingStack.h" #include "platform/RuntimeEnabledFeatures.h" #include "platform/TraceEvent.h" #include "wtf/GetPtr.h" #include "wtf/RefPtr.h" namespace blink { // Suppress warning: global constructors, because struct WrapperTypeInfo is trivial // and does not depend on another global objects. #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wglobal-constructors" #endif const WrapperTypeInfo V8HTMLSourceElement::wrapperTypeInfo = { gin::kEmbedderBlink, V8HTMLSourceElement::domTemplate, V8HTMLSourceElement::refObject, V8HTMLSourceElement::derefObject, V8HTMLSourceElement::trace, 0, 0, V8HTMLSourceElement::preparePrototypeObject, V8HTMLSourceElement::installConditionallyEnabledProperties, "HTMLSourceElement", &V8HTMLElement::wrapperTypeInfo, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::NodeClassId, WrapperTypeInfo::InheritFromEventTarget, WrapperTypeInfo::Dependent, WrapperTypeInfo::WillBeGarbageCollectedObject }; #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) #pragma clang diagnostic pop #endif // This static member must be declared by DEFINE_WRAPPERTYPEINFO in HTMLSourceElement.h. // For details, see the comment of DEFINE_WRAPPERTYPEINFO in // bindings/core/v8/ScriptWrappable.h. const WrapperTypeInfo& HTMLSourceElement::s_wrapperTypeInfo = V8HTMLSourceElement::wrapperTypeInfo; namespace HTMLSourceElementV8Internal { static void srcAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { v8::Local<v8::Object> holder = info.Holder(); HTMLSourceElement* impl = V8HTMLSourceElement::toImpl(holder); v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::srcAttr), info.GetIsolate()); } static void srcAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); HTMLSourceElementV8Internal::srcAttributeGetter(info); TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); } static void srcAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { v8::Local<v8::Object> holder = info.Holder(); Element* impl = V8Element::toImpl(holder); V8StringResource<> cppValue = v8Value; if (!cppValue.prepare()) return; impl->setAttribute(HTMLNames::srcAttr, cppValue); } static void srcAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { v8::Local<v8::Value> v8Value = info[0]; TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; HTMLSourceElementV8Internal::srcAttributeSetter(v8Value, info); TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); } static void typeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { v8::Local<v8::Object> holder = info.Holder(); HTMLSourceElement* impl = V8HTMLSourceElement::toImpl(holder); v8SetReturnValueString(info, impl->type(), info.GetIsolate()); } static void typeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); HTMLSourceElementV8Internal::typeAttributeGetter(info); TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); } static void typeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { v8::Local<v8::Object> holder = info.Holder(); HTMLSourceElement* impl = V8HTMLSourceElement::toImpl(holder); V8StringResource<> cppValue = v8Value; if (!cppValue.prepare()) return; impl->setType(cppValue); } static void typeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { v8::Local<v8::Value> v8Value = info[0]; TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); HTMLSourceElementV8Internal::typeAttributeSetter(v8Value, info); TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); } static void srcsetAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { v8::Local<v8::Object> holder = info.Holder(); Element* impl = V8Element::toImpl(holder); v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::srcsetAttr), info.GetIsolate()); } static void srcsetAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); HTMLSourceElementV8Internal::srcsetAttributeGetter(info); TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); } static void srcsetAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { v8::Local<v8::Object> holder = info.Holder(); Element* impl = V8Element::toImpl(holder); V8StringResource<> cppValue = v8Value; if (!cppValue.prepare()) return; impl->setAttribute(HTMLNames::srcsetAttr, cppValue); } static void srcsetAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { v8::Local<v8::Value> v8Value = info[0]; TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; HTMLSourceElementV8Internal::srcsetAttributeSetter(v8Value, info); TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); } static void sizesAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { v8::Local<v8::Object> holder = info.Holder(); Element* impl = V8Element::toImpl(holder); v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::sizesAttr), info.GetIsolate()); } static void sizesAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); HTMLSourceElementV8Internal::sizesAttributeGetter(info); TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); } static void sizesAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { v8::Local<v8::Object> holder = info.Holder(); Element* impl = V8Element::toImpl(holder); V8StringResource<> cppValue = v8Value; if (!cppValue.prepare()) return; impl->setAttribute(HTMLNames::sizesAttr, cppValue); } static void sizesAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { v8::Local<v8::Value> v8Value = info[0]; TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; HTMLSourceElementV8Internal::sizesAttributeSetter(v8Value, info); TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); } static void mediaAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { v8::Local<v8::Object> holder = info.Holder(); Element* impl = V8Element::toImpl(holder); v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::mediaAttr), info.GetIsolate()); } static void mediaAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); HTMLSourceElementV8Internal::mediaAttributeGetter(info); TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); } static void mediaAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { v8::Local<v8::Object> holder = info.Holder(); Element* impl = V8Element::toImpl(holder); V8StringResource<> cppValue = v8Value; if (!cppValue.prepare()) return; impl->setAttribute(HTMLNames::mediaAttr, cppValue); } static void mediaAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { v8::Local<v8::Value> v8Value = info[0]; TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; HTMLSourceElementV8Internal::mediaAttributeSetter(v8Value, info); TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); } } // namespace HTMLSourceElementV8Internal static const V8DOMConfiguration::AccessorConfiguration V8HTMLSourceElementAccessors[] = { {"src", HTMLSourceElementV8Internal::srcAttributeGetterCallback, HTMLSourceElementV8Internal::srcAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, {"type", HTMLSourceElementV8Internal::typeAttributeGetterCallback, HTMLSourceElementV8Internal::typeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, {"srcset", HTMLSourceElementV8Internal::srcsetAttributeGetterCallback, HTMLSourceElementV8Internal::srcsetAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, {"sizes", HTMLSourceElementV8Internal::sizesAttributeGetterCallback, HTMLSourceElementV8Internal::sizesAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, {"media", HTMLSourceElementV8Internal::mediaAttributeGetterCallback, HTMLSourceElementV8Internal::mediaAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; static void installV8HTMLSourceElementTemplate(v8::Local<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate) { functionTemplate->ReadOnlyPrototype(); v8::Local<v8::Signature> defaultSignature; if (!RuntimeEnabledFeatures::mediaEnabled()) defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "HTMLSourceElement", V8HTMLElement::domTemplate(isolate), V8HTMLSourceElement::internalFieldCount, 0, 0, 0, 0, 0, 0); else defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "HTMLSourceElement", V8HTMLElement::domTemplate(isolate), V8HTMLSourceElement::internalFieldCount, 0, 0, V8HTMLSourceElementAccessors, WTF_ARRAY_LENGTH(V8HTMLSourceElementAccessors), 0, 0); v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceTemplate(); ALLOW_UNUSED_LOCAL(instanceTemplate); v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->PrototypeTemplate(); ALLOW_UNUSED_LOCAL(prototypeTemplate); // Custom toString template #if V8_MAJOR_VERSION < 7 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData::from(isolate)->toStringTemplate()); #endif } v8::Local<v8::FunctionTemplate> V8HTMLSourceElement::domTemplate(v8::Isolate* isolate) { return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8HTMLSourceElementTemplate); } bool V8HTMLSourceElement::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) { return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value); } v8::Local<v8::Object> V8HTMLSourceElement::findInstanceInPrototypeChain(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) { return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperTypeInfo, v8Value); } HTMLSourceElement* V8HTMLSourceElement::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) { return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)) : 0; } void V8HTMLSourceElement::refObject(ScriptWrappable* scriptWrappable) { #if !ENABLE(OILPAN) scriptWrappable->toImpl<HTMLSourceElement>()->ref(); #endif } void V8HTMLSourceElement::derefObject(ScriptWrappable* scriptWrappable) { #if !ENABLE(OILPAN) scriptWrappable->toImpl<HTMLSourceElement>()->deref(); #endif } } // namespace blink ```
The chowchilla (Orthonyx spaldingii) is a passerine bird in the family Orthonychidae. It is endemic to Australia. Taxonomy In their 1999 study, Schodde and Mason recognise two adjoining subspecies, O. s. spaldingii and O. s. melasmenus with a zone of intergradation. Description Unmistakable thrush-like, ground-dwelling, birds. Males and females largely dark brown with white eye-ring, tail-feather shafts extend as spines beyond feather-vanes; males with white throat, breast and belly; females with bright rufous throat and upper breast, white lower breast and belly. Distribution and habitat The chowchilla is restricted to upland and lowland tropical rainforests of north-eastern Queensland. Behaviour Diet Mainly invertebrates, but also small vertebrates. Voice Continuous chattering, singing and other complex vocalisations. Breeding Nests on or near ground, often on ferns, stumps or logs. Builds a bulky, dome-shaped stick-nest with a clutch of one, possibly sometimes two, white eggs. Gallery References BirdLife International. (2007). Species factsheet: Orthonyx spaldingii. Downloaded from on 9 August 2007 Higgins, P.J.; & Peter, J.M. (eds). (2003). Handbook of Australian, New Zealand and Antarctic Birds. Volume 6: Pardalotes to Shrike-thrushes. Oxford University Press: Melbourne. External links Image at ADW Orthonyx Birds of Cape York Peninsula Endemic birds of Australia Birds described in 1868
Franz von Hatzfeld (13 September 1596 – 30 July 1642) was the Prince-Bishop of Würzburg from 1631 to 1642 and the Prince-Bishop of Bamberg from 1633 to 1642. Franz von Hatzfeld was born in Crottorf, near Friesenhagen, on 13 September 1596, the third son of Freiherr Sebastian von Hatzfeld-Wildenburg (1566-1631) and his wife Lucia von Sickingen (1569–1605), a granddaughter of Franz von Sickingen. His elder brother was Melchior von Hatzfeldt, Imperial field marshal. His father had been raised a Protestant, but converted to Roman Catholicism. In 1615, he became a canon of Würzburg Cathedral and, two years later, of Bamberg Cathedral. At age thirty, he became head cantor of Bamberg Cathedral, and the next year, became diocesan administrator of Würzburg. He then served as provost of the Gangolfskirche in Bamberg. The cathedral chapter of Würzburg Cathedral elected him Prince-Bishop of Würzburg on 7 August 1631, with Pope Urban VIII confirming his appointment on 3 January 1632. With the Thirty Years' War raging, Swedish troops occupied the Prince-Bishopric of Bamberg and Franz von Hatzfeld fled to Cologne as a protective measure. On 20 June 1633 Lord High Chancellor of Sweden Axel Oxenstierna declared that the Prince-Bishopric of Bamberg and the Prince-Bishopric of Würzburg would henceforth be combined as the "Duchy of Franconia" and enfeoffed to Bernard of Saxe-Weimar. On 4 August 1633 the cathedral chapter of Bamberg Cathedral (which had escaped to the Duchy of Carinthia) elected Franz von Hatzfeld Prince-Bishop of Bamberg, with Pope Urban VIII confirming this appointment on 31 October 1633. This created a personal union between the Prince-Bishopric of Würzburg and the Prince-Bishopric of Bamberg. Following the Battle of Nördlingen of 5–6 September 1634, Franz von Hatzfeld ended his Cologne exile, returning to Würzburg in November 1634, accompanied by the troops of Philipp von Mansfeld. He died of a stroke in Würzburg on 30 July 1642. References 1596 births 1642 deaths Prince-Bishops of Würzburg Prince-Bishops of Bamberg House of Hatzfeld
```go //go:build freebsd && arm64 // +build freebsd,arm64 // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs disk/types_freebsd.go package disk const ( sizeofPtr = 0x8 sizeofShort = 0x2 sizeofInt = 0x4 sizeofLong = 0x8 sizeofLongLong = 0x8 sizeofLongDouble = 0x8 devstat_NO_DATA = 0x00 devstat_READ = 0x01 devstat_WRITE = 0x02 devstat_FREE = 0x03 ) const ( sizeOfdevstat = 0x120 ) type ( _C_short int16 _C_int int32 _C_long int64 _C_long_long int64 _C_long_double int64 ) type devstat struct { Sequence0 uint32 Allocated int32 Start_count uint32 End_count uint32 Busy_from bintime Dev_links _Ctype_struct___0 Device_number uint32 Device_name [16]int8 Unit_number int32 Bytes [4]uint64 Operations [4]uint64 Duration [4]bintime Busy_time bintime Creation_time bintime Block_size uint32 Tag_types [3]uint64 Flags uint32 Device_type uint32 Priority uint32 Id *byte Sequence1 uint32 Pad_cgo_0 [4]byte } type bintime struct { Sec int64 Frac uint64 } type _Ctype_struct___0 struct { Empty uint64 } ```
```scala /* */ package akka.stream.alpakka.googlecloud.pubsub.grpc.scaladsl import akka.actor.Cancellable import akka.dispatch.ExecutionContexts import akka.stream.{Attributes, Materializer} import akka.stream.scaladsl.{Flow, Keep, Sink, Source} import akka.{Done, NotUsed} import com.google.pubsub.v1.pubsub._ import scala.concurrent.duration._ import scala.concurrent.{Future, Promise} /** * Google Pub/Sub Akka Stream operator factory. */ object GooglePubSub { /** * Create a flow to publish messages to Google Cloud Pub/Sub. The flow emits responses that contain published * message ids. * * @param parallelism controls how many messages can be in-flight at any given time */ def publish(parallelism: Int): Flow[PublishRequest, PublishResponse, NotUsed] = Flow .fromMaterializer { (mat, attr) => Flow[PublishRequest] .mapAsyncUnordered(parallelism)(publisher(mat, attr).client.publish) } .mapMaterializedValue(_ => NotUsed) /** * Create a source that emits messages for a given subscription using a StreamingPullRequest. * * The materialized value can be used to cancel the source. * * @param request the subscription FQRS and ack deadline fields are mandatory for the request * @param pollInterval time between StreamingPullRequest messages are being sent */ def subscribe( request: StreamingPullRequest, pollInterval: FiniteDuration ): Source[ReceivedMessage, Future[Cancellable]] = Source .fromMaterializer { (mat, attr) => val cancellable = Promise[Cancellable]() val subsequentRequest = request .withSubscription("") .withStreamAckDeadlineSeconds(0) subscriber(mat, attr).client .streamingPull( Source .single(request) .concat( Source .tick(0.seconds, pollInterval, ()) .map(_ => subsequentRequest) .mapMaterializedValue(cancellable.success) ) ) .mapConcat(_.receivedMessages.toVector) .mapMaterializedValue(_ => cancellable.future) } .mapMaterializedValue(_.flatMap(identity)(ExecutionContexts.parasitic)) /** * Create a source that emits messages for a given subscription using a synchronous PullRequest. * * The materialized value can be used to cancel the source. * * @param request the subscription FQRS field is mandatory for the request * @param pollInterval time between PullRequest messages are being sent */ def subscribePolling( request: PullRequest, pollInterval: FiniteDuration ): Source[ReceivedMessage, Future[Cancellable]] = Source .fromMaterializer { (mat, attr) => val cancellable = Promise[Cancellable]() val client = subscriber(mat, attr).client Source .tick(0.seconds, pollInterval, request) .mapMaterializedValue(cancellable.success) .mapAsync(1)(client.pull(_)) .mapConcat(_.receivedMessages.toVector) .mapMaterializedValue(_ => cancellable.future) } .mapMaterializedValue(_.flatMap(identity)(ExecutionContexts.parasitic)) /** * Create a flow that accepts consumed message acknowledgements. */ def acknowledgeFlow(): Flow[AcknowledgeRequest, AcknowledgeRequest, NotUsed] = Flow .fromMaterializer { (mat, attr) => Flow[AcknowledgeRequest] .mapAsync(1)( req => subscriber(mat, attr).client .acknowledge(req) .map(_ => req)(mat.executionContext) ) } .mapMaterializedValue(_ => NotUsed) /** * Create a sink that accepts consumed message acknowledgements. * * The materialized value completes on stream completion. * * @param parallelism controls how many acknowledgements can be in-flight at any given time */ def acknowledge(parallelism: Int): Sink[AcknowledgeRequest, Future[Done]] = { Sink .fromMaterializer { (mat, attr) => Flow[AcknowledgeRequest] .mapAsyncUnordered(parallelism)(subscriber(mat, attr).client.acknowledge) .toMat(Sink.ignore)(Keep.right) } .mapMaterializedValue(_.flatMap(identity)(ExecutionContexts.parasitic)) } private def publisher(mat: Materializer, attr: Attributes) = attr .get[PubSubAttributes.Publisher] .map(_.publisher) .getOrElse(GrpcPublisherExt()(mat.system).publisher) private def subscriber(mat: Materializer, attr: Attributes) = attr .get[PubSubAttributes.Subscriber] .map(_.subscriber) .getOrElse(GrpcSubscriberExt()(mat.system).subscriber) } ```
Samella Sanders Lewis (February 27, 1923 – May 27, 2022) was an American visual artist and art historian. She worked primarily as a printmaker and painter. She has been called the "Godmother of African American Art". She received Distinguished Artist Award for Lifetime Achievement from the College Art Association (CAA) in 2021. “Art is not a luxury as many people think – it is a necessity.  It documents history – it helps educate people and stores knowledge for generations to come.” – Dr. Samella Lewis Early life and background Samella Sanders was born to Samuel Sanders and Rachel Taylor Sanders in New Orleans, Louisiana, on February 27, 1923, and raised in Ponchatoula, Louisiana. Her father worked as a farmer and mother along other jobs worked as a domestic worker. Widely exhibited and collected as an artist herself, Lewis was better known as a historian, critic, and collector of art, especially African-American art. Lewis completed four degrees, five films, seven books, and a substantial body of artworks which have received critical respect. She pursued an art degree starting off at Dillard University in 1941, but left Dillard for Hampton Institute in Virginia, earning her master's degree in 1947. She earned her B.A. degree at Hampton University, then completed her master and doctorate in art history and cultural anthropology at the Ohio State University in 1951. Lewis was the first female African American to earn a doctorate in fine art and art history. While finishing her doctorate, Lewis taught art at Morgan State University. Lewis became the first Chair of the Fine Arts Department at Florida A&M University in 1953; that same year Lewis also became the first African American to convene the National conference of African American artists held at Florida A&M University. She was a professor at the State University of New York, California State University, Long Beach, and at Scripps College in Claremont, California. She co-founded, with Bernie Casey, the Contemporary Crafts Gallery in Los Angeles in 1970. In 1973, she served on the selection committee for the exhibition BLACKS: USA: 1973 held at the New York Cultural Center. Lewis's grandson is Bay Area artist and musician Unity Lewis. He plans to create a contemporary version of Samella Lewis's catalog Black Artists on Art, which featured black artists not typically showcased in mainstream art galleries and sold thousands of copies. "I wanted to make a chronology of African American artists, and artists of African descent, to document our history. The historians weren't doing it. I felt it better the artists do it anyway, through pictorial and written information… It was really about the movement," Samella Lewis said of the book published in 1969 and 1971. In 1960-70s, Samella Lewis belonged to a group of artists that would meet every month. Lewis began collecting art in 1942. She mostly collected art from WPA and the Harlem Renaissance. Career In the 1960s and 1970s Lewis's work, which includes lithographs, linocuts, and serigraphs, reflected humanity and freedom. Between 1969 and 1970, Lewis and E.J. Montgomery were consultants for a "groundbreaking" exhibition creating awareness to the history of African American history and art. Lewis was the founder of the International Review of African American Art in 1975. In 1976, she founded the Museum of African-American Art with a group of artistic, academic, business and community leaders in Los Angeles, California. These founders had similar goals, including increasing the public's awareness of African American art. Many individuals and corporations, such as Macy's, made generous donations to the museum. Lewis, as the staff's senior curator in the museum, not only organized a great number of exhibitions but also developed diverse ways of educating the public on African American arts. In an article, she discussed the ideas of "art of tradition", and argued that museums had the responsibility to explore the African roots of African American art. The museum operates on donations in the Baldwin Hills Crenshaw Plaza with staff and volunteers who are dedicated to supporting the museum. Lewis once mentioned an "art of inspiration" based on the experiences of African Americans themselves. Lewis founded three other museums in the Los Angeles, California. Lewis was an NAACP member, and a collector of art with her collection including African, Chinese, Asian, South American, and other works. Some of the art that Lewis collected was transferred to the Hampton Institute, now the University Museum. In 1984, she produced a monograph on the artist Elizabeth Catlett, who had been one of Lewis's mentors at Dillard University. In 2012, works by Lewis were exhibited alongside selected artworks from her personal collection in Samella Lewis and the African American Experience at Louis Stern Fine Arts in West Hollywood, California. The exhibition was accompanied by a full-color catalogue with text by art writer and critic Suzanne Muchnic. In 2015, Unity Lewis and art entrepreneur Trevor Parham created The Legacy Exhibit, which featured three generations of black fine artists, including contemporary artists as well as some included in the original "Black Artists on Art." The show launched their recruitment efforts for 500 black American artists to participate in the updated volumes. Personal life and death Lewis married mathematician Paul Gad Lewis in 1948 and they had two sons. He died in 2013. She died from renal failure in a hospice in Torrance, California, on May 27, 2022, at the age of 99. Exhibitions 1969: Samella Lewis and George Clack, Brockman Gallery, Los Angeles 1980: Solo Exhibition, University Union Gallery, California Polytechnic State University, Pomona, California 1980: Smithsonian Institution traveling exhibition, United States and Canada 1981: Solo exhibition, Pasadena City College, Pasadena, California 1981: Solo exhibition, University of California, San Diego 1984: African American Art in Atlanta, Public and Corporate Collections, High Museum of Art, Atlanta, Georgia 1984: Solo exhibition, Museum of African American Art, Los Angeles, California 2011: Now Dig This!: Art and Black Los Angeles 1960–1980, Hammer Museum, Los Angeles, California 2012: Samella Lewis and the African American Experience, Louis Stern Fine Arts, West Hollywood, California Awards and recognition 1962: Fulbright Fellowship to study Asian culture at First Institute of Chinese Civilization and Tung Mai University, Taiwan 1964-65: National Defense Education Act postdoctoral fellow at University of Southern California, studying Chinese language and Asian civilization 1993: Charles White lifetime Achievement Award 1995: UNICEF Award for the Visual Arts 1996-97: Named a Distinguished Scholar by the Getty Center for the History of Art and Humanities 2003: The History Maker Award 2004: Special Day Recognition Award for Outstanding Contributions from the City of New Orleans 2005: Alumni Association Award from the Ohio State University 2021: Distinguished Artist Award for Lifetime Achievement from the College Art Association References Further reading Lewis, Samella S. African American art and artists (Berkeley, CA: University of California Press, 1990), ; ; ; Samella S. Lewis; Ruth G. Waddy. Black Artists on Art (Los Angeles, CA: Contemporary Crafts Publishers, 1969), External links University of Delaware: Paul R. Jones Collection African American Museum of Dallas Tilford Art Group Stuart A. Rose Manuscript, Archives, and Rare Book Library, Emory University: Samella S. Lewis papers, 1930-2010 Louis Stern Fine Arts 1923 births 2022 deaths 20th-century American women artists American art historians American women printmakers Artists from New Orleans Hampton University alumni Ohio State University Graduate School alumni Women art historians 20th-century American printmakers 21st-century American women artists American women historians African-American art dealers American art dealers Women art dealers African-American printmakers Historians from Louisiana 20th-century African-American women 20th-century African-American artists 21st-century African-American women 21st-century African-American artists American women curators
```javascript /** * @license Apache-2.0 * * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ 'use strict'; // MODULES // var tape = require( 'tape' ); var ndarray = require( '@stdlib/ndarray/ctor' ); var noop = require( '@stdlib/utils/noop' ); var Complex128Array = require( '@stdlib/array/complex128' ); var isComplex128MatrixLike = require( './../lib' ); // TESTS // tape( 'main export is a function', function test( t ) { t.ok( true, __filename ); t.strictEqual( typeof isComplex128MatrixLike, 'function', 'main export is a function' ); t.end(); }); tape( 'the function returns `true` if provided a 2-dimensional ndarray containing double-precision complex floating-point numbers', function test( t ) { var arr = ndarray( 'complex128', new Complex128Array( [ 0, 0, 0, 0, 0, 0, 0, 0 ] ), [ 2, 2 ], [ 2, 1 ], 0, 'row-major' ); t.equal( isComplex128MatrixLike( arr ), true, 'returns true' ); t.end(); }); tape( 'the function returns `true` if provided a 2-dimensional ndarray-like object containing double-precision complex floating-point numbers', function test( t ) { var arr = { 'data': new Complex128Array( [ 0, 0, 0, 0, 0, 0, 0, 0 ] ), 'shape': [ 2, 2 ], 'strides': [ 2, 1 ], 'offset': 0, 'order': 'row-major', 'ndims': 2, 'dtype': 'complex128', 'length': 4, 'flags': {}, 'get': noop, 'set': noop }; t.equal( isComplex128MatrixLike( arr ), true, 'returns true' ); t.end(); }); tape( 'the function returns `false` if not provided a 2-dimensional ndarray-like object containing double-precision complex floating-point numbers', function test( t ) { var values; var arr1; var arr2; var i; arr1 = ndarray( 'complex128', new Complex128Array( [ 0, 0, 0, 0, 0, 0 ] ), [ 3, 1, 1 ], [ 1, 1, 1 ], 0, 'row-major' ); arr2 = ndarray( 'generic', [ 0, 0, 0, 0, 0, 0, 0, 0 ], [ 2, 2 ], [ 2, 1 ], 0, 'row-major' ); values = [ arr1, arr2, '5', 5, NaN, null, void 0, true, false, [], {}, function noop() {} ]; for ( i = 0; i < values.length; i++ ) { t.equal( isComplex128MatrixLike( values[i] ), false, 'returns false when provided '+values[i] ); } t.end(); }); ```
James M. Wahlberg (born August 19, 1965) is an American film producer and writer. Early life Wahlberg was born in Dorchester, a neighborhood of Boston, to Donald and Alma Elaine Wahlberg. He is the fifth of nine children, with siblings Arthur, Paul, Robert, Tracey, Michelle, Debbie, Donnie, and Mark. As a young person, Jim was in-and-out of juvenile detention centers and became briefly homeless when he was twelve years old. Throughout his teens, Wahlberg struggled with drug and alcohol addiction every day of his life and he lived essentially on his own. Wahlberg's criminal record grew to include arrests for public drunkenness and disorderly conduct which then led to two jail sentences before the age of twenty-two. While in prison after being convicted of armed robbery, Wahlberg found faith in God, and began to end his addiction to alcohol (which he had regularly consumed since he was eight) and drugs (which he had regularly consumed since he was ten). After exiting prison, he became an advocate for individuals suffering from addiction and hoped to help addicts escape the cycle of addiction. Career Film and television Wahlberg followed suit like brothers Mark and Donnie and entered the film industry through the creation of Wahl St. Productions, a film, television, and web content production company. Wahl St. Productions is credited for films such as The Circle of Addiction: A Different Kind of Tears (2018), If Only (2015), and What About the Kids? (2020). The films showcase the harsh realities of addiction and have featured family members of people who have died of an accidental overdose as extras and actors. What About the Kids? showed the effects of addiction through the lens of a child. Wahlberg's films and documentaries aim to dissolve the stigma of addiction and substance abuse. Walhberg is also known for being a personality on the A&E show "Wahlburgers" which took a deep dive into the lives and families behind the successful restaurant chain. A special episode featured Wahlberg as he successfully ran the Boston Marathon in tribute to those that lost their lives in the Boston Marathon Bombing a year prior. In 2015, an exclusive Wahlburgers episode aired the Festival of Families celebration in Philadelphia, where Jim and brothers Donnie and Mark met with Pope Francis, thus furthering Wahlberg's relationship with his faith. Wahlberg is an executive producer of The Lookalike starring Justin Long. He is credited as an executive producer on Wahl Street, a docu-series that aired in 2021 on HBO Max that followed his brother Mark Wahlberg's business interests. Jim was featured on the long-running Christian Broadcasting Network The 700 Club twice. Writing Wahlberg wrote his first book in August 2020, debuting his memoir The Big Hustle: A Boston Street Kid's Story of Addiction and Redemption. The book summarizes the struggles of his drug addiction and the redemption story of his faith. The memoir debuted to praise from critics for its brutal honesty and transparent storytelling and was sold out on Amazon in the first week. Jim Caviezel wrote the foreword to the book. Personal life Wahlberg married long-time girlfriend Bernarda aka Bennie in 1988. The couple live in South Florida and have three children: son Daniel Wahlberg (b.1997) and fraternal twins Jeff and Kyra (b.2001). Son Jeff is an actor and has appeared in films such as Dora and the Lost City of Gold (2019), Cherry (2021), and Future World (2018). Wahlberg is a devout Catholic; in an interview on The Catholic Talk Show, he gave all praise and credit to Jesus Christ, and the Catholic Church for his life. Wahlberg is also the host of The Bottom Line, a podcast that highlights the stories of individuals and their struggles and eventual breakthroughs with addiction. The show featured athletes and entertainers such as Darryl Strawberry, Chris Mullins, Brandon Novak, and many more. Wahlberg has been outspoken about the need for additional recovery and 12 step options during the COVID-19 pandemic. In October 2020, he wrote an opinion piece in USA Today about the dangers of isolation and addiction amid the pandemic. In an interview with Raymond Arroyo for Eternal Word Television Network, Wahlberg opens up about his history of crime, abuse, and meeting Mother Teresa while in prison; he states "It was the absolute most defining moment in my life, it's the moment that everything changed for me." Wahlberg currently serves as the executive director of the Mark Wahlberg Youth Foundation (MWYF) which was created to improve the quality of life for inner-city kids. Filmography The Lookalike If Only The Circle of Addiction: A Different Kind of Tears What About the Kids? Wahlburgers Wahl Street I Played the Giants on a Monday Night Toyed Instant Gratification A Feeling from Within References External links 1965 births Living people 20th-century American criminals 21st-century American male writers 21st-century American memoirists Activists from Florida Activists from Massachusetts American male criminals American people convicted of robbery Catholics from Florida Catholics from Massachusetts Criminals from Florida Criminals from Massachusetts Film directors from Florida Film directors from Massachusetts Homeless people People from Dorchester, Massachusetts Television producers from Massachusetts Jim Writers from Florida Writers from Massachusetts
NPS-2143 (SB-262,470A) is a calcilytic drug which acts as an antagonist at the Calcium-sensing receptor (CaSR), and consequently stimulates release of parathyroid hormone. Calcilytic drugs have been researched as potential treatments for osteoporosis, and as the first such compound developed, NPS-2143 is still widely used in research into the CaSR receptor as well as design of newer calcilytic agents. See also Cinacalcet References Calcilytics Amines Chloroarenes Nitriles
A multi-day period of significant tornado and severe weather activity occurred across the Southern United States (a rarity for that region during that time of year), Ohio Valley, and southern High Plains in mid-June 2023. Starting on June 14, tornadoes occurred in Texas, Alabama, and Georgia, where they caused large-scale damage to trees and structures. The tornado outbreak continued on June 15, where tornadoes occurred in five states, including one EF3 tornado which touched down in Perryton, Texas, causing three fatalities. More tornadoes touched down on June 16 in the southern and northeastern United States, including an unusual anticyclone tornado in Mobile and Baldwin counties in Alabama, where the tornado itself was associated with the anticyclonic bookend vortex of a powerful mesoscale convective system. More tornadoes occurred on June 17 and 18, including another EF3 tornado that struck Louin, Mississippi, inflicting widespread major damage, killing one person, and injuring twenty-five others. Multiple tornadoes affected Smith County, Mississippi as well. Meteorological synopsis On June 12, the Storm Prediction Center (SPC) issued a level 3/enhanced risk of severe weather for June 14 across the Mid-South and eastern Gulf Coast states, and also highlighted the threat for significant severe weather across the risk area. Mid-level atmospheric flow was beginning to become broadly confluent, while a low pressure system situated north of the Great Lakes began to weaken and move east. Higher moisture content was confined to the south of a remnant surface front, and convective instability increased in the risk area due to the eastward advection of warm elevated mixed-layer air across the Mississippi River Valley. A 5 percent tornado risk was introduced in the SPC's Day 2 outlook for June 14 across Mississippi, Alabama, and Georgia, and also included a 30 percent risk for wind and hail, which the latter included a significant threat. In the morning hours of June 14, the SPC upgraded the enhanced risk to a moderate risk, and included a significant 10 percent risk for tornadoes across southeastern Alabama and southwestern Georgia, as well as a significant 45 percent risk for wind and a significant 30 percent risk for hail across the southern United States. A few hours later, tornado watches were issued for Alabama and Georgia, and a Particularly dangerous situation severe thunderstorm watch was issued for northeastern Louisiana, southeastern Arkansas, and Mississippi. On June 15, the SPC released an outlook with a moderate risk of severe weather for portions of the High Plains. This outlook included a 10 percent risk for tornadoes along the panhandles of both Texas and Oklahoma. A shortwave trough began to move into the central U.S. Concurrently, an associated 80 kt upper-level jet moved into the southern plains. At the surface, a low area also deepened across the southern High Plains, the same area a prominent cold front was headed. Ahead of the front, surface heating and increasing low-level convergence promoted significant convection. From June 16–19, the same mid-level trough associated with previous storms continued to rotate around the Mid-Atlantic. Short-wave perturbations related to convergent air movement between a 50kt jet and the strong trough displayed signs of strong storms across the deep south, from Arkansas to Alabama. 3000 J/kg of CAPE was also present, promoting rapid intensification of storms in evening hours. Extreme instability led to unexpected and explosive storms along all dates, and multiple tornadoes produced, as well as very significant hail and wind damage. Confirmed tornadoes June 14 event June 15 event June 16 event June 17 event June 18 event June 19 event Non-tornadic effects Flash flooding in Pensacola, Florida, after a tornado in the area, resulted from of rain in five hours, and strong winds blew a tree into a house, killing one person. The flooding in Pensacola prompted a rare flash flood emergency. Rainfall totals in Gulf Breeze, Florida reached as high as of rain, and over 20,000 customers lost power in the county. Wind gusts reached up to . Late on June 15, severe storms resulted in power lines falling on the Ohio Turnpike by Exit 94, shutting the highway down for much of June 16. On June 16, severe thunderstorms in the Northeastern United States led to ground stops at LaGuardia Airport, Newark Liberty International Airport and Philadelphia International Airport. Portions of the Philadelphia metropolitan area received up to of rain, prompting a flash flood warning. The storms in Philadelphia also caused a brief delay in repairing a stretch of I-95 following a highway collapse earlier in the week. The storm system that caused significant damage in Pensacola also affected western Alabama. On the evening of June 16, a storm cluster affected parts of Pickens, Greene, and Tuscaloosa counties, leaving a sizable damage swath. Winds were estimated at , with peak gusts of . This resulted in thousands of trees being downed from the town of Gordo to the Ralph community, where hundreds of trees were snapped or uprooted along a six-mile-wide path. Several homes in Ralph sustained roof damage, and several garages and outbuildings sustained heavy damage. Debris near Ralph led to the closure of all lanes, eastbound and westbound, on I-20/59. Power outages affected thousands of residents in Tuscaloosa County, which lasted for a few days, and disrupted cell service in many areas. On June 18, flash flooding in the Saint Louis metropolitan area resulted in I-55 shutting down. In addition, flooding in Pensacola resulting in Fort Pickens shutting down until June 22. A powerful mesoscale convective system also affected a large swath of northern Oklahoma. Central Oklahoma saw scattered damaging winds and a large amount of power outages, while winds of up to caused widespread damage across Northeastern Oklahoma, including the Tulsa metropolitan area, and 341,000 power outages occurred. See also List of North American tornadoes and tornado outbreaks Weather of 2023 Tornado outbreak of June 18–22, 2011 Notes References Tornado outbreaks Tornadoes in Georgia (U.S. state) Tornadoes in Alabama Tornadoes in Texas Tornadoes in Florida Tornadoes in Oklahoma Tornadoes in Ohio Tornadoes in Michigan Tornadoes in Louisiana Tornadoes in Mississippi Tornadoes in Pennsylvania Tornadoes in New Jersey Tornadoes in Virginia Tornadoes in Arkansas F3 tornadoes Tornado Outbreak, 14
Banca Generali S.p.A. is an Italian bank focused on private banking and wealth management for high-net-worth individuals. The bank is a component of FTSE MIB index, representing the blue-chip of Borsa Italiana. The majority of its shares are owned by the Italian Insurance Group, Assicurazioni Generali. In April 2018, Banca Generali won Global Brands Awards organized by Global Brands Magazine. It has also been awarded the "Best Private Bank in Italy Award" from the FT's Group magazines for the years 2012, 2015, 2017, 2018 and 2019. In September 2018, Banca Generali inaugurated new operating offices in Citylife. References External links Banks of Italy Companies based in Milan Companies based in Trieste Generali Group
The Crusades were a series of religious wars initiated, supported, and sometimes directed by the Christian Latin Church in the medieval period. The best known of these military expeditions are those to the Holy Land in the period between 1095 and 1291 that were intended to conquer Jerusalem and its surrounding area from Muslim rule. Beginning with the First Crusade, which resulted in the conquest of Jerusalem in 1099, dozens of military campaigns were organised, providing a focal point of European history for centuries. Crusading declined rapidly after the 15th century. In 1095, Pope Urban II proclaimed the first expedition at the Council of Clermont. He encouraged military support for Byzantine emperor AlexiosI Komnenos and called for an armed pilgrimage to Jerusalem. Across all social strata in western Europe there was an enthusiastic response. Participants came from all over Europe and had a variety of motivations, including religious salvation, satisfying feudal obligations, opportunities for renown, and economic or political advantage. Later expeditions were conducted by generally more organized armies, sometimes led by a king. All were granted papal indulgences. Initial successes established four Crusader states: the County of Edessa; the Principality of Antioch; the Kingdom of Jerusalem; and the County of Tripoli. A European presence remained in the region in some form until the fall of Acre in 1291. After this, no further large military campaigns were organised. Other church-sanctioned campaigns include crusades against Christians not obeying papal rulings, against the Ottoman Empire, and for political reasons. The struggle between Christians and Muslims in the Iberian Peninsula was proclaimed a crusade in 1123, but eventually became better known as the Reconquista, and only ended in 1492 with the fall of the Emirate of Granada. From 1147, campaigns in Northern Europe against pagan tribes were considered crusades. In 1199, Pope Innocent III began the practice of proclaiming crusades against what the Latin Church considered heretic Christian communities. Crusades were called against the Cathars in Languedoc and against Bosnia; against the Waldensians in Savoy and the Hussites in Bohemia; and in response to the rise of the Ottoman Empire. Unsanctioned by the church, there were also several popular Crusades. Terminology According to modern historiography the term "crusade" ( ) first referred to military expeditions undertaken by European Christians in the 11th, 12th, and 13thcenturies to the Holy Land. The conflicts to which the term is applied has been extended to include other campaigns initiated, supported and sometimes directed by the Roman Catholic Church against pagans, heretics or for alleged religious ends. These differed from other Christian religious wars in that they were considered a penitential exercise, and so earned participants remittance from penalties for all confessed sins. What constituted a "crusade" has been understood in diverse ways, particularly regarding the early Crusades, and the definition remains a matter of debate among contemporary historians. The meaning of a "crusade" is generally viewed in one of four ways. Traditionalists view Crusades as only those to the Holy Land from 1095 to 1291. Pluralists view Crusades as military expeditions that enjoyed papal endorsement, including those to the Holy Land before and after 1291, to Northern Europe and Iberia, and against Christians. Popularists focus on the popular groundswells of religious fervour. Generalists focus on the basic phenomenon of Latin holy wars. Most modern Crusades historians consider a combination of pluralism and popularism, which is also the focus of this article. At the time of the First Crusade, , "journey", and , "pilgrimage" were used for the campaign. Crusader terminology remained largely indistinguishable from that of Christian pilgrimage during the 12thcentury. A specific term for a crusader in the form of "one signed by the cross"emerged in the early 12th century. This led to the French term the way of the cross. By the mid 13thcentury the cross became the major descriptor of the crusades with "the cross overseas"used for crusades in the eastern Mediterranean, and "the cross this side of the sea"for those in Europe. The use of , "crusade" in Middle English can be dated to , but the modern English "crusade" dates to the early 1700s. The Arabic word for struggle or contest, particularly one for the propagation of Islamwas used for a religious war of Muslims against unbelievers, and it was believed by some Muslims that the Quran and Hadith made this a duty. "Franks" and "Latins" were used by the peoples of the Near East during the crusades for western Europeans, distinguishing them from the Byzantine Christians who were known as "Greeks". "Saracen" was used for an Arab Muslim, derived from a Greek and Roman name for the inhabitants of the Syro-Arabian desert. Crusader sources used the term "Syrians" to describe Arabic speaking Christians who were members of the Greek Orthodox Church, and "Jacobites" for those who were members of the Syrian Orthodox Church. The Crusader states of Syria and Palestine were known as the "Outremer" from the French outre-mer, or "the land beyond the sea". Crusades and the Holy Land, 1095–1291 The Crusades to the Holy Land are the best known of the religious wars associated with the term, beginning in 1095 and lasting some two centuries. These Crusades began with the fervent desire to wrest the Holy Land from the Muslims, and ran through eight major numbered crusades and dozens of minor crusades over the period. Background The Arab-Byzantine wars from 629 to the 1050s resulted in the Muslim conquest of the Levant and Egypt by the Rashidun Caliphate. Jerusalem was captured after a half-year siege in 637. In 1025, the Byzantine emperor Basil II was able to extend the empire's territorial recovery to its furthest extent, with frontiers stretching east to Iran. The empire's relationships with its Islamic neighbours were no more quarrelsome than its relationships with the Western Christians, after the East-West Schism of 1054. The political situation in the Middle East was changed by waves of Turkic migrationin particular, the arrival of the Seljuk Turks in the 10thcentury. Previously a minor ruling clan from Transoxiana, they were recent converts to Islam who migrated into Persia. They conquered Iran, Iraq and the Near East to the Seljuk Empire. Byzantium's attempted confrontation in 1071 to suppress the Seljuks' sporadic raiding led to the defeat at the Battle of Manzikert, eventually the occupation of most of the Anatolian peninsula. In the same year, Jerusalem was taken from the Fatimid Caliphate by the Seljuks led by the warlord Atsiz, who seized most of Syria and Palestine throughout the Middle East. The Seljuk hold on the city resulted in pilgrims reporting difficulties and the oppression of Christians. First Crusade In 1074, just three years after Manzikert and the Seljuk takeover of Jerusalem, Gregory VII began planning to launch a military campaign for the liberation of the Holy Land. Twenty years later, Urban II realized that dream, hosting the decisive Council of Piacenza and subsequent Council of Clermont in November 1095, resulting in the mobilization of Western Europe to go to the Holy Land. Byzantine emperor Alexios I Komnenos, worried about the continued advances of the Seljuks, sent envoys to these councils asking Urban for aid against the invading Turks. Urban talked of the violence of Europe and the necessity of maintaining the Peace of God; about helping Byzantium; about the crimes being committed against Christians in the east; and about a new kind of war, an armed pilgrimage, and of rewards in heaven, where remission of sins was offered to any who might die in the undertaking. The enthusiastic crowd responded with cries of Deus lo volt!"God wills it!" Immediately after Urban's proclamation, the French priest Peter the Hermit led thousands of mostly poor Christians out of Europe in what became known as the People's Crusade. In transit through Germany, these Crusaders spawned German bands who massacred Jewish communities in what became known as the Rhineland massacres. They were destroyed in 1096 when the main body of Crusaders was annihilated at the battle of Civetot. In response to Urban's call, members of the high aristocracy from Europe took the cross. Foremost amongst these was the elder statesman Raymond IV of Toulouse, who with bishop Adhemar of Le Puy commanded southern French forces. Other armies included: one led by Godfrey of Bouillon and his brother Baldwin of Boulogne; forces led by Bohemond of Taranto and his nephew Tancred; and contingents under Robert Curthose, Stephen of Blois, Hugh of Vermandois, and Robert II of Flanders. The armies travelled to Byzantium where they were cautiously welcomed by the emperor. Alexios persuaded many of the princes to pledge allegiance to him. He also convinced them their first objective should be Nicaea. Buoyed by their success at Civetot, the over-confident Seljuks left the city unprotected, thus enabling its capture after the siege of Nicaea in May–June 1097. The first experience of Turkish tactics occurred when a force led by Bohemond and Robert was ambushed at battle of Dorylaeum in July 1097. The Normans resisted for hours before the arrival of the main army caused a Turkish withdrawal. The Crusader army marched to the former Byzantine city of Antioch, which had been in Muslim control since 1084. The Crusaders began the siege of Antioch in October 1097 and fought for eight months to a stalemate. Finally, Bohemond persuaded a guard in the city to open a gate. The Crusaders entered, massacring the Muslim inhabitants as well as many Christians. A force to recapture the city was raised by Kerbogha, the Seljuk atabeg of Mosul. The discovery of the Holy Lance by mystic Peter Bartholomew may have boosted the morale of the Crusaders. The Byzantines did not march to the assistance of the Crusaders. Instead, Alexius retreated from Philomelium. The Greeks were never truly forgiven for this perceived betrayal. The Crusaders attempted to negotiate surrender but were rejected. Bohemond recognised that the only remaining option was open combat and launched a counterattack. Despite superior numbers, the Muslims retreated and abandoned the siege. Raymond besieged Arqa in mid-February 1099 and the crusaders sent an embassy to the Fatimid vizier of Egypt seeking a treaty. When Adhemar died after Antioch, there was no spiritual leader of the crusade and the discovery of the Holy Lance provoked accusations of fraud among the clerical factions. On 8 April 1099, Arnulf of Chocques, chaplain to Robert Curthose, challenged Bartholomew to an ordeal by fire. Peter underwent the ordeal and died after days of agony from his wounds, which discredited the Holy Lance as a fake. Raymond lifted the siege of Arqa in May without capturing the town and the crusade proceeded south along the Mediterranean coast. Bohemond remained in Antioch, retaining the city, despite his pledge to return it to Byzantine control, while Raymond led the remaining army. Local rulers offered little resistance. They opted for peace in return for providing provisions. The Frankish emissaries rejoined the army accompanied by Fatimid representatives. This brought added information: the Fatimids had recaptured Jerusalem from the Seljuks. The Franks offered to partition conquered territory in return for rights to the city. When the offer was refused, it became advantageous if the crusade could reach Jerusalem before the Fatimids reinforced its defences and raised a defensive army. On 7 June 1099, the Crusaders reached Jerusalem. Many Crusaders wept upon seeing the city they had journeyed so long to reach. An initial attack on the city failed, and the siege of Jerusalem of 1099 became a stalemate, until they breached the walls on 15 July 1099. Iftikhar al-Dawla, the commander of the Fatimid garrison, struck a deal with Raymond, surrendering the citadel in return for being granted safe passage to Ascalon. For two days the Crusaders massacred the inhabitants and pillaged the city. Jerusalem had been returned to Christian rule. Urban II died on 29 July 1099, fourteen days after the fall of Jerusalem to the Crusaders, but before news of the event had reached Italy. He was succeeded by Paschal II. On July 22, 1099, a council was held in the Church of the Holy Sepulchre and Godfrey of Bouillon took the leadership, not called king but rather with the title Advocatus Sancti Sepulchri (Defender of the Holy Sepulchre). At this point, most Crusaders considered their pilgrimage complete and returned to Europe. Godfrey was left with a small forcea mere 300 knights and 2,000 foot soldiersto defend the kingdom. In August 1099, the Franks defeated a Fatimid relief force at the battle of Ascalon. The First Crusade thus ended successfully and resulted in the creation of the Kingdom of Jerusalem. The Kingdom of Jerusalem, 1099–1147 Godfrey of Bouillon died on 18 July 1100, likely from typhoid. The news of his death was met with mourning in Jerusalem. He was lying in state for five days, before his burial at the Church of the Holy Sepulchre. The Jerusalem knights offered the kingdom to Godfrey's brother Baldwin I of Jerusalem, then Count of Edessa. Godfrey's last battle, the siege of Arsuf, would be completed by Baldwin in April 1101. Meanwhile, Dagobert of Pisa, now Latin Patriarch of Jerusalem, made the same offer to Bohemond, and asking that he prevent Baldwin's expected travel to Jerusalem. But the letter was intercepted and Bohemond was captured with Richard of Salerno by the Danishmends after the battle of Melitene in August 1100. Baldwin I was crowned as the first king of Jerusalem on Christmas Day 1100 by Dagobert at the Church of the Nativity. Baldwin's cousin Baldwin of Bourcq, later his successor as Baldwin II, was named Count of Edessa, and Tancred became regent of Antioch during Bohemond's captivity, lasting through 1103. Crusade of 1101 The Crusade of 1101 was initiated by Paschal II when he learned of the precarious position of the remaining forces in the Holy Land. The host consisted of four separate armies, sometimes regarded as a second wave following the First Crusade. The first army was Lombardy, led by Anselm, archbishop of Milan. They were joined by a force led by Conrad, constable to the German emperor, Henry IV. A second army, the Nivernois, was commanded by William II of Nevers. The third group from northern France was led by Stephen of Blois and Stephen of Burgundy. They were joined by Raymond of Saint-Gilles, now in the service of the emperor. The fourth army was led by William IX of Aquitaine and Welf IV of Bavaria. The Crusaders faced their old enemy Kilij Arslan, and his Seljuk forces first met the Lombard and French contingents in August 1101 at the Battle of Mersivan, with the crusader camp captured. The Nivernois contingent was decimated that same month at Heraclea, with nearly the entire force wiped out, except for the count William and a few of his men. The Aquitainians and Bavarians reached Heraclea in September where again the Crusaders were massacred. The Crusade of 1101 was a total disaster both militarily and politically, showing the Muslims that the Crusaders were not invincible. Establishment of the kingdom The reign of Baldwin I began in 1100 and oversaw the consolidation of the kingdom in the face of enemies to the north, the Seljuks, and the Fatimids to the south. Al-Afdal Shahanshah, the powerful Fatimid vizier, anxious to recover the lands lost to the Franks, initiated the First Battle of Ramla on 7 September 1101 in which his forces were narrowly defeated, by those of Baldwin I. On 17 May 1102, the Crusaders were not so lucky, suffering a major defeat at the hands of the Fatimids, under the command of al-Afdal's son Sharaf al-Ma'ali at the Second Battle of Ramla. Among the slain were veterans of the Crusade of 1101, Stephen of Blois and Stephen of Burgundy. Conrad of Germany fought so valiantly that his attackers offered to spare his life if he surrendered. The kingdom was on the verge of collapse after the defeat, recovering after the successful Battle of Jaffa on 27 May. In the north, the siege of Tripoli was begun, not to be resolved for seven years. Al-Afdal tried once more in the Third Battle of Ramla in August 1105 and was defeated. After the Crusader victory at the siege of Beirut in 1110, the Fatimid threat to the kingdom subsided for two decades. The Battle of Harran was fought in 1104, pitting the Crusader states of Edessa and Antioch against Jikirmish, who had replaced Kerbogha as atabeg of Mosul, and Sökmen, commander of the Seljuk forces. The ensuing Seljuk victory also resulted in the capture of Baldwin of Bourcq, then count of Edessa and later king of Jerusalem, and his cousin Joscelin of Courtenay. A Turkish adventurer Jawali Saqawa killed Jikirmish in 1106, seizing Mosul and his hostage Baldwin. Separately freed, Joscelin began negotiations with Jawali for Baldwin's release. Expelled from Mosul by Mawdud, Jawali fled with his hostage to the fortress of Qal'at Ja'bar. Jawali, in need of allies against Mawdud, accepted Joscelin's offer, releasing Baldwin in the summer of 1108. After Bohemond was ransomed in 1103, he had resumed control of Antioch and continued the conflict with the Byzantine empire. The Byzantines had taken advantage of Bohemond's absence, retaking lands lost. Bohemond returned to Italy on late 1104 to recruit allies and gather supplies. Tancred again assumed leadership in Antioch, successfully defeating the Seljuks at the Battle of Artah in 1105, threatening Aleppo. In the meantime, his uncle began what is known as Bohemond's Crusade (or the Crusade of 1107–1108). Bohemond crossed into the Balkans and began the failed siege of Dyrrhachium. The subsequent Treaty of Devol of 1108 forced Bohemond to become vassal to the emperor, restore taken lands and other onerous terms. Bohemond never returned. He died in 1111, leaving Tancred as regent to his son Bohemond II, who ignored the treaty. The Norwegian Crusade also known as the Crusade of Sigurd Jorsalfar, king of Norway, took place from 1107 to 1110. More of a pilgrimage than a crusade, it did include the participation in military action at the siege of Sidon of 1110. Baldwin's army besieged the city by land, while the Norwegians came by sea, and the victorious Crusaders gave similar terms of surrender as given to previous victories at Arsuf in 1102 and at the siege of Acre of 1100–1104, freeing the major port of the kingdom. This Crusade marked the first time a European king visited the Holy Land. Beginning in 1110, the Seljuks launched a series of attacks on the Crusader states, in particular Edessa, led by Mawdud. These included the Battle of Shaizar in 1111, a stalemate. At the Battle of al-Sannabra of 1113, a Crusader army led by Baldwin I was defeated by a Muslim army led by Mawdud and Toghtekin, atabeg of Damascus, whose ultimate objective was Edessa. Mawdud was unable to annihilate the Crusader forces and was soon murdered by Assassins. Bursuq ibn Bursuq took command of the failed attempt against Edessa in 1114. Finally, Roger of Salerno routed the last Seljuk invading army at the First Battle of Tell Danith on 14 September 1115. Baldwin I died on 2 April 1118 after an attack on the city of Pelusium on the Nile. He was buried in Jerusalem. Baldwin II of Jerusalem became king on 14 April 1118, but there was not a formal coronation until Christmas Day 1119 due to issues concerning his wife Morphia of Melitene. The early days of Baldwin II's reign included the Battle of Ager Sanguinis, the Field of Blood, on 28 June 1119. At Ager Sanguinis, an army led by Ilghazi annihilated the Antiochian forces led by Roger of Salerno who was killed during the battle. The Muslim victory was short-lived, with Baldwin II and Pons of Tripoli narrowly defeating Ilghazi's army at the Second Battle of Tell Danith on 14 August 1119. On 16 January 1120, Baldwin II and the new patriarch Warmund of Jerusalem held the Council of Nablus, establishing a rudimentary set of rules for governing the kingdom now known as the assizes of Jerusalem. The formal establishment of the Knights Templar was likely also granted by the council, complementing the military arm of the Knights Hospitaller that was protecting pilgrims to the Holy Land. Both military orders were accumulating holdings in the kingdom and Crusader states, with the Hospitallers eventually obtaining the famous Krak des Chevaliers, an important military and administrative center. The Venetian Crusade, also known as the Crusade of Calixtus II, was conducted from 1122 to 1124. The Western participants included those from the Republic of Venice as well as Pons of Tripoli. The actions resulted in the successful siege of Tyre, taking the city from the Damascene atabeg Toghtekin. This marked a major victory for Baldwin II prior to his second captivity in 1123. In 1123, Baldwin II led a raid to Sarūj in order to rescue hostages held by Belek Ghazi and was also captured. Belek died in May 1124 and Baldwin II was seized by Ilghazi's son, Timurtash, who commenced negotiations for Baldwin's release. After a portion of the ransom was paid, additional hostages, to include Baldwin's youngest daughter Jovetta, were provided secure the payment of the balance, Baldwin II was released from the Citadel of Aleppo on 29 August 1124. Jovetta was held by il-Bursuqi and were ransomed by Baldwin II in 1125 using his spoils from the Battle of Azaz of 1125. Toghtekin died in February 1128, and Baldwin II began the Crusade of 1129, also known as the Damascus Crusade, shortly thereafter. The objective was Damascus, now led by the new atabeg Taj al-Muluk Buri, the son of Toghtekin. The Crusaders were able to capture the town of Banias, but were unable to take Damascus despite coming within six miles of the town. Baldwin II and Morphia married their eldest daughter Melisende of Jerusalem to Fulk V of Anjou in 1129 in anticipation of a royal succession. Baldwin II fell ill in Antioch and died on 21 August 1131. Fulk and Melisende were crowned joint rulers of Jerusalem on 14 September 1131 in the same church where Baldwin II had been laid to rest. Fulk assumed full control of the government, excluding Melisende, as he favored fellow Angevins to the native nobility. The rise of Zengi At the same time, the advent of Imad ad-Din Zengi saw the Crusaders threatened by a Muslim ruler who would introduce jihad to the conflict, joining the powerful Syrian emirates in a combined effort against the Franks. He became atabeg of Mosul in September 1127 and used this to expand his control to Aleppo in June 1128. In 1135, Zengi moved against Antioch and, when the Crusaders failed to put an army into the field to oppose him, he captured several important Syrian towns. He defeated Fulk at the Battle of Ba'rin of 1137, seizing Ba'rin Castle. In 1137, Zengi invaded Tripoli, killing the count Pons of Tripoli. Fulk intervened, but Zengi's troops captured Pons' successor Raymond II of Tripoli, and besieged Fulk in the border castle of Montferrand. Fulk surrendered the castle and paid Zengi a ransom for his and Raymond's freedom. John II Komnenos, emperor since 1118, reasserted Byzantine claims to Cilicia and Antioch, compelling Raymond of Poitiers to give homage. In April 1138, the Byzantines and Franks jointly besieged Aleppo and, with no success, began the Siege of Shaizar, abandoning it a month later. On 13 November 1143, while the royal couple were in Acre, Fulk was killed in a hunting accident. On Christmas Day 1143, their son Baldwin III of Jerusalem was crowned co-ruler with his mother. That same year, having prepared his army for a renewed attack on Antioch, John II Komnenos went hunting wild boar, cutting himself with a poisoned arrow. He died on 8 April 1143 and was succeeded as emperor by his son Manuel I Komnenos. Following John's death, the Byzantine army withdrew, leaving Zengi unopposed. Fulk's death later in the year left Joscelin II of Edessa with no powerful allies to help defend Edessa. Zengi came north to begin the first siege of Edessa, arriving on 28 November 1144. The city had been warned of his arrival and was prepared for a siege, but there was little they could do. Zengi realized there was no defending force and surrounded the city. The walls collapsed on 24 December 1144. Zengi's troops rushed into the city, killing all those who were unable to flee. All the Frankish prisoners were executed, but the native Christians were allowed to live. The Crusaders were dealt their first major defeat. Zengi was assassinated by a slave on 14 September 1146 and was succeeded in the Zengid dynasty by his son Nūr-ad-Din. The Franks recaptured the city during the Second Siege of Edessa of 1146 by stealth but could not take or even properly besiege the citadel. After a brief counter-siege, Nūr-ad-Din took the city. The men were massacred, with the women and children enslaved, and the walls razed. Second Crusade The fall of Edessa caused great consternation in Jerusalem and Western Europe, tempering the enthusiastic success of the First Crusade. Calls for a new crusadethe Second Crusadewere immediate, and was the first to be led by European kings. Concurrent campaigns as part of the Reconquista and Northern Crusades are also sometimes associated with this Crusade. The aftermath of the Crusade saw the Muslim world united around Saladin, leading to the fall of Jerusalem. The Second Crusade Eugene III, recently elected pope, issued the bull Quantum praedecessores in December 1145 calling for a new crusade, one that would be more organized and centrally controlled than the First. The armies would be led by the strongest kings of Europe and a route that would be pre-planned. The pope called on Bernard of Clairvaux to preach the Second Crusade, granting the same indulgences which had accorded to the First Crusaders. Among those answering the call were two European kings, Louis VII of France and Conrad III of Germany. Louis, his wife, Eleanor of Aquitaine, and many princes and lords prostrated themselves at the feet of Bernard in order to take the cross. Conrad and his nephew Frederick Barbarossa also received the cross from the hand of Bernard. Conrad III and the German contingent planned to leave for the Holy Land at Easter, but did not depart until May 1147. When the German army began to cross Byzantine territory, emperor Manuel I had his troops posted to ensure against trouble. A brief Battle of Constantinople in September ensued, and their defeat at the emperor's hand convinced the Germans to move quickly to Asia Minor. Without waiting for the French contingent, Conrad III engaged the Seljuks of Rûm under sultan Mesud I, son and successor of Kilij Arslan, the nemesis of the First Crusade. Mesud and his forces almost totally destroyed Conrad's contingent at the Second Battle of Dorylaeum on 25 October 1147. The French contingent departed in June 1147. In the meantime, Roger II of Sicily, an enemy of Conrad's, had invaded Byzantine territory. Manuel I needed all his army to counter this force, and, unlike the armies of the First Crusade, the Germans and French entered Asia with no Byzantine assistance. The French met the remnants of Conrad's army in northern Turkey, and Conrad joined Louis's force. They fended off a Seljuk attack at the Battle of Ephesus on 24 December 1147. A few days later, they were again victorious at the Battle of the Meander. Louis was not as lucky at the Battle of Mount Cadmus on 6 January 1148 when the army of Mesud inflicted heavy losses on the Crusaders. Shortly thereafter, they sailed for Antioch, almost totally destroyed by battle and sickness. The Crusader army arrived at Antioch on 19 March 1148 with the intent on moving to retake Edessa, but Baldwin III of Jerusalem and the Knights Templar had other ideas. The Council of Acre was held on 24 June 1148, changing the objective of the Second Crusade to Damascus, a former ally of the kingdom that had shifted its allegiance to that of the Zengids. The Crusaders fought the Battle of Bosra with the Damascenes in the summer of 1147, with no clear winner. Bad luck and poor tactics of the Crusaders led to the disastrous five-day siege of Damascus from 24 to 28 July 1148. The barons of Jerusalem withdrew support and the Crusaders retreated before the arrival of a relief army led by Nūr-ad-Din. Morale fell, hostility to the Byzantines grew and distrust developed between the newly arrived Crusaders and those that had made the region their home after the earlier crusades. The French and German forces felt betrayed by the other, lingering for a generation due to the defeat, to the ruin of the Christian kingdoms in the Holy Land. In the spring of 1147, Eugene III authorized the expansion of his mission into the Iberian peninsula, equating these campaigns against the Moors with the rest of the Second Crusade. The successful Siege of Lisbon, from 1 July to 25 October 1147, was followed by the six-month siege of Tortosa, ending on 30 December 1148 with a defeat for the Moors. In the north, some Germans were reluctant to fight in the Holy Land while the pagan Wends were a more immediate problem. The resulting Wendish Crusade of 1147 was partially successful but failed to convert the pagans to Christianity. The disastrous performance of this campaign in the Holy Land damaged the standing of the papacy, soured relations between the Christians of the kingdom and the West for many years, and encouraged the Muslims of Syria to even greater efforts to defeat the Franks. The dismal failures of this Crusade then set the stage for the fall of Jerusalem, leading to the Third Crusade. Nūr-ad-Din and the rise of Saladin In the first major encounter after the Second Crusade, Nūr-ad-Din's forces then destroyed the Crusader army at the Battle of Inab on 29 June 1149. Raymond of Poitiers, as prince of Antioch, came to the aid of the besieged city. Raymond was killed and his head was presented to Nūr-ad-Din, who forwarded it to the caliph al-Muqtafi in Baghdad. In 1150, Nūr-ad-Din defeated Joscelin II of Edessa for a final time, resulting in Joscelin being publicly blinded, dying in prison in Aleppo in 1159. Later that year, at the Battle of Aintab, he tried but failed to prevent Baldwin III's evacuation of the residents of Turbessel. The unconquered portions of the County of Edessa would nevertheless fall to the Zengids within a few years. In 1152, Raymond II of Tripoli became the first Frankish victim of the Assassins. Later that year, Nūr-ad-Din captured and burned Tortosa, briefly occupying the town before it was taken by the Knights Templar as a military headquarters. After the Siege of Ascalon ended on 22 August 1153 with a Crusader victory, Damascus was taken by Nūr-ad-Din the next year, uniting all of Syria under Zengid rule. In 1156, Baldwin III was forced into a treaty with Nūr-ad-Din, and later entered into an alliance with the Byzantine Empire. On 18 May 1157, Nūr-ad-Din began a siege on the Knights Hospitaller contingent at Banias, with the Grand Master Bertrand de Blanquefort captured. Baldwin III was able to break the siege, only to be ambushed at Jacob's Ford in June. Reinforcements from Antioch and Tripoli were able to relieve the besieged Crusaders, but they were defeated again that month at the Battle of Lake Huleh. In July 1158, the Crusaders were victorious at the Battle of Butaiha Bertrand's captivity lasted until 1159, when emperor Manuel I negotiated an alliance with Nūr-ad-Din against the Seljuks. Baldwin III died on 10 February 1163, and Amalric of Jerusalem was crowned as king of Jerusalem eight days later. Later that year, he defeated the Zengids at the Battle of al-Buqaia. Amalric then undertook a series of four invasions of Egypt from 1163 to 1169, taking advantage of weaknesses of the Fatimids. Nūr-ad-Din's intervention in the first invasion allowed his general Shirkuh, accompanied by his nephew Saladin, to enter Egypt. Shawar, the deposed vizier to the Fatimid caliph al-Adid, allied with Amalric I, attacking Shirkuh at the second Siege of Bilbeis beginning in August 1164, following Amalric's unsuccessful first siege in September 1163. This action left the Holy Land lacking in defenses, and Nūr-ad-Din defeated a Crusader forces at the Battle of Harim in August 1164, capturing most of the Franks' leaders. After the sacking of Bilbeis, the Crusader-Fatimid force was to meet Shirkuh's army in the indecisive Battle of al-Babein on 18 March 1167. In 1169, both Shawar and Shirkuh died, and al-Adid appointed Saladin as vizier. Saladin, with reinforcements from Nūr-ad-Din, defeated a massive Crusader-Byzantine force at the Siege of Damietta in late October. This gained Saladin the attention of the Assassins, with attempts on his life in January 1175 and again on 22 May 1176. Baldwin IV of Jerusalem became king on 5 July 1174 at the age of 13. As a leper he was not expected to live long, and served with a number of regents, and served as co-ruler with his cousin Baldwin V of Jerusalem beginning in 1183. Baldwin IV, Raynald of Châtillon and the Knights Templar defeated Saladin at the celebrated Battle of Montgisard on 25 November 1177. In June 1179 the Crusaders were defeated at the Battle of Marj Ayyub, and in August the unfinished castle at Jacob's Ford fell to Saladin, with the slaughter of half its Templar garrison. However, the kingdom repelled his attacks at the Battle of Belvoir Castle in 1182 and later in the Siege of Kerak of 1183. The fall of Jerusalem Baldwin V became sole king upon the death of his uncle in 1185 under the regency of Raymond III of Tripoli. Raymond negotiated a truce with Saladin which went awry when the king died in the summer of 1186. His mother Sibylla of Jerusalem and her husband Guy of Lusignan were crowned as queen and king of Jerusalem in the summer of 1186, shortly thereafter. They immediately had to deal with the threat posed by Saladin. Despite his defeat at the Battle of al-Fule in the fall of 1183, Saladin increased his attacks against the Franks, leading to their defeat at the Battle of Cresson on 1 May 1187. Guy of Lusignan responded by raising the largest army that Jerusalem had ever put into the field. Saladin lured this force into inhospitable terrain without water supplies and routed them at the Battle of Hattin on 4 July 1187. One of the major commanders was Raymond III of Tripoli who saw his force slaughtered, with some knights deserting to the enemy, and narrowly escaping, only to be regarded as a traitor and coward. Guy of Lusignan was one of the few captives of Saladin's after the battle, along with Raynald of Châtillon and Humphrey IV of Toron. Raynald was beheaded, settling an old score. Guy and Humphrey were imprisoned in Damascus and later released in 1188. As a result of his victory, much of Palestine quickly fell to Saladin. The siege of Jerusalem began on 20 September 1187 and the Holy City was surrendered to Saladin by Balian of Ibelin on 2 October. According to some, on 19October 1187, Urban III died upon of hearing of the defeat. Jerusalem was once again in Muslim hands. Many in the kingdom fled to Tyre, and Saladin's subsequent attack at the siege of Tyre beginning in November 1187 was unsuccessful. The siege of Belvoir Castle began the next month and the Hospitaller stronghold finally fell a year later. The sieges of Laodicea and Sahyun Castle in July 1188 and the sieges of al-Shughur and Bourzey Castle in August 1188 further solidified Saladin's gains. The siege of Safed in late 1188 then completed Saladin's conquest of the Holy Land. Third Crusade The years following the founding of the Kingdom of Jerusalem were met with multiple disasters. The Second Crusade did not achieve its goals, and left the Muslim East in a stronger position with the rise of Saladin. A united Egypt–Syria led to the loss of Jerusalem itself, and Western Europe had no choice but to launch the Third Crusade, this time led by the kings of Europe. The news of the disastrous defeat at the battle of Hattin and subsequent fall of Jerusalem gradually reached Western Europe. Urban III died shortly after hearing the news, and his successor Gregory VIII issued the bull Audita tremendi on 29 October 1187 describing the events in the East and urging all Christians to take up arms and go to the aid of those in the Kingdom of Jerusalem, calling for a new crusade to the Holy Landthe Third Crusadeto be led by Frederick Barbarossa and Richard I of England. Frederick took the cross in March 1188. Frederick sent an ultimatum to Saladin, demanding the return of Palestine and challenging him to battle and in May 1189, Frederick's host departed for Byzantium. In March 1190, Frederick embarked to Asia Minor. The armies coming from western Europe pushed on through Anatolia, defeating the Turks and reaching as far as Cilician Armenia. On 10 June 1190, Frederick drowned near Silifke Castle. His death caused several thousand German soldiers to leave the force and return home. The remaining German army moved under the command of the English and French forces that arrived shortly thereafter. Richard the Lionheart had already taken the cross as the Count of Poitou in 1187. His father Henry II of England and Philip II of France had done so on 21 January 1188 after receiving news of the fall of Jerusalem to Saladin. Richard I and Philip II of France agreed to go on the Crusade in January 1188. Arriving in the Holy Land, Richard led his support to the stalemated siege of Acre. The Muslim defenders surrendered on 12 July 1191. Richard remained in sole command of the Crusader force after the departure of Philip II on 31 July 1191. On 20 August 1191, Richard had more than 2000 prisoners beheaded at the massacre of Ayyadieh. Saladin subsequently ordered the execution of his Christian prisoners in retaliation. Richard moved south, defeating Saladin's forces at the battle of Arsuf on 7 September 1191. Three days later, Richard took Jaffa, held by Saladin since 1187, and advanced inland towards Jerusalem. On 12 December 1191 Saladin disbanded the greater part of his army. Learning this, Richard pushed his army forward, to within 12 miles from Jerusalem before retreating back to the coast. The Crusaders made another advance on Jerusalem, coming within sight of the city in June before being forced to retreat again. Hugh III of Burgundy, leader of the Franks, was adamant that a direct attack on Jerusalem should be made. This split the Crusader army into two factions, and neither was strong enough to achieve its objective. Without a united command the army had little choice but to retreat back to the coast. On 27 July 1192, Saladin's army began the battle of Jaffa, capturing the city. Richard's forces stormed Jaffa from the sea and the Muslims were driven from the city. Attempts to retake Jaffa failed and Saladin was forced to retreat. On 2 September 1192 Richard and Saladin entered into the Treaty of Jaffa, providing that Jerusalem would remain under Muslim control, while allowing unarmed Christian pilgrims and traders to freely visit the city. This treaty ended the Third Crusade. Three years later, Henry VI launched the Crusade of 1197. While his forces were en route to the Holy Land, Henry VI died in Messina on 28 September 1197. The nobles that remained captured the Levant coast between Tyre and Tripoli before returning to Germany. The Crusade ended on 1 July 1198 after capturing Sidon and Beirut. Fourth Crusade In 1198, the recently elected Pope Innocent III announced a new crusade, organised by three Frenchmen: Theobald of Champagne; Louis of Blois; and Baldwin of Flanders. After Theobald's premature death, the Italian Boniface of Montferrat replaced him as the new commander of the campaign. They contracted with the Republic of Venice for the transportation of 30,000 crusaders at a cost of 85,000 marks. However, many chose other embarkation ports and only around 15,000 arrived in Venice. The Doge of Venice Enrico Dandolo proposed that Venice would be compensated with the profits of future conquests beginning with the seizure of the Christian city of Zara. Pope Innocent III's role was ambivalent. He only condemned the attack when the siege started. He withdrew his legate to disassociate from the attack but seemed to have accepted it as inevitable. Historians question whether for him, the papal desire to salvage the crusade may have outweighed the moral consideration of shedding Christian blood. The crusade was joined by King Philip of Swabia, who intended to use the Crusade to install his exiled brother-in-law, Alexios IV Angelos, as Emperor. This required the overthrow of Alexios III Angelos, the uncle of AlexiosIV. Alexios IV offered the crusade 10,000 troops, 200,000 marks and the reunion of the Greek Church with Rome if they toppled his uncle Emperor Alexios III. When the crusade entered Constantinople, AlexiosIII fled and was replaced by his nephew. The Greek resistance prompted AlexiosIV to seek continued support from the crusade until he could fulfil his commitments. This ended with his murder in a violent anti-Latin revolt. The crusaders were without seaworthy ships, supplies or food. Their only escape route was through the city, taking by force what Alexios had promised and the new anti-westerner Byzantine rulerAlexios V Doukasdenied them. The Sack of Constantinople involved three days of pillaging churches and killing much of the Greek Orthodox Christian populace. This sack was not unusual considering the violent military standards of the time, but contemporaries such as Innocent III and Ali ibn al-Athir saw it as an atrocity against centuries of classical and Christian civilisation. Fifth Crusade The Fifth Crusade (1217–1221) was a campaign by Western Europeans to reacquire Jerusalem and the rest of the Holy Land by first conquering Egypt, ruled by the sultan al-Adil, brother of Saladin. In 1213, Innocent III called for another Crusade at the Fourth Lateran Council, and in the papal bull Quia maior. Innocent died in 1216 and was succeeded by Honorius III who immediately called on Andrew II of Hungary and Frederick II of Germany to lead a Crusade. Frederick had taken the cross in 1215, but hung back, with his crown still in contention, and Honorius delayed the expedition. Andrew II left for Acre in August 1217, joining John of Brienne, king of Jerusalem. The initial plan of a two-prong attack in Syria and in Egypt was abandoned and instead the objective became limited operations in Syria. After accomplishing little, the ailing Andrew returned to Hungary early in 1218. As it became clear that Frederick II was not coming to the east, the remaining commanders began the planning to attack the Egyptian port of Damietta. The fortifications of Damietta were impressive, and included the Burj al-Silsilahthe chain towerwith massive chains that could stretch across the Nile. The siege of Damietta began in June 1218 with a successful assault on the tower. The loss of the tower was a great shock to the Ayyubids, and the sultan al-Adil died soon thereafter. He was succeeded as sultan by his son al-Kamil. Further offensive action by the Crusaders would have to wait until the arrival of additional forces, including legate Pelagius with a contingent of Romans. A group from England arrived shortly thereafter. By February 1219, the Crusaders now had Damietta surrounded, and al-Kamil opened negotiations with the Crusaders, asking for envoys to come to his camp. He offered to surrender the kingdom of Jerusalem, less the fortresses of al-Karak and Krak de Montréal, guarding the road to Egypt, in exchange for the evacuation of Egypt. John of Brienne and the other secular leaders were in favor of the offer, as the original objective of the Crusade was the recovery of Jerusalem. But Pelagius and the leaders of the Templars and Hospitallers refused. Later, Francis of Assisi arrived to negotiate unsuccessfully with the sultan. In November 1219, the Crusaders entered Damietta and found it abandoned, al-Kamil having moved his army south. In the captured city, Pelagius was unable to prod the Crusaders from their inactivity, and many returned home, their vow fulfilled. Al-Kamil took advantage of this lull to reinforce his new camp at Mansurah, renewing his peace offering to the Crusaders, which was again refused. Frederick II sent troops and word that he would soon follow, but they were under orders not to begin offensive operations until he had arrived. In July 1221, Pelagius began to advance to the south. John of Brienne argued against the move, but was powerless to stop it. Already deemed a traitor for opposing the plans and threatened with excommunication, John joined the force under the command of the legate. In the ensuing Battle of Mansurah in late August, al-Kamil had the sluices along the right bank of the Nile opened, flooding the area and rendering battle impossible. Pelagius had no choice but to surrender. The Crusaders still had some leverage as Damietta was well-garrisoned. They offered the sultan a withdrawal from Damietta and an eight-year truce in exchange for allowing the Crusader army to pass, the release of all prisoners, and the return of the relic of the True Cross. Prior to the formal surrender of Damietta, the two sides would maintain hostages, among them John of Brienne and Hermann of Salza for the Franks side and a son of al-Kamil for Egypt. The masters of the military orders were dispatched to Damietta, where the forces were resistant to giving up, with the news of the surrender, which happened on 8 September 1221. The Fifth Crusade was over, a dismal failure, unable to even gain the return of the piece of the True Cross. Sixth Crusade The Sixth Crusade (1228–1229) was a military expedition to recapture the city of Jerusalem. It began seven years after the failure of the Fifth Crusade and involved very little actual fighting. The diplomatic maneuvering of Frederick II resulted in the Kingdom of Jerusalem regaining some control over Jerusalem for much of the ensuing fifteen years. The Sixth Crusade is also known as the Crusade of Frederick II. Of all the European sovereigns, only Frederick II, the Holy Roman Emperor, was in a position to regain Jerusalem. Frederick was, like many of the 13th-century rulers, a serial crucesignatus, having taken the cross multiple times since 1215. After much wrangling, an onerous agreement between the emperor and Pope Honorius III was signed on 25 July 1225 at San Germano. Frederick promised to depart on the Crusade by August 1227 and remain for two years. During this period, he was to maintain and support forces in Syria and deposit escrow funds at Rome in gold. These funds would be returned to the emperor once he arrived at Acre. If he did not arrive, the money would be employed for the needs of the Holy Land. Frederick II would go on the Crusade as king of Jerusalem. He married John of Brienne's daughter Isabella II by proxy in August 1225 and they were formally married on 9 November 1227. Frederick claimed the kingship of Jerusalem despite John having been given assurances that he would remain as king. Frederick took the crown in December 1225. Frederick's first royal decree was to grant new privileges on the Teutonic Knights, placing them on equal footing as the Templars and Hospitallers. After the Fifth Crusade, the Ayyubid sultan al-Kamil became involved in civil war in Syria and, having unsuccessfully tried negotiations with the West beginning in 1219, again tried this approach, offering return of much of the Holy Land in exchange for military support. Becoming pope in 1227, Gregory IX was determined to proceed with the Crusade. The first contingents of Crusaders then sailed in August 1227, joining with forces of the kingdom and fortifying the coastal towns. The emperor was delayed while his ships were refitted. He sailed on 8 September 1227, but before they reached their first stop, Frederick was struck with the plague and disembarked to secure medical attention. Resolved to keep his oath, he sent his fleet on to Acre. He sent his emissaries to inform Gregory IX of the situation, but the pope did not care about Frederick's illness, just that he had not lived up to his agreement. Frederick was excommunicated on 29 September 1227, branded a wanton violator of his sacred oath taken many times. Frederick made his last effort to be reconciled with Gregory. It had no effect and Frederick sailed from Brindisi in June 1228. After a stop at Cyprus, Frederick II arrived in Acre on 7 September 1228 and was received warmly by the military orders, despite his excommunication. Frederick's army was not large, mostly German, Sicilian and English. Of the troops he had sent in 1227 had mostly returned home. He could neither afford nor mount a lengthening campaign in the Holy Land given the ongoing War of the Keys with Rome. The Sixth Crusade would be one of negotiation. After resolving the internecine struggles in Syria, al-Kamil's position was stronger than it was a year before when he made his original offer to Frederick. For unknown reasons, the two sides came to an agreement. The resultant Treaty of Jaffa was concluded on 18 February 1229, with al-Kamil surrendering Jerusalem, with the exception of some Muslim holy sites, and agreeing to a ten-year truce. Frederick entered Jerusalem on 17 March 1229 and received the formal surrender of the city by al-Kamil's agent and the next day, crowned himself. On 1 May 1229, Frederick departed from Acre and arrived in Sicily a month before the pope knew that he had left the Holy Land. Frederick obtained from the pope relief from his excommunication on 28 August 1230 at the Treaty of Ceprano. The results of the Sixth Crusade were not universally acclaimed. Two letters from the Christian side tell differing stories, with Frederick touting the great success of the endeavor and the Latin patriarch painting a darker picture of the emperor and his accomplishments. On the Muslim side, al-Kamil himself was pleased with the accord, but other regarded the treaty as a disastrous event. In the end, the Sixth Crusade successfully returned Jerusalem to Christian rule and had set a precedent, in having achieved success on crusade without papal involvement. The Crusades of 1239–1241 The Crusades of 1239–1241, also known as the Barons' Crusade, were a series of crusades to the Holy Land that, in territorial terms, were the most successful since the First Crusade. The major expeditions were led separately by Theobald I of Navarre and Richard of Cornwall. These crusades are sometimes discussed along with that of Baldwin of Courtenay to Constantinople. In 1229, Frederick II and the Ayyubid sultan al-Kamil, had agreed to a ten-year truce. Nevertheless, Gregory IX, who had condemned this truce from the beginning, issued the papal bull Rachel suum videns in 1234 calling for a new crusade once the truce expired. A number of English and French nobles took the cross, but the crusade's departure was delayed because Frederick, whose lands the crusaders had planned to cross, opposed any crusading activity before the expiration of this truce. Frederick was again excommunicated in 1239, causing most crusaders to avoid his territories on their way to the Holy Land. The French expedition was led by Theobald I of Navarre and Hugh of Burgundy, joined by Amaury of Montfort and Peter of Dreux. On 1 September 1239, Theobald arrived in Acre, and was soon drawn into the Ayyubid civil war, which had been raging since the death of al-Kamil in 1238. At the end of September, al-Kamil's brother as-Salih Ismail seized Damascus from his nephew, as-Salih Ayyub, and recognized al-Adil II as sultan of Egypt. Theobald decided to fortify Ascalon to protect the southern border of the kingdom and to move against Damascus later. While the Crusaders were marching from Acre to Jaffa, Egyptian troops moved to secure the border in what became the Battle at Gaza. Contrary to Theobald's instructions and the advice of the military orders, a group decided to move against the enemy without further delay, but they were surprised by the Muslims who inflicted a devastating defeat on the Franks. The masters of the military orders then convinced Theobald to retreat to Acre rather than pursue the Egyptians and their Frankish prisoners. A month after the battle at Gaza, an-Nasir Dā'ūd, emir of Kerak, seized Jerusalem, virtually unguarded. The internal strife among the Ayyubids allowed Theobald to negotiate the return of Jerusalem. In September 1240, Theobald departed for Europe, while Hugh of Burgundy remained to help fortify Ascalon. On 8 October 1240, the English expedition arrived, led by Richard of Cornwall. The force marched to Jaffa, where they completed the negotiations for a truce with Ayyubid leaders begun by Theobald just a few months prior. Richard consented, the new agreement was ratified by Ayyub by 8 February 1241, and prisoners from both sides were released on 13 April. Meanwhile, Richard's forces helped to work on Ascalon's fortifications, which were completed by mid-March 1241. Richard entrusted the new fortress to an imperial representative, and departed for England on 3 May 1241. In July 1239, Baldwin of Courtenay, the young heir to the Latin Empire, travelled to Constantinople with a small army. In the winter of 1239, Baldwin finally returned to Constantinople, where he was crowned emperor around Easter of 1240, after which he launched his crusade. Baldwin then besieged and captured Tzurulum, a Nicaean stronghold seventy-five miles west of Constantinople. Although the Barons' Crusade returned the kingdom to its largest size since 1187, the gains would be dramatically reversed a few years later. On 15 July 1244, the city was reduced to ruins during the siege of Jerusalem and its Christians massacred by the Khwarazmian army. A few months later, the Battle of La Forbie permanently crippled Christian military power in the Holy Land. The sack of the city and the massacre which accompanied it encouraged Louis IX of France to organize the Seventh Crusade. The Seventh Crusade The Seventh Crusade (1248–1254) was the first of the two Crusades led by Louis IX of France. Also known as the Crusade of Louis IX to the Holy Land, its objective was to reclaim the Holy Land by attacking Egypt, the main seat of Muslim power in the Middle East, then under as-Salih Ayyub, son of al-Kamil. The Crusade was conducted in response to setbacks in the Kingdom of Jerusalem, beginning with the loss of the Holy City in 1244, and was preached by Innocent IV in conjunction with a crusade against emperor Frederick II, the Prussian crusades and Mongol incursions. At the end of 1244, Louis was stricken with a severe malarial infection and he vowed that if he recovered he would set out for a Crusade. His life was spared, and as soon as his health permitted him, he took the cross and immediately began preparations. The next year, the pope presided over First Council of Lyon, directing a new Crusade under the command of Louis. With Rome under siege by Frederick, the pope also issued his Ad Apostolicae Dignitatis Apicem, formally renewing the sentence of excommunication on the emperor, and declared him deposed from the imperial throne and that of Naples. The recruiting effort under cardinal Odo of Châteauroux was difficult, and the Crusade finally began on 12 August 1248 when Louis IX left Paris under the insignia of a pilgrim, the Oriflamme. With him were queen Margaret of Provence and two of Louis' brothers, Charles I of Anjou and Robert I of Artois. Their youngest brother Alphonse of Poitiers departed the next year. They were followed by Hugh IV of Burgundy, Peter Maulcerc, Hugh XI of Lusignan, royal companion and chronicler Jean de Joinville, and an English detachment under William Longespée, grandson of Henry II of England. The first stop was Cyprus, arriving in September 1248 where they experienced a long wait for the forces to assemble. Many of the men were lost en route or to disease. The Franks were soon met by those from Acre including the masters of the Orders Jean de Ronay and Guillaume de Sonnac. The two eldest sons of John of Brienne, Alsonso of Brienne and Louis of Brienne, would also join as would John of Ibelin, nephew to the Old Lord of Beirut. William of Villehardouin also arrived with ships and Frankish soldiers from the Morea. It was agreed that Egypt was the objective and many remembered how the sultan's father had been willing to exchange Jerusalem itself for Damietta in the Fifth Crusade. Louis was not willing to negotiate with the infidel Muslims, but he did unsuccessfully seek a Franco-Mongol alliance, reflecting what the pope had sought in 1245. As-Salih Ayyub conducting a campaign in Damascus when the Franks invaded as he had expected the Crusaders to land in Syria. Hurrying his forces back to Cairo, he turned to his vizier Fakhr ad-Din ibn as-Shaikh to command the army that fortified Damietta in anticipation of the invasion. On 5 June 1249 the Crusader fleet began the landing and subsequent siege of Damietta. After a short battle, the Egyptian commander decided to evacuate the city. Remarkably, Damietta had been seized with only one Crusader casualty. The city became a Frankish city and Louis waited until the Nile floods abated before advancing, remembering the lessons of the Fifth Crusade. The loss of Damietta was a shock to the Muslim world, and as-Salih Ayyub offered to trade Damietta for Jerusalem as his father had thirty years before. The offer was rejected. By the end of October 1249 the Nile had receded and reinforcements had arrived. It was time to advance, and the Frankish army set out towards Mansurah. The sultan died in November 1249, his widow Shajar al-Durr concealing the news of her husband's death. She forged a document which appointed his son al-Muazzam Turanshah, then in Syria, as heir and Fakhr ad-Din as viceroy. But the Crusade continued, and by December 1249, Louis was encamped on the river banks opposite to Mansurah. For six weeks, the armies of the West and Egypt faced each other on opposite sides of the canal, leading to the Battle of Mansurah that would end on 11 February 1250 with an Egyptian defeat. Louis had his victory, but a cost of the loss of much of his force and their commanders. Among the survivors were the Templar master Guillaume de Sonnac, losing an eye, Humbert V de Beaujeu, constable of France, John II of Soissons, and the duke of Brittany, Peter Maulcerc. Counted with the dead were the king's brother Robert I of Artois, William Longespée and most of his English followers, Peter of Courtenay, and Raoul II of Coucy. But the victory would be short-lived. On 11 February 1250, the Egyptians attacked again. Templar master Guillaume de Sonnac and acting Hospitaller master Jean de Ronay were killed. Alphonse of Poitiers, guarding the camp, was encircled and was rescued by the camp followers. At nightfall, the Muslims gave up the assault. On 28 February 1250, Turanshah arrived from Damascus and began an Egyptian offensive, intercepting the boats that brought food from Damietta. The Franks were quickly beset by famine and disease. The Battle of Fariskur fought on 6 April 1250 would be the decisive defeat of Louis' army. Louis knew that the army must be extricated to Damietta and they departed on the morning of 5 April, with the king in the rear and the Egyptians in pursuit. The next day, the Muslims surrounded the army and attacked in full force. On 6 April, Louis' surrender was negotiated directly with the sultan by Philip of Montfort. The king and his entourage were taken in chains to Mansurah and the whole of the army was rounded up and led into captivity. The Egyptians were unprepared for the large number of prisoners taken, comprising most of Louis' force. The infirm were executed immediately and several hundred were decapitated daily. Louis and his commanders were moved to Mansurah, and negotiations for their release commenced. The terms agreed to were harsh. Louis was to ransom himself by the surrender of Damietta and his army by the payment of a million bezants (later reduced to 800,000). Latin patriarch Robert of Nantes went under safe-conduct to complete the arrangements for the ransom. Arriving in Cairo, he found Turanshah dead, murdered in a coup instigated by his stepmother Shajar al-Durr. On 6 May, Geoffrey of Sergines handed Damietta over to the Moslem vanguard. Many wounded soldiers had been left behind at Damietta, and contrary to their promise, the Muslims massacred them all. In 1251, the Shepherds' Crusade, a popular crusade formed in 1251, with the objective to free Louis, engulfed France. After his release, Louis went to Acre where he remained until 1254. This is regarded as the end of the Seventh Crusade. The Last Crusades After the defeat of the Crusaders in Egypt, Louis remained in Syria until 1254 to consolidate the crusader states. A brutal power struggle developed in Egypt between various Mamluk leaders and the remaining weak Ayyubid rulers. The threat presented by an invasion by the Mongols led to one of the competing Mamluk leaders, Qutuz, seizing the sultanate in 1259 and uniting with another faction led by Baibars to defeat the Mongols at Ain Jalut. The Mamluks then quickly gained control of Damascus and Aleppo before Qutuz was assassinated and Baibers assumed control. Between 1265 and 1271, Baibars drove the Franks to a few small coastal outposts. Baibars had three key objectives: to prevent an alliance between the Latins and the Mongols, to cause dissension among the Mongols (particularly between the Golden Horde and the Persian Ilkhanate), and to maintain access to a supply of slave recruits from the Russian steppes. He supported Manfred of Sicily's failed resistance to the attack of Charles and the papacy. Dissension in the crusader states led to conflicts such as the War of Saint Sabas. Venice drove the Genoese from Acre to Tyre where they continued to trade with Egypt. Indeed, Baibars negotiated free passage for the Genoese with MichaelVIII Palaiologos, Emperor of Nicaea, the newly restored ruler of Constantinople. In 1270 Charles turned his brother King LouisIX's crusade, known as the Eighth Crusade, to his own advantage by persuading him to attack Tunis. The crusader army was devastated by disease, and Louis himself died at Tunis on 25August. The fleet returned to France. Prince Edward, the future king of England, and a small retinue arrived too late for the conflict but continued to the Holy Land in what is known as Lord Edward's Crusade. Edward survived an assassination attempt, negotiated a ten-year truce, and then returned to manage his affairs in England. This ended the last significant crusading effort in the eastern Mediterranean. Decline and fall of the Crusader States The years 1272–1302 include numerous conflicts throughout the Levant as well as the Mediterranean and Western European regions, and many crusades were proposed to free the Holy Land from Mamluk control. These include ones of Gregory X, Charles I of Anjou and Nicholas IV, none of which came to fruition. The major players fighting the Muslims included the kings of England and France, the kingdoms of Cyprus and Sicily, the three Military Orders and Mongol Ilkhanate. The end of Western European presence in the Holy Land was sealed with the fall of Tripoli and their subsequent defeat at the siege of Acre in 1291. The Christian forces managed to survive until the final fall of Ruad in 1302. The Holy Land would no longer be the focus of the West even though various crusades were proposed in the early years of the fourteenth century. The Knights Hospitaller would conquer Rhodes from Byzantium, making it the center of their activity for a hundred years. The Knights Templar, the elite fighting force in the kingdom, would be disbanded and its knights imprisoned or executed. The Mongols converted to Islam, but disintegrated as a fighting force. The Mamluk sultanate would continue for another century. The Crusades to liberate Jerusalem and the Holy Land were over. Other crusades The military expeditions undertaken by European Christians in the 11th, 12th, and 13thcenturies to recover the Holy Land from Muslims provided a template for warfare in other areas that also interested the Latin Church. These included the 12th and 13thcentury conquest of Muslim Al-Andalus by Spanish Christian kingdoms; 12th to 15thcentury German Northern Crusades expansion into the pagan Baltic region; the suppression of non-conformity, particularly in Languedoc during what has become called the Albigensian Crusade and for the Papacy's temporal advantage in Italy and Germany that are now known as political crusades. In the 13th and 14th centuries there were also unsanctioned, but related popular uprisings to recover Jerusalem known variously as Shepherds' or Children's crusades. Urban II equated the crusades for Jerusalem with the ongoing Catholic invasion of the Iberian Peninsula and crusades were preached in 1114 and 1118, but it was Pope Callixtus II who proposed dual fronts in Spain and the Middle East in 1122. In the spring of 1147, Eugene authorized the expansion of his mission into the Iberian peninsula, equating these campaigns against the Moors with the rest of the Second Crusade. The successful siege of Lisbon, from 1 July to 25 October 1147, was followed by the six-month siege of Tortosa, ending on 30 December 1148 with a defeat for the Moors. In the north, some Germans were reluctant to fight in the Holy Land while the pagan Wends were a more immediate problem. The resulting Wendish Crusade of 1147 was partially successful but failed to convert the pagans to Christianity. By the time of the Second Crusade the three Spanish kingdoms were powerful enough to conquer Islamic territoryCastile, Aragon, and Portugal. In 1212 the Spanish were victorious at the Battle of Las Navas de Tolosa with the support of foreign fighters responding to the preaching of Innocent III. Many of these deserted because of the Spanish tolerance of the defeated Muslims, for whom the Reconquista was a war of domination rather than extermination. In contrast the Christians formerly living under Muslim rule called Mozarabs had the Roman Rite relentlessly imposed on them and were absorbed into mainstream Catholicism. Al-Andalus, Islamic Spain, was completely suppressed in 1492 when the Emirate of Granada surrendered. In 1147, Pope Eugene III extended Calixtus's idea by authorising a crusade on the German north-eastern frontier against the pagan Wends from what was primarily economic conflict. From the early 13thcentury, there was significant involvement of military orders, such as the Livonian Brothers of the Sword and the Order of Dobrzyń. The Teutonic Knights diverted efforts from the Holy Land, absorbed these orders and established the State of the Teutonic Order. This evolved the Duchy of Prussia and Duchy of Courland and Semigallia in 1525 and 1562, respectively. By the beginning of the 13thcentury Papal reticence in applying crusades against the papacy's political opponents and those considered heretics. Innocent III proclaimed a crusade against Catharism that failed to suppress the heresy itself but ruined the culture the Languedoc. This set a precedent that was followed in 1212 with pressure exerted on the city of Milan for tolerating Catharism, in 1234 against the Stedinger peasants of north-western Germany, in 1234 and 1241 Hungarian crusades against Bosnian heretics. The historian Norman Housley notes the connection between heterodoxy and anti-papalism in Italy. Indulgence was offered to anti-heretical groups such as the Militia of Jesus Christ and the Order of the Blessed Virgin Mary. Innocent III declared the first political crusade against Frederick II's regent, Markward von Annweiler, and when Frederick later threatened Rome in 1240, Gregory IX used crusading terminology to raise support against him. On Frederick II's death the focus moved to Sicily. In 1263, Pope Urban IV offered crusading indulgences to Charles of Anjou in return for Sicily's conquest. However, these wars had no clear objectives or limitations, making them unsuitable for crusading. The 1281 election of a French pope, MartinIV, brought the power of the papacy behind Charles. Charles's preparations for a crusade against Constantinople were foiled by the Byzantine Emperor Michael VIII Palaiologos, who instigated an uprising called the Sicilian Vespers. Instead, Peter III of Aragon was proclaimed king of Sicily, despite his excommunication and an unsuccessful Aragonese Crusade. Political crusading continued against Venice over Ferrara; Louis IV, King of Germany when he marched to Rome for his imperial coronation; and the free companies of mercenaries. The Latin states established were a fragile patchwork of petty realms threatened by Byzantine successor statesthe Despotate of Epirus, the Empire of Nicaea and the Empire of Trebizond. Thessaloniki fell to Epirus in 1224, and Constantinople to Nicaea in 1261. Achaea and Athens survived under the French after the Treaty of Viterbo. The Venetians endured a long-standing conflict with the Ottoman Empire until the final possessions were lost in the Seventh Ottoman–Venetian War in the 18thcentury. This period of Greek history is known as the Frankokratia or Latinokratia ("Frankish or Latin rule") and designates a period when western European Catholics ruled Orthodox Byzantine Greeks. The major crusades of the 14th century include: the Crusade against the Dulcinians; the Crusade of the Poor; the Anti-Catalan Crusade; the Shepherds' Crusade; the Smyrniote Crusades; the Crusade against Novgorod; the Savoyard Crusade; the Alexandrian Crusade; the Despenser's Crusade; the Mahdia, Tedelis, and Bona Crusades; and the Crusade of Nicopolis. The threat of the expanding Ottoman Empire prompted further crusades of the 15th century. In 1389, the Ottomans defeated the Serbs at the Battle of Kosovo, won control of the Balkans from the Danube to the Gulf of Corinth, in 1396 defeated French crusaders and King Sigismund of Hungary at the Nicopolis, in 1444 destroyed a crusading Polish and Hungarian force at Varna, four years later again defeated the Hungarians at Kosovo and in 1453 captured Constantinople. The 16thcentury saw growing rapprochement. The Habsburgs, French, Spanish and Venetians and Ottomans all signed treaties. Francis I of France allied with all quarters, including from German Protestant princes and Sultan Suleiman the Magnificent. Anti-Christian crusading declined in the 15thcentury, the exceptions were the six failed crusades against the religiously radical Hussites in Bohemia and attacks on the Waldensians in Savoy. Crusading became a financial exercise; precedence was given to the commercial and political objectives. The military threat presented by the Ottoman Turks diminished, making anti-Ottoman crusading obsolete in 1699 with the final Holy League. Crusading movement Prior to the 11thcentury, the Latin Church had developed a system for the remission and absolution of sin in return for contrition, confession, and penitential acts. Reparation through abstinence from martial activity still presented a difficulty to the noble warrior class. It was revolutionary when Gregory VII offered absolution of sin earned through the Church-sponsored violence in support of his causes, if selflessly given at the end of the century. This was developed by subsequent Popes into the granting of plenary indulgences that reduced all God-imposed temporal penalties. The papacy developed "Political Augustinianism" into attempts to remove the Church from secular control by asserting ecclesiastical supremacy over temporal polities and the Orthodox Church. This was associated with the idea that the Church should actively intervene in the world to impose "justice". A distinct ideology promoting and regulating crusading is evidenced in surviving texts. The Church defined this in legal and theological terms based on the theory of holy war and the concept of pilgrimage. Theology merged the Old Testament Israelite wars instigated and assisted by God with New Testament Christocentric views. Holy war was based on ancient ideas of just war. The fourth-century theologian Augustine of Hippo had Christianised this, and it eventually became the paradigm of Christian holy war. Theologians widely accepted the justification that holy war against pagans was good, because of their opposition to Christianity. The Holy Land was the patrimony of Christ; its recovery was on behalf of God. The Albigensian Crusade was a defence of the French Church, the Northern Crusades were campaigns conquering lands beloved of Christ's mother Mary for Christianity. Inspired by the First Crusade, the crusading movement went on to define late medieval western culture and impacted the history of the western Islamic world. Christendom was geopolitical, and this underpinned the practice of the medieval Church. Reformists of the 11thcentury urged these ideas which declined following the Reformation. The ideology continued after the 16thcentury with the military orders but dwindled in competition with other forms of religious war and new ideologies. Military orders The military orders were forms of a religious order first established early in the twelfth century with the function of defending Christians, as well as observing monastic vows. The Knights Hospitaller had a medical mission in Jerusalem since before the First Crusade, later becoming a formidable military force supporting the crusades in the Holy Land and Mediterranean. The Knights Templar were founded in 1119 by a band of knights who dedicated themselves to protecting pilgrims enroute to Jerusalem. The Teutonic Knights were formed in 1190 to protect pilgrims in both the Holy Land and Baltic region. The Hospitallers and the Templars became supranational organisations as papal support led to rich donations of land and revenue across Europe. This, in turn, led to a steady flow of new recruits and the wealth to maintain multiple fortifications in the crusader states. In time, they developed into autonomous powers in the region. After the fall of Acre the Hospitallers relocated to Cyprus, then ruled Rhodes until the island was taken by the Ottomans in 1522. While there was talk of merging the Templars and Hospitallers in by Clement V, but ultimately the Templars were charged with heresy and disbanded. The Teutonic Knights supported the later Prussian campaigns into the fifteenth century. Art and architecture According to the historian Joshua Prawer no major European poet, theologian, scholar or historian settled in the crusader states. Some went on pilgrimage, and this is seen in new imagery and ideas in western poetry. Although they did not migrate east themselves, their output often encouraged others to journey there on pilgrimage. Historians consider the crusader military architecture of the Middle East to demonstrate a synthesis of the European, Byzantine and Muslim traditions and to be the most original and impressive artistic achievement of the crusades. Castles were a tangible symbol of the dominance of a Latin Christian minority over a largely hostile majority population. They also acted as centres of administration. Modern historiography rejects the 19th-century consensus that Westerners learnt the basis of military architecture from the Near East, as Europe had already experienced rapid development in defensive technology before the First Crusade. Direct contact with Arab fortifications originally constructed by the Byzantines did influence developments in the east, but the lack of documentary evidence means that it remains difficult to differentiate between the importance of this design culture and the constraints of situation. The latter led to the inclusion of oriental design features such as large water reservoirs and the exclusion of occidental features such as moats. Typically, crusader church design was in the French Romanesque style. This can be seen in the 12th-century rebuilding of the Holy Sepulchre. It retained some of the Byzantine details, but new arches and chapels were built to northern French, Aquitanian, and Provençal patterns. There is little trace of any surviving indigenous influence in sculpture, although in the Holy Sepulchre the column capitals of the south facade follow classical Syrian patterns. In contrast to architecture and sculpture, it is in the area of visual culture that the assimilated nature of the society was demonstrated. Throughout the 12thand 13thcenturies the influence of indigenous artists was demonstrated in the decoration of shrines, paintings and the production of illuminated manuscripts. Frankish practitioners borrowed methods from the Byzantines and indigenous artists and iconographical practice leading to a cultural synthesis, illustrated by the Church of the Nativity. Wall mosaics were unknown in the west but in widespread use in the crusader states. Whether this was by indigenous craftsmen or learnt by Frankish ones is unknown, but a distinctive original artistic style evolved. Manuscripts were produced and illustrated in workshops housing Italian, French, English and local craftsmen leading to a cross-fertilisation of ideas and techniques. An example of this is the Melisende Psalter, created by several hands in a workshop attached to the Holy Sepulchre. This style could have both reflected and influenced the taste of patrons of the arts. But what is seen is an increase in stylised, Byzantine-influenced content. This extended to the production of icons, unknown at the time to the Franks, sometimes in a Frankish style and even of western saints. This is seen as the origin of Italian panel painting. While it is difficult to track illumination of manuscripts and castle design back to their origins, textual sources are simpler. The translations made in Antioch are notable, but they are considered of secondary importance to the works emanating from Muslim Spain and from the hybrid culture of Sicily. Finance of the Crusades Crusade finance and taxation left a legacy of social, financial, and legal institutions. Property became available while coinage and precious materials circulated more readily within Europe. Crusading expeditions created immense demands for food supplies, weapons, and shipping that benefited merchants and artisans. Levies for crusades contributed to the development of centralised financial administrations and the growth of papal and royal taxation. This aided development of representative bodies whose consent was required for many forms of taxation. The Crusades strengthened exchanges between Oriental and Occidental economic spheres. The transport of pilgrims and crusaders notably benefitted Italian maritime cities, such as the trio of Venice, Pisa, and Genoa. Having obtained commercial privileges in the fortified places of Syria, they became the favoured intermediaries for trade in goods such as silk, spices, as well as other raw alimentary goods and mineral products. Trade with the Muslim world was thus extended beyond existing limits. Merchants were further advantaged by technological improvements, and long-distance trade as a whole expanded. The increased volume of goods being traded through ports of the Latin Levant and the Muslim world made this the cornerstone of a wider Middle Eastern economy, as manifested in important cities along the trade routes, such as Aleppo, Damascus, and Acre. It became increasingly common for European merchants to venture further east, and business was conducted fairly despite religious differences, and continued even in times of political and military tensions. Legacy The Crusades created national mythologies, tales of heroism, and a few place names. Historical parallelism and the tradition of drawing inspiration from the Middle Ages have become keystones of political Islam encouraging ideas of a modern jihad and a centuries-long struggle against Christian states, while secular Arab nationalism highlights the role of western imperialism. Modern Muslim thinkers, politicians and historians have drawn parallels between the crusades and political developments such as the establishment of Israel in 1948. Right-wing circles in the western world have drawn opposing parallels, considering Christianity to be under an Islamic religious and demographic threat that is analogous to the situation at the time of the crusades. Crusader symbols and anti-Islamic rhetoric are presented as an appropriate response. These symbols and rhetoric are used to provide a religious justification and inspiration for a struggle against a religious enemy. Historiography The historiography of the Crusades is concerned with their "history of the histories" during the Crusader period. The subject is a complex one, with overviews provided in Select Bibliography of the Crusades, Modern Historiography, and Crusades (Bibliography and Sources). The histories describing the Crusades are broadly of three types: (1) The primary sources of the Crusades, which include works written in the medieval period, generally by participants in the Crusade or written contemporaneously with the event, letters and documents in archives, and archaeological studies; (2) secondary sources, beginning with early consolidated works in the 16th century and continuing to modern times; and (3) tertiary sources, primarily encyclopedias, bibliographies and genealogies. Primary sources. The primary sources for the Crusades are generally presented in the individual articles on each Crusade and summarized in the list of sources for the Crusades. For the First Crusade, the original Latin chronicles, including the Gesta Francorum, works by Albert of Aachen and Fulcher of Chartres, The Alexiad by Byzantine princess Anna Komnene, the Complete Work of History by Muslim historian Ali ibn al-Athir, and the Chronicle of Armenian historian Matthew of Edessa, provide for a starting point for the study of the Crusades' historiography. Many of these and related texts are found in the collections Recueil des historiens des croisades (RHC) and Crusade Texts in Translation. The work of William of Tyre, Historia Rerum in Partibus Transmarinis Gestarum, and its continuations by later historians complete the foundational work of the traditional Crusade. Some of these works also provide insight into the later Crusades and Crusader states. Other works include: Eyewitness accounts of the Second Crusade by Odo of Deuil and Otto of Freising. The Arab view from Damascus is provided by ibn al-Qalanisi. Works on the Third Crusade such as Libellus de Expugnatione Terrae Sanctae per Saladinum expeditione, the Itinerarium Regis Ricardi, and the works of Crusaders Tageno and Roger of Howden, and the narratives of Richard of Devizes, Ralph de Diceto, Ralph of Coggeshall and Arnold of Lübeck. The Arabic works by al-Isfahani and al-Maqdisi as well as the biography of Saladin by Baha ad-Din ibn Shaddad are also of interest. The Fourth Crusade is described in the Devastatio Constantinopolitana and works of Geoffrey of Villehardouin, in his chronicle De la Conquête de Constantinople, Robert de Clari and Gunther of Pairis. The view of Byzantium is provided by Niketas Choniates and the Arab perspective is given by Abū Shāma and Abu'l-Fida. The history of the Fifth and Sixth Crusades is well represented in the works of Jacques de Vitry, Oliver of Paderborn and Roger of Wendover, and the Arabic works of Badr al-Din al-Ayni. Key sources for the later Crusades include Gestes des Chiprois, Jean de Joinville's Life of Saint Louis, as well as works by Guillaume de Nangis, Matthew Paris, Fidentius of Padua and al-Makrizi. After the fall of Acre, the crusades continued in through the 16th century. Principal references on this subject are the Wisconsin Collaborative History of the Crusades and Norman Housley's The Later Crusades, 1274–1580: From Lyons to Alcazar. Complete bibliographies are also given in these works. Secondary sources. The secondary sources of the Crusades began in the 16th century, with the first use of the term crusades was by 17th century French historian Louis Maimbourg in his Histoire des Croisades pour la délivrance de la Terre Sainte. Other works of the 18th century include Voltaire's Histoire des Croisades, and Edward Gibbon's Decline and Fall of the Roman Empire, excerpted as The Crusades, A.D. 1095–1261 and published in 1870. This edition also includes an essay on chivalry by Sir Walter Scott, whose works helped popularize the Crusades. Early in the 19th century, the monumental Histoire des Croisades was published by the French historian Joseph François Michaud, a major new narrative based on original sources. These histories have provided evolving views of the Crusades as discussed in detail in the Historiography writeup in Crusading movement. Modern works that serve as secondary source material are listed in the Bibliography section below and need no further discussion here. Tertiary sources. Three such works are: Louis Bréhier's multiple works on the Crusades in the Catholic Encyclopedia; the works of Ernest Barker in the Encyclopædia Britannica (11th edition), later expanded into a separate publication; and The Crusades: An Encyclopedia (2006), edited by historian Alan V. Murray. See also Criticism of crusading Crusades after Acre, 1291–1399 History of Christianity History of the Knights Hospitaller in the Levant History of the Knights Templar List of Crusades to Europe and the Holy Land Military history of the Crusader states Women in the Crusades References Bibliography Catholicism and Islam Catholicism-related controversies Christianity-related controversies Islam-related controversies Judaism-related controversies Medieval Asia Medieval Africa Medieval history of the Middle East
The East Baltic race is one of the subcategories of the Europid race, into which it was divided by biological anthropologists and scientific racism in the early 20th century. Such racial typologies have been rejected by modern anthropology for several reasons. The term East Baltic race was coined by the anthropologist Rolf Nordenstreng, but was popularised by the race theorist Hans F. K. Günther. This race was living in Finland, Estonia and Northern Russia. And was present among Slavic, Baltic, Uralic and even some individual Germanic people (I.E Prussian and Swedish locals who immigrated in the area throughout medieval and early modern history) of the Baltic sea. It was characterised as "short-headed, broad-faced, with heavy, massive under-jaw, chin not prominent, flat, rather broad, short nose with low bridge; stiff, light (ash-blond) hair; light (grey or pale blue) eyes, standing out; light skin with a greyish undertone. The American Eugenics Society described East Baltic people as being Mongolized. The Nazi philologist Josef Nadler declared the East Baltic race to be the main source of German Romanticism. Also in the Third Reich the philologist Julius Petersen wrote that Ludwig Tieck's Romanticism might have been promoted by his possible Slavic heritage, referring to the American biographer Edwin H. Zeydel's theory, that Tieck's grandmother was Russian. See also Scientific racism References Baltic peoples Historical definitions of race
Aquatic timing systems are designed to automate the process of timing, judging, and scoring in competitive swimming and other aquatic sports, including diving, water polo, and synchronized swimming. These systems are also used in the training of athletes, and many add-on products have been developed to assist with this process. Some aquatic timing systems manufacturers include Colorado Time Systems, Swiss Timing (Omega), Daktronics and Seiko. History Prior to the 1950s, competitive swimmers relied on the sound of a starting pistol to start their races and mechanical stopwatches to record their times at the end of a race. A limitation of analog timekeeping was the technology's inability to reliably record times accurately below one tenth (0.1) of a second. In 1967, the Omega company of Switzerland developed the first electronic timing system for swimming that attempted to coordinate the physical the recorded time. This new system placed contact pads (known as Touchpad) in each lane of the pool, calibrated in such a fashion that the incidental water movement of the competitors or wave action did not trigger the pad sensors; the pad was only activated by the touch of the swimmer at the end of the race. Meet Manager Programs Meet Managers are programs created to automate the process of generating results and can be either downloadable or web applications. They are normally sold to clubs and can also be connected to the timing system to obtain timing information automatically. Some meet manager developers include Active Hy-Tek, Geologix, SwimTopia, NBC Sports and Bigmidia. See also Fully automatic time Scoreboards References Sports equipment Sports officiating technology Timekeeping
```javascript Battery API High Resolution Time API User Timing API Navigation Timing API Page Visibility API ```
```scheme # This file is part of OpenMediaVault. # # @license path_to_url GPL Version 3 # @author Volker Theile <volker.theile@openmediavault.org> # # OpenMediaVault is free software: you can redistribute it and/or modify # any later version. # # OpenMediaVault is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # along with OpenMediaVault. If not, see <path_to_url # Documentation/Howto: # path_to_url # path_to_url # path_to_url # path_to_url # Testing: # podman exec -it minio-app /bin/bash # podman logs -f minio-app # podman logs -f minio-proxy {% set config = salt['omv_conf.get']('conf.service.minio') %} {% set app_image = salt['pillar.get']('default:OMV_S3_APP_CONTAINER_IMAGE', 'quay.io/minio/minio:latest') %} {% set proxy_image = salt['pillar.get']('default:OMV_S3_PROXY_CONTAINER_IMAGE', 'docker.io/library/caddy:latest') %} {% set ssl_enabled = config.consolesslcertificateref | length > 0 %} {% if config.enable | to_bool %} create_minio_app_container_systemd_unit_file: file.managed: - name: "/etc/systemd/system/container-minio-app.service" - source: - salt://{{ tpldir }}/files/container-minio-app.service.j2 - template: jinja - context: config: {{ config | json }} - user: root - group: root - mode: 644 create_minio_pod_systemd_unit_file: file.managed: - name: "/etc/systemd/system/pod-minio.service" - source: - salt://{{ tpldir }}/files/pod-minio.service.j2 - template: jinja - context: config: {{ config | json }} - user: root - group: root - mode: 644 minio_pull_app_image: cmd.run: - name: podman pull {{ app_image }} - unless: podman image exists {{ app_image }} - failhard: True minio_app_image_exists: cmd.run: - name: podman image exists {{ app_image }} - failhard: True {% if ssl_enabled %} create_minio_proxy_container_systemd_unit_file: file.managed: - name: "/etc/systemd/system/container-minio-proxy.service" - source: - salt://{{ tpldir }}/files/container-minio-proxy.service.j2 - template: jinja - context: config: {{ config | json }} - user: root - group: root - mode: 644 create_minio_proxy_container_caddyfile: file.managed: - name: "/var/lib/minio/Caddyfile" - source: - salt://{{ tpldir }}/files/Caddyfile.j2 - template: jinja - context: config: {{ config | json }} - user: root - group: root - mode: 644 minio_pull_proxy_image: cmd.run: - name: podman pull {{ proxy_image }} - unless: podman image exists {{ proxy_image }} - failhard: True minio_proxy_image_exists: cmd.run: - name: podman image exists {{ proxy_image }} - failhard: True {% else %} stop_minio_proxy_service: service.dead: - name: container-minio-proxy - enable: False purge_minio_proxy_container_caddyfile: file.absent: - name: "/var/lib/minio/Caddyfile" purge_minio_proxy_container_systemd_unit_file: file.absent: - name: "/etc/systemd/system/container-minio-proxy.service" {% endif %} minio_systemctl_daemon_reload: module.run: - service.systemctl_reload: start_minio_service: service.running: - name: pod-minio - enable: True - watch: - file: create_minio_pod_systemd_unit_file - file: create_minio_app_container_systemd_unit_file {% else %} stop_minio_service: service.dead: - name: pod-minio - enable: False remove_minio_proxy_container_caddyfile: file.absent: - name: "/var/lib/minio/Caddyfile" remove_minio_app_container_systemd_unit_file: file.absent: - name: "/etc/systemd/system/container-minio-app.service" remove_minio_proxy_container_systemd_unit_file: file.absent: - name: "/etc/systemd/system/container-minio-proxy.service" remove_minio_pod_systemd_unit_file: file.absent: - name: "/etc/systemd/system/pod-minio.service" minio_systemctl_daemon_reload: module.run: - service.systemctl_reload: {% endif %} ```
Kampfretter () is a special operations force of the German Air Force, tasked with combat search and rescue (CSAR) missions. As part of personnel recovery Kampfretter units are tasked with the recovery of air crews and personnel in hazardous regions or behind enemy lines. Selection and training Candidates for serving as part of the Kampfretter units are recruited from the German Air Force Regiment. In order to increase the number of candidates, recruitment is being opened continuously for members of the German Army's Rapid Forces Division. The completion of basic infantry training and an enlistment of 20 years is required for prospective members. Candidates undergo a strict selection process which is followed by training in: Specialized infantry training Completion of German commando course Parachutist course including HALO/HAHO qualification Rappelling/fast-roping Mountain rescue SERE training Close quarter fighting Extraction via helicopter Medical training The completion of the entire training circle may take up to two years. Mission and deployments Since their establishment Kampfretter personnel have been deployed as part of the NATO-led Resolute Support Mission in Afghanistan. Along with the German Army's KSK Kampfretter were among the first to respond to the 2016 bombing of the German consulate at Mazar-i-Sharif. See also United States Air Force Pararescue European Personnel Recovery Centre References Special forces of Germany Airborne units and formations of Germany Units and formations of the German Army (1956–present) German Air Force Search and rescue
```turing #!/usr/bin/perl use strict; use Test::More tests => 6; use FindBin qw($Bin); use lib "$Bin/lib"; use MemcachedTest; my $server = new_memcached(); my $sock = $server->sock; # set foo (and should get it) for my $flags (0, 123, 2**16-1) { print $sock "set foo $flags 0 6\r\nfooval\r\n"; is(scalar <$sock>, "STORED\r\n", "stored foo"); mem_get_is({ sock => $sock, flags => $flags }, "foo", "fooval", "got flags $flags back"); } ```
Kizzy Yuanda Constance Getrouw (born 14 March 1979) is a Dutch actress, singer-songwriter, poet and television host who performs mononymously as Kizzy. She became a household name in the Netherlands Antilles with hit songs and TV shows. In the United States she presented TV shows on both The Gossip Swapp on XY TV and CN8. Her best known poems are Supervrouwen and Cel Voor Cel. Kizzy currently presents kids TV shows. Early years Kizzy was born in Rotterdam in the Netherlands, to a Surinamese father and an Antillean mother (Sint Eustatius). At the age of four, her family moved to the Caribbean island of Curaçao. Starting at the age of nine, she had lead roles in various televised musicals and plays, and won numerous talent competitions including De Soundmix Showand The European Caribbean Talent Contest in 1995. In the following year won the National Song Festival thus she became the representative of the Netherlands Antilles at the Caribbean Song Festival in Barbados, finishing in second place. Moreover, she performed at award shows, beauty pageants and sang the National Anthem for presidential and big sports events, including The Caribbean Olympics and the Andruw Jones Awards. Career Kizzy's career took off in 1997 with the success of the hit album Lamu-Lamu, which became a number one selling album in the Netherlands Antilles. She also became the host of Wie is er Nieuwsgierig? a successful kids TV show. In 1998, Kizzy was signed to German label TMP. During the recording sessions in Majorca she was accepted at Berklee College of Music on a full scholarship. Kizzy moved to Boston, MA. Her German CD was not released. While at Berklee she studied ballet and musical theater at the Boston Conservatory, and acting at Emerson College. In the summer of 1999 Kizzy flew to Amsterdam to host and perform at the Kwakoe Festival, the Netherlands' biggest annual multicultural festival. She recorded the official commercial that was used to promote the event and the producers of Radio Wereld Omroep in Hilversum recorded a documentary of her career that was aired on TV. Prior to graduating from Berklee College of Music in 2003 with a degree in Performance, she was featured at the college's most prestigious concerts such as Tribute to David Bowie Commencement Concert, Singer's Showcase and The Berklee Gospel Choir. She performed as a backup vocalist for artists such as Steven Tyler (Aerosmith), Al Kooper, Grammy nominee Susan Tedeschi, and Grammy award winner Kim Burrell. Around the same time, Kizzy appeared on the VH1 TV series Sound Affects. In addition, she was featured on the cover of The Improper Bostonian Magazine. In 2005, Kizzy became the lead singer of the Bo Winiker Orchestra with whom she performed for Bill Clinton, Glenn Close and with whom she gained critical acclaim for performing songs in Hebrew. In 2006, she became a reporter on "The VIP" and the host of "Gossip Swap" on XYTV and in 2007 she became an entertainment reporter on Dirty Water TV. She was the face of several TV commercials and was the host and a jury member at the Miss Boston 2008 competition. Kizzy moved back to the Netherlands in 2009. In 2011, she performed her published poem "Nederland Schreeuwt om Kunst en Cultuur" at the official televised Nederland Schreeuwt om Cultuur' event. The first single of her solo album was called This Bed Ain't Big Enough and was released in October 2012. On 5 November 2012 Kizzy's solo album was released. The album Unspoken Rhyme was produced by Robert Jansen and multiple award-winning producer Piet Souer. In 2013, performed in shows as the Delft Jazz Festival and she flew to Curaçao with her band to perform at the Curaçao North Sea Jazz Festival, alongside artists as Prince and Luis Minguel. In 2014, she was the host at the annual Miss Valentine competition, Goois Jazzfestival, and the "International Women's Day" event, where she performed her poem 'Internationale Vrouwendag' (International Women's Day). Kizzy started presenting a Dutch kids television show on Open Rotterdam in 2017. She performed during the Women's March in the Hague and was invited to recite her poem Supervrouwen for Queen Maxima of the Netherlands during the Joke Smit Awards. Filmography Wie is er Nieuwsgierig? (1997) Sound Affects (2001) The VIP (2004–2006) The Gossip Swapp (2006) Dirty Water (2007–2008) OPENBOEK (2017) Discography Cocktail, Lamu - Lamu (1997) Unspoken Rhyme (2012) Have Yourself A Merry Little Christmas (2013) References 1. The Boston Globe article 2. Biography 3. The Improper Bostonian Magazine 4. Berklee Today 'Berklee Today Magazine'Professional Activities of Berklee Alumni 5. Mallorca Magazine External links Official site 1979 births Berklee College of Music alumni Boston Conservatory at Berklee alumni Curaçao musicians Dutch infotainers Dutch people of Sint Eustatius descent Dutch people of Surinamese descent Dutch women singer-songwriters Dutch singer-songwriters Dutch women television presenters Emerson College alumni Living people Musicians from Rotterdam 21st-century Dutch singers 21st-century Dutch women singers Mass media people from Rotterdam Dutch actresses Dutch women poets
```haskell {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeApplications #-} -- | Tests for TPLC parser. module Parser.Spec (tests) where import PlutusCore import PlutusCore.Error (ParserErrorBundle) import PlutusCore.Generators.Hedgehog.AST import PlutusCore.Test (isSerialisable) import PlutusPrelude import Data.Text qualified as T import Hedgehog hiding (Var) import Hedgehog.Gen qualified as Gen import Hedgehog.Range qualified as Range import Test.Tasty import Test.Tasty.Hedgehog -- | The `SrcSpan` of a parsed `Term` should not including trailing whitespaces. propTermSrcSpan :: Property propTermSrcSpan = property $ do term <- _progTerm <$> forAllWith display (runAstGen $ discardIfAnyConstant (not . isSerialisable) genProgram) let code = display (term :: Term TyName Name DefaultUni DefaultFun ()) let (endingLine, endingCol) = length &&& T.length . last $ T.lines code trailingSpaces <- forAll $ Gen.text (Range.linear 0 10) (Gen.element [' ', '\n']) case runQuoteT . parseTerm @ParserErrorBundle $ code <> trailingSpaces of Right parsed -> let sp = termAnn parsed in (srcSpanELine sp, srcSpanECol sp) === (endingLine, endingCol + 1) Left err -> annotate (display err) >> failure tests :: TestTree tests = testGroup "parsing" [ testPropertyNamed "parser captures ending positions correctly" "propTermSrcSpan" propTermSrcSpan ] ```