text
stringlengths
1
22.8M
```c /* * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. * */ #include <linux/firmware.h> #include <linux/module.h> #include <linux/pci.h> #include <drm/drm_cache.h> #include "amdgpu.h" #include "cikd.h" #include "cik.h" #include "gmc_v7_0.h" #include "amdgpu_ucode.h" #include "amdgpu_amdkfd.h" #include "amdgpu_gem.h" #include "bif/bif_4_1_d.h" #include "bif/bif_4_1_sh_mask.h" #include "gmc/gmc_7_1_d.h" #include "gmc/gmc_7_1_sh_mask.h" #include "oss/oss_2_0_d.h" #include "oss/oss_2_0_sh_mask.h" #include "dce/dce_8_0_d.h" #include "dce/dce_8_0_sh_mask.h" #include "amdgpu_atombios.h" #include "ivsrcid/ivsrcid_vislands30.h" static void gmc_v7_0_set_gmc_funcs(struct amdgpu_device *adev); static void gmc_v7_0_set_irq_funcs(struct amdgpu_device *adev); static int gmc_v7_0_wait_for_idle(void *handle); MODULE_FIRMWARE("amdgpu/bonaire_mc.bin"); MODULE_FIRMWARE("amdgpu/hawaii_mc.bin"); MODULE_FIRMWARE("amdgpu/topaz_mc.bin"); static const u32 golden_settings_iceland_a11[] = { mmVM_PRT_APERTURE0_LOW_ADDR, 0x0fffffff, 0x0fffffff, mmVM_PRT_APERTURE1_LOW_ADDR, 0x0fffffff, 0x0fffffff, mmVM_PRT_APERTURE2_LOW_ADDR, 0x0fffffff, 0x0fffffff, mmVM_PRT_APERTURE3_LOW_ADDR, 0x0fffffff, 0x0fffffff }; static const u32 iceland_mgcg_cgcg_init[] = { mmMC_MEM_POWER_LS, 0xffffffff, 0x00000104 }; static void gmc_v7_0_init_golden_registers(struct amdgpu_device *adev) { switch (adev->asic_type) { case CHIP_TOPAZ: amdgpu_device_program_register_sequence(adev, iceland_mgcg_cgcg_init, ARRAY_SIZE(iceland_mgcg_cgcg_init)); amdgpu_device_program_register_sequence(adev, golden_settings_iceland_a11, ARRAY_SIZE(golden_settings_iceland_a11)); break; default: break; } } static void gmc_v7_0_mc_stop(struct amdgpu_device *adev) { u32 blackout; gmc_v7_0_wait_for_idle((void *)adev); blackout = RREG32(mmMC_SHARED_BLACKOUT_CNTL); if (REG_GET_FIELD(blackout, MC_SHARED_BLACKOUT_CNTL, BLACKOUT_MODE) != 1) { /* Block CPU access */ WREG32(mmBIF_FB_EN, 0); /* blackout the MC */ blackout = REG_SET_FIELD(blackout, MC_SHARED_BLACKOUT_CNTL, BLACKOUT_MODE, 0); WREG32(mmMC_SHARED_BLACKOUT_CNTL, blackout | 1); } /* wait for the MC to settle */ udelay(100); } static void gmc_v7_0_mc_resume(struct amdgpu_device *adev) { u32 tmp; /* unblackout the MC */ tmp = RREG32(mmMC_SHARED_BLACKOUT_CNTL); tmp = REG_SET_FIELD(tmp, MC_SHARED_BLACKOUT_CNTL, BLACKOUT_MODE, 0); WREG32(mmMC_SHARED_BLACKOUT_CNTL, tmp); /* allow CPU access */ tmp = REG_SET_FIELD(0, BIF_FB_EN, FB_READ_EN, 1); tmp = REG_SET_FIELD(tmp, BIF_FB_EN, FB_WRITE_EN, 1); WREG32(mmBIF_FB_EN, tmp); } /** * gmc_v7_0_init_microcode - load ucode images from disk * * @adev: amdgpu_device pointer * * Use the firmware interface to load the ucode images into * the driver (not loaded into hw). * Returns 0 on success, error on failure. */ static int gmc_v7_0_init_microcode(struct amdgpu_device *adev) { const char *chip_name; char fw_name[30]; int err; DRM_DEBUG("\n"); switch (adev->asic_type) { case CHIP_BONAIRE: chip_name = "bonaire"; break; case CHIP_HAWAII: chip_name = "hawaii"; break; case CHIP_TOPAZ: chip_name = "topaz"; break; case CHIP_KAVERI: case CHIP_KABINI: case CHIP_MULLINS: return 0; default: return -EINVAL; } snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mc.bin", chip_name); err = amdgpu_ucode_request(adev, &adev->gmc.fw, fw_name); if (err) { pr_err("cik_mc: Failed to load firmware \"%s\"\n", fw_name); amdgpu_ucode_release(&adev->gmc.fw); } return err; } /** * gmc_v7_0_mc_load_microcode - load MC ucode into the hw * * @adev: amdgpu_device pointer * * Load the GDDR MC ucode into the hw (CIK). * Returns 0 on success, error on failure. */ static int gmc_v7_0_mc_load_microcode(struct amdgpu_device *adev) { const struct mc_firmware_header_v1_0 *hdr; const __le32 *fw_data = NULL; const __le32 *io_mc_regs = NULL; u32 running; int i, ucode_size, regs_size; if (!adev->gmc.fw) return -EINVAL; hdr = (const struct mc_firmware_header_v1_0 *)adev->gmc.fw->data; amdgpu_ucode_print_mc_hdr(&hdr->header); adev->gmc.fw_version = le32_to_cpu(hdr->header.ucode_version); regs_size = le32_to_cpu(hdr->io_debug_size_bytes) / (4 * 2); io_mc_regs = (const __le32 *) (adev->gmc.fw->data + le32_to_cpu(hdr->io_debug_array_offset_bytes)); ucode_size = le32_to_cpu(hdr->header.ucode_size_bytes) / 4; fw_data = (const __le32 *) (adev->gmc.fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes)); running = REG_GET_FIELD(RREG32(mmMC_SEQ_SUP_CNTL), MC_SEQ_SUP_CNTL, RUN); if (running == 0) { /* reset the engine and set to writable */ WREG32(mmMC_SEQ_SUP_CNTL, 0x00000008); WREG32(mmMC_SEQ_SUP_CNTL, 0x00000010); /* load mc io regs */ for (i = 0; i < regs_size; i++) { WREG32(mmMC_SEQ_IO_DEBUG_INDEX, le32_to_cpup(io_mc_regs++)); WREG32(mmMC_SEQ_IO_DEBUG_DATA, le32_to_cpup(io_mc_regs++)); } /* load the MC ucode */ for (i = 0; i < ucode_size; i++) WREG32(mmMC_SEQ_SUP_PGM, le32_to_cpup(fw_data++)); /* put the engine back into the active state */ WREG32(mmMC_SEQ_SUP_CNTL, 0x00000008); WREG32(mmMC_SEQ_SUP_CNTL, 0x00000004); WREG32(mmMC_SEQ_SUP_CNTL, 0x00000001); /* wait for training to complete */ for (i = 0; i < adev->usec_timeout; i++) { if (REG_GET_FIELD(RREG32(mmMC_SEQ_TRAIN_WAKEUP_CNTL), MC_SEQ_TRAIN_WAKEUP_CNTL, TRAIN_DONE_D0)) break; udelay(1); } for (i = 0; i < adev->usec_timeout; i++) { if (REG_GET_FIELD(RREG32(mmMC_SEQ_TRAIN_WAKEUP_CNTL), MC_SEQ_TRAIN_WAKEUP_CNTL, TRAIN_DONE_D1)) break; udelay(1); } } return 0; } static void gmc_v7_0_vram_gtt_location(struct amdgpu_device *adev, struct amdgpu_gmc *mc) { u64 base = RREG32(mmMC_VM_FB_LOCATION) & 0xFFFF; base <<= 24; amdgpu_gmc_vram_location(adev, mc, base); amdgpu_gmc_gart_location(adev, mc); } /** * gmc_v7_0_mc_program - program the GPU memory controller * * @adev: amdgpu_device pointer * * Set the location of vram, gart, and AGP in the GPU's * physical address space (CIK). */ static void gmc_v7_0_mc_program(struct amdgpu_device *adev) { u32 tmp; int i, j; /* Initialize HDP */ for (i = 0, j = 0; i < 32; i++, j += 0x6) { WREG32((0xb05 + j), 0x00000000); WREG32((0xb06 + j), 0x00000000); WREG32((0xb07 + j), 0x00000000); WREG32((0xb08 + j), 0x00000000); WREG32((0xb09 + j), 0x00000000); } WREG32(mmHDP_REG_COHERENCY_FLUSH_CNTL, 0); if (gmc_v7_0_wait_for_idle((void *)adev)) dev_warn(adev->dev, "Wait for MC idle timedout !\n"); if (adev->mode_info.num_crtc) { /* Lockout access through VGA aperture*/ tmp = RREG32(mmVGA_HDP_CONTROL); tmp = REG_SET_FIELD(tmp, VGA_HDP_CONTROL, VGA_MEMORY_DISABLE, 1); WREG32(mmVGA_HDP_CONTROL, tmp); /* disable VGA render */ tmp = RREG32(mmVGA_RENDER_CONTROL); tmp = REG_SET_FIELD(tmp, VGA_RENDER_CONTROL, VGA_VSTATUS_CNTL, 0); WREG32(mmVGA_RENDER_CONTROL, tmp); } /* Update configuration */ WREG32(mmMC_VM_SYSTEM_APERTURE_LOW_ADDR, adev->gmc.vram_start >> 12); WREG32(mmMC_VM_SYSTEM_APERTURE_HIGH_ADDR, adev->gmc.vram_end >> 12); WREG32(mmMC_VM_SYSTEM_APERTURE_DEFAULT_ADDR, adev->mem_scratch.gpu_addr >> 12); WREG32(mmMC_VM_AGP_BASE, 0); WREG32(mmMC_VM_AGP_TOP, 0x0FFFFFFF); WREG32(mmMC_VM_AGP_BOT, 0x0FFFFFFF); if (gmc_v7_0_wait_for_idle((void *)adev)) dev_warn(adev->dev, "Wait for MC idle timedout !\n"); WREG32(mmBIF_FB_EN, BIF_FB_EN__FB_READ_EN_MASK | BIF_FB_EN__FB_WRITE_EN_MASK); tmp = RREG32(mmHDP_MISC_CNTL); tmp = REG_SET_FIELD(tmp, HDP_MISC_CNTL, FLUSH_INVALIDATE_CACHE, 0); WREG32(mmHDP_MISC_CNTL, tmp); tmp = RREG32(mmHDP_HOST_PATH_CNTL); WREG32(mmHDP_HOST_PATH_CNTL, tmp); } /** * gmc_v7_0_mc_init - initialize the memory controller driver params * * @adev: amdgpu_device pointer * * Look up the amount of vram, vram width, and decide how to place * vram and gart within the GPU's physical address space (CIK). * Returns 0 for success. */ static int gmc_v7_0_mc_init(struct amdgpu_device *adev) { int r; adev->gmc.vram_width = amdgpu_atombios_get_vram_width(adev); if (!adev->gmc.vram_width) { u32 tmp; int chansize, numchan; /* Get VRAM informations */ tmp = RREG32(mmMC_ARB_RAMCFG); if (REG_GET_FIELD(tmp, MC_ARB_RAMCFG, CHANSIZE)) chansize = 64; else chansize = 32; tmp = RREG32(mmMC_SHARED_CHMAP); switch (REG_GET_FIELD(tmp, MC_SHARED_CHMAP, NOOFCHAN)) { case 0: default: numchan = 1; break; case 1: numchan = 2; break; case 2: numchan = 4; break; case 3: numchan = 8; break; case 4: numchan = 3; break; case 5: numchan = 6; break; case 6: numchan = 10; break; case 7: numchan = 12; break; case 8: numchan = 16; break; } adev->gmc.vram_width = numchan * chansize; } /* size in MB on si */ adev->gmc.mc_vram_size = RREG32(mmCONFIG_MEMSIZE) * 1024ULL * 1024ULL; adev->gmc.real_vram_size = RREG32(mmCONFIG_MEMSIZE) * 1024ULL * 1024ULL; if (!(adev->flags & AMD_IS_APU)) { r = amdgpu_device_resize_fb_bar(adev); if (r) return r; } adev->gmc.aper_base = adev->fb_aper_offset; adev->gmc.aper_size = adev->fb_aper_size; #ifdef CONFIG_X86_64 if ((adev->flags & AMD_IS_APU) && adev->gmc.real_vram_size > adev->gmc.aper_size && !amdgpu_passthrough(adev)) { adev->gmc.aper_base = ((u64)RREG32(mmMC_VM_FB_OFFSET)) << 22; adev->gmc.aper_size = adev->gmc.real_vram_size; } #endif adev->gmc.visible_vram_size = adev->gmc.aper_size; /* set the gart size */ if (amdgpu_gart_size == -1) { switch (adev->asic_type) { case CHIP_TOPAZ: /* no MM engines */ default: adev->gmc.gart_size = 256ULL << 20; break; #ifdef CONFIG_DRM_AMDGPU_CIK case CHIP_BONAIRE: /* UVD, VCE do not support GPUVM */ case CHIP_HAWAII: /* UVD, VCE do not support GPUVM */ case CHIP_KAVERI: /* UVD, VCE do not support GPUVM */ case CHIP_KABINI: /* UVD, VCE do not support GPUVM */ case CHIP_MULLINS: /* UVD, VCE do not support GPUVM */ adev->gmc.gart_size = 1024ULL << 20; break; #endif } } else { adev->gmc.gart_size = (u64)amdgpu_gart_size << 20; } adev->gmc.gart_size += adev->pm.smu_prv_buffer_size; gmc_v7_0_vram_gtt_location(adev, &adev->gmc); return 0; } /** * gmc_v7_0_flush_gpu_tlb_pasid - tlb flush via pasid * * @adev: amdgpu_device pointer * @pasid: pasid to be flush * @flush_type: type of flush * @all_hub: flush all hubs * @inst: is used to select which instance of KIQ to use for the invalidation * * Flush the TLB for the requested pasid. */ static int gmc_v7_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev, uint16_t pasid, uint32_t flush_type, bool all_hub, uint32_t inst) { int vmid; unsigned int tmp; if (amdgpu_in_reset(adev)) return -EIO; for (vmid = 1; vmid < 16; vmid++) { tmp = RREG32(mmATC_VMID0_PASID_MAPPING + vmid); if ((tmp & ATC_VMID0_PASID_MAPPING__VALID_MASK) && (tmp & ATC_VMID0_PASID_MAPPING__PASID_MASK) == pasid) { WREG32(mmVM_INVALIDATE_REQUEST, 1 << vmid); RREG32(mmVM_INVALIDATE_RESPONSE); break; } } return 0; } /* * GART * VMID 0 is the physical GPU addresses as used by the kernel. * VMIDs 1-15 are used for userspace clients and are handled * by the amdgpu vm/hsa code. */ /** * gmc_v7_0_flush_gpu_tlb - gart tlb flush callback * * @adev: amdgpu_device pointer * @vmid: vm instance to flush * @vmhub: which hub to flush * @flush_type: type of flush * * * Flush the TLB for the requested page table (CIK). */ static void gmc_v7_0_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid, uint32_t vmhub, uint32_t flush_type) { /* bits 0-15 are the VM contexts0-15 */ WREG32(mmVM_INVALIDATE_REQUEST, 1 << vmid); } static uint64_t gmc_v7_0_emit_flush_gpu_tlb(struct amdgpu_ring *ring, unsigned int vmid, uint64_t pd_addr) { uint32_t reg; if (vmid < 8) reg = mmVM_CONTEXT0_PAGE_TABLE_BASE_ADDR + vmid; else reg = mmVM_CONTEXT8_PAGE_TABLE_BASE_ADDR + vmid - 8; amdgpu_ring_emit_wreg(ring, reg, pd_addr >> 12); /* bits 0-15 are the VM contexts0-15 */ amdgpu_ring_emit_wreg(ring, mmVM_INVALIDATE_REQUEST, 1 << vmid); return pd_addr; } static void gmc_v7_0_emit_pasid_mapping(struct amdgpu_ring *ring, unsigned int vmid, unsigned int pasid) { amdgpu_ring_emit_wreg(ring, mmIH_VMID_0_LUT + vmid, pasid); } static void gmc_v7_0_get_vm_pde(struct amdgpu_device *adev, int level, uint64_t *addr, uint64_t *flags) { BUG_ON(*addr & 0xFFFFFF0000000FFFULL); } static void gmc_v7_0_get_vm_pte(struct amdgpu_device *adev, struct amdgpu_bo_va_mapping *mapping, uint64_t *flags) { *flags &= ~AMDGPU_PTE_EXECUTABLE; *flags &= ~AMDGPU_PTE_PRT; } /** * gmc_v7_0_set_fault_enable_default - update VM fault handling * * @adev: amdgpu_device pointer * @value: true redirects VM faults to the default page */ static void gmc_v7_0_set_fault_enable_default(struct amdgpu_device *adev, bool value) { u32 tmp; tmp = RREG32(mmVM_CONTEXT1_CNTL); tmp = REG_SET_FIELD(tmp, VM_CONTEXT1_CNTL, RANGE_PROTECTION_FAULT_ENABLE_DEFAULT, value); tmp = REG_SET_FIELD(tmp, VM_CONTEXT1_CNTL, DUMMY_PAGE_PROTECTION_FAULT_ENABLE_DEFAULT, value); tmp = REG_SET_FIELD(tmp, VM_CONTEXT1_CNTL, PDE0_PROTECTION_FAULT_ENABLE_DEFAULT, value); tmp = REG_SET_FIELD(tmp, VM_CONTEXT1_CNTL, VALID_PROTECTION_FAULT_ENABLE_DEFAULT, value); tmp = REG_SET_FIELD(tmp, VM_CONTEXT1_CNTL, READ_PROTECTION_FAULT_ENABLE_DEFAULT, value); tmp = REG_SET_FIELD(tmp, VM_CONTEXT1_CNTL, WRITE_PROTECTION_FAULT_ENABLE_DEFAULT, value); WREG32(mmVM_CONTEXT1_CNTL, tmp); } /** * gmc_v7_0_set_prt - set PRT VM fault * * @adev: amdgpu_device pointer * @enable: enable/disable VM fault handling for PRT */ static void gmc_v7_0_set_prt(struct amdgpu_device *adev, bool enable) { uint32_t tmp; if (enable && !adev->gmc.prt_warning) { dev_warn(adev->dev, "Disabling VM faults because of PRT request!\n"); adev->gmc.prt_warning = true; } tmp = RREG32(mmVM_PRT_CNTL); tmp = REG_SET_FIELD(tmp, VM_PRT_CNTL, CB_DISABLE_READ_FAULT_ON_UNMAPPED_ACCESS, enable); tmp = REG_SET_FIELD(tmp, VM_PRT_CNTL, CB_DISABLE_WRITE_FAULT_ON_UNMAPPED_ACCESS, enable); tmp = REG_SET_FIELD(tmp, VM_PRT_CNTL, TC_DISABLE_READ_FAULT_ON_UNMAPPED_ACCESS, enable); tmp = REG_SET_FIELD(tmp, VM_PRT_CNTL, TC_DISABLE_WRITE_FAULT_ON_UNMAPPED_ACCESS, enable); tmp = REG_SET_FIELD(tmp, VM_PRT_CNTL, L2_CACHE_STORE_INVALID_ENTRIES, enable); tmp = REG_SET_FIELD(tmp, VM_PRT_CNTL, L1_TLB_STORE_INVALID_ENTRIES, enable); tmp = REG_SET_FIELD(tmp, VM_PRT_CNTL, MASK_PDE0_FAULT, enable); WREG32(mmVM_PRT_CNTL, tmp); if (enable) { uint32_t low = AMDGPU_VA_RESERVED_SIZE >> AMDGPU_GPU_PAGE_SHIFT; uint32_t high = adev->vm_manager.max_pfn - (AMDGPU_VA_RESERVED_SIZE >> AMDGPU_GPU_PAGE_SHIFT); WREG32(mmVM_PRT_APERTURE0_LOW_ADDR, low); WREG32(mmVM_PRT_APERTURE1_LOW_ADDR, low); WREG32(mmVM_PRT_APERTURE2_LOW_ADDR, low); WREG32(mmVM_PRT_APERTURE3_LOW_ADDR, low); WREG32(mmVM_PRT_APERTURE0_HIGH_ADDR, high); WREG32(mmVM_PRT_APERTURE1_HIGH_ADDR, high); WREG32(mmVM_PRT_APERTURE2_HIGH_ADDR, high); WREG32(mmVM_PRT_APERTURE3_HIGH_ADDR, high); } else { WREG32(mmVM_PRT_APERTURE0_LOW_ADDR, 0xfffffff); WREG32(mmVM_PRT_APERTURE1_LOW_ADDR, 0xfffffff); WREG32(mmVM_PRT_APERTURE2_LOW_ADDR, 0xfffffff); WREG32(mmVM_PRT_APERTURE3_LOW_ADDR, 0xfffffff); WREG32(mmVM_PRT_APERTURE0_HIGH_ADDR, 0x0); WREG32(mmVM_PRT_APERTURE1_HIGH_ADDR, 0x0); WREG32(mmVM_PRT_APERTURE2_HIGH_ADDR, 0x0); WREG32(mmVM_PRT_APERTURE3_HIGH_ADDR, 0x0); } } /** * gmc_v7_0_gart_enable - gart enable * * @adev: amdgpu_device pointer * * This sets up the TLBs, programs the page tables for VMID0, * sets up the hw for VMIDs 1-15 which are allocated on * demand, and sets up the global locations for the LDS, GDS, * and GPUVM for FSA64 clients (CIK). * Returns 0 for success, errors for failure. */ static int gmc_v7_0_gart_enable(struct amdgpu_device *adev) { uint64_t table_addr; u32 tmp, field; int i; if (adev->gart.bo == NULL) { dev_err(adev->dev, "No VRAM object for PCIE GART.\n"); return -EINVAL; } amdgpu_gtt_mgr_recover(&adev->mman.gtt_mgr); table_addr = amdgpu_bo_gpu_offset(adev->gart.bo); /* Setup TLB control */ tmp = RREG32(mmMC_VM_MX_L1_TLB_CNTL); tmp = REG_SET_FIELD(tmp, MC_VM_MX_L1_TLB_CNTL, ENABLE_L1_TLB, 1); tmp = REG_SET_FIELD(tmp, MC_VM_MX_L1_TLB_CNTL, ENABLE_L1_FRAGMENT_PROCESSING, 1); tmp = REG_SET_FIELD(tmp, MC_VM_MX_L1_TLB_CNTL, SYSTEM_ACCESS_MODE, 3); tmp = REG_SET_FIELD(tmp, MC_VM_MX_L1_TLB_CNTL, ENABLE_ADVANCED_DRIVER_MODEL, 1); tmp = REG_SET_FIELD(tmp, MC_VM_MX_L1_TLB_CNTL, SYSTEM_APERTURE_UNMAPPED_ACCESS, 0); WREG32(mmMC_VM_MX_L1_TLB_CNTL, tmp); /* Setup L2 cache */ tmp = RREG32(mmVM_L2_CNTL); tmp = REG_SET_FIELD(tmp, VM_L2_CNTL, ENABLE_L2_CACHE, 1); tmp = REG_SET_FIELD(tmp, VM_L2_CNTL, ENABLE_L2_FRAGMENT_PROCESSING, 1); tmp = REG_SET_FIELD(tmp, VM_L2_CNTL, ENABLE_L2_PTE_CACHE_LRU_UPDATE_BY_WRITE, 1); tmp = REG_SET_FIELD(tmp, VM_L2_CNTL, ENABLE_L2_PDE0_CACHE_LRU_UPDATE_BY_WRITE, 1); tmp = REG_SET_FIELD(tmp, VM_L2_CNTL, EFFECTIVE_L2_QUEUE_SIZE, 7); tmp = REG_SET_FIELD(tmp, VM_L2_CNTL, CONTEXT1_IDENTITY_ACCESS_MODE, 1); tmp = REG_SET_FIELD(tmp, VM_L2_CNTL, ENABLE_DEFAULT_PAGE_OUT_TO_SYSTEM_MEMORY, 1); WREG32(mmVM_L2_CNTL, tmp); tmp = REG_SET_FIELD(0, VM_L2_CNTL2, INVALIDATE_ALL_L1_TLBS, 1); tmp = REG_SET_FIELD(tmp, VM_L2_CNTL2, INVALIDATE_L2_CACHE, 1); WREG32(mmVM_L2_CNTL2, tmp); field = adev->vm_manager.fragment_size; tmp = RREG32(mmVM_L2_CNTL3); tmp = REG_SET_FIELD(tmp, VM_L2_CNTL3, L2_CACHE_BIGK_ASSOCIATIVITY, 1); tmp = REG_SET_FIELD(tmp, VM_L2_CNTL3, BANK_SELECT, field); tmp = REG_SET_FIELD(tmp, VM_L2_CNTL3, L2_CACHE_BIGK_FRAGMENT_SIZE, field); WREG32(mmVM_L2_CNTL3, tmp); /* setup context0 */ WREG32(mmVM_CONTEXT0_PAGE_TABLE_START_ADDR, adev->gmc.gart_start >> 12); WREG32(mmVM_CONTEXT0_PAGE_TABLE_END_ADDR, adev->gmc.gart_end >> 12); WREG32(mmVM_CONTEXT0_PAGE_TABLE_BASE_ADDR, table_addr >> 12); WREG32(mmVM_CONTEXT0_PROTECTION_FAULT_DEFAULT_ADDR, (u32)(adev->dummy_page_addr >> 12)); WREG32(mmVM_CONTEXT0_CNTL2, 0); tmp = RREG32(mmVM_CONTEXT0_CNTL); tmp = REG_SET_FIELD(tmp, VM_CONTEXT0_CNTL, ENABLE_CONTEXT, 1); tmp = REG_SET_FIELD(tmp, VM_CONTEXT0_CNTL, PAGE_TABLE_DEPTH, 0); tmp = REG_SET_FIELD(tmp, VM_CONTEXT0_CNTL, RANGE_PROTECTION_FAULT_ENABLE_DEFAULT, 1); WREG32(mmVM_CONTEXT0_CNTL, tmp); WREG32(0x575, 0); WREG32(0x576, 0); WREG32(0x577, 0); /* empty context1-15 */ /* FIXME start with 4G, once using 2 level pt switch to full * vm size space */ /* set vm size, must be a multiple of 4 */ WREG32(mmVM_CONTEXT1_PAGE_TABLE_START_ADDR, 0); WREG32(mmVM_CONTEXT1_PAGE_TABLE_END_ADDR, adev->vm_manager.max_pfn - 1); for (i = 1; i < AMDGPU_NUM_VMID; i++) { if (i < 8) WREG32(mmVM_CONTEXT0_PAGE_TABLE_BASE_ADDR + i, table_addr >> 12); else WREG32(mmVM_CONTEXT8_PAGE_TABLE_BASE_ADDR + i - 8, table_addr >> 12); } /* enable context1-15 */ WREG32(mmVM_CONTEXT1_PROTECTION_FAULT_DEFAULT_ADDR, (u32)(adev->dummy_page_addr >> 12)); WREG32(mmVM_CONTEXT1_CNTL2, 4); tmp = RREG32(mmVM_CONTEXT1_CNTL); tmp = REG_SET_FIELD(tmp, VM_CONTEXT1_CNTL, ENABLE_CONTEXT, 1); tmp = REG_SET_FIELD(tmp, VM_CONTEXT1_CNTL, PAGE_TABLE_DEPTH, 1); tmp = REG_SET_FIELD(tmp, VM_CONTEXT1_CNTL, PAGE_TABLE_BLOCK_SIZE, adev->vm_manager.block_size - 9); WREG32(mmVM_CONTEXT1_CNTL, tmp); if (amdgpu_vm_fault_stop == AMDGPU_VM_FAULT_STOP_ALWAYS) gmc_v7_0_set_fault_enable_default(adev, false); else gmc_v7_0_set_fault_enable_default(adev, true); if (adev->asic_type == CHIP_KAVERI) { tmp = RREG32(mmCHUB_CONTROL); tmp &= ~BYPASS_VM; WREG32(mmCHUB_CONTROL, tmp); } gmc_v7_0_flush_gpu_tlb(adev, 0, 0, 0); DRM_INFO("PCIE GART of %uM enabled (table at 0x%016llX).\n", (unsigned int)(adev->gmc.gart_size >> 20), (unsigned long long)table_addr); return 0; } static int gmc_v7_0_gart_init(struct amdgpu_device *adev) { int r; if (adev->gart.bo) { WARN(1, "R600 PCIE GART already initialized\n"); return 0; } /* Initialize common gart structure */ r = amdgpu_gart_init(adev); if (r) return r; adev->gart.table_size = adev->gart.num_gpu_pages * 8; adev->gart.gart_pte_flags = 0; return amdgpu_gart_table_vram_alloc(adev); } /** * gmc_v7_0_gart_disable - gart disable * * @adev: amdgpu_device pointer * * This disables all VM page table (CIK). */ static void gmc_v7_0_gart_disable(struct amdgpu_device *adev) { u32 tmp; /* Disable all tables */ WREG32(mmVM_CONTEXT0_CNTL, 0); WREG32(mmVM_CONTEXT1_CNTL, 0); /* Setup TLB control */ tmp = RREG32(mmMC_VM_MX_L1_TLB_CNTL); tmp = REG_SET_FIELD(tmp, MC_VM_MX_L1_TLB_CNTL, ENABLE_L1_TLB, 0); tmp = REG_SET_FIELD(tmp, MC_VM_MX_L1_TLB_CNTL, ENABLE_L1_FRAGMENT_PROCESSING, 0); tmp = REG_SET_FIELD(tmp, MC_VM_MX_L1_TLB_CNTL, ENABLE_ADVANCED_DRIVER_MODEL, 0); WREG32(mmMC_VM_MX_L1_TLB_CNTL, tmp); /* Setup L2 cache */ tmp = RREG32(mmVM_L2_CNTL); tmp = REG_SET_FIELD(tmp, VM_L2_CNTL, ENABLE_L2_CACHE, 0); WREG32(mmVM_L2_CNTL, tmp); WREG32(mmVM_L2_CNTL2, 0); } /** * gmc_v7_0_vm_decode_fault - print human readable fault info * * @adev: amdgpu_device pointer * @status: VM_CONTEXT1_PROTECTION_FAULT_STATUS register value * @addr: VM_CONTEXT1_PROTECTION_FAULT_ADDR register value * @mc_client: VM_CONTEXT1_PROTECTION_FAULT_MCCLIENT register value * @pasid: debug logging only - no functional use * * Print human readable fault information (CIK). */ static void gmc_v7_0_vm_decode_fault(struct amdgpu_device *adev, u32 status, u32 addr, u32 mc_client, unsigned int pasid) { u32 vmid = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS, VMID); u32 protections = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS, PROTECTIONS); char block[5] = { mc_client >> 24, (mc_client >> 16) & 0xff, (mc_client >> 8) & 0xff, mc_client & 0xff, 0 }; u32 mc_id; mc_id = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS, MEMORY_CLIENT_ID); dev_err(adev->dev, "VM fault (0x%02x, vmid %d, pasid %d) at page %u, %s from '%s' (0x%08x) (%d)\n", protections, vmid, pasid, addr, REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS, MEMORY_CLIENT_RW) ? "write" : "read", block, mc_client, mc_id); } static const u32 mc_cg_registers[] = { mmMC_HUB_MISC_HUB_CG, mmMC_HUB_MISC_SIP_CG, mmMC_HUB_MISC_VM_CG, mmMC_XPB_CLK_GAT, mmATC_MISC_CG, mmMC_CITF_MISC_WR_CG, mmMC_CITF_MISC_RD_CG, mmMC_CITF_MISC_VM_CG, mmVM_L2_CG, }; static const u32 mc_cg_ls_en[] = { MC_HUB_MISC_HUB_CG__MEM_LS_ENABLE_MASK, MC_HUB_MISC_SIP_CG__MEM_LS_ENABLE_MASK, MC_HUB_MISC_VM_CG__MEM_LS_ENABLE_MASK, MC_XPB_CLK_GAT__MEM_LS_ENABLE_MASK, ATC_MISC_CG__MEM_LS_ENABLE_MASK, MC_CITF_MISC_WR_CG__MEM_LS_ENABLE_MASK, MC_CITF_MISC_RD_CG__MEM_LS_ENABLE_MASK, MC_CITF_MISC_VM_CG__MEM_LS_ENABLE_MASK, VM_L2_CG__MEM_LS_ENABLE_MASK, }; static const u32 mc_cg_en[] = { MC_HUB_MISC_HUB_CG__ENABLE_MASK, MC_HUB_MISC_SIP_CG__ENABLE_MASK, MC_HUB_MISC_VM_CG__ENABLE_MASK, MC_XPB_CLK_GAT__ENABLE_MASK, ATC_MISC_CG__ENABLE_MASK, MC_CITF_MISC_WR_CG__ENABLE_MASK, MC_CITF_MISC_RD_CG__ENABLE_MASK, MC_CITF_MISC_VM_CG__ENABLE_MASK, VM_L2_CG__ENABLE_MASK, }; static void gmc_v7_0_enable_mc_ls(struct amdgpu_device *adev, bool enable) { int i; u32 orig, data; for (i = 0; i < ARRAY_SIZE(mc_cg_registers); i++) { orig = data = RREG32(mc_cg_registers[i]); if (enable && (adev->cg_flags & AMD_CG_SUPPORT_MC_LS)) data |= mc_cg_ls_en[i]; else data &= ~mc_cg_ls_en[i]; if (data != orig) WREG32(mc_cg_registers[i], data); } } static void gmc_v7_0_enable_mc_mgcg(struct amdgpu_device *adev, bool enable) { int i; u32 orig, data; for (i = 0; i < ARRAY_SIZE(mc_cg_registers); i++) { orig = data = RREG32(mc_cg_registers[i]); if (enable && (adev->cg_flags & AMD_CG_SUPPORT_MC_MGCG)) data |= mc_cg_en[i]; else data &= ~mc_cg_en[i]; if (data != orig) WREG32(mc_cg_registers[i], data); } } static void gmc_v7_0_enable_bif_mgls(struct amdgpu_device *adev, bool enable) { u32 orig, data; orig = data = RREG32_PCIE(ixPCIE_CNTL2); if (enable && (adev->cg_flags & AMD_CG_SUPPORT_BIF_LS)) { data = REG_SET_FIELD(data, PCIE_CNTL2, SLV_MEM_LS_EN, 1); data = REG_SET_FIELD(data, PCIE_CNTL2, MST_MEM_LS_EN, 1); data = REG_SET_FIELD(data, PCIE_CNTL2, REPLAY_MEM_LS_EN, 1); data = REG_SET_FIELD(data, PCIE_CNTL2, SLV_MEM_AGGRESSIVE_LS_EN, 1); } else { data = REG_SET_FIELD(data, PCIE_CNTL2, SLV_MEM_LS_EN, 0); data = REG_SET_FIELD(data, PCIE_CNTL2, MST_MEM_LS_EN, 0); data = REG_SET_FIELD(data, PCIE_CNTL2, REPLAY_MEM_LS_EN, 0); data = REG_SET_FIELD(data, PCIE_CNTL2, SLV_MEM_AGGRESSIVE_LS_EN, 0); } if (orig != data) WREG32_PCIE(ixPCIE_CNTL2, data); } static void gmc_v7_0_enable_hdp_mgcg(struct amdgpu_device *adev, bool enable) { u32 orig, data; orig = data = RREG32(mmHDP_HOST_PATH_CNTL); if (enable && (adev->cg_flags & AMD_CG_SUPPORT_HDP_MGCG)) data = REG_SET_FIELD(data, HDP_HOST_PATH_CNTL, CLOCK_GATING_DIS, 0); else data = REG_SET_FIELD(data, HDP_HOST_PATH_CNTL, CLOCK_GATING_DIS, 1); if (orig != data) WREG32(mmHDP_HOST_PATH_CNTL, data); } static void gmc_v7_0_enable_hdp_ls(struct amdgpu_device *adev, bool enable) { u32 orig, data; orig = data = RREG32(mmHDP_MEM_POWER_LS); if (enable && (adev->cg_flags & AMD_CG_SUPPORT_HDP_LS)) data = REG_SET_FIELD(data, HDP_MEM_POWER_LS, LS_ENABLE, 1); else data = REG_SET_FIELD(data, HDP_MEM_POWER_LS, LS_ENABLE, 0); if (orig != data) WREG32(mmHDP_MEM_POWER_LS, data); } static int gmc_v7_0_convert_vram_type(int mc_seq_vram_type) { switch (mc_seq_vram_type) { case MC_SEQ_MISC0__MT__GDDR1: return AMDGPU_VRAM_TYPE_GDDR1; case MC_SEQ_MISC0__MT__DDR2: return AMDGPU_VRAM_TYPE_DDR2; case MC_SEQ_MISC0__MT__GDDR3: return AMDGPU_VRAM_TYPE_GDDR3; case MC_SEQ_MISC0__MT__GDDR4: return AMDGPU_VRAM_TYPE_GDDR4; case MC_SEQ_MISC0__MT__GDDR5: return AMDGPU_VRAM_TYPE_GDDR5; case MC_SEQ_MISC0__MT__HBM: return AMDGPU_VRAM_TYPE_HBM; case MC_SEQ_MISC0__MT__DDR3: return AMDGPU_VRAM_TYPE_DDR3; default: return AMDGPU_VRAM_TYPE_UNKNOWN; } } static int gmc_v7_0_early_init(void *handle) { struct amdgpu_device *adev = (struct amdgpu_device *)handle; gmc_v7_0_set_gmc_funcs(adev); gmc_v7_0_set_irq_funcs(adev); adev->gmc.shared_aperture_start = 0x2000000000000000ULL; adev->gmc.shared_aperture_end = adev->gmc.shared_aperture_start + (4ULL << 30) - 1; adev->gmc.private_aperture_start = adev->gmc.shared_aperture_end + 1; adev->gmc.private_aperture_end = adev->gmc.private_aperture_start + (4ULL << 30) - 1; adev->gmc.noretry_flags = AMDGPU_VM_NORETRY_FLAGS_TF; return 0; } static int gmc_v7_0_late_init(void *handle) { struct amdgpu_device *adev = (struct amdgpu_device *)handle; if (amdgpu_vm_fault_stop != AMDGPU_VM_FAULT_STOP_ALWAYS) return amdgpu_irq_get(adev, &adev->gmc.vm_fault, 0); else return 0; } static unsigned int gmc_v7_0_get_vbios_fb_size(struct amdgpu_device *adev) { u32 d1vga_control = RREG32(mmD1VGA_CONTROL); unsigned int size; if (REG_GET_FIELD(d1vga_control, D1VGA_CONTROL, D1VGA_MODE_ENABLE)) { size = AMDGPU_VBIOS_VGA_ALLOCATION; } else { u32 viewport = RREG32(mmVIEWPORT_SIZE); size = (REG_GET_FIELD(viewport, VIEWPORT_SIZE, VIEWPORT_HEIGHT) * REG_GET_FIELD(viewport, VIEWPORT_SIZE, VIEWPORT_WIDTH) * 4); } return size; } static int gmc_v7_0_sw_init(void *handle) { int r; struct amdgpu_device *adev = (struct amdgpu_device *)handle; set_bit(AMDGPU_GFXHUB(0), adev->vmhubs_mask); if (adev->flags & AMD_IS_APU) { adev->gmc.vram_type = AMDGPU_VRAM_TYPE_UNKNOWN; } else { u32 tmp = RREG32(mmMC_SEQ_MISC0); tmp &= MC_SEQ_MISC0__MT__MASK; adev->gmc.vram_type = gmc_v7_0_convert_vram_type(tmp); } r = amdgpu_irq_add_id(adev, AMDGPU_IRQ_CLIENTID_LEGACY, VISLANDS30_IV_SRCID_GFX_PAGE_INV_FAULT, &adev->gmc.vm_fault); if (r) return r; r = amdgpu_irq_add_id(adev, AMDGPU_IRQ_CLIENTID_LEGACY, VISLANDS30_IV_SRCID_GFX_MEM_PROT_FAULT, &adev->gmc.vm_fault); if (r) return r; /* Adjust VM size here. * Currently set to 4GB ((1 << 20) 4k pages). * Max GPUVM size for cayman and SI is 40 bits. */ amdgpu_vm_adjust_size(adev, 64, 9, 1, 40); /* Set the internal MC address mask * This is the max address of the GPU's * internal address space. */ adev->gmc.mc_mask = 0xffffffffffULL; /* 40 bit MC */ r = dma_set_mask_and_coherent(adev->dev, DMA_BIT_MASK(40)); if (r) { pr_warn("No suitable DMA available\n"); return r; } adev->need_swiotlb = drm_need_swiotlb(40); r = gmc_v7_0_init_microcode(adev); if (r) { DRM_ERROR("Failed to load mc firmware!\n"); return r; } r = gmc_v7_0_mc_init(adev); if (r) return r; amdgpu_gmc_get_vbios_allocations(adev); /* Memory manager */ r = amdgpu_bo_init(adev); if (r) return r; r = gmc_v7_0_gart_init(adev); if (r) return r; /* * number of VMs * VMID 0 is reserved for System * amdgpu graphics/compute will use VMIDs 1-7 * amdkfd will use VMIDs 8-15 */ adev->vm_manager.first_kfd_vmid = 8; amdgpu_vm_manager_init(adev); /* base offset of vram pages */ if (adev->flags & AMD_IS_APU) { u64 tmp = RREG32(mmMC_VM_FB_OFFSET); tmp <<= 22; adev->vm_manager.vram_base_offset = tmp; } else { adev->vm_manager.vram_base_offset = 0; } adev->gmc.vm_fault_info = kmalloc(sizeof(struct kfd_vm_fault_info), GFP_KERNEL); if (!adev->gmc.vm_fault_info) return -ENOMEM; atomic_set(&adev->gmc.vm_fault_info_updated, 0); return 0; } static int gmc_v7_0_sw_fini(void *handle) { struct amdgpu_device *adev = (struct amdgpu_device *)handle; amdgpu_gem_force_release(adev); amdgpu_vm_manager_fini(adev); kfree(adev->gmc.vm_fault_info); amdgpu_gart_table_vram_free(adev); amdgpu_bo_fini(adev); amdgpu_ucode_release(&adev->gmc.fw); return 0; } static int gmc_v7_0_hw_init(void *handle) { int r; struct amdgpu_device *adev = (struct amdgpu_device *)handle; gmc_v7_0_init_golden_registers(adev); gmc_v7_0_mc_program(adev); if (!(adev->flags & AMD_IS_APU)) { r = gmc_v7_0_mc_load_microcode(adev); if (r) { DRM_ERROR("Failed to load MC firmware!\n"); return r; } } r = gmc_v7_0_gart_enable(adev); if (r) return r; if (amdgpu_emu_mode == 1) return amdgpu_gmc_vram_checking(adev); return 0; } static int gmc_v7_0_hw_fini(void *handle) { struct amdgpu_device *adev = (struct amdgpu_device *)handle; amdgpu_irq_put(adev, &adev->gmc.vm_fault, 0); gmc_v7_0_gart_disable(adev); return 0; } static int gmc_v7_0_suspend(void *handle) { struct amdgpu_device *adev = (struct amdgpu_device *)handle; gmc_v7_0_hw_fini(adev); return 0; } static int gmc_v7_0_resume(void *handle) { int r; struct amdgpu_device *adev = (struct amdgpu_device *)handle; r = gmc_v7_0_hw_init(adev); if (r) return r; amdgpu_vmid_reset_all(adev); return 0; } static bool gmc_v7_0_is_idle(void *handle) { struct amdgpu_device *adev = (struct amdgpu_device *)handle; u32 tmp = RREG32(mmSRBM_STATUS); if (tmp & (SRBM_STATUS__MCB_BUSY_MASK | SRBM_STATUS__MCB_NON_DISPLAY_BUSY_MASK | SRBM_STATUS__MCC_BUSY_MASK | SRBM_STATUS__MCD_BUSY_MASK | SRBM_STATUS__VMC_BUSY_MASK)) return false; return true; } static int gmc_v7_0_wait_for_idle(void *handle) { unsigned int i; u32 tmp; struct amdgpu_device *adev = (struct amdgpu_device *)handle; for (i = 0; i < adev->usec_timeout; i++) { /* read MC_STATUS */ tmp = RREG32(mmSRBM_STATUS) & (SRBM_STATUS__MCB_BUSY_MASK | SRBM_STATUS__MCB_NON_DISPLAY_BUSY_MASK | SRBM_STATUS__MCC_BUSY_MASK | SRBM_STATUS__MCD_BUSY_MASK | SRBM_STATUS__VMC_BUSY_MASK); if (!tmp) return 0; udelay(1); } return -ETIMEDOUT; } static int gmc_v7_0_soft_reset(void *handle) { struct amdgpu_device *adev = (struct amdgpu_device *)handle; u32 srbm_soft_reset = 0; u32 tmp = RREG32(mmSRBM_STATUS); if (tmp & SRBM_STATUS__VMC_BUSY_MASK) srbm_soft_reset = REG_SET_FIELD(srbm_soft_reset, SRBM_SOFT_RESET, SOFT_RESET_VMC, 1); if (tmp & (SRBM_STATUS__MCB_BUSY_MASK | SRBM_STATUS__MCB_NON_DISPLAY_BUSY_MASK | SRBM_STATUS__MCC_BUSY_MASK | SRBM_STATUS__MCD_BUSY_MASK)) { if (!(adev->flags & AMD_IS_APU)) srbm_soft_reset = REG_SET_FIELD(srbm_soft_reset, SRBM_SOFT_RESET, SOFT_RESET_MC, 1); } if (srbm_soft_reset) { gmc_v7_0_mc_stop(adev); if (gmc_v7_0_wait_for_idle((void *)adev)) dev_warn(adev->dev, "Wait for GMC idle timed out !\n"); tmp = RREG32(mmSRBM_SOFT_RESET); tmp |= srbm_soft_reset; dev_info(adev->dev, "SRBM_SOFT_RESET=0x%08X\n", tmp); WREG32(mmSRBM_SOFT_RESET, tmp); tmp = RREG32(mmSRBM_SOFT_RESET); udelay(50); tmp &= ~srbm_soft_reset; WREG32(mmSRBM_SOFT_RESET, tmp); tmp = RREG32(mmSRBM_SOFT_RESET); /* Wait a little for things to settle down */ udelay(50); gmc_v7_0_mc_resume(adev); udelay(50); } return 0; } static int gmc_v7_0_vm_fault_interrupt_state(struct amdgpu_device *adev, struct amdgpu_irq_src *src, unsigned int type, enum amdgpu_interrupt_state state) { u32 tmp; u32 bits = (VM_CONTEXT1_CNTL__RANGE_PROTECTION_FAULT_ENABLE_INTERRUPT_MASK | your_sha256_hashASK | VM_CONTEXT1_CNTL__PDE0_PROTECTION_FAULT_ENABLE_INTERRUPT_MASK | VM_CONTEXT1_CNTL__VALID_PROTECTION_FAULT_ENABLE_INTERRUPT_MASK | VM_CONTEXT1_CNTL__READ_PROTECTION_FAULT_ENABLE_INTERRUPT_MASK | VM_CONTEXT1_CNTL__WRITE_PROTECTION_FAULT_ENABLE_INTERRUPT_MASK); switch (state) { case AMDGPU_IRQ_STATE_DISABLE: /* system context */ tmp = RREG32(mmVM_CONTEXT0_CNTL); tmp &= ~bits; WREG32(mmVM_CONTEXT0_CNTL, tmp); /* VMs */ tmp = RREG32(mmVM_CONTEXT1_CNTL); tmp &= ~bits; WREG32(mmVM_CONTEXT1_CNTL, tmp); break; case AMDGPU_IRQ_STATE_ENABLE: /* system context */ tmp = RREG32(mmVM_CONTEXT0_CNTL); tmp |= bits; WREG32(mmVM_CONTEXT0_CNTL, tmp); /* VMs */ tmp = RREG32(mmVM_CONTEXT1_CNTL); tmp |= bits; WREG32(mmVM_CONTEXT1_CNTL, tmp); break; default: break; } return 0; } static int gmc_v7_0_process_interrupt(struct amdgpu_device *adev, struct amdgpu_irq_src *source, struct amdgpu_iv_entry *entry) { u32 addr, status, mc_client, vmid; addr = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_ADDR); status = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_STATUS); mc_client = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_MCCLIENT); /* reset addr and status */ WREG32_P(mmVM_CONTEXT1_CNTL2, 1, ~1); if (!addr && !status) return 0; if (amdgpu_vm_fault_stop == AMDGPU_VM_FAULT_STOP_FIRST) gmc_v7_0_set_fault_enable_default(adev, false); if (printk_ratelimit()) { dev_err(adev->dev, "GPU fault detected: %d 0x%08x\n", entry->src_id, entry->src_data[0]); dev_err(adev->dev, " VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x%08X\n", addr); dev_err(adev->dev, " VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n", status); gmc_v7_0_vm_decode_fault(adev, status, addr, mc_client, entry->pasid); } vmid = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS, VMID); if (amdgpu_amdkfd_is_kfd_vmid(adev, vmid) && !atomic_read(&adev->gmc.vm_fault_info_updated)) { struct kfd_vm_fault_info *info = adev->gmc.vm_fault_info; u32 protections = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS, PROTECTIONS); info->vmid = vmid; info->mc_id = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS, MEMORY_CLIENT_ID); info->status = status; info->page_addr = addr; info->prot_valid = protections & 0x7 ? true : false; info->prot_read = protections & 0x8 ? true : false; info->prot_write = protections & 0x10 ? true : false; info->prot_exec = protections & 0x20 ? true : false; mb(); atomic_set(&adev->gmc.vm_fault_info_updated, 1); } return 0; } static int gmc_v7_0_set_clockgating_state(void *handle, enum amd_clockgating_state state) { bool gate = false; struct amdgpu_device *adev = (struct amdgpu_device *)handle; if (state == AMD_CG_STATE_GATE) gate = true; if (!(adev->flags & AMD_IS_APU)) { gmc_v7_0_enable_mc_mgcg(adev, gate); gmc_v7_0_enable_mc_ls(adev, gate); } gmc_v7_0_enable_bif_mgls(adev, gate); gmc_v7_0_enable_hdp_mgcg(adev, gate); gmc_v7_0_enable_hdp_ls(adev, gate); return 0; } static int gmc_v7_0_set_powergating_state(void *handle, enum amd_powergating_state state) { return 0; } static const struct amd_ip_funcs gmc_v7_0_ip_funcs = { .name = "gmc_v7_0", .early_init = gmc_v7_0_early_init, .late_init = gmc_v7_0_late_init, .sw_init = gmc_v7_0_sw_init, .sw_fini = gmc_v7_0_sw_fini, .hw_init = gmc_v7_0_hw_init, .hw_fini = gmc_v7_0_hw_fini, .suspend = gmc_v7_0_suspend, .resume = gmc_v7_0_resume, .is_idle = gmc_v7_0_is_idle, .wait_for_idle = gmc_v7_0_wait_for_idle, .soft_reset = gmc_v7_0_soft_reset, .set_clockgating_state = gmc_v7_0_set_clockgating_state, .set_powergating_state = gmc_v7_0_set_powergating_state, }; static const struct amdgpu_gmc_funcs gmc_v7_0_gmc_funcs = { .flush_gpu_tlb = gmc_v7_0_flush_gpu_tlb, .flush_gpu_tlb_pasid = gmc_v7_0_flush_gpu_tlb_pasid, .emit_flush_gpu_tlb = gmc_v7_0_emit_flush_gpu_tlb, .emit_pasid_mapping = gmc_v7_0_emit_pasid_mapping, .set_prt = gmc_v7_0_set_prt, .get_vm_pde = gmc_v7_0_get_vm_pde, .get_vm_pte = gmc_v7_0_get_vm_pte, .get_vbios_fb_size = gmc_v7_0_get_vbios_fb_size, }; static const struct amdgpu_irq_src_funcs gmc_v7_0_irq_funcs = { .set = gmc_v7_0_vm_fault_interrupt_state, .process = gmc_v7_0_process_interrupt, }; static void gmc_v7_0_set_gmc_funcs(struct amdgpu_device *adev) { adev->gmc.gmc_funcs = &gmc_v7_0_gmc_funcs; } static void gmc_v7_0_set_irq_funcs(struct amdgpu_device *adev) { adev->gmc.vm_fault.num_types = 1; adev->gmc.vm_fault.funcs = &gmc_v7_0_irq_funcs; } const struct amdgpu_ip_block_version gmc_v7_0_ip_block = { .type = AMD_IP_BLOCK_TYPE_GMC, .major = 7, .minor = 0, .rev = 0, .funcs = &gmc_v7_0_ip_funcs, }; const struct amdgpu_ip_block_version gmc_v7_4_ip_block = { .type = AMD_IP_BLOCK_TYPE_GMC, .major = 7, .minor = 4, .rev = 0, .funcs = &gmc_v7_0_ip_funcs, }; ```
```cuda // // // 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. #include "paddle/phi/backends/context_pool.h" #include "paddle/phi/common/memory_utils.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/funcs/math_function.h" #include "paddle/phi/kernels/impl/seed_kernel_impl.h" namespace phi { template <typename T, typename Context> void GPUSeedKernel(const Context &dev_ctx, int seed_in, bool deterministic, const std::string &rng_name, bool force_cpu, DenseTensor *out) { int seed = get_seed(seed_in, deterministic, rng_name); bool cpu_place = force_cpu || dev_ctx.GetPlace() == phi::CPUPlace(); if (cpu_place) { phi::DeviceContextPool &pool = phi::DeviceContextPool::Instance(); auto &dev_ctx_cpu = *pool.Get(phi::CPUPlace()); dev_ctx_cpu.Alloc<T>(out); phi::funcs::SetConstant<phi::CPUContext, T> functor; functor(reinterpret_cast<const phi::CPUContext &>(dev_ctx_cpu), out, static_cast<T>(seed)); } else { auto *out_data = dev_ctx.template Alloc<T>(out); auto stream = dev_ctx.stream(); phi::memory_utils::Copy(dev_ctx.GetPlace(), out_data, phi::CPUPlace(), &seed, sizeof(int), stream); } } } // namespace phi PD_REGISTER_KERNEL(seed, GPU, ALL_LAYOUT, phi::GPUSeedKernel, int) {} ```
Saint-Martin-de-la-Cluze (; ) is a commune in the Isère department in southeastern France. Population See also Communes of the Isère department References Communes of Isère Isère communes articles needing translation from French Wikipedia
The 1998 Hammersmith and Fulham Council election took place on 7 May 1998 to elect members of Hammersmith and Fulham London Borough Council in London, England. The whole council was up for election and the Labour party stayed in overall control of the council. Background Election result The Labour Party won 36 seats (on a 49.7% share of the vote) - a gain of 3 seats from the previous election, and maintained control of the council. The Conservative Party won 14 seats (with 37.4% of the vote) - a loss of 1 seat from their previous result. The Liberal Democrats lost the two seats they previously held, winning 12.6% of the votes cast. Ward results Addison Avonmore Broadway Brook Green Colehill College Park & Old Oak Coningham Crabtree Eel Brook Gibbs Green Grove Margravine Normand Palace Ravenscourt Sands End Sherbrooke Starch Green Sulivan Town Walham White City & Shepherds Bush Wormholt References 1998 1998 London Borough council elections 20th century in the London Borough of Hammersmith and Fulham
HMS Revenge was the lead ship of five super-dreadnought battleships built for the Royal Navy during the First World War in the mid-1910s. The ships were developments of the s, with reductions in size and speed to offset increases in armour protection whilst retaining the same main battery of eight guns. She was laid down in 1913, launched in 1915 and commissioned in February 1916, early enough to be worked up to see action with the Grand Fleet at the Battle of Jutland in May that year. During the engagement, she engaged German battlecruisers, damaging two of them before being forced to turn away to avoid torpedoes that damaged her squadron flagship and caused the squadron to lose contact with the rest of the fleet. Revenge emerged from the battle unscathed, but she saw no further action during the war, as the British and German fleets turned to more cautious strategies owing to the risk of submarines and naval mines. During the 1920s and 1930s, Revenge alternated between the Atlantic Fleet and the Mediterranean Fleet. Whilst serving in the Mediterranean in the early 1920s, the ship went to Turkey twice in response to crises arising from the Greco-Turkish War, including the Great Fire of Smyrna in 1922. The ship's interwar career was otherwise uneventful. With the outbreak of the Second World War in September 1939, Revenge was used to escort convoys and transport significant quantities of the country's gold reserves to Canada as part of Operation Fish; these activities continued into 1940. She was involved in the seizure of French warships in Portsmouth after the French surrender in July 1940. In October 1940, she conducted Operation Medium, an attack on German transport ships that had been collected along the English Channel in preparation for the later-cancelled invasion of Britain. Revenge thereafter resumed convoy escort duties until October 1941, when she was reassigned to the 3rd Battle Squadron and sent to the Far East as tensions with Japan began to rise. British naval forces were strengthened further after the start of the Pacific War in December, leading to the creation of the Eastern Fleet. Revenge and her sister ships were deemed too old to be of use against the Japanese fleet, so they were relegated to convoy escort duties in the Indian Ocean. Badly worn out by 1943, Revenge returned home, where she was removed from front-line service. Her last voyage was to carry Prime Minister Winston Churchill to the Tehran Conference in November 1943. Upon returning, she was assigned to the training establishment , disarmed and eventually broken up in 1948. Design and description The Revenge-class ships were designed as slightly smaller, slower, and more heavily protected versions of the preceding s. As an economy measure they were intended to revert to the previous practice of using both fuel oil and coal, but First Sea Lord Jackie Fisher rescinded the decision for coal in October 1914. Still under construction, the ships were redesigned to employ oil-fired boilers that increased the power of the engines by over the original specification. Revenge had a length overall of , a beam of and a deep draught of . She had a displacement of and displaced at deep load. She was powered by two sets of Parsons steam turbines, each driving two shafts, using steam provided by eighteen Babcock & Wilcox boilers. The turbines were rated at and intended to reach a maximum speed of , although the ship only reached a top speed of from during her sea trials on 24 March 1916. She had a range of at a cruising speed of . Her crew numbered 940 officers and ratings in 1917. Her metacentric height was at deep load. The Revenge class was equipped with eight breech-loading (BL) Mk I guns in four twin gun turrets, in two superfiring pairs fore and aft of the superstructure, designated 'A', 'B', 'X', and 'Y' from front to rear. Twelve of the fourteen BL Mk XII guns were mounted in casemates along the broadside of the vessel amidships; the remaining pair were mounted on the shelter deck and were protected by gun shields. The ship also mounted four 3-pounder () guns. Her anti-aircraft (AA) armament consisted of two quick-firing (QF) 20 cwt Mk I guns. She was fitted with four submerged torpedo tubes, two on each broadside. Revenge was completed with two fire-control directors fitted with rangefinders. One was mounted above the conning tower, protected by an armoured hood, and the other was in the spotting top above the tripod foremast. Each turret was also fitted with a 15-foot rangefinder. The main armament could be controlled by 'X' turret as well. The secondary armament was primarily controlled by directors mounted on each side of the compass platform on the foremast once they were fitted in March 1917. A torpedo-control director with a 15-foot rangefinder was mounted at the aft end of the superstructure. The ship's waterline belt consisted of Krupp cemented armour (KC) that was thick between 'A' and 'Y' barbettes and thinned to 4 to 6 inches (102 to 152 mm) towards the ship's ends, but did not reach either the bow or the stern. Above this was a strake of armour 6 inches thick that extended between 'A' and 'X' barbettes. Transverse bulkheads 4 to 6 inches thick ran at an angle from the ends of the thickest part of the waterline belt to 'A' and 'Y' barbettes. The gun turrets were protected by of KC armour, except for the turret roofs which were thick. The barbettes ranged in thickness from above the upper deck, but were only 4 to 6 inches thick below it. The Revenge-class ships had multiple armoured decks that ranged from in thickness. The main conning tower had 11 inches of armour on the sides with a 3-inch roof. The torpedo director in the rear superstructure had 6 inches of armour protecting it. After the Battle of Jutland, 1 inch of high-tensile steel was added to the main deck over the magazines and additional anti-flash equipment was added in the magazines. The ship was fitted with flying-off platforms mounted on the roofs of 'B' and 'X' turrets in 1918, from which fighters and reconnaissance aircraft could launch. During the 1928 refit the platform was removed from 'X' turret. The platform on 'B' turret was removed in 1933. Major alterations Revenge was fitted with anti-torpedo bulges between October 1917 and February 1918. They were designed to reduce the effect of torpedo detonations and improve stability. They increased her beam by over 13 feet (4 m) to , her displacement to and reduced her draught to , all at deep load. They increased her metacentric height to . Later in 1918, rangefinders were fitted in 'B' and 'X' turrets. In 1919 her complement was 1,240 officers and ratings. The gun shields for the shelter-deck six-inch guns were replaced by armoured casemates in 1922. Two years later, her anti-aircraft defences were upgraded by replacing the original three-inch AA guns with a pair of QF AA guns. During the ship's 1928–1929 refit, two more four-inch AA guns were added and the six-inch guns from the shelter deck were removed. In addition a High-Angle Control System (HACS) Mk I director was installed on the spotting top. In 1931 one octuple mount for two-pounder Mk VIII "pom-pom" guns was added abreast the funnel (only on the starboard side) for trials. Its director was added abreast and below the fire-control director in the spotting top. The aft torpedo tubes were also removed at that time. The ship's 1936–1937 refit saw the removal of the torpedo director and its associated rangefinder. Two years later, Revenges anti-aircraft defences were strengthened by replacing the single mounts of the AA guns with twin mounts and adding the portside octuple two-pounder "pom-pom" mount and its director. A HACS Mk III director replaced the Mk I on the roof of the spotting top and another was added in the position formerly occupied by the torpedo director. A pair of quadruple mounts for Vickers .50 machine guns were added abreast the conning tower. The forward torpedo tubes were also removed at that time. Wartime modifications for the Revenge-class ships were fairly minimal. Revenge was fitted with a Type 279 early-warning radar in 1941. The following year saw the addition of a Type 273 surface-search radar, a pair of Type 285 anti-aircraft gunnery sets and two Type 282 radars for the "pom-poms". Two four-barrel "pom-poms" were added in late 1941 atop 'B' and 'X' turrets as well as ten 20 mm Oerlikon guns that replaced the quadruple .50-caliber mounts. To save weight and make more room available for the additional crew required to man the new equipment like the radars and Oerlikons, four 6-inch guns were removed in 1943. Construction and service First World War Revenge was laid down at the Vickers shipyard in Barrow-in-Furness on 22 December 1913. She was launched on 29 May 1915 and was commissioned into the Grand Fleet on 1 February 1916, though she was not completed and ready for service until 24 March, with the time between her commissioning and completion including a period of sea trials. The ship cost a total of £2,406,368. On entering service, Revenge was assigned to the 6th Division of the 1st Battle Squadron (BS), Grand Fleet, along with the battleships (the divisional and squadron flagship), , and . Battle of Jutland In an attempt to lure out and destroy a portion of the Grand Fleet, the German High Seas Fleet with 16 dreadnoughts, six pre-dreadnoughts, six light cruisers and 31 torpedo boats commanded by Vice Admiral Reinhard Scheer, departed the Jade early on the morning of 31 May. The fleet sailed in concert with Rear Admiral Franz von Hipper's five battlecruisers and supporting cruisers and torpedo boats. The Royal Navy's Room 40 had intercepted and decrypted German radio traffic containing plans of the operation. The Admiralty ordered the Grand Fleet of 28 dreadnoughts and 9 battlecruisers, to sortie the night before to cut off and destroy the High Seas Fleet. On the day of the battle, Revenge and the rest of the 6th Division, 1st BS were stationed toward the rear of the British line. The initial action was fought primarily by the British and German battlecruiser formations in the afternoon, but by 18:00, the Grand Fleet approached the scene. Fifteen minutes later, Jellicoe gave the order to turn and deploy the fleet for action. The transition from their cruising formation caused congestion with the rear divisions, forcing Revenge and many of the other ships to reduce speed to to avoid colliding with each other. The German fleet quickly came into range and many British ships began to engage them starting at 18:17. The British ships initially had poor visibility and Revenge waited several minutes before opening fire at 18:22; her target during this period is unclear, and she may have engaged the crippled cruiser , the German battle line, or both. She fired intermittently for seventeen minutes and made no hits in the haze. At 19:09, Revenge was forced to turn away to avoid a torpedo that was probably launched by the torpedo boat ; the torpedo passed harmlessly in her wake. Shortly thereafter, she engaged the battlecruiser ; her first salvo estimated the range to be , but overshot the target. Revenges gunlayers quickly brought the range down to and straddled Derfflinger with their second salvo. With the range found, Revenge quickly scored five hits before shifting fire to the battlecruiser , since other battleships were concentrating their fire on Derfflinger. Two of her hits on Derfflinger disabled her aft turrets; the other three caused less significant damage, with one of them passing through a funnel without exploding. Revenge hit Von der Tann once near her aft conning tower at 19:19, doing minor damage; she also fired a torpedo at the ship during this period that failed to hit. Revenge had to turn away again at 19:35 to avoid a pair of torpedoes; she and the other members of the division turned again at 19:42 after reports of a submarine, which proved to be imaginary. Revenge saw no further contact with German forces, in large part due to torpedo damage incurred by the squadron flagship, Marlborough, that forced the ship to slow significantly. At 01:56 on 1 June, Vice-Admiral Cecil Burney, the squadron commander aboard Marlborough, informed Revenge that the damage would force him to transfer to Revenge to allow Marlborough to return to port. He boarded the light cruiser , which carried him to Revenge shortly after 03:00. By 10:00, the 6th Division ships were still to the north of the rest of the fleet. Revenge and the other two ships finally rejoined the fleet at 19:25 on the way back to Scapa Flow. In the course of the battle, Revenge had fired 102 rounds from her main battery, all of which were of the armour-piercing, capped variety. She also fired 87 rounds from her secondary guns. She was not hit by any fire during the engagement. Later operations After the action of 19 August 1916, in which the Grand Fleet had lost two light cruisers to German U-boat attacks, Admiral John Jellicoe, the fleet commander, decided that the fleet should not be risked in such sorties unless the High Seas Fleet ventured north or the strategic situation warranted the risk. For its part, the German fleet remained in port or trained in the Baltic Sea through 1917, as both sides had largely abandoned the idea of a decisive surface battle in the North Sea. Both sides turned to positional warfare, laying fields of naval mines, and Germany resumed the unrestricted submarine warfare campaign early in the year. As a result, Revenge and the rest of the Grand Fleet saw no action during the last two years of the war. In 1917, Britain began running regular convoys to Norway, escorted by light forces; the Germans raided these convoys twice late in the year, prompting Admiral David Beatty, who had replaced Jellicoe the previous year, to send battle squadrons of the Grand Fleet to escort the convoys. The High Seas Fleet went to sea on 23 April to attack one of the escorted convoys, but after the battlecruiser suffered a serious mechanical accident the next day, the Germans were forced to break off the operation. Revenge and the rest of the Grand Fleet sortied on 24 April once they intercepted wireless signals from the damaged Moltke, but the Germans were too far ahead of the British, and no shots were fired. On 21 November 1918, following the Armistice, the entire Grand Fleet left port to escort the surrendered German fleet into internment at Scapa Flow. At the time, Revenge was part of the 1st Battle Squadron, commanded by Vice-Admiral Sydney Fremantle, who made Revenge his flagship. The 1st BS was tasked with guarding the fleet while its fate was being determined at the peace treaty negotiations at the Versailles conference. After the Germans scuttled their fleet on 21 June 1919, Fremantle had the German commander, Rear Admiral Ludwig von Reuter, brought aboard Revenge. Fremantle accused Reuter of violating the terms of the armistice and had him and the German officers taken into captivity as prisoners of war. Inter-war years Throughout the 1920s and 1930s, Revenge typically operated with her sister ships, apart from periods where they were detached for refit or modernisation. In April 1919, the ships were transferred to the Atlantic Fleet, still as part of the 1st BS. They were then attached to the Mediterranean Fleet for operations in Turkey and the Black Sea as part of Britain's responses to the Greco-Turkish War and the Russian Civil War, respectively. On 19 July 1920, Revenge went to Panderma, where she encountered several vessels of the Greek Navy, including the armoured cruiser , which had King Alexander of Greece aboard. Alexander visited Revenge and met with Fremantle later that day. Over the next day, Revenge assisted with Greek landings at Sultanköy and Eregli. In August 1920, the ships returned to the Atlantic Fleet. The 1st and 2nd Battle Squadrons merged in May 1921, with Revenge and her four sisters forming the 1st Division and the five Queen Elizabeth-class battleships forming the 2nd Division. Revenge and three of her sisters were again sent to the Mediterranean Fleet in September 1922 during a crisis in Smyrna that culminated in the Great fire of Smyrna as the Greco-Turkish War came to its conclusion. The ships primarily operated in the Dardanelles and the Sea of Marmora. With the war over by November, the ships were free to return once again to the Atlantic Fleet. On 1 November 1924, the Atlantic Fleet underwent a reorganisation that saw the Queen Elizabeth-class ships sent to the Mediterranean Fleet and the ships of the 1st Division reconstituted as the 1st Battle Squadron. Revenge and her sisters were transferred to the Mediterranean Fleet in August 1927. From January 1928 to January 1929, Revenge underwent a refit that included extensive modifications to her secondary and anti-aircraft batteries, fire control equipment, and rebuilding her bridge and aft superstructure, among other changes. She had another refit from May to December 1931 that saw further alterations to her anti-aircraft battery and fire control equipment. In early 1935, the Revenge and Queen Elizabeth classes again swapped places, though by this time, the Atlantic Fleet had been renamed the Home Fleet. On 16 July, the ships were present during the fleet review at Spithead for King George V's silver jubilee. From July 1936 to March 1937, Revenge had another modernisation, which included the removal of the torpedo rangefinder and supporting tower. She and her sisters were present for the Coronation Review for George VI on 20 May 1937. A final pre-war refit began in early 1939 and concluded in August, which included a considerably strengthening of the anti-aircraft battery. On 9 August 1939 she was present during a fleet review for the king at Portland. Second World War In the Atlantic On 3 September 1939 at the start of hostilities, Revenge formed part of the Channel Fleet based at Portland. Shortly after the outbreak of the war, the merchant ship was disguised as HMS Revenge to deceive German aircraft. On 1 October Revenge was ordered to prepare to take up convoy escort duties in the South Atlantic, because of the threat posed by the German "pocket battleship", ; however, on 5 October 1939, in a change of orders, she was attached to the North Atlantic Escort Force based at Halifax, Nova Scotia. Fulfilling another urgent need at the same time, Revenge and her sister were to carry gold bullion to Canada, which was needed by the Anglo-French Purchasing Board in New York, to pay for arms bought from the United States. 148 boxes of gold bars, worth a total of £2 million, were loaded onto each battleship at Portland; they departed on 7 October and arrived in Halifax nine days later. After escorting several convoys, Revenge was again used to transport gold, this time to a value of £10 million, departing from Plymouth on 28 January 1940. On 7 February, she collided with the British tanker whilst Convoy HX19 was forming up off Halifax; although lightly damaged, she continued as an escort, returning to Halifax on 18 February for repair. On 12 May 1940, she accidentally rammed and sank the Canadian which was acting as a boom defence vessel at Halifax, although without loss of life. For the remainder of her service in the war, whenever Revenge came to Halifax, the crews of other gate ships would make elaborate and exaggerated "Abandon Ship" manoeuvres in mockery. On 30 May, Revenge began to participate in Operation Fish, the removal of all of the United Kingdom's gold reserves to Canada, in case of invasion, leaving the River Clyde with £40 million worth of bullion on board, bound for Halifax. The battleship arrived at HM Dockyard, Devonport, on 22 June for a brief refit after escorting Convoy TC 5. On 3 July 1940, while at Plymouth, boarding parties from Revenge took control of the and the large submarine-cruiser , in case their crews decided to return them to Vichy France where they might fall into the hands of the Germans. One sailor boarding Surcouf was killed during the operation. On the following day, Revenge resumed ferrying gold, this time with a cargo worth £47 million, repeating this on 11 August with £14.5 million from Greenock. On 15 September, Revenge arrived in Plymouth where she came under the control of Western Approaches Command, in case of an invasion. If the German amphibious landing, codenamed Operation Sealion, had gone ahead as planned, Revenge would have been the only British capital ship in the English Channel area. Unknown to the British high command, Adolf Hitler had ordered that the invasion be postponed indefinitely on 17 September; however in the early hours of 11 October, Revenge formed the main element of Operation Medium, which aimed to bombard invasion transport ships and barges that were still concentrated in the French port of Cherbourg. Revenge, six destroyers and a screen of motor gun boats formed the striking force, while a covering force of three cruisers and six destroyers patrolled to prevent German naval forces from interfering. There was a simultaneous air raid by RAF Bomber Command which also dropped flares to illuminate the target. During the 18-minute bombardment, Revenge fired 120 main-gun shells at the harbour while her escorts fired 801 rounds from their 4.7-inch guns. The British force came under accurate fire from German heavy coastal artillery but were able to retire undamaged, Revenge managed to make 21.5 knots on the return journey. On 13 November 1940, she resumed North Atlantic convoy duties, which continued without major incident well into 1941. With the Eastern Fleet In October 1941, the Admiralty decided the ship was to be transferred to the 3rd Battle Squadron, which was to be based in Colombo, Ceylon; she was joined there by her three surviving sisters ( had been sunk in October 1939). The unit was established in December, with the squadron attached to Force F. With the start of the Pacific War on 7 December, naval forces were necessary in the Indian Ocean to protect British India. By the end of March 1942, the Eastern Fleet had been formed, under the command of Admiral James Somerville. Despite the numerical strength of the Eastern Fleet, many of its units, including the four Revenge-class battleships, were no longer front-line warships. Vice Admiral Chūichi Nagumo's powerful Kido Butai, composed of six carriers and four fast battleships, was significantly stronger than Somerville's Eastern Fleet. As a result, only the modernised battleship could operate with the two fleet carriers; Revenge, her three sisters, and the carrier Hermes were kept away from combat to escort convoys in the Indian Ocean. In late March, the code-breakers at the Far East Combined Bureau, a branch of Bletchley Park, informed Somerville that the Japanese were planning a raid into the Indian Ocean to attack Colombo and Trincomalee and destroy his fleet. He therefore divided his fleet into two groups: Force A, which consisted of the two fleet carriers, Warspite and four cruisers, and Force B, centred on Revenge and her sisters and Hermes. He intended to ambush Nagumo's fleet in a night action, the only method by which he thought he could achieve a victory. After three days of searching for the Japanese fleet without success, Somerville returned to Addu Atoll to refuel. While refuelling his ships, Somerville received a report that the Japanese fleet was approaching Colombo, which they attacked the following day, on 5 April, followed by attacks on Trincomalee on 9 April. Following the first raid on 5 April, Somerville withdrew Revenge and her three sisters to Mombasa, where they could secure the shipping routes in the Middle East and the Persian Gulf. The four Revenges departed from Addu Atoll early on the morning of 9 April, bound for Mombasa; they remained based there into 1943. Thereafter, the Revenge-class ships escorted convoys while based in Kilindini Harbour. The ship underwent a further refit in Durban from October to November 1942. In February 1943, Revenge and Resolution escorted the Operation Pamphlet convoy that carried the 9th Australian Division from Egypt back to Australia. Fate In mid-1943, the poor condition of the ship—which had become apparent as early as 1936, but could not be remedied due to the outbreak of the war—prompted the Admiralty to recall her to Britain to be withdrawn from service. She arrived in the Clyde on 31 September, where she was reduced to reserve status for the rest of the conflict. The ship's electrical system was in very poor condition and needed a thorough overhaul, and her hull was badly stressed from years of heavy use. Although in reserve, the ship was used to carry Prime Minister Winston Churchill part of the way to the Tehran Conference in November and December. In January 1944, she was transferred to the Portsmouth Command, based in Southampton; she remained there, out of use, until 17 December, when she was converted into a training ship for boiler room personnel, part of the training establishment . During the period of inactivity, in May 1944, her main armament was removed to provide spare guns for the battleships Ramillies and Warspite, as well as monitors which were to be vital during the bombardment of the beaches of Normandy during Operation Overlord. In March 1948, she was placed on the disposal list, being sold for scrap in July to the British Iron & Steel Co.; she was then sent to ship breakers Thos. W. Ward to be broken up at Inverkeithing, where she arrived on 5 September. Some of Revenges gun-turret rack and pinion gearing was reused in the diameter Mark I radio telescope built at Jodrell Bank, Cheshire, in the mid-1950s, along with equipment from . See also Claude Choules, the last living British World War I veteran, served aboard Revenge during the Great War. Notes Footnotes References Further reading External links Maritimequest HMS Revenge Photo Gallery Battle of Jutland Crew Lists Project - HMS Revenge Crew List Revenge-class battleships Vickers Ships built in Barrow-in-Furness 1915 ships World War I battleships of the United Kingdom World War II battleships of the United Kingdom Maritime incidents in May 1940
Mohamed Aiman Moukhliss Agmir (born 6 February 2000), known as Moha Moukhliss or just Moha, is a Spanish professional footballer who plays as a midfielder for Barcelona Atlètic, on loan from Segunda División club Andorra. Club career Born in Madrid to Moroccan parents, Moha joined Real Madrid's La Fábrica in 2010, aged ten, from EDM San Blas. On 2 September 2019, after finishing his formation, he was loaned to RC Celta de Vigo's reserves in Segunda División B, for one year. Moha made his senior debut on 18 September 2019, starting in a 4–2 home win over UD Melilla, and scored his first senior goal the following 2 February by netting the equalizer in a 1–1 away draw against Marino de Luanco. He returned to Castilla on 4 August 2020, after Celta did not exercise his buyout clause, but moved to another reserve team, Real Valladolid Promesas on a four-year contract sixteen days later. On 5 April 2021, Moha was included in the Real Valladolid squad against FC Barcelona, wearing the number 35 jersey. He remained an unused substitute in the 1–0 loss at the Camp Nou. On 24 August 2022, Moha left Valladolid, and moved to Segunda División newcomers FC Andorra two days later, on a three-year deal. He made his professional debut on 9 October, coming on as a second-half substitute for Rubén Bover in a 0–0 away draw against Málaga CF. On 31 January 2023, Moha was loaned to FC Barcelona Atlètic for the remainder of the 2022–23 Primera Federación. On 21 July, his loan was extended for a further year. References External links 2000 births Living people Footballers from Madrid Spanish sportspeople of Moroccan descent Spanish men's footballers Moroccan men's footballers Men's association football midfielders Segunda División players Primera Federación players Segunda División B players Real Madrid Castilla footballers RC Celta Fortuna players Real Valladolid Promesas players FC Andorra players FC Barcelona Atlètic players Spain men's youth international footballers Spanish expatriate men's footballers Expatriate men's footballers in Andorra Spanish expatriate sportspeople in Andorra
is a railway station in Aoi-ku, Shizuoka, Japan, operated by the Ōigawa Railway. Lines Kanzō Station is served by the Ikawa Line, and is located 20.5 kilometers from the official starting point of the line at . Station layout The station has two opposed side platforms connected by a level crossing and a small unmanned lean-to rain shelter on the platform for passengers. The station is unattended. Adjacent stations |- !colspan=5|Ōigawa Railway Station history Kanzō Station was opened on August 1, 1959. Located in an isolated mountain area surrounded by forests, it has very few passengers. It was built primarily to support dam construction activities in the Ōi River area in the 1960s. Passenger statistics In fiscal 2017, the station was used by an average of 4 passengers daily (boarding passengers only). Surrounding area Ōi River See also List of Railway Stations in Japan References External links Ōigawa Railway home page Stations of Ōigawa Railway Railway stations in Shizuoka (city) Railway stations in Japan opened in 1959
```javascript const Suite = require("./default-suite").Suite; const Immutable = require("immutable"); const _ = require("lodash"); const List = require("../../dist/index"); const OldList = require("./list-old/dist/index"); const result = 1; const suite = Suite("map"); function square(n) { return n * n; } function addBenchmark(n) { let array = []; let immut = new Immutable.List(); let list = List.empty(); let oldList = OldList.empty(); for (let i = 0; i < n; ++i) { list = list.append(i); oldList = oldList.append(i); array.push(i); immut = immut.push(i); } suite .add("Array#map " + n, function() { return array.map(square); }) .add("Lodash " + n, function() { return _.map(array, square); }) .add("Immutable.js " + n, function() { return immut.map(square); }) .add("mapArray " + n, function() { return List.mapArray(square, array); }) .add("List " + n, function() { return List.map(square, list); }); } addBenchmark(10); // addBenchmark(50); // addBenchmark(100); addBenchmark(1000); suite.run({ async: true }); module.exports = suite; ```
```c /***************************************************************************** All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***************************************************************************** * Contents: Native high-level C interface to LAPACK function csptrs * Author: Intel Corporation *****************************************************************************/ #include "lapacke_utils.h" lapack_int API_SUFFIX(LAPACKE_csptrs)( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, const lapack_complex_float* ap, const lapack_int* ipiv, lapack_complex_float* b, lapack_int ldb ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_csptrs", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK if( LAPACKE_get_nancheck() ) { /* Optionally check input matrices for NaNs */ if( API_SUFFIX(LAPACKE_csp_nancheck)( n, ap ) ) { return -5; } if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, n, nrhs, b, ldb ) ) { return -7; } } #endif return API_SUFFIX(LAPACKE_csptrs_work)( matrix_layout, uplo, n, nrhs, ap, ipiv, b, ldb ); } ```
```go package cbor import "fmt" // 5 bits of the first byte on CBOR contain the additional information which can be either the // actual value or a value telling us how to get the value. // The meaning of additional information depends on the major type. For example, in major type 0, // the argument is the value of the data item itself (and in major type 1, the value of the data // item is computed from the argument); in major type 2 and 3, it gives the length of the string // data in bytes that follow; and in major types 4 and 5, it is used to determine the number of data // items enclosed. // path_to_url#name-specification-of-the-cbor-e type AdditionalInfo int const ( // The integers match with the length in bytes apart from reserved and indefinite. AdditionalInfoDirect AdditionalInfo = iota // 0->23 AdditionalInfoOneByte // 24 AdditionalInfoTwoBytes // 25 AdditionalInfoFourBytes // 26 AdditionalInfoEightBytes // 27 AdditionalInfoReserved // 28->30 AdditionalInfoIndefinite // 31 ) func convertToAdditionalInfo(b byte) AdditionalInfo { switch b & 0b00011111 { case 0x18: return AdditionalInfoOneByte case 0x19: return AdditionalInfoTwoBytes case 0x1A: return AdditionalInfoFourBytes case 0x1B: return AdditionalInfoEightBytes case 0x1C, 0x1D, 0x1E: return AdditionalInfoReserved case 0x1F: return AdditionalInfoIndefinite default: return AdditionalInfoDirect } } // getAdditionalInfoDirectValue is used for AdditionalInfoDirect to read the value following the additional info. func getAdditionalInfoDirectValue(b byte) byte { return b & 0b00011111 } // getAdditionalInfoLength returns the length of the byte array following the additional info byte to read the unsigned integer from. func (ainfo AdditionalInfo) getAdditionalInfoLength() int { switch ainfo { case AdditionalInfoDirect: return 0 case AdditionalInfoOneByte: return 1 case AdditionalInfoTwoBytes: return 2 case AdditionalInfoFourBytes: return 4 case AdditionalInfoEightBytes: return 8 default: panic("getAdditionalInfoLength() should never be called with: " + fmt.Sprint(ainfo)) } } // getAdditionalInfoValueLowerLimit returns the unsigned integer limit which is the lowest that should // be using the AdditionalInfo in question. If the unsigned integer is smaller than the limit, it should // use less bytes than it is currently using meaning it is not following the deterministic principles. func (ainfo AdditionalInfo) getAdditionalInfoValueLowerLimit() uint64 { switch ainfo { case AdditionalInfoDirect: return 0 case AdditionalInfoOneByte: // This is a special case and defined by the deterministic CBOR standard. Anything <= 23L // should be directly the value of the additional information. return 24 case AdditionalInfoTwoBytes: return 256 // Aka 0b11111111 +1 case AdditionalInfoFourBytes: return 1 << 16 // Aka 0b11111111_11111111 +1 case AdditionalInfoEightBytes: return 1 << 32 // Aka 0b11111111_11111111_11111111_11111111 +1 default: panic("Invalid additional information value: " + fmt.Sprint(ainfo)) } } ```
```kotlin package mega.privacy.android.app.mediaplayer.gateway import android.content.Intent import androidx.lifecycle.LiveData import kotlinx.coroutines.flow.Flow import mega.privacy.android.app.mediaplayer.model.MediaPlaySources import mega.privacy.android.app.mediaplayer.playlist.PlaylistItem import mega.privacy.android.domain.exception.MegaException import java.io.File /** * PlayerServiceViewModelGateway for visit MediaPlayerServiceViewModel from outside */ interface PlayerServiceViewModelGateway { /** * Remove item * * @param handle the handle that is removed */ fun removeItem(handle: Long) /** * Set new text for playlist search query * * @param newText the new text string */ fun searchQueryUpdate(newText: String?) /** * Get current intent * * @return current intent */ fun getCurrentIntent(): Intent? /** * Get the handle of the current playing item * * @return the handle of the current playing item */ fun getCurrentPlayingHandle(): Long /** * Set the handle of the current playing item * * @param handle MegaNode handle */ fun setCurrentPlayingHandle(handle: Long) /** * Get playlist item * * @param handle MegaNode handle * @return PlaylistItem */ fun getPlaylistItem(handle: String?): PlaylistItem? /** * Update when playlist is changed * * @return Flow<Pair<List<PlaylistItem>, Int>> */ fun playlistUpdate(): Flow<Pair<List<PlaylistItem>, Int>> /** * Get updated playlist items * * @return updated playlist items */ fun getUpdatedPlaylistItems(): List<PlaylistItem> /** * Update item name * * @param handle MegaNode handle * @param newName the new name string */ fun updateItemName(handle: Long, newName: String) /** * Get playlist items * * @return List<PlaylistItem> */ fun getPlaylistItems(): List<PlaylistItem> /** * Update when media playback is changed * * @return Flow<Boolean> */ fun mediaPlaybackUpdate(): Flow<Boolean> /** * Update when error is happened * * @return Flow<MegaException?> */ fun errorUpdate(): Flow<MegaException?> /** * Update when the items are cleared * * @return Flow<Boolean?> */ fun itemsClearedUpdate(): Flow<Boolean?> /** * Update when playlist title is changed * * @return Flow<String> */ fun playlistTitleUpdate(): Flow<String> /** * Update when item select count is changed * * @return Flow<Int> */ fun itemsSelectedCountUpdate(): Flow<Int> /** * Update when action mode is changed * * @return Flow<Boolean> */ fun actionModeUpdate(): Flow<Boolean> /** * Remove the selected items */ fun removeAllSelectedItems() /** * Clear the all selections */ fun clearSelections() /** * Scroll to the position of playing item */ fun scrollToPlayingPosition() /** * Judge the action mode whether is enabled * * @return true is action mode, otherwise is false. */ fun isActionMode(): Boolean? /** * Set the action mode * @param isActionMode whether the action mode is activated */ fun setActionMode(isActionMode: Boolean) /** * Saved or remove the selected items * @param handle node handle of selected item */ fun itemSelected(handle: Long) /** * Get the index from playlistItems to keep the play order is correct after reordered * @param item clicked item * @return the index of clicked item in playlistItems or null */ fun getIndexFromPlaylistItems(item: PlaylistItem): Int? /** * Get the index from playlistItems to keep the play order is correct after reordered * @param handle handle of clicked item * @return the index of clicked item in playlistItems or null */ fun getIndexFromPlaylistItems(handle: Long): Int? /** * Get the position of playing item * * @return the position of playing item */ fun getPlayingPosition(): Int /** * Swap the items * @param current the position of from item * @param target the position of to item */ fun swapItems(current: Int, target: Int) /** * Updated the play source of exoplayer after reordered. */ fun updatePlaySource() /** * Judge the current media item whether is paused * * @return true is paused, otherwise is false */ fun isPaused(): Boolean /** * Set paused * @param paused the paused state */ fun setPaused(paused: Boolean) /** * Handle player error. */ fun onPlayerError() /** * Get playing thumbnail * * @return LiveData<File> */ fun getPlayingThumbnail(): LiveData<File> /** * Update playerSource * * @return Flow<MediaPlaySources> */ fun playerSourceUpdate(): Flow<MediaPlaySources> /** * Update when item is removed * * @return Flow<Pair<Int, Long>> Int is the position of removed item, Long is the handle of removed item */ fun mediaItemToRemoveUpdate(): Flow<Pair<Int, Long>> /** * Update node name * * @return Flow<String> */ fun nodeNameUpdate(): Flow<String> /** * Update retry * * @return Flow<Boolean> */ fun retryUpdate(): Flow<Boolean> /** * Build player source from start intent. * * @param intent intent received from onStartCommand * @return if there is no error */ suspend fun buildPlayerSource(intent: Intent?): Boolean /** * Cancel search token */ fun cancelSearch() /** * Clear the state and flying task of this class, should be called in onDestroy. */ fun clear() /** * Reset retry state */ fun resetRetryState() /** * Set the search mode * @param value true is in search mode, otherwise is false */ fun setSearchMode(value: Boolean) /** * Monitor the media item transition state */ fun monitorMediaItemTransitionState(): Flow<Long?> } ```
```c /* * util/timehist.c - make histogram of time values. * * * This software is open source. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the NLNET LABS nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * \file * * This file contains functions to make a histogram of time values. */ #include "config.h" #ifdef HAVE_TIME_H #include <time.h> #endif #include <sys/time.h> #include <sys/types.h> #include "util/timehist.h" #include "util/log.h" #include "util/timeval_func.h" /** special timestwo operation for time values in histogram setup */ static void timestwo(struct timeval* v) { #ifndef S_SPLINT_S if(v->tv_sec == 0 && v->tv_usec == 0) { v->tv_usec = 1; return; } v->tv_sec *= 2; v->tv_usec *= 2; if(v->tv_usec == 1024*1024) { /* nice values and easy to compute */ v->tv_sec = 1; v->tv_usec = 0; } #endif } /** do setup exponentially */ static void dosetup(struct timehist* hist) { struct timeval last; size_t i; memset(&last, 0, sizeof(last)); for(i=0; i<hist->num; i++) { hist->buckets[i].lower = last; timestwo(&last); hist->buckets[i].upper = last; hist->buckets[i].count = 0; } } struct timehist* timehist_setup(void) { struct timehist* hist = (struct timehist*)calloc(1, sizeof(struct timehist)); if(!hist) return NULL; hist->num = NUM_BUCKETS_HIST; hist->buckets = (struct th_buck*)calloc(hist->num, sizeof(struct th_buck)); if(!hist->buckets) { free(hist); return NULL; } /* setup the buckets */ dosetup(hist); return hist; } void timehist_delete(struct timehist* hist) { if(!hist) return; free(hist->buckets); free(hist); } void timehist_clear(struct timehist* hist) { size_t i; for(i=0; i<hist->num; i++) hist->buckets[i].count = 0; } void timehist_insert(struct timehist* hist, struct timeval* tv) { size_t i; for(i=0; i<hist->num; i++) { if(timeval_smaller(tv, &hist->buckets[i].upper)) { hist->buckets[i].count++; return; } } /* dump in last bucket */ hist->buckets[hist->num-1].count++; } void timehist_print(struct timehist* hist) { #ifndef S_SPLINT_S size_t i; for(i=0; i<hist->num; i++) { if(hist->buckets[i].count != 0) { printf("%4d.%6.6d %4d.%6.6d %u\n", (int)hist->buckets[i].lower.tv_sec, (int)hist->buckets[i].lower.tv_usec, (int)hist->buckets[i].upper.tv_sec, (int)hist->buckets[i].upper.tv_usec, (unsigned)hist->buckets[i].count); } } #endif } void timehist_log(struct timehist* hist, const char* name) { #ifndef S_SPLINT_S size_t i; log_info("[25%%]=%g median[50%%]=%g [75%%]=%g", timehist_quartile(hist, 0.25), timehist_quartile(hist, 0.50), timehist_quartile(hist, 0.75)); /* 0000.000000 0000.000000 0 */ log_info("lower(secs) upper(secs) %s", name); for(i=0; i<hist->num; i++) { if(hist->buckets[i].count != 0) { log_info("%4d.%6.6d %4d.%6.6d %u", (int)hist->buckets[i].lower.tv_sec, (int)hist->buckets[i].lower.tv_usec, (int)hist->buckets[i].upper.tv_sec, (int)hist->buckets[i].upper.tv_usec, (unsigned)hist->buckets[i].count); } } #endif } /** total number in histogram */ static size_t timehist_count(struct timehist* hist) { size_t i, res = 0; for(i=0; i<hist->num; i++) res += hist->buckets[i].count; return res; } double timehist_quartile(struct timehist* hist, double q) { double lookfor, passed, res; double low = 0, up = 0; size_t i; if(!hist || hist->num == 0) return 0.; /* look for i'th element, interpolated */ lookfor = (double)timehist_count(hist); if(lookfor < 4) return 0.; /* not enough elements for a good estimate */ lookfor *= q; passed = 0; i = 0; while(i+1 < hist->num && passed+(double)hist->buckets[i].count < lookfor) { passed += (double)hist->buckets[i++].count; } /* got the right bucket */ #ifndef S_SPLINT_S low = (double)hist->buckets[i].lower.tv_sec + (double)hist->buckets[i].lower.tv_usec/1000000.; up = (double)hist->buckets[i].upper.tv_sec + (double)hist->buckets[i].upper.tv_usec/1000000.; #endif res = (lookfor - passed)*(up-low)/((double)hist->buckets[i].count); return low+res; } void timehist_export(struct timehist* hist, long long* array, size_t sz) { size_t i; if(!hist) return; if(sz > hist->num) sz = hist->num; for(i=0; i<sz; i++) array[i] = (long long)hist->buckets[i].count; } void timehist_import(struct timehist* hist, long long* array, size_t sz) { size_t i; if(!hist) return; if(sz > hist->num) sz = hist->num; for(i=0; i<sz; i++) hist->buckets[i].count = (size_t)array[i]; } ```
Saint Stephen's Episcopal School is a private college preparatory school affiliated with the Episcopal Church. The school is accredited by the Florida Council of Independent Schools. It is located in Bradenton, Florida. Founded in 1970, SSES has 650 students in grades Pre-K3 through 12. Notable alumni Chase Brown, professional football player for the Cincinnati Bengals Sydney Brown, professional football player for the Philadelphia Eagles Educational institutions established in 1970 Private high schools in Florida Private middle schools in Florida Private elementary schools in Florida Episcopal schools in the United States Schools in Bradenton, Florida 1970 establishments in Florida
Robert James Brown (2 December 1933 – 30 March 2022) was an Australian Labor Party politician. Early life Brown was born in Pelaw Main and educated at Pelaw Main Primary School, Kurri Kurri Junior Technical High School, Maitland Boys High School, the University of Sydney (B.Ec), Sydney Teachers' College (Dip.Ed), Broken Hill Technical College and the University of New England. He married Elizabeth Joy Hirschausen in 1960 and had one daughter (Kelly Hoare) and one son. Political career Brown first contested the then safe Liberal seat of Paterson at the 1961 federal election. He gathered a 6.5% swing to Labor but failed to beat the sitting member and Menzies Government Minister, Allen Fairhall. Brown later contested and won the seat of Cessnock in the New South Wales Legislative Assembly and held it from 1978 to 1980. He switched to federal politics, this time successfully contesting the nearby electorate of Hunter, holding it from 1980 until 1984. After a redistribution moved a large slice of Hunter to the new seat of Charlton, Brown transferred there and represented it from 1984 to 1998. He served as Minister for Land Transport from 1988 to 1993. He retired in 1998, and was succeeded in Charlton by his daughter, Kelly Hoare. Honours On 11 June 2007, Brown was named a Member of the Order of Australia for "service to the Australian Parliament, particularly in the area of transport policy, to the community of the Hunter Region through local government, heritage and sporting organisations, and to economics education." Death Brown died on 30 March 2022, aged 88. His funeral was held on 6 April 2022, a week after his death. References 1933 births 2022 deaths Members of the Australian House of Representatives for Hunter Members of the Australian House of Representatives for Charlton Members of the Australian House of Representatives Members of the New South Wales Legislative Assembly Members of the Order of Australia Australian Labor Party members of the Parliament of Australia 20th-century Australian politicians Transport ministers of Australia People from New South Wales
```java Floating garbage and how to deal with it Writing generic methods Using `synchronized` statements Detect or prevent integer overflow Increase `PermGen` space as to avoid `OutOfMemory` errors ```
```python from typing import List from ray.data._internal.logical.interfaces import ( LogicalPlan, Optimizer, PhysicalPlan, Rule, ) from ray.data._internal.logical.rules._user_provided_optimizer_rules import ( add_user_provided_logical_rules, add_user_provided_physical_rules, ) from ray.data._internal.logical.rules.inherit_target_max_block_size import ( InheritTargetMaxBlockSizeRule, ) from ray.data._internal.logical.rules.operator_fusion import OperatorFusionRule from ray.data._internal.logical.rules.randomize_blocks import ReorderRandomizeBlocksRule from ray.data._internal.logical.rules.set_read_parallelism import SetReadParallelismRule from ray.data._internal.logical.rules.zero_copy_map_fusion import ( EliminateBuildOutputBlocks, ) from ray.data._internal.planner.planner import Planner DEFAULT_LOGICAL_RULES = [ ReorderRandomizeBlocksRule, ] DEFAULT_PHYSICAL_RULES = [ InheritTargetMaxBlockSizeRule, SetReadParallelismRule, OperatorFusionRule, EliminateBuildOutputBlocks, ] class LogicalOptimizer(Optimizer): """The optimizer for logical operators.""" @property def rules(self) -> List[Rule]: rules = add_user_provided_logical_rules(DEFAULT_LOGICAL_RULES) return [rule_cls() for rule_cls in rules] class PhysicalOptimizer(Optimizer): """The optimizer for physical operators.""" @property def rules(self) -> List["Rule"]: rules = add_user_provided_physical_rules(DEFAULT_PHYSICAL_RULES) return [rule_cls() for rule_cls in rules] def get_execution_plan(logical_plan: LogicalPlan) -> PhysicalPlan: """Get the physical execution plan for the provided logical plan. This process has 3 steps: (1) logical optimization: optimize logical operators. (2) planning: convert logical to physical operators. (3) physical optimization: optimize physical operators. """ optimized_logical_plan = LogicalOptimizer().optimize(logical_plan) logical_plan._dag = optimized_logical_plan.dag physical_plan = Planner().plan(optimized_logical_plan) return PhysicalOptimizer().optimize(physical_plan) ```
Indigenous religions is a category used in the study of religion to demarcate the religious belief systems of communities described as being "indigenous". This category is often juxtaposed against others such as the "world religions" and "new religious movements". The term is commonly applied to a range of different belief systems across the Americas, Australasia, Asia, Africa, and Northern Europe, particularly to those practiced by communities living under the impact of colonialism. The term "indigenous religions" is usually applied to the localised belief systems of small-scale societies. These belief systems do not typically engage in proselytization, thus distinguishing them from movements like Christianity, Islam, and Buddhism that all seek converts and which are typically classified as "world religions"; unlike Judaism, even though it is often referred to as a “world religion”. They are also often characterised as being distinct from the "world religions" because they are orally transmitted, intertwined with traditional lifestyles, and pluralist. Numerically, the majority of the world's religions could be classed as "indigenous", although the number of "indigenous religionists" is significantly smaller than the number of individuals who practice one of the "world religions". Within the study of religion there has been much debate as to what the scope of the category should be, largely arising from debates over what the term "indigenous" should best encompass. For instance, the Japanese religion of Shinto is often referred to as an "indigenous religion" although, because the Japanese are not a colonised society but have colonised neighbouring societies like that of the Ainu, there is debate as to whether they meet the definition of "indigenous". In some cases, practitioners of new religions like Heathenry have sought to present theirs as "indigenous religions" although have faced scepticism from scholars of religion. Definition The academic study of religions has used three concepts through which to categorise different religious groups: "world religions", "new religious movements", and "indigenous religions". The scholar of religion Carole M. Cusack noted that "indigenous religions" were rejected from the "world religions" category because they "are typically this-wordly, orally transmitted, non-proselytizing, folk-oriented, expressed in myths and traditional law, and pluralist." In the nineteenth century, the dominant ways to refer to these religions were "primitive religion" or "non-literate religion", as they were seen as offering insight into how religion was practiced by the earliest humans. Another term, "primal religion", was coined by Andrew Walls in the University of Aberdeen in the 1970s to provide a focus on non-Western forms of religion as found in Africa, Asia, and Oceania. However, according to the scholar of religion Graham Harvey, such approaches preference Western industrialized people and the course of Protestant Enlightenment culture. Likewise, James Cox, Walls's student, argues that terms such as "primal religion", "primitive religion", and "tribal religion" suggest an undeveloped religion which can be seen as a preparation for conversion to Christianity. Graham Harvey states that indigenous religions constitute the majority of the world's religions. At the same time, he noted that "indigenous religionists" do not numerically make up the majority of religious people. Some indigenous religions have gained as much global visibility as some of the "world religions". For instance, musicians influenced by the belief systems of the Maori, Indigenous Australian, and Canadian First Nations peoples have had their work exposed to an international audience. Examples The Japanese religion Shinto is often described as an "indigenous religion", although Asian studies scholar John K. Nelson notes that it is often "unclear" what is meant by the term "indigenous" in this context. He noted, for example, that there remain debates as to when the ancestors of the Japanese arrived in the islands that now make up Japan and that there were other communities, such as the Ainu, who lived on some of these islands before them. Many followers of Heathenry, a modern Pagan religion that scholars recognise as a new religious movement, like to regard their belief system as an "indigenous religion". In claiming a sense of indigeneity, some Heathens—particularly in the United States—attempt to frame themselves as the successors to the pre-Christian belief systems of linguistic Germanic communities in Northern Europe and thus victims of Medieval Christian colonialism and imperialism. The scholars Jenifer Snook, Thad Horrell, and Kirsten Horton argued that in doing so, these Heathens ignore the fact that most of them are white, and members of the same ethnic community, which has perpetrated and benefitted from colonial and imperial policies against indigenous communities in the Americas and elsewhere. See also Ethnic religion Ethnoreligious group Sources Footnotes Bibliography Religious faiths, traditions, and movements Religious studies Indigenous culture
Guy Azouri (; born 2 June 1963) is an Israeli football manager. He is currently the head coach of the Israeli National Women's Football team, and the head of the Israeli Women's Football Academy. After playing as a youth in the Maccabi Tel Aviv youth team, Azouri spent most of his football career as a player in the United States. After an injury Azouri turned to coaching, serving as assistant coach under Avram Grant and Eli Ohana. Azouri moved to Beitar Jerusalem in 2005 as Eli Ohana's assistant coach. After Ohana's departure he became interim head coach for 5 months, proving to be very successful. After Luis Fernández was brought in as head coach Azouri returned to the assistant coach position, and finally following Fernandez's departure Azouri took over as the coach of Beitar's under-20 team, winning an historic Double in the 2006–07 season and another Championship the following year. Beginning in 2008 Azouri served as head coach of several teams in the Israeli Premier League, including Beitar Jerusalem, Hapoel Be'er Sheva and Maccabi Petach-Tikvah. In 2012 Azouri was one of the founders of Israel's Women Football Academy, which has won accolades for the improvements it has achieved in women's football, culminating in hosting the 2015 U-19 championship . Today Azouri is the director and head coach of the Israeli Women's Football Academy, which includes the Adult, U-19 and youth teams. Youth Guy Azouri was born in 1963 in Tel Aviv. He joined the Maccabi Tel Aviv youth club when he was 8, and played there continuously until his career was put on hold when he joined the Israeli Army at age 18. After completing his service in 1985, Azouri traveled to the United States to study Physical Fitness and Physiology at Long Island University. While there he played under scholarship for LIU Post Pioneers as a midfielder. Azouri also coached several youth teams during this period. In 1990 Azouri was invited to try out for a position in the NY Jets due to his impressive kicking ability . At one of these tryouts Azouri was seriously injured in the groin, thereby ending his career as a professional athlete. Career Men's Football Assistant Coach In 1994 Azouri returned to Israel, taking up a position as assistant coach in Maccabi Tel Aviv under Avram Grant. The two developed close professional ties during this time . Maccabi Tel Aviv, under Grant and Azouri, won Liga Leumit (than top division) in the first season, with 13 points advantage over second place. In 2000 Azouri joined Bnei Yehuda as assistant to Eli Ohana. Azouri followed Ohana when the latter became head coach of Beitar Jerusalem in 2002. After Eli Ohana resigned in September 2005, he was replaced by Guy Azouri as interim coach. Although Azouri enjoyed the highest success rate of any coach in the Premier League during this time, he did not have a UEFA Pro Manager diploma, and so could not continue as permanent head coach. Beitar signed the Dutch Ton Caanen as a coach, Guy Azouri was demoted to assistant coach. Azouri also served as an assistant coach to Fernández who resigned at the end of the season. U-20 Coach In the summer of 2006 Beitar signed the Argentinian manager Osvaldo Ardiles who brought his own professional team and so was not interested in Azouri staying on as assistant manager . Azouri decided to train the Beitar U-20 team, which went on to win the Double (Championship and Youth Cup) the first time in its history. The club later won another championship under his guidance. Men's football head coach In the years 2008-2011 Azouri was head coach at a number of Premier League clubs including Maccabi Petah-Tikvah, Hapoel Be'er Sheva and Hapoel Ashkelon. Women's Football Coaching Career In 2012 Azouri was one of the founders of the Israeli Women's Football Academy, an international academy modelled on European lines. The academy is considered highly successful, with the U-19 women's team participating in the Championship for the first time in its history in the 2015 tournament, which was hosted in Israel. Today Azouri is the head coach of both the adult and U-19 teams, as well as the director of the youth academy. Personal life Guy Azouri is married and has three children. He currently resides in Herzliya, Israel Honours Israeli Youth Championship: Winner (2): 2006–07, 2007–08 Youth State Cup: Winner (1): 2006–07 Israeli Premier League Championship (as assistant coach to Avram Grant in Maccabi TA): Winner (1): 1994-95 References Israeli football managers Beitar Jerusalem F.C. managers Maccabi Petah Tikva F.C. managers Hapoel Ashkelon F.C. managers Hapoel Kfar Saba F.C. managers Living people 1963 births University of New England (United States) alumni Israeli Jews Jewish sportspeople
The women's time trial LC1–4/CP 3/4 road event in cycling at the 2004 Summer Paralympics was competed on 24 September. It was won by Karen Jacobsen, representing Denmark. Standings were decided by a calculated time. Results 24 Sept. 2004, 15:30 References W 2004 in women's road cycling Vouliagmeni Olympic Centre events
```html <nz-card [nzBordered]="false"> <form nz-form [nzLayout]="'inline'" (ngSubmit)="onSearch()" class="search__form"> <div nz-row [nzGutter]="{ xs: 8, sm: 8, md: 8, lg: 24, xl: 48, xxl: 48 }"> <div nz-col nzMd="8" nzSm="24"> <nz-form-item> <nz-form-label nzFor="startDatePicker">{{ 'mxk.text.startDate' | i18n }}</nz-form-label> <nz-form-control> <nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" [(ngModel)]="query.params.startDatePicker" [ngModelOptions]="{ standalone: true }" name="startDatePicker" nzPlaceHolder="startDatePicker" > </nz-date-picker> </nz-form-control> </nz-form-item> </div> <div nz-col nzMd="8" nzSm="24"> <nz-form-item> <nz-form-label nzFor="endDatePicker">{{ 'mxk.text.endDate' | i18n }}</nz-form-label> <nz-form-control> <nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" [(ngModel)]="query.params.endDatePicker" [ngModelOptions]="{ standalone: true }" name="endDatePicker" nzPlaceHolder="endDatePicker" > </nz-date-picker> </nz-form-control> </nz-form-item> </div> <div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm"> <button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' | i18n }}</button> <button nz-button type="reset" (click)="onReset()" class="mx-sm">{{ 'mxk.text.reset' | i18n }}</button> <button nz-button (click)="query.expandForm = !query.expandForm" class="mx-sm d-none"> {{ query.expandForm ? ('mxk.text.collapse' | i18n) : ('mxk.text.expand' | i18n) }}</button > </div> </div> </form> </nz-card> <nz-card> <div nz-col [nzSpan]="24" class="table-list-toolbar"> <button nz-button type="button" (click)="onTerminate($event)" [nzType]="'primary'" nzDanger class="mx-sm">{{ 'mxk.text.terminate' | i18n }}</button> </div> <div nz-col [nzSpan]="24"> <nz-table #dynamicTable nzTableLayout="auto" nzSize="small" nzShowSizeChanger [nzBordered]="true" [nzData]="query.results.rows" [nzFrontPagination]="false" [nzTotal]="query.results.records" [nzPageSizeOptions]="query.params.pageSizeOptions" [nzPageSize]="query.params.pageSize" [nzPageIndex]="query.params.pageNumber" [nzLoading]="this.query.tableLoading" (nzQueryParams)="onQueryParamsChange($event)" > <thead> <tr> <th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate" (nzCheckedChange)="onTableAllChecked($event)"></th> <th nzAlign="center">{{ 'mxk.history.login.sessionId' | i18n }}</th> <th nzAlign="center">{{ 'mxk.history.login.username' | i18n }}</th> <th nzAlign="center">{{ 'mxk.history.login.displayName' | i18n }}</th> <th nzAlign="center">{{ 'mxk.history.login.sourceIp' | i18n }}</th> <th nzAlign="center">{{ 'mxk.history.login.browser' | i18n }}</th> <th nzAlign="center">{{ 'mxk.history.login.platform' | i18n }}</th> <th nzAlign="center">{{ 'mxk.history.login.loginTime' | i18n }}</th> </tr> </thead> <tbody> <tr *ngFor="let data of query.results.rows"> <td [nzChecked]="query.tableCheckedId.has(data.sessionId)" [nzDisabled]="data.disabled" (nzCheckedChange)="onTableItemChecked(data.sessionId, $event)" ></td> <td nzAlign="left"> <span>{{ data.sessionId }}</span> </td> <td nzAlign="left">{{ data.username }}</td> <td nzAlign="left">{{ data.displayName }}</td> <td nzAlign="left">{{ data.sourceIp }}</td> <td nzAlign="left">{{ data.browser }}</td> <td nzAlign="left">{{ data.platform }}</td> <td nzAlign="left">{{ data.loginTime }}</td> </tr> </tbody> </nz-table> </div> </nz-card> ```
An inspection is, most generally, an organized examination or formal evaluation exercise. In engineering activities inspection involves the measurements, tests, and gauges applied to certain characteristics in regard to an object or activity. The results are usually compared to specified requirements and standards for determining whether the item or activity is in line with these targets, often with a Standard Inspection Procedure in place to ensure consistent checking. Inspections are usually non-destructive. Inspections may be a visual inspection or involve sensing technologies such as ultrasonic testing, accomplished with a direct physical presence or remotely such as a remote visual inspection, and manually or automatically such as an automated optical inspection. Non-contact optical measurement and photogrammetry have become common NDT methods for inspection of manufactured components and design optimisation. A 2007 Scottish Government review of scrutiny of public services (the Crerar Review) defined inspection of public services as "... periodic, targeted scrutiny of specific services, to check whether they are meeting national and local performance standards, legislative and professional requirements, and the needs of service users." A surprise inspection tends to have different results than an announced inspection. Leaders wanting to know how others in their organization perform can drop in without warning, to see directly what happens. If an inspection is made known in advance, it can give people a chance to cover up or to fix mistakes. This could lead to distorted and inaccurate findings. A surprise inspection, therefore, gives inspectors a better picture of the typical state of the inspected object or process than an announced inspection. It also enhances external confidence in the inspection process. Specific inspection Manufacturing Quality related in-process inspection/verification is an essential part of quality control in manufacturing. characteristics of a product or process and comparing the results with specified requirements to determine whether is the requirements are met for each characteristic. Common examples of inspection by measurement or gauging include using a caliper or micrometer to determine if a dimension of a manufactured part is within the dimensional tolerance specified in a drawing for that part, and is thus acceptable for use. Design for inspection (DFI) is a concept that should complement and work in collaboration with design for manufacturability (DFM) and design for assembly (DMA) to reduce product manufacturing cost and increase manufacturing practicality. Photogrammetry is a modern way of visual inspection, delivering high accuracy and traceability for various industries. The portable 3D system is a versatile optical coordinate measuring machine (CMM) with a wide range of capabilities. Highly accurate point measurements can be taken with inspection carried out directly to CAD models, geometry or drawings.(DFI) Fire equipment Most fire equipment needs to be inspected to make sure in the event of a fire, every effort has been taken to make sure it doesn't get out of control. Extinguishers are to be inspected every month by law and inspected by a servicing company at least once a year. Fire extinguishers can be heavy, so it's a good idea to practice picking up and holding an extinguisher to get an idea of the weight and feel. Business In international trade several destination countries require pre-shipment inspection. The importer instructs the shipper which inspection company should be used. The inspector makes pictures and a report to certify that the goods that are being shipped and produced are in accordance with the accompanying documents. Commodity inspection is other term that is used between buyers and sellers. The scope of work for commodity inspection depends to the buyers. Some buyers hire the inspection agencies only for pre-shipment inspections i.e. visual quality, quantity, packing, marking and loading inspections and some others request for higher level inspections and ask inspection agencies to attend in the vendor shops and inspect commodities during manufacturing processes. Normally inspection is done based on an agreed inspection and test plan (ITP). Government In government and politics, an inspection is the act of a monitoring authority administering an official review of various criteria (such as documents, facilities, records, and any other assets) that are deemed by the authority to be related to the inspection. Inspections are used for the purpose of determining if a body is complying with regulations. The inspector examines the criteria and talks with involved individuals. A report and evaluation follows such visits. In the United States, the Food Safety Inspection Service is charged with ensuring that all meat and egg products are safe to consume and accurately labeled. The Meat Inspection Act of 1906 authorized the Secretary of Agriculture to order meat inspections and condemn any found unfit for human consumption. The United Nations Monitoring, Verification and Inspection Commission is a regulatory body that inspects for weapons of mass destruction. The Scottish Commission for the Regulation of Care regulates and inspects care services in Scotland. A labour inspectorate is a government body that executes checks on compliance to the labour law. It performs inspections on the workplace or building site. Road vehicles A vehicle inspection, e.g., an annual inspection, is a necessary inspection required on vehicles to conform with laws regarding safety, emissions, or both. It consists of an examination of a vehicle's components, usually done by a certified mechanic. Vehicles pass a pre-warranty inspection, if, and only if, a mechanic provide evidence for the proper working condition of the vehicle systems specified in the type of inspection. Engineering, mechanics A mechanical inspection is usually undertaken to ensure the safety or reliability of structures or machinery. In Europe bodies involved in engineering inspection may be assessed by accreditation bodies according to ISO 17020 "General criteria for the operation of various types of bodies performing inspection". This standard defines inspection as "examination of a product, process, service, or installation or their design and determination of its conformity with specific requirements or, on the basis of professional judgment, with general requirements". Non-destructive examination (NDE) or nondestructive testing (NDT) is a family of technologies used during inspection to analyze materials, components and products for either inherent defects (such as fractures or cracks), or service induced defects (damage from use). Some common methods are visual, industrial computed tomography scanning, microscopy, dye penetrant inspection, magnetic-particle inspection, X-ray or radiographic testing, ultrasonic testing, eddy-current testing, acoustic emission testing, and thermographic inspection. In addition, many non-destructive inspections can be performed by a precision scale, or when in motion, a checkweigher. Stereo microscopes are often used for examining small products like circuit boards for product defects. Pipeline inspection is a crucial process in ensuring the integrity and safety of pipelines used in various industries such as oil and gas, fertilizer, process industries, food and beverages, water distribution, and transportation. This systematic examination involves the assessment of pipeline materials, structural integrity, corrosion levels, and potential defects using advanced technologies like ultrasonic testing, magnetic flux leakage, and visual inspections. Regular inspections help identify issues early, allowing for timely maintenance and reducing the risk of leaks or catastrophic failures, thus ensuring the efficient and safe operation of these vital infrastructure components. Inspection and technical assistance during turnarounds helps to decrease costly downtime as well as ensures restart of operations quickly and safely. Medical A medical inspection is the thorough and unhurried visualization of a patient, this requires the use of the naked eye. Military An examination vessel is a craft used to inspect ships entering or leaving a port during wartime. Railroad The railroad's inspection locomotive were special types of steam locomotives designed to carry railroad officials on inspection tours of the railroad property. Real estate A property condition assessment is the examination for purposes of evaluating a commercial or business property's condition often as a part of a due diligence investigation for a company to know what it is buying. Building code officials do a building inspection to determine code compliance in new or altered buildings before issuing a certificate of occupancy. Residential inspections not for code compliance are called a home inspection. There are numerous types of more specific real estate and infrastructure inspections such as windstorm inspection, energy audit, and pipeline video inspection. Software inspection Software inspection, in software programming, refers to peer review of any work product by skilled individuals who look for bugs using a defined test protocol. See also Digital Product Passport Issue tracking systems in government Maintenance (technical) Pre-purchase inspection Review Site survey Third-party inspection company United States Postal Inspection Service Workers and Peasants Inspection References Quality
```objective-c #ifndef SINGLETONTWO_H #define SINGLETONTWO_H #include "cppmicroservices/GlobalConfig.h" #include "cppmicroservices/ServiceInterface.h" class SingletonTwo { public: static SingletonTwo& GetInstance(); int b; private: SingletonTwo(); ~SingletonTwo(); // Disable copy constructor and assignment operator. SingletonTwo(const SingletonTwo&); SingletonTwo& operator=(const SingletonTwo&); }; class SingletonTwoService { public: // Note: This is a helper method to migrate traditional singletons to // services. Do not create this method in real world applications. static std::shared_ptr<SingletonTwoService> GetInstance(); int b; SingletonTwoService(); ~SingletonTwoService(); private: // Disable copy constructor and assignment operator. SingletonTwoService(const SingletonTwoService&); SingletonTwoService& operator=(const SingletonTwoService&); }; #endif // SINGLETONTWO_H ```
Sir Francis Leicester, 3rd Baronet (1674–1742) of Tabley, Cheshire was a British landowner and politician who sat in the House of Commons from 1715 to 1727. Leicester was born on 30 July 1674, the eldest surviving son of Sir Robert Leicester, 2nd Baronet, of Tabley and his wife Meriell Watson, daughter of Francis Watson of Church Aston, near Newport, Shropshire. His father died on 7 July 1684 and he succeeded to the baronetcy. He was educated at Eton College from 1686 to 1692 and was admitted at St. John’s College, Cambridge on 6 April 1692. He was also admitted at Middle Temple on 28 November 1694. Sometime between. 1701 and 1705, he married Frances Thornhill, widow of Byrom Thornhill of Fixby, Yorkshire and daughter of Joshua Wilson of Pontefract and Colton, Yorkshire. Leicester was High Sheriff of Cheshire for the year 1705 to 1706. At the 1715 general election, he was returned as Member of Parliament for Newton by his friend, Peter Legh of Lyme, who owned the borough. He was returned again at the 1722 general election. Leicester did not stand in 1727 or after. Leicester extended Tabley Old Hall, increasing the servants' quarters, and adding another wing including a new library. Leicester died on 5 August 1742 and the baronetcy became extinct. He and his wife had one daughter Merriel, who married firstly Fleetwood Legh, with whom she had a daughter and secondly Sir John Byrne of Timogue. in 1728. Leicester left her his estate worth £10,000 per annum, but his will, required his heirs to change their name to Leicester and to maintain the hall in good order; otherwise they would forfeit the inheritance. The inheritance fell to Merriel’s eldest son by her second marriage who duly changed his name from Byrne to Leicester. As he could not demolish the old hall, he built a completely new house about 700 metres away, which is the present Tabley House and the family moved into it in 1767. References 1674 births 1742 deaths People educated at Eton College Alumni of St John's College, Cambridge British MPs 1715–1722 British MPs 1722–1727 Members of the Parliament of Great Britain for English constituencies High Sheriffs of Cheshire Baronets in the Baronetage of England
P. Thilothaman (born 2 November 1957) is an Indian politician.He served as a member of the 14th Kerala Legislative Assembly and former minister for Food and Civil Supplies Department of Kerala. He belongs to Communist Party of India and represented Cherthala constituency. He was previously elected to Kerala Legislative Assembly in 2006 and 2011. Political life He started his political career during college days. He joined Communist Party of India in 1977. He was the state vice president of All India Youth Federation. He served as the president of Cherthala South Grama Panchayat (1995–96) and as the vice president of Coir-Fed. He was the Thaluk President of Theeradesa Matsya Chumattu Thozhilali Union and Union Secretary of Cherthala Mandalam Committee. Positions held Member, C.P.I. State Council; Executive Member; C.P.I District Committee State President, Coir Workers Federation (AITUC) President, Cherthala Toddy Workers Union (A.I.T.U.C.) President, Cherthala Coir Factory Workers Union, K.L.D.C. Employees Association and Cherthala Taluk Ration Dealers Association Personal life He was born on 2 November 1957 at Cherthala. He is the son of Parameswaran and Gowry. He has a Bachelor of Arts degree. He is married to Usha V and has two children Amritha & Arjun. References External links http://civilsupplieskerala.gov.in/ http://supplycokerala.com/ Communist Party of India politicians from Kerala 1957 births Living people Kerala MLAs 2016–2021 People from Alappuzha district
Rodeo Massacre is the sixth album released by French post-rock band Ulan Bator. Track listing "Fly.Candy Dragon.Fly!" – 4:16 "God: Dog" – 5:28 "Pensees Massacre" – 3:02 "Tom Passion" – 4:12 "Torture" – 6:58 "La Femme Cannibale" – 4:14 "33" – 4:12 "Instinct" – 5:03 "Souvenir" – 5:43 2005 albums Ulan Bator (band) albums
```jsx import { h } from 'preact'; import PropTypes from 'prop-types'; import classNames from 'classnames/bind'; export const Icon = ({ src: InternalIcon, native, className, ...otherProps }) => { return ( <InternalIcon className={classNames('crayons-icon', { 'crayons-icon--default': native, [className]: className, })} {...otherProps} /> ); }; Icon.displayName = 'Icon'; Icon.propTypes = { native: PropTypes.bool, className: PropTypes.string, src: PropTypes.elementType.isRequired, }; ```
```dockerfile # build last version # docker build --force-rm=true -t compile_snowboy_python38 -f compile_snowboy_python38.dockerfile . # build specified version # docker build --force-rm=true --build-arg SNOWBOY_VERSION=1.1.1 -t compile_snowboy_python38 -f compile_snowboy_python38.dockerfile . # compile into local /tmp/snowboy # docker run -it --rm -v /tmp/snowboy:/data compile_snowboy_python38 FROM python:3.8-buster ARG SNOWBOY_VERSION="1.3.0" RUN apt-get update RUN apt-get install -y git make g++ python3-dev libatlas3-base libblas-dev \ gfortran vim wget libpcre3-dev libtool libatlas-base-dev swig RUN wget path_to_url{SNOWBOY_VERSION}.tar.gz && tar xzf v${SNOWBOY_VERSION}.tar.gz RUN cd /snowboy-${SNOWBOY_VERSION}/swig/Python3 && make RUN cd /snowboy-${SNOWBOY_VERSION}/swig/Python3 && python3 -c "import _snowboydetect; print('OK')" # compiled binary will be placed into data folder RUN mkdir /data CMD cp /snowboy-*/swig/Python3/*.so /data ```
Cyclamides are a class of oligopeptides produced by cyanobacteria algae strains such as Microcystis aeruginosa. Some of them can be toxic. Cyclamides are cyclopeptides with either six or eight amino acids, some of which are modified from the their natural proteinogenic form. They are typically characterized by thiazole and oxazole rings which are thought to be cysteine and threonine derivatives, respectively. Cyclamides are biosynthesized through ribosomic pathways. See also Cyanopeptolin Microcystin References External links Peptides Cyanotoxins
The Preaching of the Antichrist () is a fresco by the Italian Renaissance painter Luca Signorelli. It is one of the scenes of what is considered his masterpiece, the cycle of frescoes with apocalyptic themes that decorate the Chapel of San Brizio in Orvieto Cathedral (1499–1504). Michelangelo was inspired for his The Last Judgment by observing Signorelli's frescoes in Orvieto. In this scene the Antichrist is represented preaching in a way analogous to how the sermons of Christ used to be represented. But it is appreciated that it is the devil who whispers what he has to tell. Instead of rays of golden light, they are blood red in color at the point where the Archangel Michael is heading towards Earth to fight the Antichrist. In the lower left corner are two dark-clad gentlemen; the man to the left is apparently a self-portrait, while the man to the right could be Fra Angelico. References Rynck, Patrick de: Luca Signorelli, "El sermón y las obras del Anticristo", pp. 102–103 in Cómo leer la pintura, 2005, Grupo Editorial Random House Mondadori, S.L., Paintings by Luca Signorelli Renaissance paintings Paintings based on the Bible 1500s paintings Fresco paintings in Umbria
Aquametry in analytical chemistry refer to analytical processes to measure the water present in materials. The methods widely used in aquametry encompasses Karl Fischer titration, distillation, chromatography etc. Sources McGraw-Hill Dictionary of Scientific & Technical Terms (6. ed.). The McGraw-Hill Companies, Inc. 2003. (online May 6, 2011) References Analytical chemistry
Dad Wanted () is a 2020 Mexican comedy-drama film directed by Javier Colinas, written by Victor Avelar, Javier Colinas, Paulette Hernandez and Fernando Barreda Luna and starring Juan Pablo Medina, Ela Velden and Silvia Navarro. Cast Juan Pablo Medina as Alberto Díaz, a taxi driver and former actor who acts out as Blanca's dad Natalia Coronado as Blanca Díaz, a rebellious short-tempered tween girl who practises BMX biking, she often likes rubbing her success in other people's faces Ela Velden as Actriz guapa Silvia Navarro as Fernanda Joaquín Emanuel as Fabián, Blanca's school rival who also does BMX biking Luis Ernesto Franco as Santiago Sánchez Alberto Guerra as Alberto Guerra Patricia Reyes Spíndola as Directora del colegio, Blanca's school principal Rodrigo Murray as Hombre con traje Gonzalo Garcia Vivanco as Guapo Luis Arrieta as Luis Arrieta Marisol del Olmo as Mamá Laura Victoria Viera as Laura, Blanca's best friend who always has her back Roberto Quijano as Sergio Lisette Morelos as Recepcionista BMX Martha Claudia Moreno as Señora elegante Moisés Arizmendi as Moisés Arizmendi Plot Blanca is a rebellious tween girl who does BMX biking, her mother disapproves her habit and often forbids her doing it, but she still practices daily behind her mother's back. She is overjoyed when she is handed poster for a BMX racing tournament comes up and the prize is $100,000, but since she's too young, she needs a parent to sign her in, but her mom refuses. Since she does not have a dad, she decides to do a casting to find an actor she can use to play that role to motivate her and to also sign her in without her mom noticing, which is proven to be a difficult task due to her short temper and her mom being very suspicious about it, but she tries her best to overcome those challenges and forget the worrying thoughts of her mother. References 2020 films 2020 comedy-drama films Mexican comedy-drama films Spanish-language Netflix original films 2020s Spanish-language films 2020s Mexican films Films about families Spanish-language comedy-drama films
```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'; var inspectStream = require( '@stdlib/streams/node/inspect-sink' ); var randomStream = require( './../lib' ); function log( v ) { console.log( v.toString() ); } var opts = { 'objectMode': true, 'iter': 10 }; var stream = randomStream( 2.0, 5.0, 4.0, opts ); opts = { 'objectMode': true }; var iStream = inspectStream( opts, log ); stream.pipe( iStream ); ```
```c /* * MIPS Technologies, Inc., California. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the MIPS Technologies, Inc., nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * Author: Nedeljko Babic (nbabic@mips.com) * * Math operations optimized for MIPS * * 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 */ /** * @file * Reference: libavcodec/celp_math.c */ #include "config.h" #include "libavcodec/celp_math.h" #include "libavutil/mips/asmdefs.h" #if HAVE_INLINE_ASM #if !HAVE_MIPS32R6 && !HAVE_MIPS64R6 static float ff_dot_productf_mips(const float* a, const float* b, int length) { float sum; const float* a_end = a + length; __asm__ volatile ( "mtc1 $zero, %[sum] \n\t" "blez %[length], ff_dot_productf_end%= \n\t" "ff_dot_productf_madd%=: \n\t" "lwc1 $f2, 0(%[a]) \n\t" "lwc1 $f1, 0(%[b]) \n\t" PTR_ADDIU "%[a], %[a], 4 \n\t" PTR_ADDIU "%[b], %[b], 4 \n\t" "madd.s %[sum], %[sum], $f1, $f2 \n\t" "bne %[a], %[a_end], ff_dot_productf_madd%= \n\t" "ff_dot_productf_end%=: \n\t" : [sum] "=&f" (sum), [a] "+r" (a), [b] "+r" (b) : [a_end]"r"(a_end), [length] "r" (length) : "$f1", "$f2", "memory" ); return sum; } #endif /* !HAVE_MIPS32R6 && !HAVE_MIPS64R6 */ #endif /* HAVE_INLINE_ASM */ void ff_celp_math_init_mips(CELPMContext *c) { #if HAVE_INLINE_ASM #if !HAVE_MIPS32R6 && !HAVE_MIPS64R6 c->dot_productf = ff_dot_productf_mips; #endif #endif } ```
Fútbol Club Puente Tocinos is a football team based in Puente Tocinos in the autonomous community of Region of Murcia. The team played in Preferente Autonómica. Its stadium is Municipal de Torresol with a capacity of 1,000 seats. Season to season 2 season in Tercera División External links Official website Football clubs in the Region of Murcia Association football clubs established in 2007 Divisiones Regionales de Fútbol clubs 2007 establishments in Spain
Conscription was employed in Afghanistan during Taliban administration between 1996 and 2001. Ante September 11, 2001 Taliban conscription Kidnapping foreigners Prior to the collapse of their regime the Taliban made widespread use of conscription, and according to some of the Guantanamo captives, kidnapping and virtual slavery. Conscription of children According to a report from Oxford University the Taliban made widespread use of the conscription of children in 1997, 1998 and 1999. Post September 11, Pre-collapse Taliban conscription The Australian Broadcasting Corporation quoted a young Afghan, who reported: "They're rounding men up for a fight to the last man." According to the ABC report Ahmed Zia said there had been a large-scale exodus from Kabul. He claimed the Taliban were rounding up young boys for battle. He also claimed the Taliban were forcing people to give blood. The British paper The Daily Telegraph reported, on September 29, 2001, that the Taliban's supreme leader, Mullah Omar, had closed all Afghanistan's religious schools, so the students could fight beside the Taliban. The Los Angeles Times, reported, on October 13, 2001, an account of a young man who had an encounter with Taliban members pressing men into service for them: Samim, the young man who fled with his family, is an ethnic Tajik. He said he had a lucky escape Thursday night, walking home from the bazaar with his friend, Farid Alsoo. They stumbled across a Taliban patrol roughly shoving young men into a minivan. About five or 10 young men were already captive. The Taliban men seized Alsoo and pushed him into the van. They tried to get me, but I ran,' Samim said. 'They chased me for a few meters, but I got away,' he said, speaking in English. As the family breadwinner, he couldn't afford to be arrested or pressed to fight. Post-collapse Taliban conscription Accounts of the Taliban's conscription policies from Guantanamo detainees On March 3, 2006, after exhausting all it legal appeals, the US Department of Defense was forced to comply with a court order and release information about the identity of the captives held in extrajudicial detention in the Guantanamo Bay detainment camps, in Cuba. The DoD released thousands of pages of documents prepared for, or arising from, the captives' Combatant Status Review Tribunals and Administrative Review Board hearings. Those thousands of pages of documents revealed that many of the detainees described themselves as conscripts, sometimes enlisted at gunpoint, and imprisoned in their barracks under armed guards, kept on hand for the Taliban to use as "cannon fodder". "Enemy combatant" status Some skeptical commentators have discounted the accounts of Guantanamo detainees whose stories suggested they weren't hardened terrorists. However, there are captives who even the American intelligence analysts acknowledged were reluctant conscripts. Under questioning by US District Court Judge Joyce Hens Green, US Government lawyer Brian Boyle confirmed that the definition of "enemy combatant" status was so broad that even a little old lady from Switzerland, who sent money to what she thought was a legitimate charity, could be classified as an "enemy combatant" if workers for that charity clandestinely diverted some of its resources to back projects with ties to terrorism. Some of the Guantanamo detainees had their classification as "enemy combatants" confirmed because they had a business arrangement to supply al Qaeda, or the Taliban, with mundane items, like firewood; some claimed they were enlisted at gunpoint, and housed in their barracks under armed guard; some claimed they were kidnapped, and employed as kitchen helpers, or servants, as virtual slaves; and some said that they were conscripted, not for military duties, but simply to perform civilian duties the Taliban couldn't fill through normal hiring practices. References Conscription Taliban conscripts Conscript
```raw token data slot 1 ======= IPv4 adjacency information next-hop rewrite info interface Origin AS Peer AS Neighbor -------------- --------------- ------------- ---------- --------- -------------- 172.17.1.2 001c.b0c9.6b80 Ethernet1/1 100.120.0.2 00de.fb5a.2c47 Ethernet1/2 100.64.1.6 00a3.8eb7.6f29 Ethernet1/4 100.100.59.10 286f.7feb.1947 Ethernet1/7 100.111.0.2 00de.fb5a.2c46 Ethernet1/11 100.100.59.2 286f.7feb.1940 Ethernet1/14 100.89.1.6 b4de.3141.af12 Ethernet1/15 100.99.1.2 84b2.61d4.357f Ethernet1/22 100.99.1.10 2cab.eb4f.2f46 Ethernet1/23 100.100.59.14 00d7.8f7f.edcb Ethernet2/7 100.100.59.6 00d7.8f7f.edc4 Ethernet2/14 100.89.1.2 b4de.3141.af10 Ethernet2/15 100.126.255.2 00a3.d186.4141 Ethernet2/16 100.99.1.6 84b2.61d4.357f Ethernet2/22 100.99.1.14 2cab.eb4f.2f48 Ethernet2/23 100.127.253.1 00de.fb5a.2c45 Ethernet2/24 slot 2 ======= IPv4 adjacency information next-hop rewrite info interface Origin AS Peer AS Neighbor -------------- --------------- ------------- ---------- --------- -------------- 172.17.1.2 001c.b0c9.6b80 Ethernet1/1 100.120.0.2 00de.fb5a.2c47 Ethernet1/2 100.64.1.6 00a3.8eb7.6f29 Ethernet1/4 100.100.59.10 286f.7feb.1947 Ethernet1/7 100.111.0.2 00de.fb5a.2c46 Ethernet1/11 100.100.59.2 286f.7feb.1940 Ethernet1/14 100.89.1.6 b4de.3141.af12 Ethernet1/15 100.99.1.2 84b2.61d4.357f Ethernet1/22 100.99.1.10 2cab.eb4f.2f46 Ethernet1/23 100.100.59.14 00d7.8f7f.edcb Ethernet2/7 100.100.59.6 00d7.8f7f.edc4 Ethernet2/14 100.89.1.2 b4de.3141.af10 Ethernet2/15 100.126.255.2 00a3.d186.4141 Ethernet2/16 100.99.1.6 84b2.61d4.357f Ethernet2/22 100.99.1.14 2cab.eb4f.2f48 Ethernet2/23 100.127.253.1 00de.fb5a.2c45 Ethernet2/24 slot 5 ======= slot 6 ======= ```
Mozhga (; , Možga) is a town in the Udmurt Republic, Russia, located at the confluence of the Syuga and Syugailka Rivers, southwest of Izhevsk, the capital of the republic. Population: History It was founded in 1835 as a settlement around Syuginsky glass works. The works was built by the merchant Fyodor Chernov from Yelabuga and became known for the production of technical glass, jugs, and animal figurines. In 1916, Syuginskaya railway station was built near the factory settlement. After the October Revolution of 1917, it was renamed Sovetsky (), and later Krasny (). It was granted town status and given its present name in 1926. Administrative and municipal status Within the framework of administrative divisions, Mozhga serves as the administrative center of Mozhginsky District, even though it is not a part of it. As an administrative division, it is incorporated separately as the town of republic significance of Mozhga—an administrative unit with the status equal to that of the districts. As a municipal division, the town of republic significance of Mozhga is incorporated as Mozhga Urban Okrug. Climate Mozhga is within temperate continental climate, characterized by large annual range of temperatures; with hot summers and cold winters. Significant changes in temperature are normally observed during the day. Economy Mozhga is an important industrial center of southwestern Udmurtia. Demographics The ethnic makeup of the town is: Russians: 56.5% Udmurts: 25.8% Tatars: 15.6% References Notes Sources External links Official website of Mozhga Unofficial website of Mozhga Cities and towns in Udmurtia Populated places established in 1835
```yaml version: '2.3' networks: default: driver: bridge enable_ipv6: true ipam: config: - subnet: 10.5.0.0/12 gateway: 10.5.1.1 - subnet: 2001:3984:3989::/64 gateway: 2001:3984:3989::1 ```
```html <html lang="en"> <head> <title>setvbuf - Untitled</title> <meta http-equiv="Content-Type" content="text/html"> <meta name="description" content="Untitled"> <meta name="generator" content="makeinfo 4.8"> <link title="Top" rel="start" href="index.html#Top"> <link rel="up" href="Stdio.html#Stdio" title="Stdio"> <link rel="prev" href="setlinebuf.html#setlinebuf" title="setlinebuf"> <link rel="next" href="siprintf.html#siprintf" title="siprintf"> <link href="path_to_url" rel="generator-home" title="Texinfo Homepage"> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } --></style> </head> <body> <div class="node"> <p> <a name="setvbuf"></a> Next:&nbsp;<a rel="next" accesskey="n" href="siprintf.html#siprintf">siprintf</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="setlinebuf.html#setlinebuf">setlinebuf</a>, Up:&nbsp;<a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a> <hr> </div> <h3 class="section">4.58 <code>setvbuf</code>&mdash;specify file or stream buffering</h3> <p><a name="index-setvbuf-307"></a><strong>Synopsis</strong> <pre class="example"> #include &lt;stdio.h&gt; int setvbuf(FILE *<var>fp</var>, char *<var>buf</var>, int <var>mode</var>, size_t <var>size</var>); </pre> <p><strong>Description</strong><br> Use <code>setvbuf</code> to specify what kind of buffering you want for the file or stream identified by <var>fp</var>, by using one of the following values (from <code>stdio.h</code>) as the <var>mode</var> argument: <dl> <dt><code>_IONBF</code><dd>Do not use a buffer: send output directly to the host system for the file or stream identified by <var>fp</var>. <br><dt><code>_IOFBF</code><dd>Use full output buffering: output will be passed on to the host system only when the buffer is full, or when an input operation intervenes. <br><dt><code>_IOLBF</code><dd>Use line buffering: pass on output to the host system at every newline, as well as when the buffer is full, or when an input operation intervenes. </dl> <p>Use the <var>size</var> argument to specify how large a buffer you wish. You can supply the buffer itself, if you wish, by passing a pointer to a suitable area of memory as <var>buf</var>. Otherwise, you may pass <code>NULL</code> as the <var>buf</var> argument, and <code>setvbuf</code> will allocate the buffer. <pre class="sp"> </pre> <strong>Warnings</strong><br> You may only use <code>setvbuf</code> before performing any file operation other than opening the file. <p>If you supply a non-null <var>buf</var>, you must ensure that the associated storage continues to be available until you close the stream identified by <var>fp</var>. <pre class="sp"> </pre> <strong>Returns</strong><br> A <code>0</code> result indicates success, <code>EOF</code> failure (invalid <var>mode</var> or <var>size</var> can cause failure). <pre class="sp"> </pre> <strong>Portability</strong><br> Both ANSI C and the System V Interface Definition (Issue 2) require <code>setvbuf</code>. However, they differ on the meaning of a <code>NULL</code> buffer pointer: the SVID issue 2 specification says that a <code>NULL</code> buffer pointer requests unbuffered output. For maximum portability, avoid <code>NULL</code> buffer pointers. <p>Both specifications describe the result on failure only as a nonzero value. <p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>, <code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>. <pre class="sp"> </pre> </body></html> ```
TidalCycles (also known as "Tidal") is a live coding environment which is designed for musical improvisation and composition. In particular, it is a domain-specific language embedded in Haskell, and is focused on the generation and manipulation of audiovisual patterns. It was originally designed for heavily percussive and polyrhythmic grid-based music, but it now uses a flexible and functional reactive representation for patterns, by using rational time. Therefore, Tidal may be applied to a wide range of musical styles, although its cyclic approach to time means that it affords use in repetitive styles such as Algorave. Background TidalCycles was created by Alex McLean who also coined the term Algorave, and is a domain-specific language embedded in Haskell, which focuses on the generation and manipulation of audiovisual patterns. Tidal's representation of rhythm is based on metrical cycles, which is inspired by Indian classical music, supporting polyrhythmic and polymetric structures using a flexible, functional reactive representation for patterns, and rational time. This programme doesn't produce sound itself, but via the SuperCollider sound environment through the SuperDirt framework, via MIDI, or Open Sound Control. Tidal is also used widely in academic research, including representation in music AI, as a language in network music, and in electronic literature. Tidal is widely used at Algorave algorithmic dance music events, as well as being used on high profile music releases. It has been featured on BBC Radio 3's New Music Show. Artists using TidalCycles Richard Devine Beatrice Dillon Lil Data digital selves MIRI KAT Daniel M Karlsson 65daysofstatic Benjamin Wynn Hsien-Yu Cheng References External links Digital art Computer programming Live coding Algorave Functional programming Music technology 2009 establishments
```sqlpl -- Tags: shard, no-fasttest SET max_rows_to_group_by = 100000; SET max_block_size = 100001; SET group_by_overflow_mode = 'any'; -- Settings 'max_rows_to_group_by' and 'max_bytes_before_external_group_by' are mutually exclusive. SET max_bytes_before_external_group_by = 0; DROP TABLE IF EXISTS numbers500k; CREATE TABLE numbers500k (number UInt32) ENGINE = TinyLog; INSERT INTO numbers500k SELECT number FROM system.numbers LIMIT 500000; SET totals_mode = 'after_having_auto'; SELECT intDiv(number, 2) AS k, count(), argMax(toString(number), number) FROM (SELECT * FROM remote('127.0.0.{2,3}', currentDatabase(), numbers500k) ORDER BY number) GROUP BY k WITH TOTALS ORDER BY k LIMIT 10; SET totals_mode = 'after_having_inclusive'; SELECT intDiv(number, 2) AS k, count(), argMax(toString(number), number) FROM (SELECT * FROM remote('127.0.0.{2,3}', currentDatabase(), numbers500k) ORDER BY number) GROUP BY k WITH TOTALS ORDER BY k LIMIT 10; SET totals_mode = 'after_having_exclusive'; SELECT intDiv(number, 2) AS k, count(), argMax(toString(number), number) FROM (SELECT * FROM remote('127.0.0.{2,3}', currentDatabase(), numbers500k) ORDER BY number) GROUP BY k WITH TOTALS ORDER BY k LIMIT 10; SET totals_mode = 'before_having'; SELECT intDiv(number, 2) AS k, count(), argMax(toString(number), number) FROM (SELECT * FROM remote('127.0.0.{2,3}', currentDatabase(), numbers500k) ORDER BY number) GROUP BY k WITH TOTALS ORDER BY k LIMIT 10; DROP TABLE numbers500k; ```
Garden of Fools is a 2012 book by Robert Hutchison published by Palimpsest Publishing House in New Delhi. The book is a fictional account of the construction of the sacred Ganga Canal under the guidance of an engineer of the East India Company, Proby Caudey. It throws light on the social and administrative structure in India during the Raj. The author has described his book as "essentially a work of historical fiction based upon fact." References 2012 Indian novels Novels set in India Ganges
```c++ /*! @file Defines the @ref group-functional module. @copyright Louis Dionne 2013-2017 (See accompanying file LICENSE.md or copy at path_to_url */ #ifndef BOOST_HANA_FUNCTIONAL_HPP #define BOOST_HANA_FUNCTIONAL_HPP #include <boost/hana/functional/always.hpp> #include <boost/hana/functional/apply.hpp> #include <boost/hana/functional/arg.hpp> #include <boost/hana/functional/capture.hpp> #include <boost/hana/functional/compose.hpp> #include <boost/hana/functional/curry.hpp> #include <boost/hana/functional/demux.hpp> #include <boost/hana/functional/fix.hpp> #include <boost/hana/functional/flip.hpp> #include <boost/hana/functional/id.hpp> #include <boost/hana/functional/infix.hpp> #include <boost/hana/functional/iterate.hpp> #include <boost/hana/functional/lockstep.hpp> #include <boost/hana/functional/on.hpp> #include <boost/hana/functional/overload.hpp> #include <boost/hana/functional/overload_linearly.hpp> #include <boost/hana/functional/partial.hpp> #include <boost/hana/functional/placeholder.hpp> #include <boost/hana/functional/reverse_partial.hpp> #endif // !BOOST_HANA_FUNCTIONAL_HPP ```
```smalltalk // This file is part of Core WF which is licensed under the MIT license. // See LICENSE file in the project root for full license information. using System; using System.Activities; using System.Activities.Expressions; using System.Collections.Generic; using Test.Common.TestObjects.Activities; using Test.Common.TestObjects.Activities.Expressions; using Test.Common.TestObjects.Runtime; using Test.Common.TestObjects.Runtime.ConstraintValidation; using Test.Common.TestObjects.Utilities; using TestCases.Activities.Common.Expressions; using Xunit; namespace Test.TestCases.Activities.Expressions { public class FieldReference : IDisposable { /// <summary> /// Set a public property on an object. /// </summary> [Fact] public void SetPublicFieldOnAnObject() { Variable<PublicType> customType = new Variable<PublicType>("Custom", context => new PublicType() { publicField = "public" }); TestFieldReference<PublicType, string> fieldReference = new TestFieldReference<PublicType, string> { OperandVariable = customType, FieldName = "publicField" }; TestSequence seq = new TestSequence { Variables = { customType }, Activities = { new TestAssign<string> { ToLocation = fieldReference, Value = "private" }, new TestWriteLine { MessageExpression = e => customType.Get(e).publicField, HintMessage = "private" } } }; TestRuntime.RunAndValidateWorkflow(seq); } /// <summary> /// Set a public static field on an object. /// </summary> [Fact] public void SetStaticFieldOnAnObject() { TestFieldReference<PublicType, int> fieldReference = new TestFieldReference<PublicType, int> { FieldName = "staticField" }; TestSequence seq = new TestSequence { Activities = { new TestAssign<int> { ToLocation = fieldReference, Value = 22 }, new TestWriteLine { MessageExpression = e => PublicType.staticField.ToString(), HintMessage = "22" } } }; TestRuntime.RunAndValidateWorkflow(seq); } /// <summary> /// Set a public field on a struct object. /// </summary> [Fact] public void SetPublicFieldOnAStruct() { //TheStruct.publicField wont be serialized so round tripping loses the value. Variable<TheStruct> customType = new Variable<TheStruct>("CustomType", context => new TheStruct { publicField = 1 }); TestFieldReference<TheStruct, int> fieldReference = new TestFieldReference<TheStruct, int> { OperandVariable = customType, FieldName = "publicField" }; TestSequence seq = new TestSequence { Variables = { customType }, Activities = { new TestAssign<int> { ToLocation = fieldReference, Value = 1793 }, new TestWriteLine { MessageExpression = e => customType.Get(e).publicField.ToString(), HintMessage = "0" } } }; string error = string.Format(ErrorStrings.TargetTypeIsValueType, typeof(FieldReference<TheStruct, int>).Name, fieldReference.DisplayName); List<TestConstraintViolation> constraints = new List<TestConstraintViolation>(); constraints.Add(new TestConstraintViolation( error, fieldReference.ProductActivity)); TestRuntime.ValidateWorkflowErrors(seq, constraints, error); } [Fact] public void PassEnumTypeAsOperand() { Variable<WeekDay> weekDayVariable = new Variable<WeekDay>("weekDayVariable"); TestFieldReference<WeekDay, int> fieldRef = new TestFieldReference<WeekDay, int> { OperandVariable = weekDayVariable, FieldName = "Monday" }; TestSequence testSequence = new TestSequence { Variables = { weekDayVariable, }, Activities = { new TestAssign<WeekDay> { ToVariable = weekDayVariable, ValueExpression = (context => WeekDay.Monday) }, fieldRef, } }; List<TestConstraintViolation> constraints = new List<TestConstraintViolation>(); constraints.Add(new TestConstraintViolation( string.Format(ErrorStrings.TargetTypeCannotBeEnum, typeof(FieldReference<WeekDay, int>).Name, fieldRef.DisplayName), fieldRef.ProductActivity)); TestRuntime.ValidateWorkflowErrors(testSequence, constraints, string.Format(ErrorStrings.TargetTypeCannotBeEnum, typeof(FieldReference<WeekDay, int>).Name, fieldRef.DisplayName)); } [Fact] public void InvokeWithWorkflowInvoker() { Dictionary<string, object> results = WorkflowInvoker.Invoke((Activity)new FieldReference<PublicType, int>() { FieldName = "publicField" }, new Dictionary<string, object> { { "Operand", new PublicType() } }) as Dictionary<string, object>; if (results["Result"] == null) { throw new Exception("Result was expected to be in output"); } } /// <summary> /// Set a public static field on a struct. /// </summary> [Fact] public void SetStaticFieldOnAStruct() { TestFieldReference<TheStruct, int> fieldReference = new TestFieldReference<TheStruct, int> { FieldName = "staticField" }; TestSequence seq = new TestSequence { Activities = { new TestAssign<int> { ToLocation = fieldReference, Value = 22 }, new TestWriteLine { MessageExpression = e => TheStruct.staticField.ToString(), HintMessage = "22" } } }; string error = string.Format(ErrorStrings.TargetTypeIsValueType, typeof(FieldReference<TheStruct, int>).Name, fieldReference.DisplayName); List<TestConstraintViolation> constraints = new List<TestConstraintViolation>(); constraints.Add(new TestConstraintViolation( error, fieldReference.ProductActivity)); TestRuntime.ValidateWorkflowErrors(seq, constraints, error); } /// <summary> /// Try setting a private field on an object. Validation exception expected. /// </summary> [Fact] public void TrySettingPrivateFieldOnAnObject() { TestFieldReference<PublicType, int> fieldReference = new TestFieldReference<PublicType, int> { OperandExpression = context => new PublicType(), FieldName = "privateField" }; string error = string.Format(ErrorStrings.MemberNotFound, "privateField", typeof(PublicType).Name); List<TestConstraintViolation> constraints = new List<TestConstraintViolation> { new TestConstraintViolation( error, fieldReference.ProductActivity) }; TestRuntime.ValidateWorkflowErrors(fieldReference, constraints, error); } [Fact] public void ConstraintErrorForInvalidField() { TestFieldReference<PublicType, int> fieldRef = new TestFieldReference<PublicType, int> { OperandExpression = context => new PublicType(), FieldName = "!@$!@#%><?<?<*&^(*&^(" }; string error = string.Format(ErrorStrings.MemberNotFound, "!@$!@#%><?<?<*&^(*&^(", typeof(PublicType).Name); TestExpressionTracer.Validate(fieldRef, new List<string> { error }); } [Fact] public void ConstraintErrorForFieldNameNull() { TestFieldReference<PublicType, int> fieldRef = new TestFieldReference<PublicType, int> { OperandExpression = context => new PublicType() }; string error = string.Format(ErrorStrings.ActivityPropertyMustBeSet, "FieldName", fieldRef.DisplayName); TestExpressionTracer.Validate(fieldRef, new List<string> { error }); } [Fact] public void ConstraintErrorForEnumOperand() { TestFieldReference<WeekDay, int> fieldRef = new TestFieldReference<WeekDay, int> { Operand = WeekDay.Monday, FieldName = "Monday" }; List<string> errors = new List<string> { string.Format(ErrorStrings.TargetTypeCannotBeEnum, typeof(FieldReference<WeekDay, int>).Name, fieldRef.DisplayName) }; TestExpressionTracer.Validate(fieldRef, errors); } [Fact] public void ConstraintErrorForValueTypeOperand() { TestFieldReference<TheStruct, int> fieldRef = new TestFieldReference<TheStruct, int> { Operand = new TheStruct(), FieldName = "publicField" }; string error = string.Format(ErrorStrings.TargetTypeIsValueType, typeof(FieldReference<TheStruct, int>).Name, fieldRef.DisplayName); TestExpressionTracer.Validate(fieldRef, new List<string> { error }); } /// <summary> /// Try executing FieldReference activity by setting FieldName to null. Validation exception expected. /// </summary> [Fact] public void TrySettingValueOfFieldNameNull() { Variable<PublicType> publicTypeVariable = new Variable<PublicType>("publicTypeVariable"); TestFieldReference<PublicType, int> fieldRef = new TestFieldReference<PublicType, int> { OperandVariable = publicTypeVariable }; TestSequence testSequence = new TestSequence { Variables = { publicTypeVariable, }, Activities = { new TestAssign<PublicType> { ToVariable = publicTypeVariable, ValueExpression = (context => new PublicType()) }, fieldRef } }; string exceptionString = string.Format(ErrorStrings.ActivityPropertyMustBeSet, "FieldName", fieldRef.DisplayName); List<TestConstraintViolation> constraints = new List<TestConstraintViolation> { new TestConstraintViolation( exceptionString, fieldRef.ProductActivity) }; TestRuntime.ValidateWorkflowErrors(testSequence, constraints, exceptionString); } public void Dispose() { } } } ```
Scale is a studio album by British electronic musician Herbert. It was released via Studio !K7 on 29 May 2006. Scale peaked at number 24 on the UK Independent Albums Chart and number 20 on the Billboard Top Dance/Electronic Albums chart. Production According to the liner notes, 635 objects were used to create the album. These include traditional instruments, such as violins and guitars, as well as other objects, such as breakfast cereal, gas pumps and coffins. Critical reception At Metacritic, which assigns a weighted average score out of 100 to reviews from mainstream critics, Scale received an average score of 81% based on 20 reviews, indicating "universal acclaim". Pitchfork placed Scale at number 35 on the "Top 50 Albums of 2006" list. "Something Isn't Right" was ranked at number 17 on Pitchforks "Top 100 Tracks of 2006" list. Track listing 2013 Special Edition extras: Charts References External links 2006 albums Matthew Herbert albums Studio !K7 albums
"The War Prayer" is the seventh episode of the first season of the science fiction television series, Babylon 5. It first aired on 9 March 1994. Plot A string of attacks on aliens has occurred on Babylon 5, the latest being the stabbing and branding of Minbari poet, Shaal Mayan. Commander Sinclair is pressured by Minbari ambassador Delenn to find the culprit, and he orders Security Chief Garibaldi to investigate in depth. Narn ambassador G'kar, however, insists more action must be done, and beings to rally the other aliens aboard, creating a tense situation. Meanwhile, Centauri ambassador Londo Mollari must deal with his aide Vir Cotto's cousin Kiron and his girlfriend Aria, who have fled the Centauri homeworld as they have been arranged to be wed into different families. Mollari asserts that it is Centauri morals for assigned marriages, love having no place in their society. That evening, Kiron and Aria are attacked in a similar manner to the previous attack, leaving Kiron in a coma. Elsewhere, Ivanova discovers that her former associate from the academy, Malcolm Biggs, has arrived on the station. While he remains secretive as to his business reasons for being there, Malcolm does express interest in rekindling his relationship with Ivanova. Aria stays by Kiron's side, but Mollari suggests that there is no point in Aria waiting around should Kiron die. After Aria leaves, Shaal talks to Mollari about love, and that that from her writings, she found that the measure of a value of a person is how much capacity they have to love and love others. Vir finds Mollari later: Mollari tells Vir a tale from his father who had complained that his shoes were too tight, but it did not matter as he had forgotten how to dance; Mollari now feels the same way. When Kiron wakes, Mollari gladly tells him and Aria that he has arranged for the two to return to Centauri Prime and stay with his cousin, a powerful figure in the government, to be schooled in Centauri customs in such that when they are old enough, they will be able to choose who they can marry. This solution pleases both them and Vir. Ivanova brings Malcolm to a reception where Sinclair purposely speaks out against the alien presence. Malcolm later invites Sinclair and Ivanova to a meeting, there introducing them to his agents that have been behind the attacks. Malcolm explains their intent to assassinate the four key ambassadors on Babylon 5 in an attempt to force the alien ambassadors off Earth. Sinclair and Ivanova turn on Malcolm and his men, as security officers arrive to arrest them. As they are taken off the station, Ivanova expresses her resentment to Malcolm for the direction he has taken. Production Cast The Home Guard leader Malcolm Biggs was played by Australian-American actor Tristan Rogers, best known for playing Robert Scorpio in General Hospital. Earlier, he played roles in a number of prominent Australian serials such as Number 96, Bellbird. and The Box. In 2019 he won a Daytime Emmy Award for his role as Doc in the series Studio City. Minbari poet Shaal Mayan was played by Nancy Lee Grahn, who also appears in General Hospital, playing Alexis Davis, winning a Daytime Emmy Award in 2012. Grahn also starred as Julia Wainwright Capwell on Santa Barbara, winning an Emmy Award in 1989. Vir's cousin Kiron Maray was played by Canadian actor Rodney Eastman, best known for playing Joey Crusel in the A Nightmare on Elm Street film series. He is also a musician with the Los Angeles band King Straggler with fellow actors John Hawkes and Brentley Gore. Kiron's girlfriend Aria Tensus was played by actress, mathematician and mathematics educator Danica McKellar. McKellar played Winnie Cooper in The Wonder Years, and Elsie Snuffin in The West Wing. In 1997 she co-authored an academic paper on the statistical analysis of magnetic properties of materials, and has authored several mathematics books for children and secondary school students, some being New York Times bestsellers. American actor Michael Paul Chan played Roberts, the man picked by as a suspect in the attack on Shaal Mayan. Chan is known for playing the role of Lieutenant Michael Tao in The Closer and Major Crimes. He also played roles in The Goonies, Batman Forever, Batman & Robin and Falling Down. Music, sound and visual effects The Babylon 5 makeup department involved in this episode – consisting of Everett Burrell, Greg Funk, Mary Kay Morse, Ron Pipes and John Vulich – won the 1994 Emmy Award for Outstanding Individual Achievement in Makeup for a Series for episode 5 of the season, "The Parliament of Dreams" The design for the Vorlon ambassador, Kosh was created by Steve Burg for the pilot episode. Due to Kosh's encounter suit costume being too large for the set doors, the character was never shown entering or leaving through a door. For its visual effects scenes, Babylon 5 pioneered the use of computer-generated imagery (CGI) scenes – instead of using more expensive physical models – in a television series.<ref name="Britt">{{cite web |url=https://www.syfy.com/syfywire/5-things-babylon-5-did-that-changed-science-fiction-forever |title=5 Things that Babylon 5 did that changed science fiction forever. |last=Britt |first=Ryan |date=11 July 2019 |website=www.syfy.com |publisher=SYFY Media LLC. |access-date= |url-status=dead |archive-url=https://web.archive.org/web/20211009164702/https://www.syfy.com/syfywire/5-things-babylon-5-did-that-changed-science-fiction-forever |archive-date= 2021-10-09 |quote=And though this may seem shocking now, in the early and mid-'90s, CGI was not the default for sci-fi special effects. Most big sci-fi shows and movies (like Star Trek) all still used physical models, which are notoriously more expensive. But all of Babylon 5'''s spaceships and space stations were made in a computer.}}</ref> This also enabled motion effects which are difficult to create using models, such as the rotation of fighter craft along multiple axes, or the rotation and banking of a virtual camera. The visual effects were created by Foundation Imaging using 24 Commodore Amiga 2000 computers with Lightwave 3D software and Video Toaster cards, 16 of which were dedicated to rending each individual frame of CGI, with each frame taking on average 45 minutes to render. In-house resource management software managed the workload of the Amiga computers to ensure that no machine was left idle during the image rendering process. Music for the title sequence and the episode was provided by the series' composer, Christopher Franke. Franke developed themes for each of the main characters, the station, for space in general, and for the alien races, endeavoring to carry a sense of the character of each race. The voice effects for the Vorlon ambassador Kosh, were also designed by Franke, with the character voiced by Ardwight Chamberlain. Writing According to showrunner J. Michael Straczynski, the title refers to a short prose writing of the same title – written to highlight the humanity of participants of both sides in war – by Mark Twain, which, according to Straczynski, "should be read by ." Regarding Mark Twain, Straczynski wrote, "He's always been a seminal influence on my work. I have pretty much everything he's ever written, absent the five volume set of his journals that's only available to libraries. 'The Man Who Corrupted Hadleyburg' is still one of my favorite pieces, as is 'The War Prayer,' leading to its nod in B5." As Babylon 5 was conceived with an overall five-year story arc, the episode was written as both an individual story and with another level, where the hints of the larger story arc were given. The series' creator, J. Michael Straczynski indicates that the episodes can be watched for the individual stories, the character stories, or the story arc. The episode was written by D.C. Fontana who has written episodes for many television series, including a large number of episodes for various Star Trek series. Fontana was a writer for the Star Trek: The Next Generation pilot episode, "Encounter at Farpoint." She also wrote two other Babylon 5 scripts, "Legacies" and "A Distant Star". Fontana wrote the episode, based on a premise by Straczynski the series creator. Only the pilot was available for research purposes, so she spent some time speaking with Straczynski to get a feel for the series. Reviews Rowan Kaiser, writing in The A.V. Club, notes that the episode develops the idea that human culture in the year 2258 isn't entirely pleasant. Kaiser writes, "This isn't a necessary revelation after 'Infection' and 'Mind War', but it's not meant to be a revelation—it's a premise." Kaiser also identifies the theme of regret appearing throughout the episode. He writes, "Ivanova has regrets, though she claims not to, about leaving Malcolm eight years prior. Delenn has a conversation with her friend, where she's asked 'Do you regret the choices that you've made?' 'Sometimes,' responds Delenn, but she makes it clear that those don't define her. Londo, on the other hand, lets his regrets define him. 'My shoes are too tight. But it does not matter, for I have forgotten how to dance,' he tells Vir, as a metaphor for him forgetting himself in favor of tradition, of propriety, and of power." Elias Rosner, writing in the Multiversity Comics website, also singles out this scene, with Londo discussing with Vir about what it means to be trapped in his own ways, to have forgotten what it is to be young. Rosner observes, "It's a profound scene that's the right balance of clarity and mystique. Londo's words carry all the weight in the world and in that moment, we understand where he is and what he is thinking. [...] It's a fantastic bit of dialogue that is revealing in all the right ways."<ref name="Rosner">{{cite web |url=http://www.multiversitycomics.com/tv/babylon-5-war-prayer/|title='Five Thoughts on Babylon 5's "The War Prayer."' |last=Rosner |first=Elias |date=4 July 2018 |website=Multiversity Comics |publisher=Matthew Meylikhov |access-date= }}</ref> References External linksThe War Prayer'' text of 1905 piece by Mark Twain Babylon 5 episodes 1994 American television episodes
```xml import dedent from 'dedent-js'; import { FormatFn } from '../../src/sqlFormatter.js'; export default function supportsTabWidth(format: FormatFn) { it('indents with 2 spaces by default', () => { const result = format('SELECT count(*),Column1 FROM Table1;'); expect(result).toBe(dedent` SELECT count(*), Column1 FROM Table1; `); }); it('supports indenting with 4 spaces', () => { const result = format('SELECT count(*),Column1 FROM Table1;', { tabWidth: 4, }); expect(result).toBe(dedent` SELECT count(*), Column1 FROM Table1; `); }); } ```
Lies for the Liars is the third studio album by American rock band the Used. It was released on May 22, 2007, and was certified gold by the RIAA on February 28, 2019. Background On September 12, 2006, it was announced that drummer Branden Steineckert left the band. However, a day later, Steineckert explained that he was in fact kicked out of the band: "Quinn, Bert and Jeph have agreed that they no longer want to play music with me." In addition, they added that recording was nearly done. However, two months later the band was still working on the album. In total, the band recorded 19 songs, from about 40 that were written in preparation for the album. Dean Butterworth of Good Charlotte recorded the drums for the album. Release On January 17, 2007, Dan Whitesides, formerly of New Transit Direction, was announced as Steineckert's replacement. From mid February to early April 2007, the band co-headlined the 2007 edition of the Taste of Chaos tour. On February 24, Lies for the Liars was announced for release in May. "The Bird and the Worm" was made available for streaming on March 19 through AOL Music, and released to radio on April 3. In April, the band performed in the UK as part of the Give it a Name festival. A music video for "The Bird and the Worm" was released on April 26. A behind-the-scenes video of the music video was released on May 11. Lies for the Liars was made available for streaming on May 18 through their Myspace account, and released four days later through Reprise. The special edition version includes a bonus DVD, slightly different artwork, special casing, and a 24-page booklet packed with vibrant images of the band and Chadam. The special casing is fashioned to look like a book, with the pages within holding several photographs of the band and different fictional characters as well as the lyrics. The DVD has a 20-minute feature on the making of the album. The group were initially planned to appear on the Warped Tour from late June to early July. However, shortly prior to the beginning of the tour, it was announced that McCracken would be having vocal surgery, which forced the band to abandon the tour. A music video was released for "Pretty Handsome Awkward" on July 23, 2007. The song was released to US alternative radio on August 21 and released to UK radio on September 3. From mid August to early October, the band went a tour of the US with the Bled, Army of Me and the Josephine Collective, which included an appearance at the X96 Big Ass Show radio festival. In between this, the group performed on the main stage at Reading and Leeds Festivals in the UK. Following the tour, the group went visited Australia and New Zealand on the Taste of Chaos Down Under tour. Further tours of Japan and Europe were undertaken in November. A demo version of "Smother Me" was posted on the group's Myspace on November 29, 2007. A few outtakes from the recording sessions, namely "Dark Days", "Slit Your Own Throat", "Devil Beside You", "My Pesticide", "Sun Comes Up", "Sick Hearts" and "Tunnel", were released on the Shallow Believer EP in February 2008. Reception The album peaked at number 5 on the Billboard 200. It charted at number 39 in the UK and became the group's fastest-selling album in that country. Track listing Additional track information The Used recorded 19 songs during the Lies for the Liars recording session. The 8 b-sides from the session are titled "Dark Days", "Devil Beside You", "Silt Your Own Throat", "My Pesticide", "Sun Comes Up", "Sick Hearts", "Pain" and "Tunnel". The b-sides were released as bonus tracks from select retailers and later appeared on Shallow Believer. "Tunnel" is the only track that is different between the early bonus track release and Shallow Believer release a year later. A hidden track was also included titled "Queso" which is a 29-second song that is about a quesadilla. Though it was first released on the Used's MySpace in late 2006, most fans talked about it on message boards and thought of it as a joke, it was not expected to actually be on the album. A demo version of "Smother Me" was also posted on the band's MySpace page. Personnel The Used Bert McCracken – vocals, piano Jeph Howard – bass, backing vocals Quinn Allman – guitars, backing vocals Dan Whitesides – drums, backing vocals Performers John Feldmann – vocals, gang vocals Dean Butterworth-drums Arin Older – additional vocals on "The Bird and the Worm", gang vocals Ashley Grobmeyer – screams on "Wake the Dead" Quinn Allman – gang vocals Bert McCracken – gang vocals Jeph Howard – gang vocals Matt Appleton – gang vocals Joe Manganiello – gang vocals Danny Feinberg – gang vocals Dan Whitesides – gang vocals Monique Powell – vocals on "Smother Me" and "Wake the Dead" Julian Feldmann – additional vocals on "Find a Way" Design Alex Pardee – creative direction, design, photography, creation of "Chadam" and other characters MONSTER EFFECTS – creature effects, masks, props, building of Chadam. Musicians Matt Appleton – horns, keys, organ, cadence on "Find a Way" Dean Butterworth – drums, percussion John Feldmann – additional percussion, keys, cadence on "Find a Way", string arrangement on "The Bird and the Worm", "Earthquake" and "Smother Me" Suzie Katayama – string contractor Technical and production John Feldmann – producer, programming Chris Lord-Alge – mixing Matt Appleton – engineering Jon – drum tech Allan Hessler – tech Todd Parker – tech Joe Gastwirt – mastering Managerial Craig Aaronson – A&R Tim Carhart – A&R coordinator Technical and production – DVD CW Mihlberger – director, editor, filming Adam Peterson – director, editor, animation sequence, filming Chris Trovero – director, editor Jeph Howard – animation sequence Quinn Allman – animation sequence, filming David May – DVD producer Raena Winscott – DVD producer Tony Friedman – DVD post audio Sean Donnelly – DVD menus Jim Atkins – DVD authoring Sean Cowling – DVD coordination Charts Certifications Release history Standard edition Special edition References External links Lies for the Liars at YouTube (streamed copy where licensed) 2007 albums Reprise Records albums The Used albums Albums produced by John Feldmann
```javascript import styled from 'styled-components' const WithAttrs = styled.div.attrs({ some: 'value' })`` const WithAttrsWrapped = styled(Inner).attrs({ some: 'value' })`` ```
The St. Thomas More Church is part of a Roman Catholic church complex located on East 89th Street, off Madison Avenue on the Upper East Side in Manhattan, New York City. The parish is under the authority of the Archdiocese of New York. Attached to the complex is the church (1870), a single-cell chapel (1879), a rectory (1880), and a parish house (1893). The church was built for the Protestant Episcopal Church as the Chapel of the Beloved Disciple in the Gothic Revival architectural style. Under various names, the church building has been used by three Christian denominations, including Episcopalians, Dutch Reformed, and Catholics. It is the second-oldest church on the Upper East Side. History and design The church was built from sandstone from Nova Scotia in 1870 to a design by the architectural firm of Hubert & Pirsson. Architectural historian and New York Times journalist Christopher Gray wrote that "The Gothic-style building has the air of a picturesque English country church, with a plot of green in front and a square tower rising in front of the sanctuary. According to Andrew S. Dolkart, an architectural historian specializing in church design, the building is closely modeled after Edward Buckton Lamb's Church of St. Martin's, Gospel Oak, London (see Gospel Oak), built in 1865. 'It has almost every little quirky detail of the London church,' says Mr. Dolkart. 'The chamfered corners, the varying planes of the façade, the asymmetrical pinnacle at the top of the tower. It really captures your attention.'" Attached to the complex are a single-cell chapel (1879), and a rectory and a parish house (1880 and 1893). The larger Episcopal Church of the Heavenly Rest, on Fifth Avenue and 45th Street, relocated to 2 East 90th Street, forcing Beloved Disciple to merge with it (its name retained in a chapel). The old church was sold in 1929 to wealthy Dutch Reformed congregants from Harlem who formed the Second Collegiate Church of Harlem. In 1950 they sold the church to the Roman Catholic Church, who rededicated it to St. Thomas More. The church was renovated in the later half of the 20th century by architect Paul C. Reilly. Notable parishioners Jacqueline Kennedy Onassis was a parishioner there until her death, and she had a Mass offered for John F. Kennedy every November 22 on the anniversary of his death, a tradition later maintained by her daughter Caroline. Her 1994 funeral was held at the nearby St. Ignatius of Loyola because of the number of attendees. On July 23, 1999, after the death and cremation of John F. Kennedy, Jr., the Kennedy family held a private memorial service for him at St. Thomas More, at which Senator Ted Kennedy gave the eulogy and President Bill Clinton attended. Peggy Noonan is also a parishioner. Fashion and street photographer Bill Cunningham was also a regular parishioner and a private Requiem Mass was celebrated for the repose of his soul by Fr Kevin Madigan on June 30, 2016. The private funeral for Lee Bouvier Radziwill was held at the church on 25 February 2019. References Roman Catholic churches completed in 1870 19th-century Episcopal church buildings 19th-century Roman Catholic church buildings in the United States Gothic Revival church buildings in New York City Victorian architecture in New York City Buildings converted to Catholic church buildings Roman Catholic churches in Manhattan Former Episcopal church buildings in New York City Former Dutch Reformed churches in New York (state) Upper East Side
```java package com.journaldev.servlet.session; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; /** * Servlet implementation class LogoutServlet */ @WebServlet("/LogoutServlet") public class LogoutServlet extends HttpServlet { private static final long serialVersionUID = 1L; protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); Cookie[] cookies = request.getCookies(); if(cookies != null){ for(Cookie cookie : cookies){ if(cookie.getName().equals("JSESSIONID")){ System.out.println("JSESSIONID="+cookie.getValue()); break; } } } //invalidate the session if exists HttpSession session = request.getSession(false); System.out.println("User="+session.getAttribute("user")); if(session != null){ session.invalidate(); } response.sendRedirect("login.html"); } } ```
```python import numpy as np import matplotlib.pyplot as plt from sklearn.tree import DecisionTreeClassifier from io import StringIO from sklearn.tree import export_graphviz from imageio import imread from scipy import ndimage from sklearn.datasets import make_moons import re from .tools import discrete_scatter from .plot_helpers import cm2 def tree_image(tree, fout=None): try: import graphviz except ImportError: # make a hacky white plot x = np.ones((10, 10)) x[0, 0] = 0 return x dot_data = StringIO() export_graphviz(tree, out_file=dot_data, max_depth=3, impurity=False) data = dot_data.getvalue() data = re.sub(r"samples = [0-9]+\\n", "", data) data = re.sub(r"\\nsamples = [0-9]+", "", data) data = re.sub(r"value", "counts", data) graph = graphviz.Source(data, format="png") if fout is None: fout = "tmp" graph.render(fout) return imread(fout + ".png") def plot_tree_progressive(): X, y = make_moons(n_samples=100, noise=0.25, random_state=3) plt.figure() ax = plt.gca() discrete_scatter(X[:, 0], X[:, 1], y, ax=ax) ax.set_xlabel("Feature 0") ax.set_ylabel("Feature 1") plt.legend(["Class 0", "Class 1"], loc='best') axes = [] for i in range(3): fig, ax = plt.subplots(1, 2, figsize=(12, 4), subplot_kw={'xticks': (), 'yticks': ()}) axes.append(ax) axes = np.array(axes) for i, max_depth in enumerate([1, 2, 9]): tree = plot_tree(X, y, max_depth=max_depth, ax=axes[i, 0]) axes[i, 1].imshow(tree_image(tree)) axes[i, 1].set_axis_off() def plot_tree_partition(X, y, tree, ax=None): if ax is None: ax = plt.gca() eps = X.std() / 2. x_min, x_max = X[:, 0].min() - eps, X[:, 0].max() + eps y_min, y_max = X[:, 1].min() - eps, X[:, 1].max() + eps xx = np.linspace(x_min, x_max, 1000) yy = np.linspace(y_min, y_max, 1000) X1, X2 = np.meshgrid(xx, yy) X_grid = np.c_[X1.ravel(), X2.ravel()] Z = tree.predict(X_grid) Z = Z.reshape(X1.shape) faces = tree.apply(X_grid) faces = faces.reshape(X1.shape) border = ndimage.laplace(faces) != 0 ax.contourf(X1, X2, Z, alpha=.4, cmap=cm2, levels=[0, .5, 1]) ax.scatter(X1[border], X2[border], marker='.', s=1) discrete_scatter(X[:, 0], X[:, 1], y, ax=ax) ax.set_xlim(x_min, x_max) ax.set_ylim(y_min, y_max) ax.set_xticks(()) ax.set_yticks(()) return ax def plot_tree(X, y, max_depth=1, ax=None): tree = DecisionTreeClassifier(max_depth=max_depth, random_state=0).fit(X, y) ax = plot_tree_partition(X, y, tree, ax=ax) ax.set_title("depth = %d" % max_depth) return tree ```
Brakefield is a surname. Notable people with the surname include: Jim Brakefield (1919–2002), American football and baseball coach Paul Brakefield (born 1952), British evolutionary biologist See also Brakefield Green, a village in Norfolk, England
```python #!/usr/bin/env python3 # # This software may be used and distributed according to the terms of the # pyre-strict import argparse import binascii import collections import json import os import re import shlex import stat import subprocess import sys import time from pathlib import Path from typing import ( Any, Callable, cast, DefaultDict, Dict, IO, Iterator, List, Optional, Pattern, Tuple, Type, Union, ) import eden.dirstate import facebook.eden.ttypes as eden_ttypes import thrift.util.inspect from eden.fs.cli.cmd_util import get_eden_instance from eden.thrift.legacy import EdenClient from facebook.eden import EdenService from facebook.eden.constants import ( DIS_COMPUTE_BLOB_SIZES, DIS_NOT_RECURSIVE, DIS_REQUIRE_LOADED, DIS_REQUIRE_MATERIALIZED, ) from facebook.eden.ttypes import ( BlobMetadataOrError, BlobMetadataWithOrigin, DataFetchOrigin, DebugGetBlobMetadataRequest, DebugGetRawJournalParams, DebugGetScmBlobRequest, DebugGetScmTreeRequest, DebugInvalidateRequest, DebugJournalDelta, EdenError, MountId, ScmBlobMetadata, ScmBlobOrError, ScmBlobWithOrigin, ScmTreeEntry, ScmTreeOrError, ScmTreeWithOrigin, SyncBehavior, TimeSpec, TreeInodeDebugInfo, ) from fb303_core import BaseService from thrift.protocol.TSimpleJSONProtocol import TSimpleJSONProtocolFactory from thrift.Thrift import TApplicationException from thrift.util import Serializer try: from tqdm import tqdm except ModuleNotFoundError: # pyre-fixme[3]: Return type must be annotated. # pyre-fixme[2]: Parameter must be annotated. def tqmd(x): return x from . import ( cmd_util, hg_util, rage as rage_mod, stats_print, subcmd as subcmd_mod, tabulate, ui as ui_mod, ) from .config import EdenCheckout, EdenInstance from .subcmd import Subcmd from .util import format_cmd, format_mount, print_stderr, split_inodes_by_operation_type MB: int = 1024**2 debug_cmd = subcmd_mod.Decorator() # This is backported from Python 3.9. # # TODO: Use argparse.BooleanOptionalAction when we # can expect Python 3.9 or later. class BooleanOptionalAction(argparse.Action): # pyre-fixme[3]: Return type must be annotated. def __init__( self, # pyre-fixme[2]: Parameter must be annotated. option_strings, # pyre-fixme[2]: Parameter must be annotated. dest, # pyre-fixme[2]: Parameter must be annotated. default=None, # pyre-fixme[2]: Parameter must be annotated. type=None, # pyre-fixme[2]: Parameter must be annotated. choices=None, # pyre-fixme[2]: Parameter must be annotated. required=False, # pyre-fixme[2]: Parameter must be annotated. help=None, # pyre-fixme[2]: Parameter must be annotated. metavar=None, ): _option_strings = [] for option_string in option_strings: _option_strings.append(option_string) if option_string.startswith("--"): option_string = "--no-" + option_string[2:] _option_strings.append(option_string) super().__init__( option_strings=_option_strings, dest=dest, nargs=0, default=default, type=type, choices=choices, required=required, help=help, metavar=metavar, ) # pyre-fixme[3]: Return type must be annotated. # pyre-fixme[2]: Parameter must be annotated. def __call__(self, parser, namespace, values, option_string=None): if option_string in self.option_strings: setattr(namespace, self.dest, not option_string.startswith("--no-")) # pyre-fixme[3]: Return type must be annotated. def format_usage(self): return " | ".join(self.option_strings) def escape_path(value: bytes) -> str: """ Take a binary path value, and return a printable string, with special characters escaped. """ def human_readable_byte(b: int) -> str: if b < 0x20 or b >= 0x7F: return "\\x{:02x}".format(b) elif b == ord(b"\\"): return "\\\\" return chr(b) return "".join(human_readable_byte(b) for b in value) def hash_str(value: bytes) -> str: """ Take a hash as a binary value, and return it represented as a hexadecimal string. """ return binascii.hexlify(value).decode("utf-8") def object_id_str(value: bytes) -> str: # While we migrate the representation of object IDs, continue to support # older versions of EdenFS returning 20-byte binary hashes. if len(value) == 20: return hash_str(value) return value.decode("utf-8", errors="replace") def parse_object_id(value: str) -> bytes: return value.encode() @debug_cmd("parents", "Show EdenFS's current working copy parent") class ParentsCmd(Subcmd): def setup_parser(self, parser: argparse.ArgumentParser) -> None: parser.add_argument( "path", nargs="?", help="The path to an EdenFS mount point. Uses `pwd` by default.", ) parser.add_argument( "--hg", action="store_true", help="Include Mercurial's parents in output" ) def _commit_hex(self, commit: bytes) -> str: return binascii.hexlify(commit).decode("utf-8") def run(self, args: argparse.Namespace) -> int: null_commit_id = 20 * b"\x00" path = args.path or os.getcwd() _, checkout, _ = cmd_util.require_checkout(args, path) try: working_copy_parent, checked_out_revision = checkout.get_snapshot()[0:2] except Exception as ex: print_stderr(f"error parsing EdenFS snapshot : {ex}") return 1 if args.hg: hg_parents, _, _ = _get_dirstate_data(checkout) print("Mercurial p0: {}".format(self._commit_hex(hg_parents[0]))) if hg_parents[1] != null_commit_id: print("Mercurial p1: {}".format(self._commit_hex(hg_parents[1]))) print("EdenFS snapshot: {}".format(working_copy_parent)) else: print(working_copy_parent) return 0 @debug_cmd( "tree", "Show EdenFS's data for a source control tree. Fetches from ObjectStore " "by default: use options to inspect different origins.", ) class TreeCmd(Subcmd): def setup_parser(self, parser: argparse.ArgumentParser) -> None: add_get_object_options(parser, "tree") parser.add_argument("mount", help="The EdenFS mount point path.") parser.add_argument("id", help="The tree ID") def print_all_trees(self, trees: List[ScmTreeWithOrigin]) -> None: print_all_objects( trees, "tree", lambda tree: tree.scmTreeData.getType() != ScmTreeOrError.TREEENTRIES, lambda trees: trees[0].scmTreeData.get_treeEntries() == trees[1].scmTreeData.get_treeEntries(), lambda tree: print_tree(tree.scmTreeData.get_treeEntries()), ) def print_tree_or_error(self, treeOrError: ScmTreeOrError) -> None: if treeOrError.getType() == ScmTreeOrError.TREEENTRIES: print_tree(treeOrError.get_treeEntries()) else: error = treeOrError.get_error() sys.stdout.buffer.write(f"ERROR fetching data: {error}\n".encode()) def run(self, args: argparse.Namespace) -> int: instance, checkout, _rel_path = cmd_util.require_checkout(args, args.mount) tree_id = parse_object_id(args.id) origin_flags = get_origin_flags(args) with instance.get_thrift_client_legacy() as client: resp = client.debugGetTree( DebugGetScmTreeRequest( MountId(bytes(checkout.path)), tree_id, origin_flags, ) ) if args.all: self.print_all_trees(resp.trees) else: self.print_tree_or_error(resp.trees[0].scmTreeData) return 0 class Process: # pyre-fixme[2]: Parameter must be annotated. def __init__(self, pid, cmd, mount) -> None: # pyre-fixme[4]: Attribute must be annotated. self.pid = pid # pyre-fixme[4]: Attribute must be annotated. self.cmd = format_cmd(cmd) self.fetch_count = 0 # pyre-fixme[4]: Attribute must be annotated. self.mount = format_mount(mount) def set_fetchs(self, fetch_counts: int) -> None: self.fetch_count = fetch_counts @debug_cmd("processfetch", "List processes and fetch counts") class ProcessFetchCmd(Subcmd): def setup_parser(self, parser: argparse.ArgumentParser) -> None: parser.add_argument( "-s", "--short-cmdline", action="store_true", default=False, help="Show commands without arguments, otherwise show the entire cmdlines", ) parser.add_argument( "-a", "--all-processes", action="store_true", default=False, help="Default option only lists recent processes. This option shows all " "processes from the beginning of this EdenFS. Old cmdlines might be unavailable", ) parser.add_argument( "-m", "--mount", action="store_true", default=False, help="Show mount base name for each process", ) def run(self, args: argparse.Namespace) -> int: # pyre-fixme[31]: Expression `Process())]` is not a valid type. processes: Dict[int, Process()] = {} header = ["PID", "FETCH COUNT", "CMD"] if args.mount: header.insert(1, "MOUNT") rows = [] eden = cmd_util.get_eden_instance(args) with eden.get_thrift_client_legacy() as client: # Get the data in the past 16 seconds. All data is collected only within # this period except that fetchCountsByPid is from the beginning of start counts = client.getAccessCounts(16) for mount, accesses in counts.accessesByMount.items(): # Get recent process accesses for pid, _ in accesses.accessCountsByPid.items(): cmd = counts.cmdsByPid.get(pid, b"<unknown>") processes[pid] = Process(pid, cmd, mount) # When querying older versions of EdenFS fetchCountsByPid will be None fetch_counts_by_pid = accesses.fetchCountsByPid or {} # Set fetch counts for recent processes for pid, fetch_counts in fetch_counts_by_pid.items(): if pid not in processes: if not args.all_processes: continue else: cmd = counts.cmdsByPid.get(pid, b"<unknown>") processes[pid] = Process(pid, cmd, mount) processes[pid].set_fetchs(fetch_counts) sorted_processes = sorted( processes.items(), key=lambda x: x[1].fetch_count, reverse=True ) for pid, process in sorted_processes: if process.fetch_count: row: Dict[str, str] = {} cmd = process.cmd if args.short_cmdline: cmd = cmd.split()[0] row["PID"] = pid row["FETCH COUNT"] = process.fetch_count row["CMD"] = cmd if args.mount: row["MOUNT"] = process.mount rows.append(row) print(tabulate.tabulate(header, rows)) return 0 def add_get_object_options(parser: argparse.ArgumentParser, objectType: str) -> None: group = parser.add_mutually_exclusive_group() group.add_argument( "-o", "--object-cache-only", action="store_true", default=False, help=f"Only check the in memory object cache for the {objectType}", ) group.add_argument( "-l", "--local-store-only", action="store_true", default=False, help=f"Only check the EdenFS LocalStore for {objectType}. ", ) group.add_argument( "-d", # d for "disk cache" "--hgcache-only", action="store_true", default=False, help=f"Only check the hgcache for the {objectType}", ) group.add_argument( "-r", "--remote-only", action="store_true", default=False, help=f"Only fetch the {objectType} from the servers. ", ) group.add_argument( "-a", "--all", action="store_true", default=False, help=f"Fetch the {objectType} from all storage locations and display their contents. ", ) def get_origin_flags(args: argparse.Namespace) -> int: origin_flags = DataFetchOrigin.ANYWHERE if args.object_cache_only: origin_flags = DataFetchOrigin.MEMORY_CACHE elif args.local_store_only: origin_flags = DataFetchOrigin.DISK_CACHE elif args.hgcache_only: origin_flags = DataFetchOrigin.LOCAL_BACKING_STORE elif args.remote_only: origin_flags = DataFetchOrigin.REMOTE_BACKING_STORE elif args.all: origin_flags = ( DataFetchOrigin.MEMORY_CACHE | DataFetchOrigin.DISK_CACHE | DataFetchOrigin.LOCAL_BACKING_STORE | DataFetchOrigin.REMOTE_BACKING_STORE | DataFetchOrigin.ANYWHERE ) return origin_flags def origin_to_text(origin: DataFetchOrigin) -> str: if origin == DataFetchOrigin.MEMORY_CACHE: return "object cache" elif origin == DataFetchOrigin.DISK_CACHE: return "local store" elif origin == DataFetchOrigin.LOCAL_BACKING_STORE: return "hgcache" elif origin == DataFetchOrigin.REMOTE_BACKING_STORE: return "servers" elif origin == DataFetchOrigin.ANYWHERE: return "EdenFS complete data fetching behavior" return "<unknown>" def print_blob(blob: bytes) -> None: sys.stdout.buffer.write(blob) def print_tree(treeEntries: List[ScmTreeEntry]) -> None: max_object_id_len = max( (len(object_id_str(entry.id)) for entry in treeEntries), default=0 ) for entry in treeEntries: file_type_flags, perms = _parse_mode(entry.mode) print( "{} {:4o} {:<{}} {}".format( file_type_flags, perms, object_id_str(entry.id), max_object_id_len, escape_path(entry.name), ) ) def print_blob_metadata(id: str, metadata: ScmBlobMetadata) -> None: print("Blob ID: {}".format(id)) print("Size: {}".format(metadata.size)) print("SHA-1: {}".format(hash_str(metadata.contentsSha1))) def print_all_objects( # pyre-fixme[24]: Generic type `list` expects 1 type parameter, use # `typing.List[<element type>]` to avoid runtime subscripting errors. objects: List, object_type: str, # pyre-fixme[24]: Generic type `Callable` expects 2 type parameters. is_error: Callable, # pyre-fixme[24]: Generic type `Callable` expects 2 type parameters. equal: Callable, # pyre-fixme[24]: Generic type `Callable` expects 2 type parameters. print_data: Callable, ) -> None: non_error_objects = [] for obj in objects: non_error_found = not is_error(obj) pretty_origin = origin_to_text(obj.origin) pretty_non_error_found = "hit" if non_error_found else "miss" print(f"{pretty_origin}: {pretty_non_error_found}") if non_error_found: non_error_objects.append(obj) if len(non_error_objects) == 0: return if len(non_error_objects) == 1: print("\n") print_data(non_error_objects[0]) return objects_match = True for obj in non_error_objects[1::]: if not equal((obj, non_error_objects[0])): objects_match = False break if objects_match: print(f"\nAll {object_type}s match :) \n") print_data(non_error_objects[0]) else: print(f"\n!!!!! {object_type} mismatch !!!!! \n") for obj in non_error_objects: prety_fromwhere = origin_to_text(obj.origin) print(f"{object_type} from {prety_fromwhere}\n") print("-----------------------------\n") print_data(obj) print("\n-----------------------------\n\n") @debug_cmd( "blob", "Show EdenFS's data for a source control blob. Fetches from ObjectStore " "by default: use options to inspect different origins.", ) class BlobCmd(Subcmd): def setup_parser(self, parser: argparse.ArgumentParser) -> None: add_get_object_options(parser, "blob") parser.add_argument( "mount", help="The EdenFS mount point path.", ) parser.add_argument("id", help="The blob ID") def print_blob_or_error(self, blobOrError: ScmBlobOrError) -> None: if blobOrError.getType() == ScmBlobOrError.BLOB: print_blob(blobOrError.get_blob()) else: error = blobOrError.get_error() sys.stdout.buffer.write(f"ERROR fetching data: {error}\n".encode()) def print_all_blobs(self, blobs: List[ScmBlobWithOrigin]) -> None: print_all_objects( blobs, "blob", lambda blob: blob.blob.getType() != ScmBlobOrError.BLOB, lambda blobs: blobs[0].blob.get_blob() == blobs[1].blob.get_blob(), lambda blob: print_blob(blob.blob.get_blob()), ) def run(self, args: argparse.Namespace) -> int: instance, checkout, _rel_path = cmd_util.require_checkout(args, args.mount) blob_id = parse_object_id(args.id) origin_flags = get_origin_flags(args) with instance.get_thrift_client_legacy() as client: data = client.debugGetBlob( DebugGetScmBlobRequest( MountId(bytes(checkout.path)), blob_id, origin_flags, ) ) if args.all: self.print_all_blobs(data.blobs) else: self.print_blob_or_error(data.blobs[0].blob) return 0 @debug_cmd("blobmeta", "Show EdenFS's metadata about a source control blob") class BlobMetaCmd(Subcmd): def setup_parser(self, parser: argparse.ArgumentParser) -> None: add_get_object_options(parser, "blob metadata") parser.add_argument("mount", help="The EdenFS mount point path.") parser.add_argument("id", help="The blob ID") def print_blob_metadata_or_error( self, id: str, metadataOrError: BlobMetadataOrError ) -> None: if metadataOrError.getType() == BlobMetadataOrError.METADATA: print_blob_metadata(id, metadataOrError.get_metadata()) else: error = metadataOrError.get_error() sys.stdout.buffer.write(f"ERROR fetching data: {error}\n".encode()) def print_all_blob_metadatas( self, id: str, blob_metadatas: List[BlobMetadataWithOrigin] ) -> None: print_all_objects( blob_metadatas, "blob metadata", lambda metadata: metadata.metadata.getType() != BlobMetadataOrError.METADATA, lambda metadatas: metadatas[0].metadata.get_metadata() == metadatas[1].metadata.get_metadata(), lambda metadata: print_blob_metadata(id, metadata.metadata.get_metadata()), ) def run(self, args: argparse.Namespace) -> int: instance, checkout, _rel_path = cmd_util.require_checkout(args, args.mount) blob_id = parse_object_id(args.id) origin_flags = get_origin_flags(args) with instance.get_thrift_client_legacy() as client: info = client.debugGetBlobMetadata( DebugGetBlobMetadataRequest( MountId(bytes(checkout.path)), blob_id, origin_flags, ) ) if args.all: self.print_all_blob_metadatas(args.id, info.metadatas) else: self.print_blob_metadata_or_error(args.id, info.metadatas[0].metadata) return 0 class MismatchedBlobSize: actual_blobsize: int cached_blobsize: int def __init__(self, actual_blobsize: int, cached_blobsize: int) -> None: self.actual_blobsize = actual_blobsize self.cached_blobsize = cached_blobsize def check_blob_and_size_match( client: EdenClient, checkout: Path, identifying_hash: bytes ) -> Optional[MismatchedBlobSize]: try: response = client.debugGetBlob( DebugGetScmBlobRequest( mountId=MountId(bytes(checkout)), id=identifying_hash, origins=DataFetchOrigin.LOCAL_BACKING_STORE, # We don't want to cause any network fetches. ) ) blob = None for blobFromACertainPlace in response.blobs: try: blob = blobFromACertainPlace.blob.get_blob() except AssertionError: # only care to check blobs that exist pass blobmeta = None try: blobmeta = ( client.debugGetBlobMetadata( DebugGetBlobMetadataRequest( MountId(bytes(checkout)), identifying_hash, DataFetchOrigin.DISK_CACHE, ) ) .metadatas[0] .metadata.get_metadata() ) except AssertionError: # only care to check blobs that exist pass if blob is not None and blobmeta is not None and blobmeta.size != len(blob): return MismatchedBlobSize( actual_blobsize=len(blob), cached_blobsize=blobmeta.size ) except EdenError: # we don't care if debugGetScmBlobV2 returns an EdenError because # we only care about data that has been read by the user and thus is # present locally being incorrect. # We don't care if debugGetScmBlobMetadata returns an EdenError because # we only care about cached data being incorrect. return None except TApplicationException as ex: # we don't care about older versions of eden being incompatible, we will # just run the check when we can. if ex.type == TApplicationException.UNKNOWN_METHOD: return None def check_size_corruption( client: EdenClient, instance: EdenInstance, checkout: Path, loaded_tree_inodes: List[TreeInodeDebugInfo], ) -> int: # list of files whose size is wrongly cached in the local store local_store_corruption: List[Tuple[bytes, MismatchedBlobSize]] = [] for loaded_dir in tqdm(loaded_tree_inodes): for dirent in loaded_dir.entries: if not stat.S_ISREG(dirent.mode) or dirent.materialized: continue result = check_blob_and_size_match(client, checkout, dirent.hash) if result is not None: local_store_corruption.append((dirent.name, result)) if local_store_corruption: print(f"{len(local_store_corruption)} corrupted sizes in the local store") for filename, mismatch in local_store_corruption[:10]: print( f"{filename} --" f"actual size: {mismatch.actual_blobsize} -- " f"local store blob size: {mismatch.cached_blobsize}" ) if len(local_store_corruption) > 10: print("...") return 1 return 0 @debug_cmd( "sizecorruption", "Check if the metadata blob size match the actual blob size" ) class SizeCorruptionCmd(Subcmd): def run(self, args: argparse.Namespace) -> int: instance = get_eden_instance(args) checkouts = instance.get_mounts() number_effected_mounts = 0 with instance.get_thrift_client_legacy() as client: for path in sorted(checkouts.keys()): print(f"Checking {path}") inodes = client.debugInodeStatus( bytes(path), b"", flags=DIS_REQUIRE_LOADED, sync=SyncBehavior(), ) number_effected_mounts += check_size_corruption( client, instance, path, inodes ) return number_effected_mounts _FILE_TYPE_FLAGS: Dict[int, str] = { stat.S_IFREG: "f", stat.S_IFDIR: "d", stat.S_IFLNK: "l", } def _parse_mode(mode: int) -> Tuple[str, int]: """ Take a mode value, and return a tuple of (file_type, permissions) where file type is a one-character flag indicating if this is a file, directory, or symbolic link. """ file_type_str = _FILE_TYPE_FLAGS.get(stat.S_IFMT(mode), "?") perms = mode & 0o7777 return file_type_str, perms @debug_cmd("buildinfo", "Show the build info for the EdenFS server") class BuildInfoCmd(Subcmd): def run(self, args: argparse.Namespace) -> int: instance = cmd_util.get_eden_instance(args) do_buildinfo(instance) return 0 def do_buildinfo(instance: EdenInstance, out: Optional[IO[bytes]] = None) -> None: if out is None: out = sys.stdout.buffer build_info = instance.get_server_build_info() sorted_build_info = collections.OrderedDict(sorted(build_info.items())) for key, value in sorted_build_info.items(): out.write(b"%s: %s\n" % (key.encode(), value.encode())) @debug_cmd( "gc_process_fetch", "clear and start a new recording of process fetch counts" ) class GcProcessFetchCmd(Subcmd): def setup_parser(self, parser: argparse.ArgumentParser) -> None: parser.add_argument( "mount", nargs="?", help="The path to an EdenFS mount point. If not specified," " process fetch data will be cleared for all mounts.", ) def run(self, args: argparse.Namespace) -> int: eden = cmd_util.get_eden_instance(args) with eden.get_thrift_client_legacy() as client: if args.mount: instance, checkout, _rel_path = cmd_util.require_checkout( args, args.mount ) client.clearFetchCountsByMount(bytes(checkout.path)) else: client.clearFetchCounts() return 0 @debug_cmd("clear_local_caches", "Clears local caches of objects stored in RocksDB") class ClearLocalCachesCmd(Subcmd): def run(self, args: argparse.Namespace) -> int: instance = cmd_util.get_eden_instance(args) with instance.get_thrift_client_legacy() as client: client.debugClearLocalStoreCaches() return 0 @debug_cmd("compact_local_storage", "Asks RocksDB to compact its storage") class CompactLocalStorageCmd(Subcmd): def run(self, args: argparse.Namespace) -> int: instance = cmd_util.get_eden_instance(args) with instance.get_thrift_client_legacy() as client: client.debugCompactLocalStorage() return 0 @debug_cmd("hg_copy_map_get_all", "Copymap for dirstate") class HgCopyMapGetAllCmd(Subcmd): def setup_parser(self, parser: argparse.ArgumentParser) -> None: parser.add_argument( "path", nargs="?", help="The path to an EdenFS mount point. Uses `pwd` by default.", ) def run(self, args: argparse.Namespace) -> int: path = args.path or os.getcwd() _instance, checkout, _rel_path = cmd_util.require_checkout(args, path) _parents, _dirstate_tuples, copymap = _get_dirstate_data(checkout) _print_copymap(copymap) return 0 def _print_copymap(copy_map: Dict[str, str]) -> None: copies = [f"{item[1]} -> {item[0]}" for item in copy_map.items()] copies.sort() for copy in copies: print(copy) @debug_cmd("hg_dirstate", "Print full dirstate") class HgDirstateCmd(Subcmd): def setup_parser(self, parser: argparse.ArgumentParser) -> None: parser.add_argument( "path", nargs="?", help="The path to an EdenFS mount point. Uses `pwd` by default.", ) def run(self, args: argparse.Namespace) -> int: path = args.path or os.getcwd() _instance, checkout, _rel_path = cmd_util.require_checkout(args, path) _parents, dirstate_tuples, copymap = _get_dirstate_data(checkout) out = ui_mod.get_output() entries = list(dirstate_tuples.items()) out.writeln(f"Non-normal Files ({len(entries)}):", attr=out.BOLD) entries.sort(key=lambda entry: entry[0]) # Sort by key. for path, dirstate_tuple in entries: _print_hg_nonnormal_file(Path(os.fsdecode(path)), dirstate_tuple, out) out.writeln(f"Copymap ({len(copymap)}):", attr=out.BOLD) _print_copymap(copymap) return 0 def _print_hg_nonnormal_file( rel_path: Path, # pyre-fixme[2]: Parameter annotation cannot contain `Any`. dirstate_tuple: Tuple[str, Any, int], out: ui_mod.Output, ) -> None: status = _dirstate_char_to_name(dirstate_tuple[0]) merge_state = _dirstate_merge_state_to_name(dirstate_tuple[2]) out.writeln(f"{rel_path}", fg=out.GREEN) out.writeln(f" status = {status}") out.writeln(f" mode = {oct(dirstate_tuple[1])}") out.writeln(f" mergeState = {merge_state}") def _dirstate_char_to_name(state: str) -> str: if state == "n": return "Normal" elif state == "m": return "NeedsMerging" elif state == "r": return "MarkedForRemoval" elif state == "a": return "MarkedForAddition" elif state == "?": return "NotTracked" else: raise Exception(f"Unrecognized dirstate char: {state}") def _dirstate_merge_state_to_name(merge_state: int) -> str: if merge_state == 0: return "NotApplicable" elif merge_state == -1: return "BothParents" elif merge_state == -2: return "OtherParent" else: raise Exception(f"Unrecognized merge_state value: {merge_state}") # pyre-fixme[3]: Return annotation cannot contain `Any`. def _get_dirstate_data( checkout: EdenCheckout, ) -> Tuple[Tuple[bytes, bytes], Dict[str, Tuple[str, Any, int]], Dict[str, str]]: """Returns a tuple of (parents, dirstate_tuples, copymap). On error, returns None. """ filename = checkout.hg_dot_path.joinpath("dirstate") with filename.open("rb") as f: return eden.dirstate.read(f, str(filename)) @debug_cmd("inode", "Show data about loaded inodes") class InodeCmd(Subcmd): def setup_parser(self, parser: argparse.ArgumentParser) -> None: parser.add_argument( "path", help="The path to the EdenFS mount point. If a subdirectory inside " "a mount point is specified, only data about inodes under the " "specified subdirectory will be reported.", ) parser.add_argument( "--recursive", default=False, help="Recursively walk the directory and report data on all of the subdirectories recursively.", ) def run(self, args: argparse.Namespace) -> int: out = sys.stdout.buffer instance, checkout, rel_path = cmd_util.require_checkout(args, args.path) with instance.get_thrift_client_legacy() as client: flags = DIS_REQUIRE_LOADED | DIS_COMPUTE_BLOB_SIZES if not args.recursive: flags |= DIS_NOT_RECURSIVE results = client.debugInodeStatus( bytes(checkout.path), bytes(rel_path), flags=flags, sync=SyncBehavior(), ) out.write(b"%d loaded TreeInodes\n" % len(results)) for inode_info in results: _print_inode_info(inode_info, out) return 0 @debug_cmd( "modified", "Enumerate all potentially-modified inode paths", aliases=["materialized"], ) class MaterializedCmd(Subcmd): def setup_parser(self, parser: argparse.ArgumentParser) -> None: parser.add_argument( "path", default=None, nargs="?", help="The path to the EdenFS mount point. If a subdirectory inside " "a mount point is specified, only data about inodes under the " "specified subdirectory will be reported.", ) def run(self, args: argparse.Namespace) -> int: instance, checkout, rel_path = cmd_util.require_checkout(args, args.path) with instance.get_thrift_client_legacy() as client: results = client.debugInodeStatus( bytes(checkout.path), bytes(rel_path), DIS_REQUIRE_MATERIALIZED, sync=SyncBehavior(), ) if not results: return 0 by_inode = {} for result in results: by_inode[result.inodeNumber] = result # pyre-fixme[53]: Captured variable `by_inode` is not annotated. # pyre-fixme[3]: Return type must be annotated. # pyre-fixme[2]: Parameter must be annotated. def walk(ino, path): print(os.fsdecode(path if path else b"/")) try: inode = by_inode[ino] except KeyError: return for entry in inode.entries: if entry.materialized: walk(entry.inodeNumber, os.path.join(path, entry.name)) root = results[0] # In practice, this condition is always true, because edenfs creates .eden at startup. if root.materialized: walk(root.inodeNumber, root.path) return 0 @debug_cmd("file_stats", "Show data about loaded and written files") class FileStatsCMD(Subcmd): def setup_parser(self, parser: argparse.ArgumentParser) -> None: parser.add_argument("path", help="The path to the EdenFS mount point") def make_file_entries( self, paths_and_sizes: List[Tuple[str, int]] ) -> List[Dict[str, Union[str, int]]]: return [ {"path": path, "size": file_size} for (path, file_size) in paths_and_sizes ] def make_summary(self, paths_and_sizes: List[Tuple[str, int]]) -> Dict[str, Any]: # large files larger than 10mb are processed differently by mercurial large_paths_and_sizes = [ (path, size) for path, size in paths_and_sizes if size > 10 * MB ] summary = { "file_count": len(paths_and_sizes), "total_bytes": sum(size for _, size in paths_and_sizes), "large_file_count": len(large_paths_and_sizes), "large_files": self.make_file_entries(large_paths_and_sizes), "largest_directories_by_file_count": self.get_largest_directories_by_count( paths_and_sizes ), } return summary @staticmethod def get_largest_directories_by_count( paths_and_sizes: List[Tuple[str, int]], min_file_count: int = 1000 ) -> List[Dict[str, Union[int, str]]]: """ Returns a list of directories that contain more than min_file_count files. """ directories: DefaultDict[str, int] = collections.defaultdict(int) directories["."] = 0 for filepath, _ in paths_and_sizes: for parent in Path(filepath).parents: directories[str(parent)] += 1 directory_list: List[Dict[str, Union[int, str]]] = sorted( ( {"path": path, "file_count": file_count} for path, file_count in directories.items() if file_count >= min_file_count ), key=lambda d: d["path"], ) return directory_list def run(self, args: argparse.Namespace) -> int: request_root = args.path instance, checkout, rel_path = cmd_util.require_checkout(args, request_root) with instance.get_thrift_client_legacy() as client: inode_results = client.debugInodeStatus( bytes(checkout.path), bytes(rel_path), flags=0, sync=SyncBehavior() ) read_files, written_files = split_inodes_by_operation_type(inode_results) operations = { "summary": { "read": self.make_summary(read_files), "written": self.make_summary(written_files), }, "details": { "read_files": self.make_file_entries(read_files), "written_files": self.make_file_entries(written_files), }, } json.dump(operations, fp=sys.stdout, indent=4, separators=(",", ": ")) return 0 @debug_cmd("fuse_calls", "Show data about outstanding fuse calls") class FuseCallsCmd(Subcmd): def setup_parser(self, parser: argparse.ArgumentParser) -> None: parser.add_argument("path", help="The path to the EdenFS mount point.") def run(self, args: argparse.Namespace) -> int: out = sys.stdout.buffer instance, checkout, _rel_path = cmd_util.require_checkout(args, args.path) with instance.get_thrift_client_legacy() as client: outstanding_call = client.debugOutstandingFuseCalls(bytes(checkout.path)) out.write(b"Outstanding FUSE calls: %d\n" % len(outstanding_call)) for count, call in enumerate(outstanding_call): out.write(b"Call %d\n" % (count + 1)) out.write(b"\topcode: %d\n" % call.opcode) out.write(b"\tunique: %d\n" % call.unique) out.write(b"\tnodeid: %d\n" % call.nodeid) out.write(b"\tuid: %d\n" % call.uid) out.write(b"\tgid: %d\n" % call.gid) out.write(b"\tpid: %d\n" % call.pid) return 0 @debug_cmd( "start_recording", "Start an activity recording session and get its id", ) class StartRecordingCmd(Subcmd): def setup_parser(self, parser: argparse.ArgumentParser) -> None: parser.add_argument( "--output-dir", help="The output dir to store the performance profile", ) def run(self, args: argparse.Namespace) -> int: instance, checkout, _rel_path = cmd_util.require_checkout(args, os.getcwd()) with instance.get_thrift_client_legacy() as client: result = client.debugStartRecordingActivity( bytes(checkout.path), args.output_dir.encode() ) if result.unique: sys.stdout.buffer.write(str(result.unique).encode()) return 0 print(f"Fail to start recording at {args.output_dir}", file=sys.stderr) return 1 @debug_cmd( "stop_recording", "Stop the given activity recording session and get the output file", ) class StopRecordingCmd(Subcmd): def setup_parser(self, parser: argparse.ArgumentParser) -> None: parser.add_argument( "--unique", type=int, help="The id of the recording to stop", ) def run(self, args: argparse.Namespace) -> int: instance, checkout, _rel_path = cmd_util.require_checkout(args, os.getcwd()) output_path: Optional[bytes] = None with instance.get_thrift_client_legacy() as client: result = client.debugStopRecordingActivity( bytes(checkout.path), args.unique ) output_path = result.path if output_path is None: print(f"Fail to stop recording: {args.unique}", file=sys.stderr) return 1 sys.stdout.buffer.write(output_path) return 0 @debug_cmd( "list_recordings", "List active activity recording sessions", ) class ListRecordingsCmd(Subcmd): def run(self, args: argparse.Namespace) -> int: instance, checkout, _rel_path = cmd_util.require_checkout(args, os.getcwd()) with instance.get_thrift_client_legacy() as client: result = client.debugListActivityRecordings(bytes(checkout.path)) if not result.recordings: print("There is no active activity recording sessions.") else: for recording in result.recordings: path = recording.path print( f"ID: {recording.unique} Output file: {'' if path is None else path.decode()}" ) return 0 def _print_inode_info(inode_info: TreeInodeDebugInfo, out: IO[bytes]) -> None: out.write(inode_info.path + b"\n") out.write(b" Inode number: %d\n" % inode_info.inodeNumber) out.write(b" Ref count: %d\n" % inode_info.refcount) out.write(b" Materialized?: %s\n" % str(inode_info.materialized).encode()) out.write(b" Object ID: %s\n" % object_id_str(inode_info.treeHash).encode()) out.write(b" Entries (%d total):\n" % len(inode_info.entries)) max_object_id_len = max( (len(object_id_str(entry.hash)) for entry in inode_info.entries), default=0 ) for entry in inode_info.entries: if entry.loaded: loaded_flag = "L" else: loaded_flag = "-" file_type_str, perms = _parse_mode(entry.mode) line = " {:9} {} {:4o} {} {:<{}} {}\n".format( entry.inodeNumber, file_type_str, perms, loaded_flag, object_id_str(entry.hash), max_object_id_len, escape_path(entry.name), ) out.write(line.encode()) @debug_cmd("getpath", "Get the EdenFS path that corresponds to an inode number") class GetPathCmd(Subcmd): def setup_parser(self, parser: argparse.ArgumentParser) -> None: parser.add_argument( "path", nargs="?", help="The path to an EdenFS mount point. Uses `pwd` by default.", ) parser.add_argument( "number", type=int, help="Display information for the specified inode number.", ) def run(self, args: argparse.Namespace) -> int: path = args.path or os.getcwd() instance, checkout, _rel_path = cmd_util.require_checkout(args, path) with instance.get_thrift_client_legacy() as client: inodePathInfo = client.debugGetInodePath(bytes(checkout.path), args.number) state = "loaded" if inodePathInfo.loaded else "unloaded" resolved_path = ( checkout.path.joinpath(os.fsdecode(inodePathInfo.path)) if inodePathInfo.linked else "[unlinked]" ) print(f"{state} {resolved_path}") return 0 @debug_cmd("unload", "Unload unused inodes") class UnloadInodesCmd(Subcmd): def setup_parser(self, parser: argparse.ArgumentParser) -> None: parser.add_argument( "path", help="The path to the EdenFS mount point. If a subdirectory inside " "a mount point is specified, only inodes under the " "specified subdirectory will be unloaded.", ) parser.add_argument( "age", type=float, nargs="?", default=0, help="Minimum age of the inodes to be unloaded in seconds", ) def run(self, args: argparse.Namespace) -> int: instance, checkout, rel_path = cmd_util.require_checkout(args, args.path) with instance.get_thrift_client_legacy() as client: # set the age in nanoSeconds age = TimeSpec() age.seconds = int(args.age) age.nanoSeconds = int((args.age - age.seconds) * 10**9) count = client.unloadInodeForPath( bytes(checkout.path), bytes(rel_path), age ) unload_path = checkout.path.joinpath(rel_path) print(f"Unloaded {count} inodes under {unload_path}") return 0 @debug_cmd("flush_cache", "Flush kernel cache for inode") class FlushCacheCmd(Subcmd): def setup_parser(self, parser: argparse.ArgumentParser) -> None: parser.add_argument( "path", help="Path to a directory/file inside an EdenFS mount." ) def run(self, args: argparse.Namespace) -> int: instance, checkout, rel_path = cmd_util.require_checkout(args, args.path) with instance.get_thrift_client_legacy() as client: client.invalidateKernelInodeCache(bytes(checkout.path), bytes(rel_path)) return 0 @debug_cmd("log", "Display/Gather the EdenFS log file. Defaults to Display mode.") class LogCmd(Subcmd): def setup_parser(self, parser: argparse.ArgumentParser) -> None: group = parser.add_mutually_exclusive_group() group.add_argument( "--upload", action="store_true", help=( "Gather logs from eden and uploads them externally. " "This uses the upload tool specified by the rage.reporter config value" ), ) group.add_argument( "--stdout", action="store_true", help="Print the logs to stdout: ignore reporter.", ) parser.add_argument( "--full", action="store_true", help="Gather the full logs from eden. Works with the upload and stdout options", ) parser.add_argument( "--size", type=int, default=1000000, help=( "The amount of the logs we should gather in bytes. " "Size is ignored if --full is set. Defaults to 1M. Works with --upload and --stdout" ), ) parser.add_argument( "--tail", action="store_true", help="Tail the end of the log file", ) parser.add_argument( "--path", action="store_true", help="Print the location of the EdenFS log file", ) def upload_logs( self, args: argparse.Namespace, instance: EdenInstance, eden_log_path: Path ) -> int: # For ease of use, just use the same rage reporter rage_processor = instance.get_config_value("rage.reporter", default="") # pyre-fixme[24]: Generic type `subprocess.Popen` expects 1 type parameter. proc: Optional[subprocess.Popen] = None if rage_processor and not args.stdout: proc = subprocess.Popen(shlex.split(rage_processor), stdin=subprocess.PIPE) sink = proc.stdin else: proc = None sink = sys.stdout.buffer # pyre-fixme[6]: Expected `IO[bytes]` for 2nd param but got # `Optional[typing.IO[typing.Any]]`. rage_mod.print_log_file(eden_log_path, sink, args.full, args.size) if proc: # pyre-fixme[16]: `Optional` has no attribute `close`. sink.close() proc.wait() return 0 def run(self, args: argparse.Namespace) -> int: instance = cmd_util.get_eden_instance(args) eden_log_path = instance.get_log_path() if not eden_log_path.exists(): print(f"No log file found at {eden_log_path}", file=sys.stderr) return 1 if args.path: print(eden_log_path, file=sys.stdout) return 0 if args.stdout or args.upload: return self.upload_logs(args, instance, eden_log_path) elif args.tail: if sys.platform == "win32": cmd = [ "powershell.exe", "cat", "-tail", "50", "-wait", str(eden_log_path), ] subprocess.run(cmd) else: cmd = ["tail", "-f", str(eden_log_path)] os.execvp(cmd[0], cmd) raise Exception("we should never reach here") else: # Display eden's log with the system pager if possible. pager_env = os.getenv("PAGER") if pager_env: pager_cmd = shlex.split(pager_env) else: pager_cmd = ["less", "+G"] pager_cmd.append(str(eden_log_path)) os.execvp(pager_cmd[0], pager_cmd) raise Exception("we should never reach here") @debug_cmd("logging", "Display or modify logging configuration for the edenfs daemon") class LoggingCmd(Subcmd): def setup_parser(self, parser: argparse.ArgumentParser) -> None: parser.add_argument( "-a", "--all", action="store_true", help="Show the configuration of all logging categories, even ones " "with default configuration settings", ) parser.add_argument( "--reset", action="store_true", help="Fully reset the logging config to the specified settings rather " "than updating the current configuration with the new settings. " "(Beware that you need to specify log handlers unless you want them " "all to be deleted.)", ) parser.add_argument( "config", type=str, nargs="?", help="A log configuration string to use to modify the log settings. See " "folly/logging/docs/Config.md (path_to_url" " for syntax documentation. The most basic syntax is CATEGORY=LEVEL.", ) def run(self, args: argparse.Namespace) -> int: instance = cmd_util.get_eden_instance(args) if args.reset and args.config is None: # The configuration to use if the caller specifies --reset with no # explicit config argument. args.config = ( "WARN:default,eden=DBG2; default=stream:stream=stderr,async=true" ) with instance.get_thrift_client_legacy() as client: if args.config is not None: if args.reset: print(f"Resetting logging configuration to {args.config!r}") client.setOption("logging_full", args.config) else: print(f"Updating logging configuration with {args.config!r}") client.setOption("logging", args.config) print("Updated configuration. New config settings:") else: print("Current logging configuration:") if args.all: config_str = client.getOption("logging_full") else: config_str = client.getOption("logging") self.print_config(config_str) return 0 def print_config(self, config_str: str) -> None: config = json.loads(config_str) handler_fmt = " {:12} {:12} {}" separator = " " + ("-" * 76) print("=== Log Handlers ===") if not config["handlers"]: print(" Warning: no log handlers configured!") else: print(handler_fmt.format("Name", "Type", "Options")) print(separator) for name, handler in sorted(config["handlers"].items()): options_str = ", ".join( sorted("{}={}".format(k, v) for k, v in handler["options"].items()) ) print(handler_fmt.format(name, handler["type"], options_str)) print("\n=== Log Categories ===") category_fmt = " {:50} {:12} {}" print(category_fmt.format("Name", "Level", "Handlers")) print(separator) for name, category in sorted(config["categories"].items()): # For categories that do not inherit their parent's level (unusual) # show the level with a trailing '!' # Don't do this for the root category, though--it never inherits it's # parent's level since it has no parent. level_str = category["level"] if not category["inherit"] and name != "": level_str = level_str + "!" # Print the root category name as '.' instead of the empty string just # to help make it clear that there is a category name here. # (The logging config parsing code accepts '.' as the root category # name too.) if name == "": name = "." handlers_str = ", ".join(category["handlers"]) print(category_fmt.format(name, level_str, handlers_str)) @debug_cmd("journal_set_memory_limit", "Sets the journal memory limit") class DebugJournalSetMemoryLimitCmd(Subcmd): def setup_parser(self, parser: argparse.ArgumentParser) -> None: parser.add_argument( "limit", type=int, help="The amount of memory (in bytes) that the journal can keep.", ) parser.add_argument( "path", nargs="?", help="The path to an EdenFS mount point. Uses `pwd` by default.", ) def run(self, args: argparse.Namespace) -> int: instance, checkout, _rel_path = cmd_util.require_checkout(args, args.path) with instance.get_thrift_client_legacy() as client: try: client.setJournalMemoryLimit(bytes(checkout.path), args.limit) except EdenError as err: print(err, file=sys.stderr) return 1 return 0 @debug_cmd("journal_get_memory_limit", "Gets the journal memory limit") class DebugJournalGetMemoryLimitCmd(Subcmd): def setup_parser(self, parser: argparse.ArgumentParser) -> None: parser.add_argument( "path", nargs="?", help="The path to an EdenFS mount point. Uses `pwd` by default.", ) def run(self, args: argparse.Namespace) -> int: instance, checkout, _rel_path = cmd_util.require_checkout(args, args.path) with instance.get_thrift_client_legacy() as client: try: mem = client.getJournalMemoryLimit(bytes(checkout.path)) except EdenError as err: print(err, file=sys.stderr) return 1 print("Journal memory limit is " + stats_print.format_size(mem)) return 0 @debug_cmd( "flush_journal", "Flushes the journal, and causes any subscribers to get a truncated result", ) class DebugFlushJournalCmd(Subcmd): def setup_parser(self, parser: argparse.ArgumentParser) -> None: parser.add_argument( "path", nargs="?", help="The path to an EdenFS mount point. Uses `pwd` by default.", ) def run(self, args: argparse.Namespace) -> int: instance, checkout, _rel_path = cmd_util.require_checkout(args, args.path) with instance.get_thrift_client_legacy() as client: try: client.flushJournal(bytes(checkout.path)) except EdenError as err: print(err, file=sys.stderr) return 1 return 0 @debug_cmd("journal", "Prints the most recent entries from the journal") class DebugJournalCmd(Subcmd): def setup_parser(self, parser: argparse.ArgumentParser) -> None: parser.add_argument( "-n", "--limit", type=int, default=1000, help="The number of journal entries to print.", ) parser.add_argument( "-e", "--pattern", type=str, help="Show only deltas for paths matching this pattern. " "Specify '^((?!^\\.hg/).)*$' to exclude the .hg/ directory.", ) parser.add_argument( "-f", "--follow", action="store_true", default=False, help="Output appended data as the journal grows.", ) parser.add_argument( "-i", "--ignore-case", action="store_true", default=False, help="Ignore case in the pattern specified by --pattern.", ) parser.add_argument( "path", nargs="?", help="The path to an EdenFS mount point. Uses `pwd` by default.", ) def run(self, args: argparse.Namespace) -> int: pattern: Optional[Pattern[bytes]] = None if args.pattern: pattern_bytes = args.pattern.encode("utf-8") flags = re.IGNORECASE if args.ignore_case else 0 pattern = re.compile(pattern_bytes, flags) instance, checkout, _ = cmd_util.require_checkout(args, args.path) mount = bytes(checkout.path) # pyre-fixme[53]: Captured variable `instance` is not annotated. # pyre-fixme[3]: Return type must be annotated. # pyre-fixme[2]: Parameter must be annotated. def refresh(params): with instance.get_thrift_client_legacy() as client: journal = client.debugGetRawJournal(params) deltas = journal.allDeltas if len(deltas) == 0: seq_num = params.fromSequenceNumber else: seq_num = deltas[0].fromPosition.sequenceNumber + 1 _print_raw_journal_deltas(reversed(deltas), pattern) return seq_num try: params = DebugGetRawJournalParams( mountPoint=mount, fromSequenceNumber=1, limit=args.limit ) seq_num = refresh(params) while args.follow: REFRESH_SEC = 2 time.sleep(REFRESH_SEC) params = DebugGetRawJournalParams( mountPoint=mount, fromSequenceNumber=seq_num ) seq_num = refresh(params) except EdenError as err: print(err, file=sys.stderr) return 1 except KeyboardInterrupt: if args.follow: pass else: raise return 0 def _print_raw_journal_deltas( deltas: Iterator[DebugJournalDelta], pattern: Optional[Pattern[bytes]] ) -> None: matcher: Callable[[bytes], bool] = ( (lambda x: True) if pattern is None # pyre-fixme[33]: Given annotation cannot be `Any`. else cast(Any, pattern.match) ) labels = { (False, False): "_", (False, True): "A", (True, False): "R", (True, True): "M", } for delta in deltas: entries: List[str] = [] for path, info in delta.changedPaths.items(): if not matcher(path): continue label = labels[(info.existedBefore, info.existedAfter)] entries.append(f"{label} {os.fsdecode(path)}") for path in delta.uncleanPaths: entries.append(f"X {os.fsdecode(path)}") # Only print journal entries if they changed paths that matched the matcher # or if they change the current working directory commit. if entries or delta.fromPosition.snapshotHash != delta.toPosition.snapshotHash: _print_journal_entry(delta, entries) def _print_journal_entry(delta: DebugJournalDelta, entries: List[str]) -> None: if delta.fromPosition.snapshotHash != delta.toPosition.snapshotHash: from_commit = hash_str(delta.fromPosition.snapshotHash) to_commit = hash_str(delta.toPosition.snapshotHash) commit_ids = f"{from_commit} -> {to_commit}" else: commit_ids = hash_str(delta.toPosition.snapshotHash) if delta.fromPosition.sequenceNumber != delta.toPosition.sequenceNumber: print( f"MERGE {delta.fromPosition.sequenceNumber}-" f"{delta.toPosition.sequenceNumber} {commit_ids}" ) else: print(f"DELTA {delta.fromPosition.sequenceNumber} {commit_ids}") if entries: entries.sort() print(" " + "\n ".join(entries)) @debug_cmd("thrift", "Invoke a thrift function") class DebugThriftCmd(Subcmd): args_suffix = "_args" result_suffix = "_result" def setup_parser(self, parser: argparse.ArgumentParser) -> None: parser.add_argument( "-l", "--list", action="store_true", help="List the available thrift functions.", ) parser.add_argument( "--eval-all-args", action="store_true", help="Always pass all arguments through eval(), even for plain strings.", ) parser.add_argument( "--json", action="store_true", help="Attempt to encode the result as JSON." ) parser.add_argument( "function_name", nargs="?", help="The thrift function to call." ) parser.add_argument( "args", nargs="*", help="The arguments to the thrift function." ) def run(self, args: argparse.Namespace) -> int: if args.list: self._list_functions() return 0 if not args.function_name: print(f"Error: no function name specified", file=sys.stderr) print( "Use the --list argument to see a list of available functions, or " "specify a function name", file=sys.stderr, ) return 1 # Look up the function information try: fn_info = thrift.util.inspect.get_function_info( EdenService, args.function_name ) except thrift.util.inspect.NoSuchFunctionError: print(f"Error: unknown function {args.function_name!r}", file=sys.stderr) print( 'Run "eden debug thrift --list" to see a list of available functions', file=sys.stderr, ) return 1 if len(args.args) != len(fn_info.arg_specs): print( f"Error: {args.function_name} requires {len(fn_info.arg_specs)} " f"arguments, but {len(args.args)} were supplied>", file=sys.stderr, ) return 1 python_args = self._eval_args( args.args, fn_info, eval_strings=args.eval_all_args ) # pyre-fixme[3]: Return type must be annotated. # pyre-fixme[2]: Parameter must be annotated. def lookup_module_member(modules, name): for module in modules: try: return getattr(module, name) except AttributeError: continue raise AttributeError(f"Failed to find {name} in {modules}") instance = cmd_util.get_eden_instance(args) with instance.get_thrift_client_legacy() as client: fn = getattr(client, args.function_name) result = fn(**python_args) if args.json: # The following back-and-forth is required to reliably # convert a Python Thrift client result into its JSON # form. The Python Thrift client returns native Python # lists and dicts for lists and maps, but they cannot # be passed directly to TSimpleJSONProtocol. Instead, # map the result back into a Thrift message, and then # serialize that as JSON. Finally, strip the message # container. # # NOTE: Stripping the root object means the output may # not have a root dict or array, which is required by # most JSON specs. But Python's json module and jq are # both fine with this deviation. result_type = lookup_module_member( [EdenService, BaseService], args.function_name + "_result" ) json_data = Serializer.serialize( TSimpleJSONProtocolFactory(), result_type(result) ) json.dump( # If the method returns void, json_data will not # have a "success" field. Print `null` in that # case. json.loads(json_data).get("success"), sys.stdout, sort_keys=True, indent=2, ) sys.stdout.write("\n") else: print(result) return 0 def _eval_args( self, args: List[str], fn_info: thrift.util.inspect.Function, eval_strings: bool ) -> Dict[str, Any]: from thrift.Thrift import TType code_globals = {key: getattr(eden_ttypes, key) for key in dir(eden_ttypes)} parsed_args = {} for arg, arg_spec in zip(args, fn_info.arg_specs): ( _field_id, thrift_type, arg_name, _extra_spec, _default, _required, ) = arg_spec # If the argument is a string type, don't pass it through eval. # This is purely to make it easier for humans to input strings. if not eval_strings and thrift_type == TType.STRING: parsed_arg = arg else: # pyre-fixme[6]: For 5th argument expected `bool` but got `int`. code = compile(arg, "<command_line>", "eval", 0, 1) parsed_arg = eval(code, code_globals.copy()) parsed_args[arg_name] = parsed_arg return parsed_args def _list_functions(self) -> None: # Report functions by module, from parent service downwards modules = thrift.util.inspect.get_service_module_hierarchy(EdenService) for module in reversed(modules): module_functions = thrift.util.inspect.list_service_functions(module) print(f"From {module.__name__}:") for _fn_name, fn_info in sorted(module_functions.items()): print(f" {fn_info}") @debug_cmd("drop-fetch-requests", "Drop all pending source control object fetches") class DropRequestsCmd(Subcmd): def run(self, args: argparse.Namespace) -> int: instance = cmd_util.get_eden_instance(args) with instance.get_thrift_client_legacy() as client: num_dropped = client.debugDropAllPendingRequests() print(f"Dropped {num_dropped} source control fetch requests") return 0 @debug_cmd( "gc-inodes", "Invalidate not recently used files and directories (non-materialized inodes)", ) class GCInodesCmd(Subcmd): def setup_parser(self, parser: argparse.ArgumentParser) -> None: parser.add_argument( "--mount", help="The EdenFS mount point path.", default=None ) parser.add_argument( "--path", help="Relative path in the repo to recursively invalidate", default="", ) parser.add_argument( "--background", action="store_true", help="Run invalidation in the background", ) def run(self, args: argparse.Namespace) -> int: instance, checkout, _rel_path = cmd_util.require_checkout(args, args.mount) # non-zero age is only supported on Windows if sys.platform == "win32": # On Windows, the atime is updated only once an hour, # so values below 1h may over-invalidate. This is also the # value used in `eden doctor` seconds = 3600 else: seconds = 0 with instance.get_thrift_client_legacy() as client: try: result = client.debugInvalidateNonMaterialized( DebugInvalidateRequest( mount=MountId(mountPoint=os.fsencode(checkout.path)), path=os.fsencode(args.path), background=args.background, age=TimeSpec(seconds=seconds), ) ) print( f"Invalidated {result.numInvalidated} inodes under {checkout.path}/{args.path}" ) return 0 except EdenError as err: print(err, file=sys.stderr) return 1 @subcmd_mod.subcmd("debug", "Internal commands for examining EdenFS state") class DebugCmd(Subcmd): # pyre-fixme[13]: Attribute `parser` is never initialized. parser: argparse.ArgumentParser def setup_parser(self, parser: argparse.ArgumentParser) -> None: # The "debug_posix" module contains other debug subcommands that are # supported on POSIX platforms (basically, not Windows). Import this module # if we aren't running on Windows. This will make sure it has registered all of # its subcommands in our debug_cmd.commands list. if sys.platform != "win32": from . import debug_posix # noqa: F401 else: from . import debug_windows # noqa: F401 subcmd_add_list: List[Type[Subcmd]] = [] # Save the parser so we can use it to print help in run() if we are # called with no arguments. self.parser = parser self.add_subcommands(parser, debug_cmd.commands + subcmd_add_list) def run(self, args: argparse.Namespace) -> int: self.parser.print_help() return 0 ```
```css Sass Mixins Sass Operators Using SassScripts Interactive Shell SassScript Color Operations SassScript String Operations ```
```python # from winbase.h STDOUT = -11 STDERR = -12 try: import ctypes from ctypes import LibraryLoader windll = LibraryLoader(ctypes.WinDLL) from ctypes import wintypes except (AttributeError, ImportError): windll = None SetConsoleTextAttribute = lambda *_: None winapi_test = lambda *_: None else: from ctypes import byref, Structure, c_char, POINTER COORD = wintypes._COORD class CONSOLE_SCREEN_BUFFER_INFO(Structure): """struct in wincon.h.""" _fields_ = [ ("dwSize", COORD), ("dwCursorPosition", COORD), ("wAttributes", wintypes.WORD), ("srWindow", wintypes.SMALL_RECT), ("dwMaximumWindowSize", COORD), ] def __str__(self): return '(%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d)' % ( self.dwSize.Y, self.dwSize.X , self.dwCursorPosition.Y, self.dwCursorPosition.X , self.wAttributes , self.srWindow.Top, self.srWindow.Left, self.srWindow.Bottom, self.srWindow.Right , self.dwMaximumWindowSize.Y, self.dwMaximumWindowSize.X ) _GetStdHandle = windll.kernel32.GetStdHandle _GetStdHandle.argtypes = [ wintypes.DWORD, ] _GetStdHandle.restype = wintypes.HANDLE _GetConsoleScreenBufferInfo = windll.kernel32.GetConsoleScreenBufferInfo _GetConsoleScreenBufferInfo.argtypes = [ wintypes.HANDLE, POINTER(CONSOLE_SCREEN_BUFFER_INFO), ] _GetConsoleScreenBufferInfo.restype = wintypes.BOOL _SetConsoleTextAttribute = windll.kernel32.SetConsoleTextAttribute _SetConsoleTextAttribute.argtypes = [ wintypes.HANDLE, wintypes.WORD, ] _SetConsoleTextAttribute.restype = wintypes.BOOL _SetConsoleCursorPosition = windll.kernel32.SetConsoleCursorPosition _SetConsoleCursorPosition.argtypes = [ wintypes.HANDLE, COORD, ] _SetConsoleCursorPosition.restype = wintypes.BOOL _FillConsoleOutputCharacterA = windll.kernel32.FillConsoleOutputCharacterA _FillConsoleOutputCharacterA.argtypes = [ wintypes.HANDLE, c_char, wintypes.DWORD, COORD, POINTER(wintypes.DWORD), ] _FillConsoleOutputCharacterA.restype = wintypes.BOOL _FillConsoleOutputAttribute = windll.kernel32.FillConsoleOutputAttribute _FillConsoleOutputAttribute.argtypes = [ wintypes.HANDLE, wintypes.WORD, wintypes.DWORD, COORD, POINTER(wintypes.DWORD), ] _FillConsoleOutputAttribute.restype = wintypes.BOOL _SetConsoleTitleW = windll.kernel32.SetConsoleTitleA _SetConsoleTitleW.argtypes = [ wintypes.LPCSTR ] _SetConsoleTitleW.restype = wintypes.BOOL handles = { STDOUT: _GetStdHandle(STDOUT), STDERR: _GetStdHandle(STDERR), } def winapi_test(): handle = handles[STDOUT] csbi = CONSOLE_SCREEN_BUFFER_INFO() success = _GetConsoleScreenBufferInfo( handle, byref(csbi)) return bool(success) def GetConsoleScreenBufferInfo(stream_id=STDOUT): handle = handles[stream_id] csbi = CONSOLE_SCREEN_BUFFER_INFO() success = _GetConsoleScreenBufferInfo( handle, byref(csbi)) return csbi def SetConsoleTextAttribute(stream_id, attrs): handle = handles[stream_id] return _SetConsoleTextAttribute(handle, attrs) def SetConsoleCursorPosition(stream_id, position, adjust=True): position = COORD(*position) # If the position is out of range, do nothing. if position.Y <= 0 or position.X <= 0: return # Adjust for Windows' SetConsoleCursorPosition: # 1. being 0-based, while ANSI is 1-based. # 2. expecting (x,y), while ANSI uses (y,x). adjusted_position = COORD(position.Y - 1, position.X - 1) if adjust: # Adjust for viewport's scroll position sr = GetConsoleScreenBufferInfo(STDOUT).srWindow adjusted_position.Y += sr.Top adjusted_position.X += sr.Left # Resume normal processing handle = handles[stream_id] return _SetConsoleCursorPosition(handle, adjusted_position) def FillConsoleOutputCharacter(stream_id, char, length, start): handle = handles[stream_id] char = c_char(char.encode()) length = wintypes.DWORD(length) num_written = wintypes.DWORD(0) # Note that this is hard-coded for ANSI (vs wide) bytes. success = _FillConsoleOutputCharacterA( handle, char, length, start, byref(num_written)) return num_written.value def FillConsoleOutputAttribute(stream_id, attr, length, start): ''' FillConsoleOutputAttribute( hConsole, csbi.wAttributes, dwConSize, coordScreen, &cCharsWritten )''' handle = handles[stream_id] attribute = wintypes.WORD(attr) length = wintypes.DWORD(length) num_written = wintypes.DWORD(0) # Note that this is hard-coded for ANSI (vs wide) bytes. return _FillConsoleOutputAttribute( handle, attribute, length, start, byref(num_written)) def SetConsoleTitle(title): return _SetConsoleTitleW(title) ```
```php <?php // autoload_real.php @generated by Composer class ComposerAutoloaderInitProvisioning_API { private static $loader; public static function loadClassLoader($class) { if ('Composer\Autoload\ClassLoader' === $class) { require __DIR__ . '/ClassLoader.php'; } } /** * @return \Composer\Autoload\ClassLoader */ public static function getLoader() { if (null !== self::$loader) { return self::$loader; } spl_autoload_register(array('ComposerAutoloaderInitProvisioning_API', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); spl_autoload_unregister(array('ComposerAutoloaderInitProvisioning_API', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; call_user_func(\Composer\Autoload\ComposerStaticInitProvisioning_API::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); return $loader; } } ```
```css CSS Specificity Matching images to a website's color scheme Styling elements using `::before` and `::after` Debug with `*` selector Conditional comments ```
```javascript import {defineMessages} from 'react-intl'; import sharedMessages from '../shared-messages'; let messages = defineMessages({ meow: { defaultMessage: 'Meow', description: 'Name for the meow sound', id: 'gui.defaultProject.meow' }, variable: { defaultMessage: 'my variable', description: 'Name for the default variable', id: 'gui.defaultProject.variable' } }); messages = {...messages, ...sharedMessages}; // use the default message if a translation function is not passed const defaultTranslator = msgObj => msgObj.defaultMessage; /** * Generate a localized version of the default project * @param {function} translateFunction a function to use for translating the default names * @return {object} the project data json for the default project */ const projectData = translateFunction => { const translator = translateFunction || defaultTranslator; return ({ targets: [ { isStage: true, name: 'Stage', variables: { '`jEk@4|i[#Fk?(8x)AV.-my variable': [ translator(messages.variable), 0 ] }, lists: {}, broadcasts: {}, blocks: {}, currentCostume: 0, costumes: [ { assetId: 'cd21514d0531fdffb22204e0ec5ed84a', name: translator(messages.backdrop, {index: 1}), md5ext: 'cd21514d0531fdffb22204e0ec5ed84a.svg', dataFormat: 'svg', rotationCenterX: 240, rotationCenterY: 180 } ], sounds: [ { assetId: '83a9787d4cb6f3b7632b4ddfebf74367', name: translator(messages.pop), dataFormat: 'wav', format: '', rate: 11025, sampleCount: 258, md5ext: '83a9787d4cb6f3b7632b4ddfebf74367.wav' } ], volume: 100 }, { isStage: false, name: translator(messages.sprite, {index: 1}), variables: {}, lists: {}, broadcasts: {}, blocks: {}, currentCostume: 0, costumes: [ { assetId: 'bcf454acf82e4504149f7ffe07081dbc', name: translator(messages.costume, {index: 1}), bitmapResolution: 1, md5ext: 'bcf454acf82e4504149f7ffe07081dbc.svg', dataFormat: 'svg', rotationCenterX: 48, rotationCenterY: 50 }, { assetId: '0fb9be3e8397c983338cb71dc84d0b25', name: translator(messages.costume, {index: 2}), bitmapResolution: 1, md5ext: '0fb9be3e8397c983338cb71dc84d0b25.svg', dataFormat: 'svg', rotationCenterX: 46, rotationCenterY: 53 } ], sounds: [ { assetId: '83c36d806dc92327b9e7049a565c6bff', name: translator(messages.meow), dataFormat: 'wav', format: '', rate: 22050, sampleCount: 18688, md5ext: '83c36d806dc92327b9e7049a565c6bff.wav' } ], volume: 100, visible: true, x: 0, y: 0, size: 100, direction: 90, draggable: false, rotationStyle: 'all around' } ], meta: { semver: '3.0.0', vm: '0.1.0', agent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36' // eslint-disable-line max-len } }); }; export default projectData; ```
The Plantem is a Nimbin street theatre character created by former Nimbin, New South Wales resident Bob Hopkins, modelled on Lee Falk's Phantom comic book character. The Plantem campaigns against prohibition and joins in the festivities of the Nimbin MardiGrass Cannabis Law Reform Rally. Since Bob vacated the position, the Plantem was portrayed by another local Nimbin fellow John Taylor, also known by the curious name of "Chicken" George. George died in December 2007 Sources External links http://www.nimbinmardigrass.com/Plantem_II.html Culture of New South Wales Fictional Australian people
Highlanes Gallery is a public art gallery and visual arts exhibition centre in Drogheda, Ireland which opened 4 October 2006. External links Highlanes website 2006 establishments in Ireland Art museums and galleries in the Republic of Ireland Art museums established in 2006 Buildings and structures in Drogheda Tourist attractions in County Louth
Wattkopf is a mountain of Baden-Württemberg, Germany. Mountains and hills of Baden-Württemberg Mountains and hills of the Black Forest
```c++ // // // 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. #include <fuzzer/FuzzedDataProvider.h> #include <math.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include "opus.h" #include "opus_defines.h" #include "opus_projection.h" #include "opus_types.h" #include "../celt/os_support.h" #define MAX_PACKET (1500) static unsigned char out[MAX_PACKET]; extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { FuzzedDataProvider fdp(data, size); opus_int32 nb_channels = fdp.ConsumeIntegralInRange(0, 255); const opus_int32 frequency = fdp.PickValueInArray({8, 12, 16, 24, 48}) * 1000; int streams = fdp.ConsumeIntegralInRange(0, 255); int coupled_streams = fdp.ConsumeIntegralInRange(0, 255); int frame_size_ms_x2 = fdp.PickValueInArray({5, 10, 20, 40, 80, 120, 160, 200, 240}); int frame_size = frame_size_ms_x2 * frequency / 2000; int application = fdp.PickValueInArray({OPUS_APPLICATION_AUDIO, OPUS_APPLICATION_VOIP, OPUS_APPLICATION_RESTRICTED_LOWDELAY}); int err = OPUS_OK; int mapping_family = fdp.PickValueInArray({0, 1, 2, 3, 255}); OpusProjectionEncoder *enc = opus_projection_ambisonics_encoder_create( frequency, nb_channels, mapping_family, &streams, &coupled_streams, application, &err); if (err != OPUS_OK || enc == NULL) { opus_projection_encoder_destroy(enc); return 0; } opus_projection_encoder_ctl( enc, OPUS_SET_COMPLEXITY(fdp.ConsumeIntegralInRange(0, 10))); opus_projection_encoder_ctl(enc, OPUS_SET_VBR(fdp.ConsumeBool())); opus_projection_encoder_ctl(enc, OPUS_SET_VBR_CONSTRAINT(fdp.ConsumeBool())); opus_projection_encoder_ctl( enc, OPUS_SET_FORCE_CHANNELS(fdp.PickValueInArray({OPUS_AUTO, 1, 2}))); opus_projection_encoder_ctl( enc, OPUS_SET_MAX_BANDWIDTH(fdp.PickValueInArray( {OPUS_BANDWIDTH_NARROWBAND, OPUS_BANDWIDTH_MEDIUMBAND, OPUS_BANDWIDTH_WIDEBAND, OPUS_BANDWIDTH_SUPERWIDEBAND, OPUS_BANDWIDTH_FULLBAND}))); opus_projection_encoder_ctl(enc, OPUS_SET_INBAND_FEC(fdp.ConsumeBool())); opus_projection_encoder_ctl( enc, OPUS_SET_PACKET_LOSS_PERC(fdp.ConsumeIntegralInRange(0, 100))); opus_projection_encoder_ctl(enc, OPUS_SET_DTX(fdp.ConsumeBool())); opus_projection_encoder_ctl( enc, OPUS_SET_LSB_DEPTH(fdp.ConsumeIntegralInRange(8, 24))); opus_projection_encoder_ctl( enc, OPUS_SET_PREDICTION_DISABLED((fdp.ConsumeBool()))); opus_projection_encoder_ctl( enc, OPUS_SET_SIGNAL(fdp.PickValueInArray( {OPUS_AUTO, OPUS_SIGNAL_VOICE, OPUS_SIGNAL_MUSIC}))); opus_projection_encoder_ctl( enc, OPUS_SET_PHASE_INVERSION_DISABLED(((fdp.ConsumeBool())))); const int pcm_size = sizeof(opus_int16) * frame_size * nb_channels; opus_int16 *pcm = (opus_int16 *)opus_alloc(pcm_size); if (pcm == NULL) { opus_projection_encoder_destroy(enc); return 0; } memset(pcm, 0, pcm_size); if (pcm_size == fdp.ConsumeData(pcm, pcm_size)) { const int len = opus_projection_encode(enc, pcm, frame_size, out, MAX_PACKET); (void)len; } opus_free(pcm); opus_projection_encoder_destroy(enc); return 0; } ```
```smalltalk " I return all methods which are visible from the scope. " Class { #name : 'ClyAllMethodsQuery', #superclass : 'ClyMethodQuery', #category : 'Calypso-SystemQueries-Queries', #package : 'Calypso-SystemQueries', #tag : 'Queries' } { #category : 'printing' } ClyAllMethodsQuery >> description [ ^'all methods' ] { #category : 'testing' } ClyAllMethodsQuery >> selectsMethod: aMethod [ ^true ] ```
The tufted capuchin (Sapajus apella), also known as brown capuchin, black-capped capuchin, or pin monkey, is a New World primate from South America and the Caribbean islands of Trinidad and Margarita. As traditionally defined, it is one of the most widespread primates in the Neotropics, but it has recently been recommended considering the black-striped, black and golden-bellied capuchins as separate species in a new genus, thereby effectively limiting the tufted capuchin to the Amazon basin and nearby regions. However, the large-headed capuchin (S. a. macrocephalus), previously defined as a distinct species, has been reclassified as a subspecies of the tufted capuchin, expanding its range east to Peru & Ecuador and south to Bolivia. The tufted capuchin is an omnivorous animal, mostly feeding on fruits and invertebrates, although it sometimes feeds on small vertebrates (e.g. lizards and bird chicks) and other plant parts. It can be found in many different kinds of environment, including moist tropical and subtropical forest, dry forest, and disturbed or secondary forest. Like other capuchins, it is a social animal, forming groups of 8 to 15 individuals that are led by an alpha or dominant male. Taxonomy and phylogeny At one point all tufted capuchins were classified as Cebus apella. Under such taxonomy, the range of C. apella would extend throughout much of South America from Colombia to northern Argentina. Although she didn't describe specific or subspecific nomenclature, Torres de Assumpção (1983; 1988) described differences between tufted capuchins from five distinct geographic regions of Brazil and high phenotypic variation of individuals in a sixth area that had a greater selection pressure. In 2001, Silva Júnior proposed that the robust capuchins such (formerly the C. apella group) be placed in a separate genus, Sapajus, from the gracile capuchins (formerly the C. capucinus group) which retain the genus Cebus. This was supported by Jessica Lynch Alfaro et al. in 2011. Groves (2005) recognized six subspecies: Cebus apella apella, C. a. fatuellus, C. a. macrocephalus, C. a. margaritae, C. a. peruanus, C. a. tocantinus. The IUCN follows Silva (2001) and recognise the species as monotypic, though the subspecies status of S. a. margaritae is unclear. Physical characteristics The tufted capuchin is more powerfully built than the other capuchins, with rougher fur and a long, thick tail. It has a bundle of long, hardened hair on the forehead that can be raised as a sort of "wig". The fur is brownish gray, with the belly being somewhat lighter-colored than the rest of the body. The hands and feet are black. The tail is prehensile: strong and can be used for grasping, as an extra limb. The tufted capuchin has a head-body length of , a tail length of , and a weight of , with the males generally being larger and heavier than the females. Behaviour and ecology The tufted capuchin is a diurnal, arboreal primate species, but it often forages on the ground to search for food or to walk longer distances between trees that are too far apart to jump. The tufted capuchin lives in groups of two to twenty or more animals. A single group usually contains at least one adult male, but mixed groups with multiple males do also occur. In that case, one of the males is dominant. He accepts only a few monkeys in his direct surroundings, mainly younger animals and a few females. The dominant male and the group members that are close to him have the privilege to eat first in case of food scarcity, while subordinate monkeys have to wait until they are ready. After a gestation period of 180 days, one young is born, or incidentally a twin. This young, which weighs only 200 to 250 grams, is carried on the back of its mother. The mother feeds her child for 9 months, but the young are sexually immature until its seventh year, which is quite late for a primate of its size. Important natural enemies of the capuchin are large birds of prey. They are so afraid of those birds that they even become alarmed when a harmless bird flies over. Diet A recently discovered characteristic of one population of this species is that it uses stones as a tool to open hard nuts. First it chooses ripe nuts from a nut palm. It uses its teeth to strip off the nut's fibrous husk. Then it leaves the nut to dry for about a week. When the nut is dry, the monkey lays the nut on a large, flat rock or fallen tree, hammering the nut with a suitable stone until the nut cracks. The hammerstones are often large enough to require lifting with both hands. The anvil rock is often pockmarked with hollows as a result of repeated use. Besides nuts, the capuchin also eats fruit, leaves, seeds, pith, insects and larvae, eggs and young birds, frogs, lizards, other reptiles, rodents, mouse opossums, and even bats. They are also known to chase cats. The tufted capuchin looks for its food in groups. As soon as one of the group members has found something edible, he or she may make a large whistling sound, dependent upon the proximity of other individuals and abundance of the food resource so that the other monkeys know that there is something to eat. The composition of the group is very well organized and is determined by rank in the hierarchy. The dominant male often resides somewhere in the middle of the group just behind the front line, so that it is safer when a predator attacks. The vanguard is composed of higher-ranked females who are tolerated by the dominant male. They have the privilege to reach the food first, but they are also the most vulnerable when a predator attacks. Tool use and manufacture The tufted capuchin has been observed using containers to hold water, using sticks (to dig nuts, to dip for syrup, to catch ants, to reach food), using sponges to absorb juice, using stones as hammer and chisel to penetrate a barrier and using stones as hammer and anvil to crack nuts. While some of these tasks are relatively simple by cognitive standards (e.g. using a stick to catch ants), others, like cracking nuts with hammer and anvil are only exceeded in complexity by chimpanzees. The potential for tool use in animals like the tufted capuchin depends on a number of conditions that would increase its likelihood of appearing in a given species. Van Schaik proposed that the occurrence of tool use would be likely in foraging species if three factors were present: manual dexterity, intelligence, and social tolerance. As it applies to manual dexterity, capuchins are capable of a limited precision grip (the ability to delicately pinch and manipulate objects with the thumb and fingertips), which is not found in any other New World monkeys and only found in limited amounts in apes. C. apella has an encephalization ratio greater than the hominids (except humans) and a neocortex ratio that is almost as large as the apes; both of these rough indicators suggest high intelligence. Finally, the tufted capuchin forms social groups typical of a complex and tolerant society. The tufted capuchin has been observed manufacturing tools both in captivity and in the wild. In captivity, it has been reported as making probing sticks to reach normally inaccessible containers with syrup. It is also capable of understanding the concept of "sponging" and using paper towels, monkey biscuits, sticks, leaves and straw to sop up juice and then suck on the sponge to consume the juice. Research in the wild has shown that capuchin tool use is every bit as extensive as in captivity with capuchins being observed using stones to dig holes to get at tubers, an activity previously only seen in humans. The practice of using stones to crack nuts has arisen spontaneously in many locations such as in the Caatinga Dry Forest and Serra da Capivara National Park, all in Brazil and hundreds of miles apart. It has been observed cracking various nuts and fruits such as palm nuts (Attalea and Astrocaryum spp.) and jatobá fruits.(Hymenaea courbaril) The tufted capuchin has even been observed using stones to dislodge other stones that would later be used as hammers or shovels, an example of a more complex tool using behavior known as second-order tool use previously only found in chimpanzees. Curiously, not all tufted capuchins engage in tool use. Moura and Lee (2004) suggest lack of other food sources as the key factor. Ottoni and Mannu (2001), Fragaszy et al. (2004) and Visalberghi et al. (2005) have proposed this is likely more a factor of a monkey's terrestrial habit: the more time a monkey spends on the ground, the more likely it is to profit from (and thus engage in) tool use. In captivity, the tufted capuchin has been seen to manufacture stone tools that produced simple flakes and cores. Some of the capuchins even used these sharpened stones to cut (in a back-and-forth motion) barriers in order to reach food. The importance of this behavior is that it serves as evidence of mechanical proclivity to modify stones by using behaviors already in the monkeys' repertoires, and this behavior is seen as a precursor to stone-knapping. This early and limited tool use behavior has been hypothesized as similar to pre-Homo habilis and that artifacts of that time would probably resemble those of capuchins. S. apella tool manufacture and use has been analyzed for potential clues to social learning and problem solving ability, as tool manufacture and use can often shed light on such complex cognitive abilities. Social learning, or the ability to learn from other individuals, is a controversial topic in most nonhuman species like S. apella because of the relative difficulty of determining whether a behavior was learned from imitation or a much simpler form of social learning. One way of closing the gap between concurrent tool related behaviors and their likelihood of arising from imitation is by narrowing down events that would make social learning more probable such as a preference for observing experienced tool users. In this regard, Ottoni and his team found that young capuchins tended to observe the best tool users when cracking nuts. Another way of isolating imitation from other simpler behaviors is to present the capuchins with a box that has food but has two different ways of opening it. The important point is that neither way should be more advantageous so that the monkey can freely choose one. In one such study, when humans opened the door in front of the monkeys using one way only, the monkeys used that method, even when they discovered the alternative on their own. In another study, capuchin alphas from two separate groups were trained to open the door in a specific way, after which the monkeys were paired with subordinates who learned to open the door in the same way. When capuchins are trained in the same way and this time released into their groups, the habit is once again disseminated amongst all group members even when others discover alternative ways. Nevertheless, the subject of whether or not S. apella learns by imitation is still controversial, because of the inherent difficulty in teasing out unambiguous evidence of a complex cognitive process such as imitation. Problem solving Tool use and manufacture can also shed light on the many aspects of the tufted capuchin's cognitive abilities by determining how it solves some problems. Some non-primates manufacture and use objects as tools. Crows are known to make hook-tools for catching insects, but such activities lack the behavioral plasticity of tool use as evidenced in tufted capuchins who found new ways to use tools that other species could not. But this plasticity in tool use, while suggesting greater complexity and cognitive ability, does not suggest that the monkeys understand cause and effect. It instead implies they are only able to learn from successful efforts but not from failures, nor are they able to refine and improve much. Its ability to repeat successes, coupled with its complex repertoire of behavioral events helps to explain the tufted capuchin's extensive repertoire of innovative behaviors besides tool use. Distribution and habitat This species lives in the northern Amazon rainforest of the Guyanas, Venezuela and Brazil and to the west of the Rio Negro, as far north as the Orinoco in Venezuela. It is also found in eastern Colombia, Ecuador, Bolivia, Peru, including the upper Andean Magdalena valley in Colombia. An introduced breeding population is well established in the northwestern peninsula of the island of Trinidad in the Republic of Trinidad and Tobago. The subspecies/population on Margarita Island in Venezuela, S. a. margaritae, is considered Critically Endangered by the IUCN Red List. It can be found in a large variety of forest types, mainly in tropical rainforests (up till a height of 2700 m), but also in more open forests. The distribution overlaps with that of other species of capuchins, such as the white-fronted capuchin (Cebus albifrons). References Further reading Notes on the taxonomy and distributions of the tufted capuchin monkeys (Cebus, Cebidae) of South America Janson, Charles H. (2001) "Capuchin-like Monkeys". in: MacDonald, D. (red.), The New Encyclopedia of Mammals, Oxford: Oxford University Press, p. 344–353. Nowak, R.M. (1999) Walker's Primates of the World. Baltimore & London: the Johns Hopkins University Press. p. 113–115. External links Information about tufted capuchins at Animal Diversity Web Primate Info Net Cebus apella Factsheet Associação Mãe-da-lua Brown Capuchin (Cebus apella) tufted capuchin Mammals of the Caribbean Mammals of Suriname Mammals of Brazil Mammals of Guyana Mammals of French Guiana Mammals of Trinidad and Tobago Mammals of Venezuela Mammals of Colombia Mammals of Ecuador Mammals of Bolivia Mammals of Peru Tool-using mammals tufted capuchin tufted capuchin Primates of South America
The Comins' reagent is a triflyl-donating reagent that is used to synthesize vinyl triflates from the corresponding ketone enolates or dienolates. It was first reported in 1992 by Daniel Comins. The vinyl triflates prepared are useful as substrates in the Suzuki reaction. See also Bis(trifluoromethanesulfonyl)aniline References Reagents for organic chemistry Chloropyridines Sulfonamides Trifluoromethyl compounds Substances discovered in the 1990s
```python """Tests that the `env_checker` runs as expects and all errors are possible.""" import re import warnings from typing import Tuple, Union import numpy as np import pytest import gym from gym import spaces from gym.core import ObsType from gym.utils.env_checker import ( check_env, check_reset_options, check_reset_return_info_deprecation, check_reset_return_type, check_reset_seed, check_seed_deprecation, ) from tests.testing_env import GenericTestEnv @pytest.mark.parametrize( "env", [ gym.make("CartPole-v1", disable_env_checker=True).unwrapped, gym.make("MountainCar-v0", disable_env_checker=True).unwrapped, GenericTestEnv( observation_space=spaces.Dict( a=spaces.Discrete(10), b=spaces.Box(np.zeros(2), np.ones(2)) ) ), GenericTestEnv( observation_space=spaces.Tuple( [spaces.Discrete(10), spaces.Box(np.zeros(2), np.ones(2))] ) ), GenericTestEnv( observation_space=spaces.Dict( a=spaces.Tuple( [spaces.Discrete(10), spaces.Box(np.zeros(2), np.ones(2))] ), b=spaces.Box(np.zeros(2), np.ones(2)), ) ), ], ) def test_no_error_warnings(env): """A full version of this test with all gym envs is run in tests/envs/test_envs.py.""" with warnings.catch_warnings(record=True) as caught_warnings: check_env(env) assert len(caught_warnings) == 0, [warning.message for warning in caught_warnings] def _no_super_reset(self, seed=None, options=None): self.np_random.random() # generates a new prng # generate seed deterministic result self.observation_space.seed(0) return self.observation_space.sample(), {} def _super_reset_fixed(self, seed=None, options=None): # Call super that ignores the seed passed, use fixed seed super(GenericTestEnv, self).reset(seed=1) # deterministic output self.observation_space._np_random = self.np_random return self.observation_space.sample(), {} def _reset_default_seed(self: GenericTestEnv, seed="Error", options=None): super(GenericTestEnv, self).reset(seed=seed) self.observation_space._np_random = ( # pyright: ignore [reportPrivateUsage] self.np_random ) return self.observation_space.sample(), {} @pytest.mark.parametrize( "test,func,message", [ [ gym.error.Error, lambda self: (self.observation_space.sample(), {}), "The `reset` method does not provide a `seed` or `**kwargs` keyword argument.", ], [ AssertionError, lambda self, seed, *_: (self.observation_space.sample(), {}), "Expects the random number generator to have been generated given a seed was passed to reset. Mostly likely the environment reset function does not call `super().reset(seed=seed)`.", ], [ AssertionError, _no_super_reset, "Mostly likely the environment reset function does not call `super().reset(seed=seed)` as the random generates are not same when the same seeds are passed to `env.reset`.", ], [ AssertionError, _super_reset_fixed, "Mostly likely the environment reset function does not call `super().reset(seed=seed)` as the random number generators are not different when different seeds are passed to `env.reset`.", ], [ UserWarning, _reset_default_seed, "The default seed argument in reset should be `None`, otherwise the environment will by default always be deterministic. Actual default: Error", ], ], ) def test_check_reset_seed(test, func: callable, message: str): """Tests the check reset seed function works as expected.""" if test is UserWarning: with pytest.warns( UserWarning, match=f"^\\x1b\\[33mWARN: {re.escape(message)}\\x1b\\[0m$" ): check_reset_seed(GenericTestEnv(reset_fn=func)) else: with pytest.raises(test, match=f"^{re.escape(message)}$"): check_reset_seed(GenericTestEnv(reset_fn=func)) def _deprecated_return_info( self, return_info: bool = False ) -> Union[Tuple[ObsType, dict], ObsType]: """function to simulate the signature and behavior of a `reset` function with the deprecated `return_info` optional argument""" if return_info: return self.observation_space.sample(), {} else: return self.observation_space.sample() def _reset_var_keyword_kwargs(self, kwargs): return self.observation_space.sample(), {} def _reset_return_info_type(self, seed=None, options=None): """Returns a `list` instead of a `tuple`. This function is used to make sure `env_checker` correctly checks that the return type of `env.reset()` is a `tuple`""" return [self.observation_space.sample(), {}] def _reset_return_info_length(self, seed=None, options=None): return 1, 2, 3 def _return_info_obs_outside(self, seed=None, options=None): return self.observation_space.sample() + self.observation_space.high, {} def _return_info_not_dict(self, seed=None, options=None): return self.observation_space.sample(), ["key", "value"] @pytest.mark.parametrize( "test,func,message", [ [ AssertionError, _reset_return_info_type, "The result returned by `env.reset()` was not a tuple of the form `(obs, info)`, where `obs` is a observation and `info` is a dictionary containing additional information. Actual type: `<class 'list'>`", ], [ AssertionError, _reset_return_info_length, "Calling the reset method did not return a 2-tuple, actual length: 3", ], [ AssertionError, _return_info_obs_outside, "The first element returned by `env.reset()` is not within the observation space.", ], [ AssertionError, _return_info_not_dict, "The second element returned by `env.reset()` was not a dictionary, actual type: <class 'list'>", ], ], ) def test_check_reset_return_type(test, func: callable, message: str): """Tests the check `env.reset()` function has a correct return type.""" with pytest.raises(test, match=f"^{re.escape(message)}$"): check_reset_return_type(GenericTestEnv(reset_fn=func)) @pytest.mark.parametrize( "test,func,message", [ [ UserWarning, _deprecated_return_info, "`return_info` is deprecated as an optional argument to `reset`. `reset`" "should now always return `obs, info` where `obs` is an observation, and `info` is a dictionary" "containing additional information.", ], ], ) def test_check_reset_return_info_deprecation(test, func: callable, message: str): """Tests that return_info has been correct deprecated as an argument to `env.reset()`.""" with pytest.warns(test, match=f"^\\x1b\\[33mWARN: {re.escape(message)}\\x1b\\[0m$"): check_reset_return_info_deprecation(GenericTestEnv(reset_fn=func)) def test_check_seed_deprecation(): """Tests that `check_seed_deprecation()` throws a warning if `env.seed()` has not been removed.""" message = """Official support for the `seed` function is dropped. Standard practice is to reset gym environments using `env.reset(seed=<desired seed>)`""" env = GenericTestEnv() def seed(seed): return with pytest.warns( UserWarning, match=f"^\\x1b\\[33mWARN: {re.escape(message)}\\x1b\\[0m$" ): env.seed = seed assert callable(env.seed) check_seed_deprecation(env) with warnings.catch_warnings(record=True) as caught_warnings: env.seed = [] check_seed_deprecation(env) env.seed = 123 check_seed_deprecation(env) del env.seed check_seed_deprecation(env) assert len(caught_warnings) == 0 def test_check_reset_options(): """Tests the check_reset_options function.""" with pytest.raises( gym.error.Error, match=re.escape( "The `reset` method does not provide an `options` or `**kwargs` keyword argument" ), ): check_reset_options(GenericTestEnv(reset_fn=lambda self: (0, {}))) @pytest.mark.parametrize( "env,message", [ [ "Error", "The environment must inherit from the gym.Env class. See path_to_url for more info.", ], [ GenericTestEnv(action_space=None), "The environment must specify an action space. See path_to_url for more info.", ], [ GenericTestEnv(observation_space=None), "The environment must specify an observation space. See path_to_url for more info.", ], ], ) def test_check_env(env: gym.Env, message: str): """Tests the check_env function works as expected.""" with pytest.raises(AssertionError, match=f"^{re.escape(message)}$"): check_env(env) ```
```c++ // // // path_to_url // #include "pxr/usdImaging/bin/usdBakeMtlx/bakeMaterialX.h" #include "pxr/imaging/hdMtlx/hdMtlx.h" #include "pxr/usdImaging/usdImaging/materialParamUtils.h" #include "pxr/usd/sdf/path.h" #include "pxr/usd/sdr/registry.h" #include "pxr/usd/sdr/shaderProperty.h" #include "pxr/usd/usd/stage.h" #include "pxr/usd/usdMtlx/reader.h" #include "pxr/usd/usdMtlx/utils.h" #include "pxr/usd/usdShade/connectableAPI.h" #include "pxr/usd/usdShade/nodeDefAPI.h" #include "pxr/usd/usdShade/shader.h" #include <MaterialXCore/Document.h> #include <MaterialXCore/Generated.h> #include <MaterialXCore/Node.h> #include <MaterialXFormat/Util.h> #include <MaterialXFormat/XmlIo.h> #include <MaterialXRenderGlsl/TextureBaker.h> #include <fstream> namespace mx = MaterialX; PXR_NAMESPACE_OPEN_SCOPE TF_DEFINE_PRIVATE_TOKENS( _tokens, (mtlx) ((mtlxSurface, "mtlx:surface")) (surface) ); namespace { /// Read a MaterialX document then convert it using UsdMtlxRead(). template <typename R> static UsdStageRefPtr _ReadMtlxToStage(R&& reader, UsdStageRefPtr stage) { try { auto doc = reader(); if (!doc) { return TfNullPtr; } UsdMtlxRead(doc, stage); return stage; } catch (mx::ExceptionFoundCycle& x) { TF_RUNTIME_ERROR("MaterialX cycle found: %s", x.what()); return TfNullPtr; } catch (mx::Exception& x) { TF_RUNTIME_ERROR("MaterialX read failed: %s", x.what()); return TfNullPtr; } } } // anonymous namespace UsdStageRefPtr UsdBakeMtlxReadDocToStage(std::string const &pathname, UsdStageRefPtr stage) { return _ReadMtlxToStage( [&](){ return UsdMtlxReadDocument(pathname); }, stage); } static mx::FileSearchPath _GetMtlxSearchPaths() { // The mx::TextureBaker adds the 'libraries' folder to the search paths // when registering them. However, these searchPaths may include that // folder in the path, so we need to remove it here. mx::FileSearchPath searchPaths; mx::FileSearchPath originalSearchPaths = HdMtlxSearchPaths(); for (const mx::FilePath &path : originalSearchPaths) { // Remove the "libraries" part from the searchPath if (path.getBaseName() == "libraries") { searchPaths.append(path.getParentPath()); } else { searchPaths.append(path); } } return searchPaths; } static UsdShadeShader _GetSurfaceSource(UsdShadeMaterial const &mtlxMaterial) { UsdShadeOutput output = mtlxMaterial.GetOutput(_tokens->mtlxSurface); if (output) { UsdShadeAttributeVector valueAttrs = UsdShadeUtils::GetValueProducingAttributes( output, /*shaderOutputsOnly*/true); return UsdShadeShader(valueAttrs[0].GetPrim()); } return UsdShadeShader(); } static void _BakeMtlxDocument( mx::DocumentPtr const &mtlxDoc, mx::FileSearchPath const &searchPath, mx::DocumentPtr const &stdLibraries, mx::FilePath const &bakeFilename, int textureWidth, int textureHeight, bool bakeHdr, bool bakeAverage) { mx::Image::BaseType baseType = bakeHdr ? mx::Image::BaseType::FLOAT : mx::Image::BaseType::UINT8; // Construct a Texture Baker. #if MATERIALX_MAJOR_VERSION <= 1 && MATERIALX_MINOR_VERSION <= 38 && \ MATERIALX_BUILD_VERSION <= 6 mx::TextureBakerPtr baker = mx::TextureBaker::create( textureWidth, textureHeight, baseType); #else mx::TextureBakerPtr baker = mx::TextureBakerGlsl::create( textureWidth, textureHeight, baseType); #endif baker->setupUnitSystem(stdLibraries); baker->setAverageImages(bakeAverage); // Bake all materials in the active document. try { baker->bakeAllMaterials(mtlxDoc, searchPath, bakeFilename); } catch (std::exception& e) { TF_RUNTIME_ERROR("Error in texture baking: %s", e.what()); } } std::string UsdBakeMtlxBakeMaterial( UsdShadeMaterial const& mtlxMaterial, std::string const& bakedMtlxDir, int textureWidth, int textureHeight, bool bakeHdr, bool bakeAverage) { // Get the surface shader node const UsdShadeShader mtlxShader = _GetSurfaceSource(mtlxMaterial); SdfPath const &terminalPath = mtlxShader.GetPath(); // Convert to HdMaterialNetwork HdMaterialNetworkMap networkMap; UsdImagingBuildHdMaterialNetworkFromTerminal( mtlxShader.GetPrim(), _tokens->surface, {_tokens->mtlx}, {_tokens->mtlx}, &networkMap, UsdTimeCode()); // Convert to HdMaterialNetwork2 bool isVolume = false; const HdMaterialNetwork2 network2 = HdConvertToHdMaterialNetwork2(networkMap, &isVolume); if (isVolume) { // Not supported return std::string(); } // Load Standard Libraries/setup SearchPaths // XXX This does not follow the pattern used elsewhere because of how // mx::TextureBaker is registering the searchPaths. This means that in // order for this baking to work the user cannot change the name of the // libraries folder. mx::FilePathVec libraryFolders = { "libraries", }; mx::FileSearchPath searchPath = _GetMtlxSearchPaths(); mx::DocumentPtr stdLibraries = mx::createDocument(); mx::loadLibraries(libraryFolders, searchPath, stdLibraries); // Get Terminal Node auto const terminalNodeItr = network2.nodes.find(terminalPath); if (terminalNodeItr == network2.nodes.end()) { return std::string(); } HdMaterialNode2 terminalNode = terminalNodeItr->second; // Create a MaterialX Document mx::DocumentPtr mtlxDoc = HdMtlxCreateMtlxDocumentFromHdNetwork(network2, terminalNode, terminalPath, mtlxMaterial.GetPath(), stdLibraries); // Bake the MaterialX material. The baked mtlx file and associated textures // will all be in the bakedMtlxDir. mx::FilePath bakedMtlxFilename( mtlxMaterial.GetPath().GetName() + "_baked.mtlx"); mx::FilePath bakedPath = mx::FilePath(bakedMtlxDir) / bakedMtlxFilename; _BakeMtlxDocument(mtlxDoc, searchPath, stdLibraries, bakedPath, textureWidth, textureHeight, bakeHdr, bakeAverage); return bakedPath; } PXR_NAMESPACE_CLOSE_SCOPE ```
Aldo Brovarone (24 June 1926 – 12 October 2020) was an Italian automobile designer and the chief stylist with Carrozzeria Pininfarina (1974-1988) – widely known for a prominent range of work including the Dino 206 GT, Lancia Gamma Coupé and the Peugeot 504 (sedan). Background Brovarone was born on 24 June 1926, in Vigliano Biellese, in Italy's Piedmont textile region. He demonstrated artistic talent at an early age, and was fascinated by airplanes and dreamed of becoming a pilot. He later studied at the state commercial and technical institute, considering a career in the textile industry. His studies were interrupted by WWII, and he was deported by the Germans and imprisoned for one year in a German concentration camp in occupied Poland. Having managed to survive, he later worked as a designer with a refrigerator company. Career In 1949 Brovarone expatriated to Buenos Aires, Argentina and worked as a graphic designer at an advertising firm, later working with AUTOAR (Automotores Argentinos) until it ended operations in 1953. Brovarone returned to Italy to work with Piero Dusio of Cisitalia, where he first developed brochure illustrations and began his career as an automobile designer. On introduction from Dusio, Brovarone met Battista "Pinin" Farina and in 1952, he joined Carrozzeria Pinin Farina (later simply Pininfarina) first as assistant stylist to Francesco Salomone and Franco Martinengo. He subsequently became lead designer, beginning with the design of the Ferrari Superamerica II, presented at the 1960 Turin Auto Show. At Pininfarina, Brovarone designed the sedan variant of the Peugeot 504. In 2007 he verified that he did not design the coupe and cabriolet variants, confirming these were designed at Pininfarina, but under the direction of Franco Martinegno, from sketches by Peugeot. At Pininfarina, he collaborated on the 1987 Ferrari F40 with its designer Pietro Camardella, just before retiring. Later years After his retirement from Pininfarina in 1988, Brovarone consulted as a stylist with Stola, later contributing to the design of Studiotorino's Porsche Boxster-based Ruf RK Spyder, named at the 2005 Milan Triennale as the most beautiful car in the world. At Studiotorino, Broverone secretly penned a coupe variant that management later accepted. He continued to live in Turin, without computer or cellphone, and continued to make pencil sketches and tempera illustrations which were printed as collectible postcards. He died at 94 on 12 October 2020 at Molinette hospital in Turin, several days after the death of his wife Martarita, and was survived by his son Enrico Brovarone and nephew Cesare Brovarone. He was a member of the Auto Moto Club Storico Italiano (AMSAP) and judge for two concours d'elegance organized by the club, at Villa La Malpenga in Vigliano Biellese (in 2016) and at Ricetto di Candelo (in 2017). His life and work was recounted in the 2019 book, Stile & raffinatezza. Le creazioni di Aldo Brovarone ("Style & Refinement. The Creations of Aldo Brovarone) by Giuliano Silli, presented at the Third Annual Parco del Valentino Concours d'Elegance. Design work Alfa Romeo 6C 3000 CM Superflow (1955–1960 concept). A series of four consecutive bodies on the same chassis. Alfa Romeo Eagle Alfa Romeo Giulia 1600 Sport Alfa Romeo Spider (Duetto) with Martinengo, Salomone, and Carli of Pininfarina Cisitalia 33DF Voloradente Ford-Cisitalia 808 coupé Dino 206 GT Dino Berlinetta GT Dino Berlinetta Speciale Ferrari 250 LM Ferrari 365 GT 2+2 Ferrari 365 P Berlinetta Speciale Speciale Ferrari 375 America Coupe Speciale (1954 for Gianni Agnelli) Ferrari 400 Superamerica Pinin Farina Coupé (1959 for Gianni Agnelli) Maserati 5000 GT Pinin Farina Coupé (1961 for Gianni Agnelli) Ferrari 400 Superamerica Coupé Aerodinamico Ferrari Superfast II–IV (1960–1962 concept). A series of three consecutive bodies on the same chassis. Ferrari 500 Superfast Lancia Gamma Coupé Maserati A6GCS Pinin Farina Berlinetta Peugeot 504 (berlina/sedan) Peugeot 604 Stola Dedica Stola Abarth Monotipo Stola S82 Spyder Stola GTS Ruf RK Coupé and Spyder Ruf R Spyder References Italian automobile designers Pininfarina people Cisitalia people 2020 deaths 1926 births People from the Province of Biella Alfa Romeo people Ferrari people
The 2018–19 UEFA Europa League was the 48th season of Europe's secondary club football tournament organised by UEFA, and the 10th season since it was renamed from the UEFA Cup to the UEFA Europa League. The final was played at the Olympic Stadium in Baku, Azerbaijan, between English sides Chelsea and Arsenal – which was the first Europa League final to feature two teams from one city. Chelsea defeated Arsenal 4–1 and earned the right to play against Liverpool, the winners of the 2018–19 UEFA Champions League, in the 2019 UEFA Super Cup. As winners, Chelsea would also have been qualified for the 2019–20 UEFA Champions League group stage; however, since they had already qualified after finishing third in the Premier League, the berth reserved was given to the third-placed team of the 2018–19 Ligue 1 (Lyon) – the 5th-ranked association according to next season's access list. For the first time, the video assistant referee (VAR) system was used in the competition, where it was implemented in the final. As the title holders of the Europa League, Atlético Madrid qualified for the 2018–19 UEFA Champions League, although they had already qualified before the final through their league performance. They were unable to defend their title as they advanced to the Champions League knockout stage, and were eliminated by Juventus in the round of 16. Format changes On 9 December 2016, UEFA confirmed the reforming plan for the UEFA Champions League for the 2018–2021 cycle, which was announced on 26 August 2016. As per the new regulations, all teams that are eliminated in the UEFA Champions League qualifying rounds will get a second chance in the Europa League. Association team allocation 213 teams from all 55 UEFA member associations participated in the 2018–19 UEFA Europa League. The association ranking based on the UEFA country coefficients was used to determine the number of participating teams for each association: Associations 1–51 (except Liechtenstein) each had three teams qualify. Associations 52–54 each had two teams qualify. Liechtenstein and Kosovo (association 55) each had one team qualify (Liechtenstein organised only a domestic cup and no domestic league; Kosovo as per decision by the UEFA Executive Committee). Moreover, 55 teams eliminated from the 2018–19 UEFA Champions League were transferred to the Europa League (default number was 57, but 2 fewer teams competed in the 2018–19 UEFA Champions League). Association ranking For the 2018–19 UEFA Europa League, the associations were allocated places according to their 2017 UEFA country coefficients, which took into account their performance in European competitions from 2012–13 to 2016–17. Apart from the allocation based on the country coefficients, associations could have additional teams participating in the Champions League, as noted below: – Additional teams transferred from the UEFA Champions League Distribution In the default access list, originally 17 losers from the Champions League first qualifying round were transferred to the Europa League second qualifying round (Champions Path). However, one fewer loser would be transferred since the Champions League title holders already qualified for the group stage via their domestic league. Therefore, only 19 teams entered the Champions Path second qualifying round (one of the losers from the Champions League first qualifying round would be drawn to receive a bye to the third qualifying round). In addition, originally three losers from the Champions League second qualifying round (League Path) were transferred to the Europa League third qualifying round (Main Path). However, one fewer loser would be transferred since the Europa League title holders already qualified for the group stage via their domestic league. As a result, the following changes to the access list was made: The cup winners of association 18 (Denmark) entered the third qualifying round instead of the second qualifying round. The cup winners of association 25 (Norway) entered the second qualifying round instead of the first qualifying round. The cup winners of associations 50 (Wales) and 51 (Faroe Islands) entered the first qualifying round instead of the preliminary round. Redistribution rules A Europa League place was vacated when a team qualified for both the Champions League and the Europa League, or qualified for the Europa League by more than one method. When a place was vacated, it was redistributed within the national association by the following rules: When the domestic cup winners (considered as the "highest-placed" qualifier within the national association with the latest starting round) also qualified for the Champions League, their Europa League place was vacated. As a result, the highest-placed team in the league which had not yet qualified for European competitions qualified for the Europa League, with the Europa League qualifiers which finished above them in the league moving up one "place". When the domestic cup winners also qualified for the Europa League through league position, their place through the league position was vacated. As a result, the highest-placed team in the league which had not yet qualified for European competitions qualified for the Europa League, with the Europa League qualifiers which finished above them in the league moving up one "place" if possible. For associations where a Europa League place was reserved for either the League Cup or end-of-season European competition play-offs winners, they always qualified for the Europa League as the "lowest-placed" qualifier. If the League Cup winners had already qualified for European competitions through other methods, this reserved Europa League place was taken by the highest-placed team in the league which had not yet qualified for European competitions. Teams The labels in the parentheses show how each team qualified for the place of its starting round: CW: Cup winners 2nd, 3rd, 4th, 5th, 6th, etc.: League position LC: League Cup winners RW: Regular season winners PW: End-of-season Europa League play-offs winners UCL: Transferred from the Champions League GS: Third-placed teams from the group stage PO: Losers from the play-off round Q3: Losers from the third qualifying round Q2: Losers from the second qualifying round Q1: Losers from the first qualifying round PR: Losers from the preliminary round (SF: semi-finals; F: final) Notably one team that was not playing a national top division took part in the competition; Vaduz (representing Liechtenstein) played in 2017–18 Swiss Challenge League, which is Switzerland's second tier. Notes Round and draw dates The schedule of the competition was as follows (all draws were held at the UEFA headquarters in Nyon, Switzerland, unless stated otherwise). Matches in the qualifying (including preliminary and play-off) and knockout rounds could also be played on Tuesdays or Wednesdays instead of the regular Thursdays due to scheduling conflicts. From this season, the kick-off times starting from the group stage were slightly changed to 18:55 CET and 21:00 CET. Kick-off times starting from the quarter-finals were 21:00 CEST. Qualifying rounds In the qualifying and play-off rounds, teams are divided into seeded and unseeded teams based on their 2018 UEFA club coefficients (for Main Path), or based on which round they qualified from (for Champions Path), and then drawn into two-legged home-and-away ties. Preliminary round In the preliminary round, teams were divided into seeded and unseeded teams based on their 2018 UEFA club coefficients, and then drawn into two-legged home-and-away ties. Teams from the same association could not be drawn against each other. The draw for the preliminary round was held on 12 June 2018. The first legs were played on 26 and 28 June, and the second legs were played on 5 July 2018. First qualifying round The draw for the first qualifying round was held on 20 June 2018. The first legs were played on 10, 11 and 12 July, and the second legs were played on 17, 18 and 19 July 2018. Second qualifying round The second qualifying round was split into two separate sections: Champions Path (for league champions) and Main Path (for cup winners and league non-champions). The draw for the second qualifying round (Champions Path) was held on 19 June, and the draw for the second qualifying round (Main Path) was held on 20 June 2018. The first legs were played on 26 July, and the second legs were played on 31 July, 1 and 2 August 2018. Third qualifying round The third qualifying round was split into two separate sections: Champions Path (for league champions) and Main Path (for cup winners and league non-champions). The draw for the third qualifying round was held on 23 July 2018. The first legs were played on 7 and 9 August, and the second legs were played on 16 August 2018. Play-off round The play-off round was split into two separate sections: Champions Path (for league champions) and Main Path (for cup winners and league non-champions). The draw for the play-off round was held on 6 August 2018. The first legs were played on 23 August, and the second legs were played on 30 August 2018. Group stage The draw for the group stage was held on 31 August 2018 at the Grimaldi Forum in Monaco. The 48 teams were drawn into twelve groups of four, with the restriction that teams from the same association cannot be drawn against each other. For the draw, the teams are seeded into four pots based on their 2018 UEFA club coefficients. In each group, teams played against each other home-and-away in a round-robin format. The group winners and runners-up advance to the round of 32 where they are joined by the eight third-placed teams of the 2018–19 UEFA Champions League group stage. The matchdays are 20 September, 4 October, 25 October, 8 November, 29 November, and 13 December 2018. A total of 27 national associations were represented in the group stage. Akhisarspor, Chelsea, F91 Dudelange, Jablonec, Rangers, RB Leipzig, Sarpsborg 08, Spartak Moscow and Spartak Trnava made their debut appearances in the UEFA Europa League group stage (although Chelsea, Rangers, RB Leipzig and Spartak Moscow had already competed in the UEFA Europa League knockout phase after a third place in the UEFA Champions League group stage, while Rangers and Spartak Moscow had appeared in the UEFA Cup group stage). Akhisarspor and Sarpsborg 08 made their debuts in any European football. F91 Dudelange were the first team from Luxembourg to play in either the Champions League or Europa League group stage. Group A Group B Group C Group D Group E Group F Group G Group H Group I Group J Group K Group L Knockout phase In the knockout phase, teams play against each other over two legs on a home-and-away basis, except for the one-match final. Bracket Round of 32 The draw for the round of 32 was held on 17 December 2018. The first legs were played on 12 and 14 February, and the second legs were played on 20 and 21 February 2019. Round of 16 The draw for the round of 16 was held on 22 February 2019. The first legs were played on 7 March, and the second legs were played on 14 March 2019. Quarter-finals The draw for the quarter-finals was held on 15 March 2019. The first legs were played on 11 April, the second legs were played on 18 April 2019. Semi-finals The draw for the semi-finals was held on 15 March 2019 (after the quarter-final draw). The first legs were played on 2 May, and the second legs were played on 9 May 2019. Final The final was held on 29 May 2019 at the Olympic Stadium in Baku. The "home" team (for administrative purposes) was determined by an additional draw held after the quarter-final and semi-final draws. Statistics Statistics exclude qualifying rounds and play-off round. Top goalscorers Top assists Squad of the Season The UEFA technical study group selected the following 18 players as the squad of the tournament. Player of the Season Votes were cast by coaches of the 48 teams in the group stage, together with 55 journalists selected by the European Sports Media (ESM) group, representing each of UEFA's member associations. The coaches were not allowed to vote for players from their own teams. Jury members selected their top three players, with the first receiving five points, the second three and the third one. The shortlist of the top three players was announced on 8 August 2019. The award winner was announced during the 2019–20 UEFA Europa League group stage draw in Monaco on 30 August 2019. See also 2018–19 UEFA Champions League 2019 UEFA Super Cup References External links 2 2018-19
Thông Nông is a township of Hà Quảng District, Cao Bằng Province. The township was the district capital of former Thông Nông District. References Populated places in Cao Bằng province Townships in Vietnam
The 2014 Aircel Chennai Open was a 2014 ATP World Tour tennis tournament, played on outdoor hard courts. It was the 19th edition of the only ATP tournament taking place in India and took place at the SDAT Tennis Stadium in Chennai, India, from 30 December 2013 to 5 January 2014. Points and prize money Point distribution Prize money * per team Singles main-draw entrants Seeds 1 Rankings as of 23 December 2013 Other entrants The following players received wildcards into the singles main draw: Yuki Bhambri Kyle Edmund Jeevan Nedunchezhiyan The following players received entry from the qualifying draw: Radu Albot Alexander Kudryavtsev Henri Laaksonen Ramkumar Ramanathan Withdrawals Before the tournament Janko Tipsarević (achillar tendon injury) → replaced by Somdev Devvarman Jürgen Zopp (back injury) → replaced by Aleksandr Nedovyesov During the tournament Lu Yen-hsun (right thigh strain) Retirements Fabio Fognini (left leg strain) Alexander Kudryavtsev (right groin injury) Vasek Pospisil (lower back strain) Julian Reister (sickness) Mikhail Youzhny (sickness) ATP doubles main-draw entrants Seeds 1 Rankings as of 23 December 2013 Other entrants The following pairs received wildcards into the doubles main draw: Sriram Balaji / Ramkumar Ramanathan Karen Khachanov / Saketh Myneni Withdrawals During the tournament Fabio Fognini (left leg strain) Retirements Yen-hsun Lu (right thigh strain) Finals Singles Stanislas Wawrinka defeated Édouard Roger-Vasselin, 7–5, 6–2 Doubles Johan Brunström / Frederik Nielsen defeated Marin Draganja / Mate Pavić, 6–2, 4–6, [10–7] References External links 2014 2014 ATP World Tour 2014 in Indian tennis December 2013 sports events in India January 2014 sports events in India
Henry Wills Rischbieth (26 January 1870, Glenelg, South Australia – 27 March 1925, London, England) was a prominent Australian grazier and wool merchant, described as "one of Western Australia's best known and enterprising businessmen." He was the husband of Bessie Rischbieth, a South Australian feminist, social activist, and campaigner for women's rights. Early life and education Rischbieth was born in Glenelg in the colony of South Australia to Charles Rischbieth, a Hanover-born merchant and business leader, and Elizabeth Susan Wills. He studied at Prince Alfred College. A noted athlete in his youth, Rischbieth played Australian Rules Football for Norwood. While in England, he also played rugby, representing the North of England in a match against Scotland. Career Rischbieth learned the wool business during an extended visit to Bradford, England. After returning to Australia, he moved to Western Australia in 1899, settled in Peppermint Grove, and built Henry Wills & Co., a large grazing and wool business. Rischbieth died in 1925 in London, worth approximately 300,000 pounds. He had been ill for some time and had sought medical treatment in Melbourne, Philadelphia, USA, and finally England. Family Rischbieth married Bessie Mabel Earle at the Wesleyan Church in Kent Town on 22 October 1898, who became a prominent social reformer and advocate for women's rights. The couple did not have children. His father was businessman and colonist Charles Rischbieth. His cousin Oswald Rishbeth was a pioneer of academic geography in Britain. References Australian businesspeople Norwood Football Club players 1870 births 1925 deaths Australian rules footballers from South Australia
```html <nav class="navbar has-shadow"> <div class="container"> <div class="navbar-tabs"> <a class="navbar-item is-tab {% if page.doc-subtab == 'breadcrumb' %}is-active{% endif %}" href="{{ site.url }}/documentation/components/breadcrumb/"> Breadcrumb </a> <a class="navbar-item is-tab {% if page.doc-subtab == 'card' %}is-active{% endif %}" href="{{ site.url }}/documentation/components/card/"> Card </a> <a class="navbar-item is-tab {% if page.doc-subtab == 'dropdown' %}is-active{% endif %}" href="{{ site.url }}/documentation/components/dropdown/"> Dropdown </a> <a class="navbar-item is-tab {% if page.doc-subtab == 'menu' %}is-active{% endif %}" href="{{ site.url }}/documentation/components/menu/"> Menu </a> <a class="navbar-item is-tab {% if page.doc-subtab == 'message' %}is-active{% endif %}" href="{{ site.url }}/documentation/components/message/"> Message </a> <a class="navbar-item is-tab {% if page.doc-subtab == 'modal' %}is-active{% endif %}" href="{{ site.url }}/documentation/components/modal/"> Modal </a> <a class="navbar-item is-tab {% if page.doc-subtab == 'navbar' %}is-active{% endif %}" href="{{ site.url }}/documentation/components/navbar/"> Navbar </a> <a class="navbar-item is-tab {% if page.doc-subtab == 'pagination' %}is-active{% endif %}" href="{{ site.url }}/documentation/components/pagination/"> Pagination </a> <a class="navbar-item is-tab {% if page.doc-subtab == 'panel' %}is-active{% endif %}" href="{{ site.url }}/documentation/components/panel/"> Panel </a> <a class="navbar-item is-tab {% if page.doc-subtab == 'tabs' %}is-active{% endif %}" href="{{ site.url }}/documentation/components/tabs/"> Tabs </a> </div> </div> </nav> ```
Paddlefish (family Polyodontidae) are a family of ray-finned fish belonging to order Acipenseriformes, and one of two living groups of the order alongside sturgeons (Acipenseridae). They are distinguished from other fish by their elongated rostra, which are thought to enhance electroreception to detect prey. Paddlefish have been referred to as "primitive fish" because the Acipenseriformes are among the earliest diverging lineages of ray-finned fish, having diverged from all other living groups over 300 million years ago. Paddlefish are almost exclusively North American and Chinese, both extant and in the fossil record. Eight species are known - six extinct species known only from fossil remains (five from North America, one from China), one extant species, the American paddlefish (Polyodon spathula), which is native to the Mississippi River basin in the U.S., and the Chinese paddlefish (Psephurus gladius), declared extinct in 2022 following a 2019 recommendation that it be declared extinct. The species was last sighted in 2003 in the Yangtze River Basin in China. Chinese paddlefish are also commonly referred to as "Chinese swordfish", or "elephant fish". The earliest known species is Protopsephurus from the Early Cretaceous (Aptian) of China, dating to around 120 million years ago. Paddlefish populations have declined dramatically throughout their historic range as a result of overfishing, pollution, and the encroachment of human development, including the construction of dams that have blocked their seasonal upward migration to ancestral spawning grounds. Other detrimental effects include alterations of rivers which have changed natural flows resulting in the loss of spawning habitat and nursery areas. Morphology Paddlefish as a group are one of the few organisms that retain a notochord past the embryonic stage. Paddlefish have very few bones and their bodies mostly consist of cartilage with the notochord functioning as a soft spine. During the initial stages of development from embryo to fry, paddlefish have no rostrum (snout). It begins to form shortly after hatching. The rostrum of the Chinese paddlefish was narrow and sword-like whereas the rostrum of the American paddlefish is broad and paddle-like. Some common morphological characteristics of paddlefish include a spindle-shaped, smooth-skinned scaleless body, heterocercal tail, and small poorly developed eyes. Unlike the filter-feeding American paddlefish, Chinese paddlefish were piscivores, and highly predatory. Their jaws were more forward pointing which suggested they foraged primarily on small fishes in the water column, and occasionally on shrimp, benthic fishes, and crabs. The jaws of the American paddlefish are distinctly adapted for filter feeding only. They are ram suspension filter feeders with a diet that consists primarily of zooplankton, and occasionally small insects, insect larvae, and small fish. The largest Chinese paddlefish on record measured in length, and was estimated to weigh a few thousand pounds. They commonly reached and . Although the American paddlefish is one of the largest freshwater fishes in North America, their recorded lengths and weights fall short in comparison to the larger Chinese paddlefish. American paddlefish commonly reach or more in length and can weigh more than . The largest American paddlefish on record was caught in 1916 in Okoboji Lake, Iowa. The fish was taken with a spear, and measured long and in the girth. A report published by J. R. Harlan and E. B. Speaker in Iowa Fish and Fishing (1969) said the fish weighed over . The world record paddlefish caught on rod and reel weighed and was long. The fish was caught by Clinton Boldridge in a 5-acre pond in Atchison County, Kansas on May 5, 2004. However, the record would be broken an additional two times in 2020. On June 28, 2020, an Oklahoma man caught a 146-pounder in Keystone Lake, west of Tulsa. Later on July 23, 2020, the record was broken again when another Oklahoma man caught a 151-pound, nearly 6-foot long Paddlefish in the same lake. Scientists once believed paddlefish used their rostrums to excavate bottom substrate, but have since determined with the aid of electron microscopy that paddlefish rostrums are covered in electroreceptors called ampullae. These ampullae are densely packed within star-shaped bone projections that branch out from the rostrum. The electroreceptors can detect weak electrical fields which not only signal the presence of prey items in the water column, such as zooplankton which is the primary diet of the American paddlefish, but they can also detect the individual feeding and swimming movements of zooplankton's appendages. Paddlefish have poorly developed eyes, and rely on their electroreceptors for foraging. However, the rostrum is not the paddlefish's sole means of food detection. Some reports incorrectly suggest that a damaged rostrum would render paddlefish less capable of foraging efficiently to maintain good health. Laboratory experiments, and field research indicate otherwise. In addition to electroreceptors on the rostrum, paddlefish also have sensory pores covering nearly half of the skin surface extending from the rostrum to the top of the head down to the tips of the operculum (gill flaps). Therefore, paddlefish with damaged or abbreviated rostrums are still able to forage and maintain good health. Habitat and historic range Over the past half century, paddlefish populations have been on the decline. Attributable causes are overfishing, pollution, and the encroachment of human development, including the construction of dams which block their seasonal upward migration to ancestral spawning grounds. Other detrimental effects include alterations of rivers which have changed the natural flow, and resulted in the loss of spawning habitat and nursery areas. American paddlefish have been extirpated from much of their Northern peripheral range, including the Great Lakes and Canada, New York, Maryland and Pennsylvania. There is growing concern about their populations in other states. The Chinese paddlefish was considered anadromous with upstream migration, however little is known about their migration habits and population structure. They were endemic to the Yangtze River Basin in China where they lived primarily in the broad surfaced main stem rivers and shoal zones along the East China Sea. Research suggests they preferred to navigate the middle and lower layers of the water column, and occasionally swam into large lakes. There have been no sightings of Chinese paddlefish since 2003, and were declared extinct in 2019. Past attempts of artificial propagation for restoration purposes failed because of difficulties encountered in keeping captive fish alive. American paddlefish are native to the Mississippi River basin from New York to Montana and south to the Gulf of Mexico. They have been found in several Gulf Slope drainages in medium to large rivers with long, deep sluggish pools, as well as in backwater lakes and bayous. In Texas, paddlefish occurred historically in the Angelina River, Big Cypress Bayou, Neches River, Red River tributaries, Sabine River, San Jacinto River, Sulphur River, and Trinity River. Their historical range also included occurrences in Canada in Lake Huron and Lake Helen, and in 26–27 states in the United States. The Ontario Ministry of Natural Resources listed the paddlefish as extirpated from Ontario, Canada under their Endangered Species Act. The IUCN Red List lists the Canadian populations of paddlefish as extirpated, noting there have been no Canadian records since the early 1900s and distribution in Canada was highly peripheral. As a species, the American paddlefish is classified as vulnerable (VU) on the IUCN Red List, and its international trade has been restricted since June 1992 under Appendix II of the Convention of International Trade in Endangered Species of Wild Flora and Fauna, or CITES. Life cycle Paddlefish are long-lived, and sexually late maturing. Females do not begin spawning until they are six to twelve years old, some even as late as sixteen to eighteen years old. Males begin spawning around age four to seven, some as late as nine or ten years of age. Paddlefish spawn in late spring provided the proper combination of events occur, including water flow, temperature, photoperiod, and availability of gravel substrates suitable for spawning. If all the conditions are not met, paddlefish will not spawn. Research suggests females do not spawn every year, rather they spawn every second or third year while males spawn more frequently, typically every year or every other year. Paddlefish migrate upstream to spawn, and prefer silt-free gravel bars that would otherwise be exposed to air, or covered by very shallow water were it not for the rises in the river from snow melt and annual spring rains that cause flooding. They are broadcast spawners, also referred to as mass spawners or synchronous spawners. Gravid females release their eggs into the water over bare rocks or gravel at the same time males release their sperm. Fertilization occurs externally. The eggs are adhesive and stick to the rocky substrate. The young are swept downstream after hatching and grow to adulthood in deep freshwater pools. Propagation and culture The advancements in biotechnology in paddlefish propagation and rearing of captive stock indicate significant improvements in reproduction success, adaptation and survival rates of paddlefish cultured for broodstock development and stock rehabilitation. Such improvements have led to successful practices in reservoir ranching and pond rearing, creating an increasing interest in the global market for paddlefish polyculture. In a cooperative scientific effort in the early 1970s between the US Fish & Wildlife Service and its former USSR counterpart, American paddlefish were imported into the former USSR for aquaculture, beginning with five-thousand hatched larvae from Missouri hatcheries in the United States. They were introduced into several rivers in Europe and Asia, and provided the first broodstock that were successfully reproduced in 1984–1986 in Russia. Paddlefish are now being raised in Germany, Austria, the Czech Republic, and the Plovdiv and Vidin regions in Bulgaria. Reproduction was successful in 1988 and 1989, and resulted in the exportation of juvenile paddlefish to Romania and Hungary. In May 2006, specimens of different sizes and weights were caught by professional fisherman near Prahovo in the Serbian part of the Danube River. In 1988, fertilized paddlefish eggs and larvae from Missouri hatcheries were first introduced into China. Since that time, China imports approximately 4.5 million fertilized eggs and larvae every year from hatcheries in Russia, and the United States. Some of the paddlefish are polycultured in carp ponds, and sold to restaurants while others are cultured for brood stock and caviar production. China has also exported paddlefish to Cuba, where they are farmed for caviar production. Classification There is one currently extant genus in this family, one recently extinct and five extinct genera known exclusively from fossils. Classification after Grande and Bemis (1991), with Parapsephurus and Pugiopsephurus added after Hilton et al. (2023): Genus †Protopsephurus Lu, 1994 (Early Cretaceous, China) Species †Protopsephurus liui Lu, 1994 Genus †Pugiopsephurus Hilton et al., 2023 (Late Cretaceous, North America) (Incertae sedis) Species †Pugiopsephurus inundatus Hilton et al., 2023 Clade Polyodonti Genus †Paleopsephurus MacAlpin, 1947 (Late Cretaceous, North America) Species †Paleopsephurus wilsoni MacAlpin, 1947 Genus †Parapsephurus Hilton et al., 2023 (Late Cretaceous, North America) Species †Parapsephurus willybemisi Hilton et al., 2023 Subfamily Polyodontinae Genus †Psephurus Günther, 1873 †Psephurus gladius E. von Martens, 1862 Chinese paddlefish (extinct c. 2003) Tribe Polyodontini Genus †Crossopholis Cope, 1883 (Paleogene, North America) Species †Crossopholis magnicaudatus Cope, 1883 Genus Polyodon Lacépède, 1797 (Paleocene-Recent, North America) Polyodon spathula Walbaum, 1792 American paddlefish † Grande & Bemis, 1991 Relationships of the genera, after Grande et al. (2002). References External links One hour PBS documentary The Chinese Paddlefish Website – containing many photographs of Psepherus. images and movies of the paddlefish (Polyodon spathula) ARKive FishBase entry for Polyodontidae USGS UMESC Paddlefish Study Fisheries.org Paddlefish Fisheries Management Stochastic synchronization of electroreceptors in the paddlefish Polyodontidae Acipenseriformes Freshwater fish of North America Taxa named by Charles Lucien Bonaparte Extant Barremian first appearances
Bobo (died 1189 or 1190) was a cardinal of the Roman Catholic Church. He was a native of Rome, and a member of the Bobone family, later called the Orsini. Life Bobo was created a cardinal by Pope Lucius III in 1182, probably in the Advent Ember days, and assigned the deaconry of Sant'Angelo in Pescheria. He signed a papal document for the first time on 3 January 1183. In 1184, Cardinal Bobo was sent, along with Cardinal Soffredus, to France to attempt to arrange a peace between Henry II of England and Philip II of France. He was also apparently in England, according to a papal document of Pope Clement III of 12 February 1189, as papal legate, when he cooperated with King Henry II and Archbishop Baldwin of Canterbury in the restoration of the priory of Canterbury to the archbishop. Cardinal Bobo did not participate in the papal election that took place in Verona on 25 November 1185, the day after Pope Lucius' death. He was still in northwestern Europe. He subscribed documents for Pope Urban III in Verona on 19 April, 22 April, 8 May, 17 June, 26 June, 14 July, 26 July, 9 August, 11 August, 30 August, 20 September, 30 November, 10 December 1186; 7 January, 12 January 1187. His latest known subscription for Urban III is at Verona on 5 February 1187. Urban III continued the hostilities with the emperor, offering no concessions, and finally arriving at the decision to excommunicate him. He was deterred only by the urgent pleas of the people of Verona. Urban and the cardinals who were besieged with him were able to escape from Verona in the last weeks of September 1187, taking refuge in Ferrara. Urban died there on 20 October 1187. On the following day thirteen cardinals who had been present in Ferrara began the proceedings to elect his successor. It is not known whether Cardinal Bobo was present. The cardinals were aware that the papal chancellor, Albert di Morra, was in great favor with the Emperor Frederick Barbarossa, because he was a member of the imperial party in the curia, and because he reported to the emperor all the confidential activities of the Roman curia. On 21 October 1187 he was unanimously elected pope and took the name Gregory VIII. Cardinal Bobo did not subscribe any documents at all for Pope Gregory VIII during his brief reign of one month and twenty-seven days. This might be an accident of the survival of documents, or perhaps a policy disagreement between the two. The cardinals unanimously elected Cardinal Paolo Scolari, bishop of Palestrina, on 19 December 1187, the Saturday after the Feast of S. Barbara. He took the name Clement III. Immediate arrangements were begun for a return to Rome. Without delay Pope Clement sent his legates to the Roman people, in order to formulate a firm peace between him and them. On 26 January 1188, Pope Clement was in Siena, and by 11 February 1188 he returned to Rome and was resident at the Lateran. Cardinal Bobo, still deacon of S. Angelo in Pescheria, began subscribing for Pope Clement III at the Lateran in Rome on 11 March 1188. Pope Clement promoted Cardinal Bobo cardinal priest of the titulus of Sant' Anastasia in 1188. Gaetano Moroni states that the pope also made Bobo his vicar of the city of Rome. Ciaconius states that the consistory for the promotion of cardinals took place in 1188 on 12 March. Bobo's earliest known subscription as a cardinal priest is apparently dated 28 March 1188. There are two papal bulls, however, each dated 5 April 1188, which contain the signature of Bobo, sancti Angeli diaconus cardinalis. Bobo, therefore, was promoted after 5 April 1188. He appears as cardinal priest of S. Anastasia in a bull signed at the Lateran on 6 May 1188. He also subscribed on 17 May, 29 May, 2 June, 21 June, 22 June, 14 October, 28 October, 4 November, 22 November, 29 November, 15 December 1188; 16 March, 20 April 1189. He was promoted Bishop of Porto in spring 1189. He first subscribes as cardinal bishop on 18 May 1189. He also signed on 28 June 1189. His latest known signature was on 12 September 1189. The earliest known subscription of his successor, Petrus Gallocia, is dated 20 August 1190. References Sources 12th-century Italian cardinals Cardinal-deacons Cardinal-priests Clergy from Rome 1190 deaths Year of birth unknown
```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.runners.dataflow.worker; import static org.junit.Assert.assertFalse; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.HashSet; /** Static helpers for testing Windmill state. */ public class WindmillStateTestUtils { /** * Assert that no field (including compiler-generated fields) within {@code obj} point back to a * non-null instance of (a subclass of) {@code clazz}. */ public static void assertNoReference(Object obj, Class<?> clazz) throws Exception { assertNoReference(obj, clazz, new ArrayList<String>(), new HashSet<Object>()); } public static void assertNoReference( Object obj, Class<?> clazz, ArrayList<String> path, HashSet<Object> visited) throws Exception { if (obj == null || visited.contains(obj)) { return; } Class<?> thisClazz = obj.getClass(); assertFalse( "Found invalid path " + path + " back to " + clazz.getName(), clazz.isAssignableFrom(thisClazz)); visited.add(obj); if (obj instanceof Object[]) { Object[] arr = (Object[]) obj; for (int i = 0; i < arr.length; i++) { try { path.add(thisClazz.getName() + "[" + i + "]"); assertNoReference(arr[i], clazz, path, visited); } finally { path.remove(path.size() - 1); } } } else { Class<?> currClazz = thisClazz; while (currClazz != null) { for (Field f : currClazz.getDeclaredFields()) { if (Modifier.isStatic(f.getModifiers())) { continue; } boolean accessible = f.isAccessible(); try { path.add(thisClazz.getName() + "#" + f.getName()); f.setAccessible(true); assertNoReference(f.get(obj), clazz, path, visited); } finally { path.remove(path.size() - 1); f.setAccessible(accessible); } } currClazz = currClazz.getSuperclass(); } } } } ```
The La Venta River is a river of Chiapas state in southern Mexico. It is a tributary of the Grijalva River. The La Venta River runs through a canyon 84 km in length, with limestone canyon walls soaring up to 500 meters above the river. The porous limestone has eroded into karst landscape, with sinkholes, fissures, dolines and caverns. These include the cavern called the Arch of Time (El Arco del Tiempo), which opens directly onto the river. The La Venta canyon is within the Selva El Ocote Biosphere Reserve. See also List of rivers of Mexico References The Prentice Hall American World Atlas, 1984. Rand McNally, The New International Atlas, 1993. Rivers of Chiapas Grijalva River World Heritage Tentative List for Mexico
```shell `master` and `origin` aren't special Merging under the hood Get the most out of **Git** GitHub General **GitHub** workflow ```
```c++ /** * Authors: * - Paul Asmuth <paul@eventql.io> * * This program is free software: you can redistribute it and/or modify it under * or any later version. * * In accordance with Section 7(e) of the license, the licensing of the Program * under the license does not imply a trademark license. Therefore any rights, * title and interest in our trademarks remain entirely with us. * * 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 license for more details. * * You can be released from the requirements of the license by purchasing a * commercial license. Buying such a license is mandatory as soon as you develop * commercial activities involving this program without disclosing the source * code of your own applications */ #include "axisdefinition.h" #include "domain.h" namespace util { namespace chart { AxisDefinition::AxisDefinition( kPosition axis_position) : AxisDefinition(axis_position, nullptr) {} AxisDefinition::AxisDefinition( kPosition axis_position, DomainProvider* domain) : position_(axis_position), domain_(domain), has_ticks_(false), has_labels_(false) {} void AxisDefinition::addTick(double tick_position) { has_ticks_ = true; ticks_.push_back(tick_position); } const std::vector<double> AxisDefinition::getTicks() const { if (has_ticks_ || domain_ == nullptr) { return ticks_; } return domain_->getTicks(); } void AxisDefinition::addLabel( double label_position, const std::string& label_text) { has_labels_ = true; labels_.emplace_back(label_position, label_text); } void AxisDefinition::removeLabels() { labels_.clear(); } const std::vector<std::pair<double, std::string>> AxisDefinition::getLabels() const { if (has_labels_ || domain_ == nullptr) { return labels_; } return domain_->getLabels(); } bool AxisDefinition::hasLabels() const { return has_labels_ || domain_ != nullptr; } AxisDefinition::kPosition AxisDefinition::getPosition() const { return position_; } void AxisDefinition::setLabelPosition(kLabelPosition pos) { printf("set label pos: %i", pos); } AxisDefinition::kLabelPosition AxisDefinition::getLabelPosition() const { return LABELS_INSIDE; } void AxisDefinition::setLabelRotation(double deg) { printf("axis label rot: %f\n", deg); } double AxisDefinition::getLabelRotation() const { return 0.0f; } void AxisDefinition::setTitle(const std::string& title) { title_ = title; } const std::string& AxisDefinition::getTitle() { return title_; } bool AxisDefinition::hasTitle() const { return title_.length() > 0; } void AxisDefinition::setDomain(DomainProvider* domain) { domain_ = domain; } } } ```
Weissensee () is a municipality in the district of Spittal an der Drau in Carinthia, Austria. Geography The lakeside resort is situated on the shore of the Weissensee within the Gailtal Alps mountain range. It can be reached via the Weissensee Road (B 87) leading from Greifenburg in the Drava Valley across the Kreuzberg Saddle to Gitschtal and Hermagor in the Gail Valley. The municipal area comprises the cadastral community of Techendorf. History In the centre of the town is a bridge across the lake, first mentioned in a 1348 deed. It was replaced by a reinforced concrete construction in 1967. The Catholic church in the village of Gatschach was first documented in 1485. Nevertheless, Weissensee is one of the few municipalities in Austria with a Protestant majority (73.6% as of 2001). Not until the 1781 Patent of Toleration issued by the Habsburg emperor Joseph II could they confess themselves and be allowed to worship in a Bethaus (i.e. "pray house" – explicitly not a church). The present-day Neo-Gothic church in Techendorf was erected from 1900 to 1903. The commune of Techendorf was established in 1850; the name was changed in 1968 for tourist reasons. Summer tourism around the lake is the main component of the local economy. Since 1989, an Alternative Elfstedentocht is organized there by the SWS (Stichting Winter Sporten) on the natural ice rink in winter. In 1986, the ice chase scenes for James Bond movie The Living Daylights were shot in the town and vicinity. Politics Seats in the municipal assembly (Gemeinderat) as of 2009 elections: Austrian People's Party (ÖVP): 6 Freedom Party of Austria (FPÖ): 3 Social Democratic Party of Austria (SPÖ): 2 References External links Municipal site Cities and towns in Spittal an der Drau District Gailtal Alps
```java package com.baronzhang.android.weather.data.db.entities; import com.j256.ormlite.field.DatabaseField; import com.j256.ormlite.table.DatabaseTable; /** * @author baronzhang (baron[dot]zhanglei[at]gmail[dot]com) * 16/6/21 */ @DatabaseTable(tableName = "HotCity") public class HotCity { public static final String ID_FIELD_NAME = "_id"; public static final String CITY_NAME_FIELD_NAME = "name"; public static final String CITY_ID_FIELD_NAME = "posID"; @DatabaseField(columnName = ID_FIELD_NAME, generatedId = true) private int id; @DatabaseField(columnName = CITY_ID_FIELD_NAME) private int cityId; @DatabaseField(columnName = CITY_NAME_FIELD_NAME) private String cityName; public int getCityId() { return cityId; } public void setCityId(int cityId) { this.cityId = cityId; } public String getCityName() { return cityName; } public void setCityName(String cityName) { this.cityName = cityName; } } ```
```java Difference between JRE and JDK? Uses of the `final` keyword Inheriting a constructor from a superclass Supply `toString()` in all classes Implementing an `interface` ```
```powershell . ..\utils\make-exercise-repo.ps1 Set-Content -Value "Ben\nTom\nSally" -Path names.txt git add names.txt git commit -m "Commit A: Added the names file" Set-Content -Value "This is a lovely sentence" -Path sentence.txt git add sentence.txt git commit -m "Commit B: Added the sentence file" git branch feature Set-Content -Value "This is another delicous sentence" -Path other_sentence.txt git add other_sentence.txt git commit -m "Commit C: Added the additional other_sentence file" Set-Content -Value "Cat\nDog\nMouse" -Path animals.txt git add animals.txt git commit -m "Commit D: Added the animals file" git checkout feature Set-Content -Value "1\n2\n6\n54" -Path numbers.txt git add numbers.txt git commit -m "Commit E: Added the numbers file" Set-Content -Value "Craig\nJodie\nNathan" -Path names.txt git add names.txt git commit -m "Commit F: Updated and added more names to the file" Set-Content -Value "Finally I think this is probably the last sentence to add" -Path sentence.txt git add sentence.txt git commit -m "Commit G: Updated the original sentence file" Set-Content -Value "Boring extra file for no reason" -Path boring.txt git add boring.txt git commit -m "Commit H: Added the boring file" git checkout master ```
William James Almon (14 August 1755 – 5 February 1817) was a doctor and loyalist who left New York City for Nova Scotia during the American Revolution (1776). He is reported to have attended to the wounded at the Battle of Bunker Hill. He later served at the capture of New York City. He was the surgeon mate of the 4th battalion, Royal Artillery, which served in the Battle of Monmouth. In 1780, he returned to Halifax. He became the surgeon general of the Nova Scotia militia. His last year of practice he joined his son Dr. William Bruce Almon. Along with Duncan Clark and John Halliburton, Almon served as physician to Edward Augustus and were part of the royal social circle in Halifax. In 1810, Almon had his portrait painted by Robert Field. In 1816, Almon went to England to address health issues and died there. He was buried under Church of St James, Southstoke, Bath. His wife of 31 years Rebecca Byles returned to Nova Scotia. Legacy Namesake of Almon Street, Halifax, Nova Scotia References History of Nova Scotia 1755 births 1817 deaths
Dr. George Sutton Medical Office Building is a historic medical office building located at Aurora, Dearborn County, Indiana. It was built about 1870, and is a small two-story, Second Empire style brick building. It sits on a limestone block foundation and has a mansard roof. It was added to the National Register of Historic Places in 1994. It is located in the Downtown Aurora Historic District. References External links Commercial buildings on the National Register of Historic Places in Indiana Second Empire architecture in Indiana Commercial buildings completed in 1870 Buildings and structures in Dearborn County, Indiana National Register of Historic Places in Dearborn County, Indiana Individually listed contributing properties to historic districts on the National Register in Indiana
is a Japanese company based in Kyoto. The company is mainly involved in the production of beverages, food, printing and medical supplies. Divisions Takara Bio Clontech Laboratories was acquired from BD Biosciences in 2005. In 2007, Clontech was involved in litigation with Invitrogen over patents for RNase H minus reverse transcriptase. Subsidiaries of Takara Bio Inc. include Takara Bio USA (formerly Clontech Laboratories), a Mountain View, California-based manufacturer of kits, reagents, instruments, and services for biological research, as well as regional subsidiaries in Europe, Korea, China, and India. The main offices of Takara Bio USA moved to San Jose in August 2021. Takara Shuzo Takara Shuzo Co. produces sake, other beverages, and seasonings. This division comprises the original business; the holding company including it was formed in 2001. Takara Shuzo also owns the Tomatin distillery of Highland single malt scotch whisky. Takara Shuzo Co. is the largest distiller of traditional shochu liquor in Japan. References Multinational companies headquartered in Japan Manufacturing companies based in Kyoto Drink companies of Japan Biotechnology companies of Japan Holding companies established in 1925 Japanese companies established in 1925 Sake breweries Japanese brands Conglomerate companies established in 1925 Companies listed on the Tokyo Stock Exchange
The Danish Agency for Culture and Palaces () is an agency under the aegis of the Danish Ministry of Culture. The agency carries out the cultural policies of the Danish government within the visual and performing arts, music, literature, museums, historical and cultural heritage, broadcasting, libraries and all types of printed and electronic media. It works internationally in all fields, and increased internationalisation of Danish arts and cultural life is a top priority. The Danish Agency for Culture was founded on 1 January 2002 when the Danish Heritage Agency, the Danish Arts Agency and the Danish Agency for Libraries and Media merged. The Danish Agency for Culture and Palaces was founded on 1 January 2016 by a fusion of the Danish Agency for Culture and the Danish agency Styrelsen for Slotte & Kulturejendomme. Responsibilities Sites and monuments Ancient sites and monuments include burial mounds, rock carvings, runic stones, road tracks, military fortifications, castles, ruins, etc. Underwater sites, including shipwrecks more than a hundred years old, are also covered. Construction sites often reveal ancient settlements and burial finds. Many towns have cultural layers from Medieval times to the present. All sites and monuments are protected from destruction under the Danish Museum Act which is administered by the Heritage Agency. The Heritage Agency does not own any sites and monuments itself, though it manages the restoration of selected megalithic tombs and Medieval ruins. To the extent that the State owns listed buildings, they are owned and administrated by the Palaces and Properties Agency. Listed buildings There are more than 9,000 listed buildings in Denmark while another 300,000 have been deemed "worthy of preservation". The Heritage Agency is responsible for listed buildings, while the local authorities are responsible for buildings worthy of preservation. Most listed and preserved buildings are privately owned. Status as listed is not restricted to very old or very grand buildings. Eligibility extends to everything from castles and mansions to town halls, prisons, farmhouses, factories, warehouses and filling stations. Museums The State owns approximately 10 museums (some of which have departments spread out over many locations), and approximately 120 are approved to receive State subsidies. The Heritage Agency does not run any museums itself, but provides funding and supervises all State-subsidised museums and most of the State-owned museums. These museums are subject to the Danish Museum Act and must comply with a number of its requirements in order to receive funding. A State-subsidised museum can be an independent institution or it can be owned by one or more local authorities or by an association designed to run it. A private museum cannot be approved for State subsidies. Registers National Register of Sites and Monuments The National Register of Sites and Monuments (Danish: Kulturhistorisk Centralregister) is a register of all known sites, monuments and archaeological finds. It holds information on more than 165,000 sites, of which some 7,000 are shipwrecks and submarine Stone Age settlements. In 1873, the National Museum of Denmark embarked on a project to map all burial mounds, megalithic tombs, runic stones and other archaeological sites in Denmark. This mapping is the basis of the current digital register. Under the Danish Museum Act, museums have an obligation to report new finds and activities to the Heritage Agency. This increases the register considerably every year. The register can be accessed here: "Sites and Monuments". It is in Danish only. Danish Museums' Collections Registers Museums owned or subsidised by the State must report their collections to two national registers maintained by the Heritage Agency. Both registers are accessible online and hold information on the cultural heritage museums' collections of objects and materials, and the works held by art museums. Danish Cultural Heritage Register Established in 2004, the register of the cultural heritage museums' collections holds information on approximately two million objects. The register provides a national overview that makes it easier for the museums to coordinate and prioritise their investigations and collections. Danish Art Register The central register of works of art in Danish museums and collections was established in 1985 and went online in 1996. The register holds information on approximately 100,000 works by Danish and international artists. In addition, it provides access to a digital edition of Weilbach's Dictionary of Danish artists and international artists who have worked in Denmark. Link to the Art in Danish Museums database here (partly in English). References External links Official website Sites and Monuments Register (Danish only) Listed buildings in Denmark Danish Cultural Heritage Register (Danish only) Danish Art Register Government agencies of Denmark Architecture in Denmark Culture of Denmark 2002 establishments in Denmark Danish art Denmark
Raffaele Soprani (1612-1672) was an Italian aristocrat known mainly as an art historian for his volume of biographies of Genoese artists, published posthumously in 1674. Biography He was born to a senatorial family in Genoa, and himself served twice as a Senator. Educated in the humanities, he also dabbled in painting, studying under Giulio Benso and Pellegro Piola. He confessed being attracted to the styles of Sinibaldo Scorza and Goffredo Waals. His friendship with Benso, and the popularity of Vasari's biographies, led Soprani to collect the information about Ligurian painters, sculptors, and architects. His first synthesis was complete by about 1657, but he continued to revise the manuscript. A second volume was added by Carlo Giuseppe Ratti. He also published books on the writers of Liguria and select biographies. Bibliography Delle vite de' Pittori, scultori ed Architetti Genovesi Li Scrittori della Liguria, e particolarmente della maritima (1667) Vita della Venerabile Suor Tomasa Fiesca Trattato delle Antiche medaglie Vite della Veneatile Donna Anna Soprani References 1612 births 1674 deaths Nobility from Genoa 17th-century Italian writers Writers from Genoa Italian art historians
Râu Alb is a commune in Dâmbovița County, Muntenia, Romania, with 1500 inhabitants. It is composed of two villages, Râu Alb de Jos (the commune center) and Râu Alb de Sus. These were part of Bărbulețu Commune until 2004, when they were split off. Râu Alb is about 7 km away from the town of Pucioasa, and about 40 km from Târgoviște, the county seat. The commune has its own hospital, church and police station. References Communes in Dâmbovița County Localities in Muntenia
Dzhalil may refer to: 3082 Dzhalil, a main-belt asteroid Dzhalil (urban-type settlement), an urban locality in Sarmanovsky District, Republic of Tatarstan, Russia An alternate name for Cəlilli, Tovuz District, Azerbaijan See also Jalil (disambiguation) Djalil (disambiguation)
There were 34 shooting events at the 2010 South American Games. Competitions were held over March 20–26. Medal summary Medal table Men Women References Shooting South American Games 2010 South American Games Shooting competitions in Colombia
```shell # $OpenBSD: keygen-sshfp.sh,v 1.3 2023/02/10 05:06:03 djm Exp $ # Placed in the Public Domain. tid="keygen-sshfp" trace "keygen fingerprints" fp=`${SSHKEYGEN} -r test -f ${SRC}/ed25519_openssh.pub | \ awk '$5=="1"{print $6}'` if [ "$fp" != "8a8647a7567e202ce317e62606c799c53d4c121f" ]; then fail "keygen fingerprint sha1" fi fp=`${SSHKEYGEN} -r test -f ${SRC}/ed25519_openssh.pub | \ awk '$5=="2"{print $6}'` if [ "$fp" != \ your_sha256_hash ]; then fail "keygen fingerprint sha256" fi # Expect two lines of output without an explicit algorithm fp=`${SSHKEYGEN} -r test -f ${SRC}/ed25519_openssh.pub | wc -l` if [ $(($fp + 0)) -ne 2 ] ; then fail "incorrect number of SSHFP records $fp (expected 2)" fi # Test explicit algorithm selection exp="test IN SSHFP 4 1 8a8647a7567e202ce317e62606c799c53d4c121f" fp=`${SSHKEYGEN} -Ohashalg=sha1 -r test -f ${SRC}/ed25519_openssh.pub` if [ "x$exp" != "x$fp" ] ; then fail "incorrect SHA1 SSHFP output" fi exp="test IN SSHFP 4 2 your_sha256_hash fp=`${SSHKEYGEN} -Ohashalg=sha256 -r test -f ${SRC}/ed25519_openssh.pub` if [ "x$exp" != "x$fp" ] ; then fail "incorrect SHA256 SSHFP output" fi if ${SSH} -Q key-plain | grep ssh-rsa >/dev/null; then fp=`${SSHKEYGEN} -r test -f ${SRC}/rsa_openssh.pub | awk '$5=="1"{print $6}'` if [ "$fp" != "99c79cc09f5f81069cc017cdf9552cfc94b3b929" ]; then fail "keygen fingerprint sha1" fi fp=`${SSHKEYGEN} -r test -f ${SRC}/rsa_openssh.pub | awk '$5=="2"{print $6}'` if [ "$fp" != \ your_sha256_hash ]; then fail "keygen fingerprint sha256" fi fi ```
```javascript import React from 'react' import { shallow } from 'enzyme' import Caption from '.' const wrap = (props = {}) => shallow(<Caption {...props} />) it('renders children when passed in', () => { const wrapper = wrap({ children: 'test' }) expect(wrapper.contains('test')).toBe(true) }) it('renders props when passed in', () => { const wrapper = wrap({ id: 'foo' }) expect(wrapper.find({ id: 'foo' })).toHaveLength(1) }) ```
```makefile ################################################################################ # # mender # ################################################################################ MENDER_VERSION = 3.4.0 MENDER_SITE = $(call github,mendersoftware,mender,$(MENDER_VERSION)) MENDER_LICENSE = Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC, MIT, OLDAP-2.8 # Vendor license paths generated with: # awk '{print $2}' LIC_FILES_CHKSUM.sha256 | grep vendor MENDER_LICENSE_FILES = \ LICENSE \ LIC_FILES_CHKSUM.sha256 \ vendor/github.com/mendersoftware/mender-artifact/LICENSE \ vendor/github.com/mendersoftware/openssl/LICENSE \ vendor/github.com/minio/sha256-simd/LICENSE \ vendor/github.com/mendersoftware/progressbar/LICENSE \ vendor/github.com/pkg/errors/LICENSE \ vendor/github.com/godbus/dbus/LICENSE \ vendor/github.com/gorilla/websocket/LICENSE \ vendor/github.com/klauspost/compress/LICENSE \ vendor/github.com/pmezard/go-difflib/LICENSE \ vendor/golang.org/x/sys/LICENSE \ vendor/github.com/bmatsuo/lmdb-go/LICENSE.md \ vendor/github.com/remyoudompheng/go-liblzma/LICENSE \ vendor/golang.org/x/term/LICENSE \ vendor/github.com/davecgh/go-spew/LICENSE \ vendor/github.com/klauspost/pgzip/LICENSE \ vendor/github.com/klauspost/cpuid/v2/LICENSE \ vendor/github.com/sirupsen/logrus/LICENSE \ vendor/github.com/stretchr/testify/LICENSE \ vendor/github.com/ungerik/go-sysfs/LICENSE \ vendor/github.com/urfave/cli/v2/LICENSE \ vendor/github.com/stretchr/objx/LICENSE \ vendor/gopkg.in/yaml.v3/LICENSE \ vendor/github.com/mattn/go-isatty/LICENSE \ vendor/github.com/bmatsuo/lmdb-go/LICENSE.mdb.md MENDER_DEPENDENCIES = host-pkgconf openssl MENDER_LDFLAGS = -X github.com/mendersoftware/mender/conf.Version=$(MENDER_VERSION) MENDER_UPDATE_MODULES_FILES = \ directory \ script \ single-file \ $(if $(BR2_PACKAGE_DOCKER_CLI),docker) \ $(if $(BR2_PACKAGE_RPM),rpm) define MENDER_INSTALL_CONFIG_FILES $(INSTALL) -d -m 755 $(TARGET_DIR)/etc/mender/scripts echo -n "3" > $(TARGET_DIR)/etc/mender/scripts/version $(INSTALL) -D -m 0644 $(MENDER_PKGDIR)/mender.conf \ $(TARGET_DIR)/etc/mender/mender.conf $(INSTALL) -D -m 0644 $(MENDER_PKGDIR)/server.crt \ $(TARGET_DIR)/etc/mender/server.crt $(INSTALL) -D -m 0755 $(@D)/support/mender-device-identity \ $(TARGET_DIR)/usr/share/mender/identity/mender-device-identity $(foreach f,bootloader-integration hostinfo network os rootfs-type, \ $(INSTALL) -D -m 0755 $(@D)/support/mender-inventory-$(f) \ $(TARGET_DIR)/usr/share/mender/inventory/mender-inventory-$(f) ) $(INSTALL) -D -m 0755 $(MENDER_PKGDIR)/artifact_info \ $(TARGET_DIR)/etc/mender/artifact_info $(INSTALL) -D -m 0755 $(MENDER_PKGDIR)/device_type \ $(TARGET_DIR)/etc/mender/device_type mkdir -p $(TARGET_DIR)/var/lib ln -snf /var/run/mender $(TARGET_DIR)/var/lib/mender $(foreach f,$(MENDER_UPDATE_MODULES_FILES), \ $(INSTALL) -D -m 0755 $(@D)/support/modules/$(notdir $(f)) \ $(TARGET_DIR)/usr/share/mender/modules/v3/$(notdir $(f)) ) endef MENDER_POST_INSTALL_TARGET_HOOKS += MENDER_INSTALL_CONFIG_FILES ifeq ($(BR2_PACKAGE_XZ),y) MENDER_DEPENDENCIES += xz else MENDER_TAGS += nolzma endif ifeq ($(BR2_PACKAGE_DBUS)$(BR2_PACKAGE_LIBGLIB2),yy) MENDER_DEPENDENCIES += libglib2 define MENDER_INSTALL_DBUS_AUTHENTICATION_MANAGER_CONF $(INSTALL) -D -m 0755 $(@D)/support/dbus/io.mender.AuthenticationManager.conf \ $(TARGET_DIR)/etc/dbus-1/system.d/io.mender.AuthenticationManager.conf $(INSTALL) -D -m 0755 $(@D)/support/dbus/io.mender.UpdateManager.conf \ $(TARGET_DIR)/etc/dbus-1/system.d/io.mender.UpdateManager.conf endef MENDER_POST_INSTALL_TARGET_HOOKS += MENDER_INSTALL_DBUS_AUTHENTICATION_MANAGER_CONF else MENDER_TAGS += nodbus endif define MENDER_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 0644 $(MENDER_PKGDIR)/mender-client.service \ $(TARGET_DIR)/usr/lib/systemd/system/mender-client.service endef define MENDER_INSTALL_INIT_SYSV $(INSTALL) -D -m 755 $(MENDER_PKGDIR)/S42mender \ $(TARGET_DIR)/etc/init.d/S42mender endef $(eval $(golang-package)) ```
Hancock County–Bar Harbor Airport is a county-owned, public-use airport located in Trenton, Maine, eight nautical miles (9 mi, 15 km) northwest of the central business district of Bar Harbor, a city in Hancock County, Maine, United States. It serves the residents of Hancock County with commercial and charter aviation services. During the summer months, the airport becomes one of Maine's busiest, with significant private jet operations bringing visitors to the numerous summer colonies in the county, which includes Mount Desert Island. Scheduled passenger airline service is subsidized by the Essential Air Service program. As per Federal Aviation Administration records, the airport had 10,562 passenger boardings (enplanements) in calendar year 2008, 10,100 enplanements in 2009, and 11,109 in 2010. It is included in the Federal Aviation Administration (FAA) National Plan of Integrated Airport Systems for 2017–2021, in which it is categorized as a non-primary commercial service facility. History The airport operated as Bar Harbor Naval Auxiliary Air Facility (NAAF) supporting operations of Naval Air Station Brunswick from September 1, 1943 until November 15, 1945. In July 2010, sitting United States president Barack Obama landed at the airport, in a smaller version of Air Force One, for a vacation with his family. Facilities and aircraft Hancock County–Bar Harbor Airport covers an area of 468 acres (189 ha) at an elevation of 83 feet (25 m) above mean sea level. It has two asphalt paved runways: 4/22 is 5,200 by 100 feet (1,585 x 30 m) and 17/35 is 3,253 by 75 feet (992 x 23 m). The airport is uncontrolled. For the 12-month period ending September 30, 2016, the airport had 21,250 aircraft operations, an average of 58 per day: 84% general aviation, 8% scheduled commercial, 7% air taxi, and <1% military. In September 2017, there were 33 aircraft based at this airport: 32 single-engine and 1 glider. Airlines and destinations Cape Air operates Cessna 402 twin prop aircraft with code sharing agreements with American Airlines, JetBlue Airways and United Airlines. Previously, the airport was additionally served by Silver Airways Saab 340 and PenAir during the summer months. StTop destinationsr shares Top destinations See also List of airports in Maine References Other sources Essential Air Service documents (Docket OST-2011-0185) from the U.S. Department of Transportation: Order 2011-11-26 (November 22, 2011): prohibiting Colgan Air, Inc., operating as US Airways Express, from terminating its subsidized service at Bar Harbor and Presque Isle/Houlton, Maine (Presque Isle), and Plattsburgh, New York, and requesting proposals from airlines interested in providing replacement essential air service (EAS) at any or all of the communities, with or without subsidy. Order 2012-3-2 (March 2, 2012): making Essential Air Service (EAS) air carrier selections at Bar Harbor and Presque Isle, Maine, and Plattsburgh, New York. At Bar Harbor, Hyannis Air Service Inc., operating as Cape Air, and Peninsula Airways, Inc. (PenAir) will jointly provide EAS for a four-year term beginning when either carrier begins providing full EAS. PenAir will operate only the peak summer months from Memorial Day through Labor Day, and will operate two daily nonstop round trips to Boston using 34-seat Saab 340 aircraft subsidy free. Cape Air will operate on a year-round basis, providing one daily round trip (seven a week) from Memorial Day through Labor Day, and three daily round trips (21 a week) from September through May using 9-seat Cessna 402 aircraft for an annual subsidy rate of $1,631,223. External links Hancock County-Bar Harbor Airport, official site Aerial image from USGS The National Map Airports in Maine Essential Air Service Bar Harbor, Maine Transportation buildings and structures in Hancock County, Maine
Zachary Wyatt (born October 7, 1984) is an American politician from the state of Missouri. A Republican, Wyatt was a one-term member of the Missouri House of Representatives from the 2nd District, encompassing Adair county, Putnam county, and a part of Sullivan county. In May 2012, Representative Wyatt became, at that time, the nation's only openly gay Republican legislator. He "came out" during a press conference in the Missouri Capitol, while opposing the "Don't Say Gay" bill. Due to Missouri House redistricting following the 2010 U.S. Census the 2nd district was divided into two newly numbered districts. Representative Wyatt had originally filed to run for the 3rd district, which includes most of his former 2nd district territory. However, in early April 2012 he announced his intention to withdraw once a suitable Republican replacement could be named. Wyatt stated his withdrawal was prompted by his acceptance into a marine biology program at the University of Hawaii, and his desire to take full advantage of his veterans education benefits. In the November general election Republican Nate Walker defeated Democrat Rebecca McClanahan, Wyatt's opponent in 2010, to win the 3rd district seat and succeed Wyatt. Personal life Zachary Wyatt was born October 7, 1984, in Kirksville, Missouri to parents Randall "Randy" Wyatt and Frances "Fran" Wyatt (née Quint). He has one sibling, older brother Nicholas Wyatt, a U.S. Navy veteran. Raised in rural western Adair county, Wyatt graduated from Adair County R-1 High School in Novinger, Missouri in 2003. Following graduation he enlisted in the United States Air Force, serving until March 2010. While in the USAF, Wyatt earned an Associate of Arts degree in information technology from the Community College of the Air Force, as well as an Associate of Arts degree in Russian language and a Chechen translating certificate from the Defense Language Institute. While in the Air Force Wyatt also served as an airborne Russian/Chechen/Ukrainian linguist on RC-135 and C-130 aircraft monitoring communications. Political life Zachary Wyatt developed an interest in politics as a teen, an interest that was further enhanced when he had the opportunity to serve as a legislative intern for Missouri United States Senator Christopher "Kit" Bond in 2007. According to Wyatt: "It was at this time I first realized my call in life was to serve Missouri through politics." Despite not having run for or held public office before, Wyatt declared his candidacy for Missouri's 2nd District State Representative. In an election upset, Wyatt defeated two-term incumbent Representative Rebecca McClanahan by a margin of 60.6% to 39.4% In addition to the state legislature, Wyatt was also elected president of Novinger Renewal in 2010. Novinger Renewal is a community betterment group working for the historic preservation and revitalization of Novinger, Missouri. Legislative Assignments Representative Wyatt serves on the Veterans, International Trade and Job Creation, Special Standing Committee on Renewable Energy, and Agri-Business committees. Wyatt also serves as vice-chair of the Rural Communities Development Committee. Summer 2011, Representative Wyatt was appointed to the Joint Committee on Urban Agriculture. He also will serve on the Missouri Arts Trust Board. 2011 Legislative Session Representative Wyatt sponsored 14 pieces of legislation in the session. The bills dealt with economic development, veterans, education, and lower taxes. Three of the bills were signed into law. 2012 Legislative session Among the bills introduced during the session by Representative Wyatt were legislation to establish renewable energy in Missouri state parks, changes allowing more freedom in living arrangements for the developmentally disabled, and a constitutional amendment altering the state's judicial commission. Wyatt vs. Judge Steele One key piece of legislation was HR 333 sponsored by Representative Wyatt. The resolution called for the impeachment of Missouri Circuit Judge Russel E. Steele, the first such action in Missouri since 1968. The impeachment is based on allegations of possible judicial misconduct, willful neglect of duties as a jurist, and official corruption. The resolution received bipartisan support, being co-sponsored by Representatives Andrew Koenig (R), Paul Curtman (R), and Sylvester Taylor (D). In response to HR 333, Steele issued a press release stating "I trust that the media and the people will see this effort for what it truly is, politics at its worst" and that the Missouri Commission on the Retirement, Removal, and Discipline of Judges, as well as an Adair County grand jury, had already investigated the charges in 2006. The resolution was forwarded to the House Judiciary Committee but no further action was taken. "Don't Say Gay" bill In April and May 2012 Representative Wyatt expressed deep opposition to Missouri House Bill 2051, commonly known as the "Don't Say Gay" bill. The bill would put strict limits on the discussion of sexual orientation in Missouri schools, limiting it only to classes on health and sexual reproduction. The bill gained nationwide attention from various news outlets and The Colbert Report. On May 2, 2012, Wyatt held a press conference at the Missouri State Capitol outlining his opposition. During the course of the event he read a statement announcing that he was gay. The revelation meant that Wyatt is the only currently-serving gay Republican legislator in the United States, something addressed in a May 3, 2012 interview on the MSNBC program The Last Word with Lawrence O'Donnell. Asked by O'Donnell why he was a Republican, considering the party's stance on LGBT issues Wyatt replied "I'm not a one-issue person" and that he is a firm believer in a balanced budget and small government. Electoral history References Republican Party members of the Missouri House of Representatives People from Kirksville, Missouri 1984 births Living people United States Air Force airmen Community College of the Air Force alumni Defense Language Institute alumni LGBT Roman Catholics LGBT state legislators in Missouri Gay politicians American LGBT military personnel
```m4sugar # memset.m4 serial 4 dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_MEMSET], [ AC_CHECK_FUNCS([memset]) ]) # Prerequisites of lib/memset.c. AC_DEFUN([gl_PREREQ_MEMSET], [ : ]) ```
The World Igbo Summit Group is an umbrella body that brings all the Igbo people and it relevant bodies like Indigenous People of Biafra, Ohanaeze Ndigbo, World Igbo Congress, Igbo Leadership Development Foundation and including present/past political office holders, Royal kings, professionals, businessmen, Civil society activists, gender advocates and other experts of Igbo extraction residing in different parts of the world together to Foster the growth and unity of the five state comprises Imo State, Anambra state, Enugu state, Ebonyi state, and Abia State. The group was formed in 2006 with Ifedi Okwenna as the Director general and strategic meetings are held yearly to bring all igbo heads within and outside the country together so as to foster unity and to project their 50-year visioning plan for 2066. Conflict In 2018 the Indigenous People of Biafra threatened for the summit not to be held insisting that the group would not accept anything other than a referendum for the rebirth of the Republic of Biafra. The World Igbo Summit Group has called for an end to all contention and conflict in Ohanaeze Ndigbo and request all aggrieved parties to come together in the larger interest of Igbo people. Vision Plan In 2016, World Igbo Summit Group adopted the resolutions for the immediate implementation of the 50-year visioning plan. The group took the decision at a post-summit meeting of the group held at the Gregory University, Uturu in Abia State. The resolution articulates short term, mid-term and long-term strategic plans to “comprehensively tackle the development of Igboland” and promote the well-being of the people. It also strives to persuade Igbo entrepreneurs and investors in Nigeria and Diaspora to think-home and invest in Igboland. References Igbo society Cultural organizations based in Nigeria Igbo people International nongovernmental organizations International sustainability organizations Organizations established in 2006
The New Zealand Touring Car Championship was a motor racing title which was contested in New Zealand from 1984 to 2002. Results See also NZ Touring Cars championship References Touring car racing series Auto racing series in New Zealand