content
stringlengths
7
2.61M
/** * @brief write specified image data with specified length to flash * @param image_id image_id to identify FW. * @param offset offset of the image. * @param length length of data. * @param p_void pointer to data. * @return 0 if write FW image successfully, error line number otherwise */ uint32_t dfu_update(uint16_t image_id, uint32_t offset, uint32_t length, uint32_t *p_void) { uint32_t result = 0; uint32_t dfu_base_addr = 0; uint32_t start_addr = 0; bool erase_rst = true; DFU_PRINT_INFO2("==>dfu_update: offset=0x%x, length=%d", offset, length); if (length % 4) { result = __LINE__; goto L_Return; } if (p_void == 0) { result = __LINE__; goto L_Return; } if (IMAGE_USER_DATA != image_id) { #ifdef SUPPORT_ALONE_UPPERSTACK_IMG dfu_base_addr = get_temp_ota_bank_addr_by_img_id_app((T_IMG_ID)image_id); #else dfu_base_addr = get_temp_ota_bank_addr_by_img_id((T_IMG_ID)image_id); #endif } else { dfu_base_addr = flash_get_bank_addr(FLASH_BKP_DATA1); } if (dfu_base_addr == 0) { result = __LINE__; goto L_Return; } if (!check_dfu_update_image_length(image_id, offset, length, p_void, &result)) { goto L_Return; } if (offset == 0) { T_IMG_CTRL_HEADER_FORMAT *p_header = (T_IMG_CTRL_HEADER_FORMAT *) p_void; p_header->ctrl_flag.flag_value.not_ready = 0x1; #if (SUPPORT_PUBLIC_DECODE_OTA == 1) if (IMAGE_COMPRESSED == p_header->ctrl_flag.flag_value.image_type) { p_header->ctrl_flag.flag_value.compressed_not_ready = 0x1; } #endif if (IMAGE_USER_DATA == image_id) { img_total_len = p_header->payload_len + IMG_HEADER_SIZE; if (0 == (dfu_base_addr & (FMC_BLK_SECTION_LEN - 1))) { total_block_cnt = img_total_len / FMC_BLK_SECTION_LEN; DFU_PRINT_TRACE2("<==dfu_update: img_total_len=0x%x, total_block_cnt=%d", img_total_len, total_block_cnt); } else { DBG_DIRECT("Error User data start addr not aligned 64K!"); result = __LINE__; goto L_Return; } if (0 != (img_total_len & (FMC_BLK_SECTION_LEN - 1))) { if (length > FMC_SEC_SECTION_LEN) { DBG_DIRECT("Error DFU_TEMP_BUFFER_SIZE > 4KB"); result = __LINE__; goto L_Return; } } } DFU_PRINT_TRACE3("<==dfu_update: New Image Header=0x%x, image_id=0x%x, dfu_base_addr=0x%x", length, image_id, dfu_base_addr); } start_addr = dfu_base_addr + offset; unlock_flash_bp_all(); if (IMAGE_USER_DATA == image_id) { if (block_cnt < total_block_cnt) { if (0 == (offset & (FMC_BLK_SECTION_LEN - 1))) { erase_rst = flash_erase_block(start_addr); block_cnt ++; } else { if (((offset % FMC_BLK_SECTION_LEN) + length > FMC_BLK_SECTION_LEN) && (length <= FMC_BLK_SECTION_LEN)) { erase_rst = flash_erase_block((start_addr + length) & ~(FMC_BLK_SECTION_LEN - 1)); block_cnt ++; } } } else { if (0 != (img_total_len & (FMC_BLK_SECTION_LEN - 1))) { if (0 == (offset & (FMC_SEC_SECTION_LEN - 1))) { erase_rst = flash_erase_sector(start_addr); } else { if (((offset % FMC_SEC_SECTION_LEN) + length > FMC_SEC_SECTION_LEN) && (length <= FMC_SEC_SECTION_LEN)) { erase_rst = flash_erase_sector((start_addr + length) & ~(FMC_SEC_SECTION_LEN - 1)); } } } } } else { if (0 == (offset & (FMC_SEC_SECTION_LEN - 1))) { erase_rst = flash_erase_sector(start_addr); } else { if (((offset % FMC_SEC_SECTION_LEN) + length > FMC_SEC_SECTION_LEN) && (length <= FMC_SEC_SECTION_LEN)) { erase_rst = flash_erase_sector((start_addr + length) & ~(FMC_SEC_SECTION_LEN - 1)); } } } if (!erase_rst) { result = __LINE__; goto L_Return; } result = dfu_write(start_addr, length, (uint8_t *)p_void); lock_flash_bp(); L_Return: DFU_PRINT_INFO1("<==dfu_update: result=%d", result); return result; }
<gh_stars>0 package com.mypurecloud.sdk.v2.model; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; import com.mypurecloud.sdk.v2.model.Call; import com.mypurecloud.sdk.v2.model.Callback; import com.mypurecloud.sdk.v2.model.Cobrowsesession; import com.mypurecloud.sdk.v2.model.ConversationChat; import com.mypurecloud.sdk.v2.model.Email; import com.mypurecloud.sdk.v2.model.Evaluation; import com.mypurecloud.sdk.v2.model.Message; import com.mypurecloud.sdk.v2.model.Screenshare; import com.mypurecloud.sdk.v2.model.SocialExpression; import com.mypurecloud.sdk.v2.model.Video; import com.mypurecloud.sdk.v2.model.Wrapup; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import java.io.Serializable; /** * Participant */ public class Participant implements Serializable { private String id = null; private Date startTime = null; private Date endTime = null; private Date connectedTime = null; private String name = null; private String userUri = null; private String userId = null; private String externalContactId = null; private String externalOrganizationId = null; private String queueId = null; private String groupId = null; private String queueName = null; private String purpose = null; private String participantType = null; private String consultParticipantId = null; private String address = null; private String ani = null; private String aniName = null; private String dnis = null; private String locale = null; private Boolean wrapupRequired = null; /** * This field controls how the UI prompts the agent for a wrapup. */ public enum WrapupPromptEnum { OUTDATEDSDKVERSION("OutdatedSdkVersion"), MANDATORY("mandatory"), OPTIONAL("optional"), TIMEOUT("timeout"), FORCEDTIMEOUT("forcedTimeout"); private String value; WrapupPromptEnum(String value) { this.value = value; } @JsonCreator public static WrapupPromptEnum fromString(String key) { if (key == null) return null; for (WrapupPromptEnum value : WrapupPromptEnum.values()) { if (key.equalsIgnoreCase(value.toString())) { return value; } } return WrapupPromptEnum.values()[0]; } @Override @JsonValue public String toString() { return String.valueOf(value); } } private WrapupPromptEnum wrapupPrompt = null; private Integer wrapupTimeoutMs = null; private Boolean wrapupSkipped = null; private Wrapup wrapup = null; private Integer alertingTimeoutMs = null; private String monitoredParticipantId = null; private Map<String, String> attributes = null; private List<Call> calls = new ArrayList<Call>(); private List<Callback> callbacks = new ArrayList<Callback>(); private List<ConversationChat> chats = new ArrayList<ConversationChat>(); private List<Cobrowsesession> cobrowsesessions = new ArrayList<Cobrowsesession>(); private List<Email> emails = new ArrayList<Email>(); private List<Message> messages = new ArrayList<Message>(); private List<Screenshare> screenshares = new ArrayList<Screenshare>(); private List<SocialExpression> socialExpressions = new ArrayList<SocialExpression>(); private List<Video> videos = new ArrayList<Video>(); private List<Evaluation> evaluations = new ArrayList<Evaluation>(); /** * The current screen recording state for this participant. */ public enum ScreenRecordingStateEnum { OUTDATEDSDKVERSION("OutdatedSdkVersion"), REQUESTED("requested"), ACTIVE("active"), PAUSED("paused"), STOPPED("stopped"), ERROR("error"), TIMEOUT("timeout"); private String value; ScreenRecordingStateEnum(String value) { this.value = value; } @JsonCreator public static ScreenRecordingStateEnum fromString(String key) { if (key == null) return null; for (ScreenRecordingStateEnum value : ScreenRecordingStateEnum.values()) { if (key.equalsIgnoreCase(value.toString())) { return value; } } return ScreenRecordingStateEnum.values()[0]; } @Override @JsonValue public String toString() { return String.valueOf(value); } } private ScreenRecordingStateEnum screenRecordingState = null; /** * The reason specifying why participant flagged the conversation. */ public enum FlaggedReasonEnum { OUTDATEDSDKVERSION("OutdatedSdkVersion"), GENERAL("general"); private String value; FlaggedReasonEnum(String value) { this.value = value; } @JsonCreator public static FlaggedReasonEnum fromString(String key) { if (key == null) return null; for (FlaggedReasonEnum value : FlaggedReasonEnum.values()) { if (key.equalsIgnoreCase(value.toString())) { return value; } } return FlaggedReasonEnum.values()[0]; } @Override @JsonValue public String toString() { return String.valueOf(value); } } private FlaggedReasonEnum flaggedReason = null; /** * A globally unique identifier for this conversation. **/ public Participant id(String id) { this.id = id; return this; } @ApiModelProperty(example = "null", value = "A globally unique identifier for this conversation.") @JsonProperty("id") public String getId() { return id; } public void setId(String id) { this.id = id; } /** * The timestamp when this participant joined the conversation in the provider clock. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ **/ public Participant startTime(Date startTime) { this.startTime = startTime; return this; } @ApiModelProperty(example = "null", value = "The timestamp when this participant joined the conversation in the provider clock. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ") @JsonProperty("startTime") public Date getStartTime() { return startTime; } public void setStartTime(Date startTime) { this.startTime = startTime; } /** * The timestamp when this participant disconnected from the conversation in the provider clock. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ **/ public Participant endTime(Date endTime) { this.endTime = endTime; return this; } @ApiModelProperty(example = "null", value = "The timestamp when this participant disconnected from the conversation in the provider clock. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ") @JsonProperty("endTime") public Date getEndTime() { return endTime; } public void setEndTime(Date endTime) { this.endTime = endTime; } /** * The timestamp when this participant was connected to the conversation in the provider clock. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ **/ public Participant connectedTime(Date connectedTime) { this.connectedTime = connectedTime; return this; } @ApiModelProperty(example = "null", value = "The timestamp when this participant was connected to the conversation in the provider clock. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ") @JsonProperty("connectedTime") public Date getConnectedTime() { return connectedTime; } public void setConnectedTime(Date connectedTime) { this.connectedTime = connectedTime; } /** * A human readable name identifying the participant. **/ public Participant name(String name) { this.name = name; return this; } @ApiModelProperty(example = "null", value = "A human readable name identifying the participant.") @JsonProperty("name") public String getName() { return name; } public void setName(String name) { this.name = name; } /** * If this participant represents a user, then this will be an URI that can be used to fetch the user. **/ public Participant userUri(String userUri) { this.userUri = userUri; return this; } @ApiModelProperty(example = "null", value = "If this participant represents a user, then this will be an URI that can be used to fetch the user.") @JsonProperty("userUri") public String getUserUri() { return userUri; } public void setUserUri(String userUri) { this.userUri = userUri; } /** * If this participant represents a user, then this will be the globally unique identifier for the user. **/ public Participant userId(String userId) { this.userId = userId; return this; } @ApiModelProperty(example = "null", value = "If this participant represents a user, then this will be the globally unique identifier for the user.") @JsonProperty("userId") public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } /** * If this participant represents an external contact, then this will be the globally unique identifier for the external contact. **/ public Participant externalContactId(String externalContactId) { this.externalContactId = externalContactId; return this; } @ApiModelProperty(example = "null", value = "If this participant represents an external contact, then this will be the globally unique identifier for the external contact.") @JsonProperty("externalContactId") public String getExternalContactId() { return externalContactId; } public void setExternalContactId(String externalContactId) { this.externalContactId = externalContactId; } /** * If this participant represents an external org, then this will be the globally unique identifier for the external org. **/ public Participant externalOrganizationId(String externalOrganizationId) { this.externalOrganizationId = externalOrganizationId; return this; } @ApiModelProperty(example = "null", value = "If this participant represents an external org, then this will be the globally unique identifier for the external org.") @JsonProperty("externalOrganizationId") public String getExternalOrganizationId() { return externalOrganizationId; } public void setExternalOrganizationId(String externalOrganizationId) { this.externalOrganizationId = externalOrganizationId; } /** * If present, the queue id that the communication channel came in on. **/ public Participant queueId(String queueId) { this.queueId = queueId; return this; } @ApiModelProperty(example = "null", value = "If present, the queue id that the communication channel came in on.") @JsonProperty("queueId") public String getQueueId() { return queueId; } public void setQueueId(String queueId) { this.queueId = queueId; } /** * If present, group of users the participant represents. **/ public Participant groupId(String groupId) { this.groupId = groupId; return this; } @ApiModelProperty(example = "null", value = "If present, group of users the participant represents.") @JsonProperty("groupId") public String getGroupId() { return groupId; } public void setGroupId(String groupId) { this.groupId = groupId; } /** * If present, the queue name that the communication channel came in on. **/ public Participant queueName(String queueName) { this.queueName = queueName; return this; } @ApiModelProperty(example = "null", value = "If present, the queue name that the communication channel came in on.") @JsonProperty("queueName") public String getQueueName() { return queueName; } public void setQueueName(String queueName) { this.queueName = queueName; } /** * A well known string that specifies the purpose of this participant. **/ public Participant purpose(String purpose) { this.purpose = purpose; return this; } @ApiModelProperty(example = "null", value = "A well known string that specifies the purpose of this participant.") @JsonProperty("purpose") public String getPurpose() { return purpose; } public void setPurpose(String purpose) { this.purpose = purpose; } /** * A well known string that specifies the type of this participant. **/ public Participant participantType(String participantType) { this.participantType = participantType; return this; } @ApiModelProperty(example = "null", value = "A well known string that specifies the type of this participant.") @JsonProperty("participantType") public String getParticipantType() { return participantType; } public void setParticipantType(String participantType) { this.participantType = participantType; } /** * If this participant is part of a consult transfer, then this will be the participant id of the participant being transferred. **/ public Participant consultParticipantId(String consultParticipantId) { this.consultParticipantId = consultParticipantId; return this; } @ApiModelProperty(example = "null", value = "If this participant is part of a consult transfer, then this will be the participant id of the participant being transferred.") @JsonProperty("consultParticipantId") public String getConsultParticipantId() { return consultParticipantId; } public void setConsultParticipantId(String consultParticipantId) { this.consultParticipantId = consultParticipantId; } /** * The address for the this participant. For a phone call this will be the ANI. **/ public Participant address(String address) { this.address = address; return this; } @ApiModelProperty(example = "null", value = "The address for the this participant. For a phone call this will be the ANI.") @JsonProperty("address") public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } /** * The address for the this participant. For a phone call this will be the ANI. **/ public Participant ani(String ani) { this.ani = ani; return this; } @ApiModelProperty(example = "null", value = "The address for the this participant. For a phone call this will be the ANI.") @JsonProperty("ani") public String getAni() { return ani; } public void setAni(String ani) { this.ani = ani; } /** * The ani-based name for this participant. **/ public Participant aniName(String aniName) { this.aniName = aniName; return this; } @ApiModelProperty(example = "null", value = "The ani-based name for this participant.") @JsonProperty("aniName") public String getAniName() { return aniName; } public void setAniName(String aniName) { this.aniName = aniName; } /** * The address for the this participant. For a phone call this will be the ANI. **/ public Participant dnis(String dnis) { this.dnis = dnis; return this; } @ApiModelProperty(example = "null", value = "The address for the this participant. For a phone call this will be the ANI.") @JsonProperty("dnis") public String getDnis() { return dnis; } public void setDnis(String dnis) { this.dnis = dnis; } /** * An ISO 639 language code specifying the locale for this participant **/ public Participant locale(String locale) { this.locale = locale; return this; } @ApiModelProperty(example = "null", value = "An ISO 639 language code specifying the locale for this participant") @JsonProperty("locale") public String getLocale() { return locale; } public void setLocale(String locale) { this.locale = locale; } /** * True iff this participant is required to enter wrapup for this conversation. **/ public Participant wrapupRequired(Boolean wrapupRequired) { this.wrapupRequired = wrapupRequired; return this; } @ApiModelProperty(example = "null", value = "True iff this participant is required to enter wrapup for this conversation.") @JsonProperty("wrapupRequired") public Boolean getWrapupRequired() { return wrapupRequired; } public void setWrapupRequired(Boolean wrapupRequired) { this.wrapupRequired = wrapupRequired; } /** * This field controls how the UI prompts the agent for a wrapup. **/ public Participant wrapupPrompt(WrapupPromptEnum wrapupPrompt) { this.wrapupPrompt = wrapupPrompt; return this; } @ApiModelProperty(example = "null", value = "This field controls how the UI prompts the agent for a wrapup.") @JsonProperty("wrapupPrompt") public WrapupPromptEnum getWrapupPrompt() { return wrapupPrompt; } public void setWrapupPrompt(WrapupPromptEnum wrapupPrompt) { this.wrapupPrompt = wrapupPrompt; } /** * Specifies how long a timed ACW session will last. **/ public Participant wrapupTimeoutMs(Integer wrapupTimeoutMs) { this.wrapupTimeoutMs = wrapupTimeoutMs; return this; } @ApiModelProperty(example = "null", value = "Specifies how long a timed ACW session will last.") @JsonProperty("wrapupTimeoutMs") public Integer getWrapupTimeoutMs() { return wrapupTimeoutMs; } public void setWrapupTimeoutMs(Integer wrapupTimeoutMs) { this.wrapupTimeoutMs = wrapupTimeoutMs; } /** * The UI sets this field when the agent chooses to skip entering a wrapup for this participant. **/ public Participant wrapupSkipped(Boolean wrapupSkipped) { this.wrapupSkipped = wrapupSkipped; return this; } @ApiModelProperty(example = "null", value = "The UI sets this field when the agent chooses to skip entering a wrapup for this participant.") @JsonProperty("wrapupSkipped") public Boolean getWrapupSkipped() { return wrapupSkipped; } public void setWrapupSkipped(Boolean wrapupSkipped) { this.wrapupSkipped = wrapupSkipped; } /** * Call wrap up or disposition data. **/ public Participant wrapup(Wrapup wrapup) { this.wrapup = wrapup; return this; } @ApiModelProperty(example = "null", value = "Call wrap up or disposition data.") @JsonProperty("wrapup") public Wrapup getWrapup() { return wrapup; } public void setWrapup(Wrapup wrapup) { this.wrapup = wrapup; } /** * Specifies how long the agent has to answer an interaction before being marked as not responding. **/ public Participant alertingTimeoutMs(Integer alertingTimeoutMs) { this.alertingTimeoutMs = alertingTimeoutMs; return this; } @ApiModelProperty(example = "null", value = "Specifies how long the agent has to answer an interaction before being marked as not responding.") @JsonProperty("alertingTimeoutMs") public Integer getAlertingTimeoutMs() { return alertingTimeoutMs; } public void setAlertingTimeoutMs(Integer alertingTimeoutMs) { this.alertingTimeoutMs = alertingTimeoutMs; } /** * If this participant is a monitor, then this will be the id of the participant that is being monitored. **/ public Participant monitoredParticipantId(String monitoredParticipantId) { this.monitoredParticipantId = monitoredParticipantId; return this; } @ApiModelProperty(example = "null", value = "If this participant is a monitor, then this will be the id of the participant that is being monitored.") @JsonProperty("monitoredParticipantId") public String getMonitoredParticipantId() { return monitoredParticipantId; } public void setMonitoredParticipantId(String monitoredParticipantId) { this.monitoredParticipantId = monitoredParticipantId; } /** * Additional participant attributes **/ public Participant attributes(Map<String, String> attributes) { this.attributes = attributes; return this; } @ApiModelProperty(example = "null", value = "Additional participant attributes") @JsonProperty("attributes") public Map<String, String> getAttributes() { return attributes; } public void setAttributes(Map<String, String> attributes) { this.attributes = attributes; } /** **/ public Participant calls(List<Call> calls) { this.calls = calls; return this; } @ApiModelProperty(example = "null", value = "") @JsonProperty("calls") public List<Call> getCalls() { return calls; } public void setCalls(List<Call> calls) { this.calls = calls; } /** **/ public Participant callbacks(List<Callback> callbacks) { this.callbacks = callbacks; return this; } @ApiModelProperty(example = "null", value = "") @JsonProperty("callbacks") public List<Callback> getCallbacks() { return callbacks; } public void setCallbacks(List<Callback> callbacks) { this.callbacks = callbacks; } /** **/ public Participant chats(List<ConversationChat> chats) { this.chats = chats; return this; } @ApiModelProperty(example = "null", value = "") @JsonProperty("chats") public List<ConversationChat> getChats() { return chats; } public void setChats(List<ConversationChat> chats) { this.chats = chats; } /** **/ public Participant cobrowsesessions(List<Cobrowsesession> cobrowsesessions) { this.cobrowsesessions = cobrowsesessions; return this; } @ApiModelProperty(example = "null", value = "") @JsonProperty("cobrowsesessions") public List<Cobrowsesession> getCobrowsesessions() { return cobrowsesessions; } public void setCobrowsesessions(List<Cobrowsesession> cobrowsesessions) { this.cobrowsesessions = cobrowsesessions; } /** **/ public Participant emails(List<Email> emails) { this.emails = emails; return this; } @ApiModelProperty(example = "null", value = "") @JsonProperty("emails") public List<Email> getEmails() { return emails; } public void setEmails(List<Email> emails) { this.emails = emails; } /** **/ public Participant messages(List<Message> messages) { this.messages = messages; return this; } @ApiModelProperty(example = "null", value = "") @JsonProperty("messages") public List<Message> getMessages() { return messages; } public void setMessages(List<Message> messages) { this.messages = messages; } /** **/ public Participant screenshares(List<Screenshare> screenshares) { this.screenshares = screenshares; return this; } @ApiModelProperty(example = "null", value = "") @JsonProperty("screenshares") public List<Screenshare> getScreenshares() { return screenshares; } public void setScreenshares(List<Screenshare> screenshares) { this.screenshares = screenshares; } /** **/ public Participant socialExpressions(List<SocialExpression> socialExpressions) { this.socialExpressions = socialExpressions; return this; } @ApiModelProperty(example = "null", value = "") @JsonProperty("socialExpressions") public List<SocialExpression> getSocialExpressions() { return socialExpressions; } public void setSocialExpressions(List<SocialExpression> socialExpressions) { this.socialExpressions = socialExpressions; } /** **/ public Participant videos(List<Video> videos) { this.videos = videos; return this; } @ApiModelProperty(example = "null", value = "") @JsonProperty("videos") public List<Video> getVideos() { return videos; } public void setVideos(List<Video> videos) { this.videos = videos; } /** **/ public Participant evaluations(List<Evaluation> evaluations) { this.evaluations = evaluations; return this; } @ApiModelProperty(example = "null", value = "") @JsonProperty("evaluations") public List<Evaluation> getEvaluations() { return evaluations; } public void setEvaluations(List<Evaluation> evaluations) { this.evaluations = evaluations; } /** * The current screen recording state for this participant. **/ public Participant screenRecordingState(ScreenRecordingStateEnum screenRecordingState) { this.screenRecordingState = screenRecordingState; return this; } @ApiModelProperty(example = "null", value = "The current screen recording state for this participant.") @JsonProperty("screenRecordingState") public ScreenRecordingStateEnum getScreenRecordingState() { return screenRecordingState; } public void setScreenRecordingState(ScreenRecordingStateEnum screenRecordingState) { this.screenRecordingState = screenRecordingState; } /** * The reason specifying why participant flagged the conversation. **/ public Participant flaggedReason(FlaggedReasonEnum flaggedReason) { this.flaggedReason = flaggedReason; return this; } @ApiModelProperty(example = "null", value = "The reason specifying why participant flagged the conversation.") @JsonProperty("flaggedReason") public FlaggedReasonEnum getFlaggedReason() { return flaggedReason; } public void setFlaggedReason(FlaggedReasonEnum flaggedReason) { this.flaggedReason = flaggedReason; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Participant participant = (Participant) o; return Objects.equals(this.id, participant.id) && Objects.equals(this.startTime, participant.startTime) && Objects.equals(this.endTime, participant.endTime) && Objects.equals(this.connectedTime, participant.connectedTime) && Objects.equals(this.name, participant.name) && Objects.equals(this.userUri, participant.userUri) && Objects.equals(this.userId, participant.userId) && Objects.equals(this.externalContactId, participant.externalContactId) && Objects.equals(this.externalOrganizationId, participant.externalOrganizationId) && Objects.equals(this.queueId, participant.queueId) && Objects.equals(this.groupId, participant.groupId) && Objects.equals(this.queueName, participant.queueName) && Objects.equals(this.purpose, participant.purpose) && Objects.equals(this.participantType, participant.participantType) && Objects.equals(this.consultParticipantId, participant.consultParticipantId) && Objects.equals(this.address, participant.address) && Objects.equals(this.ani, participant.ani) && Objects.equals(this.aniName, participant.aniName) && Objects.equals(this.dnis, participant.dnis) && Objects.equals(this.locale, participant.locale) && Objects.equals(this.wrapupRequired, participant.wrapupRequired) && Objects.equals(this.wrapupPrompt, participant.wrapupPrompt) && Objects.equals(this.wrapupTimeoutMs, participant.wrapupTimeoutMs) && Objects.equals(this.wrapupSkipped, participant.wrapupSkipped) && Objects.equals(this.wrapup, participant.wrapup) && Objects.equals(this.alertingTimeoutMs, participant.alertingTimeoutMs) && Objects.equals(this.monitoredParticipantId, participant.monitoredParticipantId) && Objects.equals(this.attributes, participant.attributes) && Objects.equals(this.calls, participant.calls) && Objects.equals(this.callbacks, participant.callbacks) && Objects.equals(this.chats, participant.chats) && Objects.equals(this.cobrowsesessions, participant.cobrowsesessions) && Objects.equals(this.emails, participant.emails) && Objects.equals(this.messages, participant.messages) && Objects.equals(this.screenshares, participant.screenshares) && Objects.equals(this.socialExpressions, participant.socialExpressions) && Objects.equals(this.videos, participant.videos) && Objects.equals(this.evaluations, participant.evaluations) && Objects.equals(this.screenRecordingState, participant.screenRecordingState) && Objects.equals(this.flaggedReason, participant.flaggedReason); } @Override public int hashCode() { return Objects.hash(id, startTime, endTime, connectedTime, name, userUri, userId, externalContactId, externalOrganizationId, queueId, groupId, queueName, purpose, participantType, consultParticipantId, address, ani, aniName, dnis, locale, wrapupRequired, wrapupPrompt, wrapupTimeoutMs, wrapupSkipped, wrapup, alertingTimeoutMs, monitoredParticipantId, attributes, calls, callbacks, chats, cobrowsesessions, emails, messages, screenshares, socialExpressions, videos, evaluations, screenRecordingState, flaggedReason); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Participant {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n"); sb.append(" connectedTime: ").append(toIndentedString(connectedTime)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" userUri: ").append(toIndentedString(userUri)).append("\n"); sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); sb.append(" externalContactId: ").append(toIndentedString(externalContactId)).append("\n"); sb.append(" externalOrganizationId: ").append(toIndentedString(externalOrganizationId)).append("\n"); sb.append(" queueId: ").append(toIndentedString(queueId)).append("\n"); sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n"); sb.append(" queueName: ").append(toIndentedString(queueName)).append("\n"); sb.append(" purpose: ").append(toIndentedString(purpose)).append("\n"); sb.append(" participantType: ").append(toIndentedString(participantType)).append("\n"); sb.append(" consultParticipantId: ").append(toIndentedString(consultParticipantId)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" ani: ").append(toIndentedString(ani)).append("\n"); sb.append(" aniName: ").append(toIndentedString(aniName)).append("\n"); sb.append(" dnis: ").append(toIndentedString(dnis)).append("\n"); sb.append(" locale: ").append(toIndentedString(locale)).append("\n"); sb.append(" wrapupRequired: ").append(toIndentedString(wrapupRequired)).append("\n"); sb.append(" wrapupPrompt: ").append(toIndentedString(wrapupPrompt)).append("\n"); sb.append(" wrapupTimeoutMs: ").append(toIndentedString(wrapupTimeoutMs)).append("\n"); sb.append(" wrapupSkipped: ").append(toIndentedString(wrapupSkipped)).append("\n"); sb.append(" wrapup: ").append(toIndentedString(wrapup)).append("\n"); sb.append(" alertingTimeoutMs: ").append(toIndentedString(alertingTimeoutMs)).append("\n"); sb.append(" monitoredParticipantId: ").append(toIndentedString(monitoredParticipantId)).append("\n"); sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); sb.append(" calls: ").append(toIndentedString(calls)).append("\n"); sb.append(" callbacks: ").append(toIndentedString(callbacks)).append("\n"); sb.append(" chats: ").append(toIndentedString(chats)).append("\n"); sb.append(" cobrowsesessions: ").append(toIndentedString(cobrowsesessions)).append("\n"); sb.append(" emails: ").append(toIndentedString(emails)).append("\n"); sb.append(" messages: ").append(toIndentedString(messages)).append("\n"); sb.append(" screenshares: ").append(toIndentedString(screenshares)).append("\n"); sb.append(" socialExpressions: ").append(toIndentedString(socialExpressions)).append("\n"); sb.append(" videos: ").append(toIndentedString(videos)).append("\n"); sb.append(" evaluations: ").append(toIndentedString(evaluations)).append("\n"); sb.append(" screenRecordingState: ").append(toIndentedString(screenRecordingState)).append("\n"); sb.append(" flaggedReason: ").append(toIndentedString(flaggedReason)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
<gh_stars>0 package openblocks.shapes; import net.minecraft.util.StatCollector; import openmods.shapes.*; /** * Enumeracion de los distintos tipos de bloque fantasma * @author OpenBlocks * */ public enum GuideShape { Sphere(false, new ShapeSphereGenerator(), "sphere"), Cylinder(false, new ShapeCylinderGenerator(), "cylinder"), Cuboid(false, new ShapeCuboidGenerator(), "cuboid"), Dome(false, new ShapeDomeGenerator(), "dome"), Triangle(true, new ShapeEquilateral2dGenerator(3), "triangle"), Pentagon(true, new ShapeEquilateral2dGenerator(5), "pentagon"), Hexagon(true, new ShapeEquilateral2dGenerator(6), "hexagon"), Octagon(true, new ShapeEquilateral2dGenerator(8), "octagon"); public final String unlocalizedName; public final boolean fixedRatio; public final IShapeGenerator generator; private GuideShape(boolean fixedRatio, IShapeGenerator generator, String name) { this.unlocalizedName = "openblocks.misc.shape." + name; this.fixedRatio = fixedRatio; this.generator = generator; } public String getLocalizedName() { return StatCollector.translateToLocal(unlocalizedName); } }
Ten Years of Postsocialist Transition: Lessons for Policy Reforms Transition to a market economy is a lengthy process comprised of various spheres of economic activities. The naive belief that a market economy can be introduced by "shock therapy" is wrong, and in several cases, when attempted, has caused more problems than it has solved. Because a market economy requires adequate institutional structures and an appropriate behavior, transition can be executed only in a gradual manner, since these are very gradual processes based upon new organizations, new laws, and the changing behavior of various economic entities. In 1989, influential financial organizations, political bodies, and professional economists seemed to agree upon main points for economic policy reform. This was termed the Washington consensus. Despite the fact that the economic policy of the Washington consensus was initially developed without any concern for post-socialist transformation, it has happened that these ideas have significantly influenced the path of thought and action in Eastern Europe and the former Soviet Union. Because these policies were not intended for the overhaul of post-socialist countries, however, they have failed. A new, post-Washington consensus is developing, as it should, based on the lessons learned from experience thus far. Some major policy conclusions can be drawn: First, institutional arrangements are the most important factor for progress toward durable growth. Second, policy must recognize that institution building by its nature must be a gradual process. Third, policy makers must acknowledge that the size of the government is less important than the quality of its policy and the manner of the changes of government dimension. Fourth, if institutional arrangement is neglected and left to the spontaneous processes and unleashed forces of liberalized markets, then informal institutionalization fills the systemic vacuum. Fifth, in transition economies' policies must transform and streamline the judiciary system to serve the market economy. Sixth, a shift of competence and power from the central government to local governments is necessary for deregulation of the post-socialist economy. Seventh, there is an urgent necessity to accelerate the development of non-government organizations. Eight, during transition income policy and government concern for equitable growth has great meaning. Ninth, short-term capital liberalization must be monitored and controlled by the countries' fiscal and monetary authorities with the support of international financial institutions. Tenth, the Bretton Woods organizations should reconsider their policies toward transition economies aiming at institutional building and support for equitable growth.
/* Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Package controlplane contains functions used at the controlplane controller package controlplane import ( "github.com/23technologies/gardener-extension-provider-hcloud/pkg/hcloud" controllerapis "github.com/23technologies/gardener-extension-provider-hcloud/pkg/hcloud/apis/controller" extensionscontroller "github.com/gardener/gardener/extensions/pkg/controller" "github.com/gardener/gardener/extensions/pkg/controller/controlplane" "github.com/gardener/gardener/extensions/pkg/controller/controlplane/genericactuator" "github.com/gardener/gardener/extensions/pkg/util" "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/manager" ) var ( // DefaultAddOptions are the default AddOptions for AddToManager. DefaultAddOptions = AddOptions{} logger = log.Log.WithName("hcloud-controlplane-controller") ) // AddOptions are options to apply when adding the HCloud controlplane controller to the manager. type AddOptions struct { // Controller are the controller.Options. Controller controller.Options // IgnoreOperationAnnotation specifies whether to ignore the operation annotation or not. IgnoreOperationAnnotation bool // GardenId is the Gardener garden identity GardenId string } // AddToManagerWithOptions adds a controller with the given Options to the given manager. // The opts.Reconciler is being set with a newly instantiated actuator. // // PARAMETERS // mgr manager.Manager Control plane controller manager instance // opts AddOptions Options to add func AddToManagerWithOptions(mgr manager.Manager, opts AddOptions) error { return controlplane.Add(mgr, controlplane.AddArgs{ Actuator: genericactuator.NewActuator( hcloud.Name, controlPlaneSecrets, nil, configChart, controlPlaneChart, controlPlaneShootChart, nil, storageClassChart, nil, NewValuesProvider(logger, opts.GardenId), extensionscontroller.ChartRendererFactoryFunc(util.NewChartRendererForShoot), controllerapis.ImageVector(), hcloud.CloudProviderConfig, nil, mgr.GetWebhookServer().Port, logger, ), ControllerOptions: opts.Controller, Predicates: controlplane.DefaultPredicates(opts.IgnoreOperationAnnotation), Type: hcloud.Type, }) } // AddToManager adds a controller with the default Options. // // PARAMETERS // mgr manager.Manager Control plane controller manager instance func AddToManager(mgr manager.Manager) error { return AddToManagerWithOptions(mgr, DefaultAddOptions) }
Magnitude of the genetic component in juvenile idiopathic arthritis Genetic factors undoubtedly play a part at least in some forms of juvenile idiopathic arthritis (JIA). Yet it is commonly believed that the risk to a sibling of a patient with JIA is not particularly strong as shown by the rarity of reported multicase families.1 Multicase JIA families have been traced systematically at the Rheumatism Foundation Hospital in Heinola, Finland, over a period of 15 years. A total of 41 families with 88 affected siblings (34 boys, 54 girls) were found fulfilling the Durban criteria for JIA.2In 60 (68%) of these 88 patients the disease was pauciarticular
def add_glyph(self, glyph, use_in_combinations=False): if use_in_combinations: self.standalone_glyphs.pop(glyph.name, None) self.glyphs.update({glyph.name: glyph}) else: self.glyphs.pop(glyph.name, None) self.standalone_glyphs.update({glyph.name: glyph}) self._recalculate_glyphs()
import {Component} from '@angular/core'; import {HsLanguageService} from '../../language/language.service'; import {HsLayerDescriptor} from './../layer-descriptor.interface'; import {HsLayerEditorWidgetBaseComponent} from './layer-editor-widget-base.component'; import {HsLayerManagerMetadataService} from './../layermanager-metadata.service'; import {HsLayerManagerService} from '../layermanager.service'; import {HsLayerSelectorService} from '../editor/layer-selector.service'; import {getAbstract, setAbstract} from '../../../common/layer-extensions'; import {getAttribution} from '../../../common/layer-extensions'; @Component({ selector: 'hs-metadata-widget', templateUrl: './metadata-widget.component.html', }) export class HsMetadataWidgetComponent extends HsLayerEditorWidgetBaseComponent { name = 'metadata-widget'; getAttribution = getAttribution; constructor( public HsLanguageService: HsLanguageService, hsLayerSelectorService: HsLayerSelectorService, public metadataService: HsLayerManagerMetadataService, // Used in template public HsLayerManagerService: HsLayerManagerService ) { super(hsLayerSelectorService); } /** * Determines if layer has copyright information available * @param layer - Selected layer (HsLayerManagerService.currentLayer) */ hasCopyright(layer: HsLayerDescriptor): boolean | undefined { if (!this.currentLayer) { return; } else { return getAttribution(layer.layer)?.onlineResource != undefined; } } set abstract(newAbstract: string) { const layer = this.olLayer(); if (layer == undefined) { return; } setAbstract(layer, newAbstract); } get abstract(): string { const layer = this.olLayer(); if (layer == undefined) { return; } return getAbstract(layer); } }
Analysis of a model for hepatitis C virus transmission that includes the effects of vaccination with waning immunity This paper considers a mathematical model based on the transmission dynamics of hepatitis C virus (HCV) infection. In addition to the usual compartments for susceptible, exposed, and infected individuals, this model includes compartments for individuals who are under treatment and those who have had vaccination against HCV infection. It is assumed that the immunity provided by the vaccine fades with time. The basic reproduction number, $R_0$, and the equilibrium solutions of the model are determined. The model exhibits the phenomenon of backward bifurcation where a stable disease-free equilibrium co-exists with a stable endemic equilibrium whenever $R_0$ is less than unity. It is shown that the use of only a perfect vaccine can eliminate backward bifurcation completely. Furthermore, a unique endemic equilibrium of the model is proved to be globally asymptotically stable under certain restrictions on the parameter values. Numerical simulation results are given to support the theoretical predictions. Introduction The liver of a hepatitis patient is one of the most frequently damaged organs in the body, and it is indeed fortunate that it has a very large functional reserve. In the experimental animal, it has been shown that only 10% of the hepatic parenchyma (the functional part of the liver) is required to maintain normal liver function (). The liver can be infected due to a variety of infectious agents such as parasites, viruses, and bacteria, and diseases of the liver have a variety of causes such as obstructive, vascular, metabolic and toxic involvements. Hepatitis C is the inflammation of the liver caused by hepatitis C virus (HCV), and spreads through contact with contaminated blood. Hepatitis C may be an acute infection, which spans over a period of weeks to a few months, or chronic infection, in which the virus persists for a longer time (Di Bisceglie 2000; ). Acute hepatitis is characterized by moderate liver injury and if symptoms appear, they include fatigue, loss of appetite, abdominal pain, fever and jaundice. However, most of the times, acute hepatitis is asymptomatic. A large percentage of patients with HCV infection recover completely, but some develop long term chronic hepatitis or massive necrosis of the liver. Chronic HCV infection may damage the liver permanently, cause cirrhosis, hepatic failure, and sometimes liver cancer. Today, HCV infects an estimated 170 million people worldwide (). Around 150 million people are chronically infected with HCV. HCV infection is a major cause of death of more than 350,000 people every year. Countries with the highest prevalence of chronic liver infection are Egypt (15%), Pakistan (4.8%) and China (3.2%) (Lozano 1990). Although, treatment for this infection does exist, the current drug therapies are ineffective in completely eliminating the virus and patients suffering from chronic illness may require a liver transplant (). Unfortunately, there is no effective vaccine yet developed that may help prevent the spread of the disease. At present, various attempts are being made to create such a vaccine (Chen and Li 2006). Thus, it is crucial to assess the potential impact of HCV vaccine on the population. Some mathematical models on HCV infection have been formulated recently, but much work has not been done, since it is a relatively new disease (discovered in 1989) and data is not available on account of the high variability of the HCV. In contrast, more research has been carried out on hepatitis B virus (HBV) infection. Several epidemiological models have focused on the effects of preventive measures as well as control of HBV infection (Zhang and Zhou 2012). This has helped in creating cost effective disease prevention techniques. The modes of transmission of both HCV and HBV are same, i.e. through blood, thus mathematical models on both infections are somewhat inter related. Some mathematical models were formed on HCV infection that considered infected cells, uninfected cells and viral cells in the human host. The basic aim of these models was to study the effects of liver transplant in patients with HCV infection. But in major cases, HCV infection is not completely eliminated even after the transplant. Thus, these models were extended to include more infected compartments (). Martcheva and Castillo-Chavez introduced an epidemiologic model of HCV infection with chronic infectious stage in a varying population. Their model does not include a recovered or immune class and it falls within the susceptible-infected-susceptible (SIS) category of models. A susceptible-infected-recovered (SIR) model was used by Jager et al. to study the transmission of HCV among injecting drug users, while susceptibleinfected-removed-susceptible (SIRS) type models that allow waning immunity are presented in Zeiler et al.. Also, a deterministic model for HCV transmission is used by Elbasha, with the objective of assessing the impact of therapy on public health. Our aim is to meticulously analyze the model and examine various parameters to explore their effect on the transmission of HCV and its control. The model focuses on studying the effects of imperfect vaccines on the control of hepatitis C. The model shows that an imperfect vaccine reduces the number of individuals who are exposed to HCV, while a perfect vaccine completely removes them. We have subdivided the total population into six mutually-exclusive compartments of susceptible, exposed, acutely infected, chronically infected, treated and vaccinated individuals. Ordinary differential equations are used to model the HCV infection. This model can help provide insights into the spread of HCV infection and the assessment of the effectiveness of immunization techniques. This paper is organized as follows: The mathematical model is developed and analyzed in Section 2. The stability of the disease free equilibrium, and the endemic equilibrium is discussed, along with the effects of vaccination on backward bifurcation phenomenon. Numerical simulations are also provided in the same section. Section 3 summarizes the final results of the paper. Model Formulation The total population at time t, denoted by N (t), is divided into sub-populations of susceptible individuals, S(t), exposed individuals with hepatitis C symptoms, E(t), individuals with acute infection, I(t), individuals undergoing treatment, T (t), individuals with chronic infection, C h (t), and vaccinated individuals, V (t), so that It is assumed that the mode of transmission of HCV infection is horizontal. We further assume that mixing of individual hosts is homogeneous (every person in the population N (t) has an equal chance of getting HCV infection). The following system of ordinary differential equations describes the dynamics of the HCV infection (2.1) The recruitment rate of susceptible humans is. A proportion, b, of these susceptible individuals is vaccinated. The death rate of individuals is denoted by. The rate of progression from acute infected class to both treated and chronic infected class is given by. The acutely infected proportion of individuals who enter the treated class is 1. The remaining infected proportion, (1 − 1 ), progresses to the chronic infectious stage. The rate of progression for treatment from chronic hepatitis is given by 2. The term is the rate of progression from exposed class to acute infected class. The recovery rates due to treatment and naturally from the chronic group are and, respectively. The transmission coefficients of HCV infection by individuals with acute hepatitis C, I(t), chronic hepatitis C, C h (t) and individuals undergoing treatment but not yet cured, T (t) are 1, 2, and 3, respectively. Following effective contact with I(t), C ( t), and T (t), susceptible individuals can acquire HCV at a rate ( 1 I + 2 C h + 3 T ). proportion of vaccinated individuals rate of progression from the acute state to treated and chronic state rate of transfer from exposed class to acute infected class 1 proportion of individuals who enter the treated class from acutely infected class 2 rate of progression for treatment from chronic hepatitis rate of recovery due to treatment rate of recovery from the chronic class (0 < ≤ 1) represents the vaccine efficacy, with = 1 representing a perfect vaccine, and ∈ corresponding to an imperfect vaccine which wanes with time. The term (1 − ) corresponds to the decrease in disease transmission in vaccinated individuals, in contrast to susceptible individuals who are not vaccinated. Hence, vaccinated individuals acquire HCV at a reduced rate (1 − )( 1 I + 2 C h + 3 T ). The rate at which the vaccine wanes is denoted by. The parameter description is described in Table 1. In the proposed model (2.1), the total population is S + E + I + T + C h + V = for all t ≥ 0, provided that S + E + I + T + C h + V =. Thus, the biologically feasible region for system (2.1) given by is positively invariant with respect to the system (2.1). The local stability of P 0 is determined by the next generation operator method (Driessche and Watmough 2002) on system (2.1). For this purpose, the basic reproduction number (the average number of secondary infections produced by an infected individual in a completely susceptible population), denoted by R 0, is obtained. Using the same notation as in Driessche and Watmough, R 0 is given by Using Theorem 2 in Driessche and Watmough, the following result is established. Endemic equilibria and backward bifurcation To calculate the endemic equilibrium, we consider the following reduced system of differential equations We will consider the dynamics of the flow generated by (2.2) in the invariant region The endemic equilibrium for system ( and I * is the root of the following quadratic equation The endemic equilibria of the model (2.2) can then be obtained by solving for I * from (2.4), and substituting the positive values of I * into the expressions in (2.3). Hence,, it can be seen that a 1 is always positive (for an imperfect vaccine), and a 3 is positive (negative) if R 0 is less than (greater than) unity. Thus, the following result is established Hence, the model has a unique endemic equilibrium (P * ) whenever R 0 > 1, as evident from case (i) of the above theorem. Also, case (iii) indicates a possible chance of backward bifurcation (where a locally asymptotically stable DFE exists along with a locally asymptotically stable endemic equilibrium when R 0 < 1). Since, for a 3 > 0, R 0 < 1, the model will have a disease-free equilibrium and two endemic equilibria. To check for this, the discriminant a 2 2 − 4a 1 a 3 is set to zero and is solved for the critical value of R 0. The critical value is denoted by R c and is given by Backward bifurcation occurs for those values of R 0 which satisfy R c < R 0 < 1. This is illustrated by simulating the model with these parameter values: The result is shown in Fig. 1. It can be seen that a locally asymptotically stable disease free equilibrium, a locally asymptotically stable endemic equilibrium, and, an unstable endemic equilibrium coexist when R 0 < 1. Proof of backward bifurcation phenomenon The phenomenon of backward bifurcation can be proved by using the center manifold theory on system (2.1). A theorem given by Castillo-Chavez and Song will be used here. To apply this method, the following change of variables is made on the model: Thus, the system (2.1) can now be written as dX dt = (f 1, f 2, f 3, f 4, f 5, f 5, f 6 ) T and is given below (2.6) Choose 1 as the bifurcation parameter, and let R 0 = 1. Solving for 1 = 1 from R 0 = 1 gives The Jacobian matrix (J) of system (2.6) calculated at P 0, with 1 = 1, is given as follows The characteristic equation (in ) of J is given as where Corresponding to the zero eigenvalue, the Jacobian matrix J | 1 = 1 can be shown to have a right eigenvector given by w = (w 1, w 2, w 3, w 4, w 5, w 6 ) T, where Similarly, corresponding to the zero eigenvalue, J | 1 = 1 has a left eigenvector given Calculation of a. For system (2.6), the corresponding non-zero partial derivatives of f i (i = 1, 2,..., 6) calculated at the DFE, P 0, are given by Consequently, the associated bifurcation coefficient, a, is given by Calculation of b. The required partial derivative, for the computation of b, is calculated at P 0, and is given by Since the coefficient b is always positive, it follows from Theorem 3.3 given by Castillo-Chavez and Song B that the system (2.2) will undergo backward bifurcation if the coefficient a is positive. The phenomenon of backward bifurcation poses a lot of problems, since it jeopardizes the possibility of total disease eradication from the population, when the basic reproduction number is less than unity. Hence, it is instructive to try to eliminate the backward bifurcation effect. Since, this effect requires the existence of at least two endemic equilibria when R 0 < 1 (; Safi and Gumel 2011), it may be removed by considering such a model in which positive endemic equilibria cease to exist. Use of a perfect vaccine to eliminate backward bifurcation The backward bifurcation behavior of the proposed HCV infection model (2.1), can be eliminated by using a perfect vaccine, i.e., when =1. For =1, the original model now becomes (2.10) System (2.10) has a DFE, P 0 (S 0, 0, 0, 0, 0, V 0 ), which is the same as the original model given in equation (2.1). The corresponding vaccinated reproduction number,R 0, for model (2.10) is given as Consider now, the quadratic equation (2.4), rewritten below for convenience a 1 I * 2 + a 2 I * + a 3 = 0. For = 1, using the values given in equation (2.5), the coefficients a 1, a 2, and a 3 of the above quadratic equation reduce to a 1 = 0, a 2 > 0, and a 3 ≥ 0 (whenever R 0 = R 0 | =1 ≤ 1). In this case, the quadratic equation (2.4) will have just a single non positive solution Hence, wheneverR 0 ≤ 1, the model (2.10) has no positive endemic equilibrium. This clearly suggests the impossibility of backward bifurcation (because for backward bifurcation to occur, there must exist at least two endemic equilibria wheneverR 0 ≤ 1). A contour plot of vaccinated reproduction number (R 0 ) as a function of proportion of vaccinated humans (b) and vaccine efficacy () is shown in Fig. 2. The parameter values used to generate this diagram are given in Table 2. The contours illustrate a significant decrease in the vaccinated reproduction number,R 0, with increasing vaccine efficacy,, and proportion of vaccinated humans, b. It can be seen that very high vaccine efficacy and vaccine coverage is required to control HCV infection effectively in the population. Almost all of the susceptible individuals should have had vaccination, and vaccine efficacy must be 100% forR 0 to be less than one, so that the spread of HCV infection is controlled effectively. The global stability of the disease free equilibrium can be proved in the region ∆ as follows. Proof : Let Then, V = 0 whenever E = 0, I = 0, T = 0, C h = 0, which corresponds to the set {(E, I, T, C h ) : E = I = T = C h = 0}. In this set, system (2.10) is given as (2.11) When t → ∞, the solution of system (2.11) becomes Clearly, when t → ∞, the solution to system (2.11) approaches the DFE, P 0 (S 0, 0, 0, 0, 0, V 0 ). By using LaSalle's invariance principle (LaSalle 1976), P 0 is found to be globally asymptotically stable in ∆. This result is illustrated by simulating the model (2.10) using a reasonable set of parameter values given in Table 2. The plot in Fig. 3 shows that the disease is eliminated from the population. In order to prove the above theorem, we have used the method given by Li et al. (2012Li et al. (, 2011. At the endemic equilibrium P *, with = 0 and = 0, the following equations are satisfied: (2.12) Let Then (2.1) can be rewritten as (2.14) The endemic equilibrium P * (S *, E *, I *, T *, C * h, V * ) corresponds to the positive equi-libriumP * of (2.14). Since, the global stability ofP * is the same as that of P *, the global stability ofP * is described below instead of P *. We define the Lyapunov function as follows where a 1, a 2, a 3, a 4, a 5 and a 6 are positive numbers which are to be determined. Using (2.12), the time derivative of L along the solutions of system (2.1) is given as We define the function H = 14 i=1 P i, where P i (i = 1, 2,..., 14) is given as To determine all the coefficients, ( a i > 0 (i = 1, 2,..., 6), b i ≥ 0 (i = 1, 2,..., 14) ) we let F (x 1, x 2, x 3, x 4, x 5, x 6 ) = H. Comparing coefficients of F and H, we see that the terms x 2, x 4, x 5, x 5 x 6, x 1 x 3, x 1 x 5, x 1 x 4, x 3 x 6, and x 4 x 6 of F do not appear in H. Hence their coefficients will be equal to zero. We solve the resulting equations to obtain a 1 = a 2 = a 6 = 1, Substituting these values into L = F (x 1, x 2, x 3, x 4, x 5, x 6 ), and using equations (2.12) gives Comparing the remaining coefficients of F and H gives (2.16) To assure that b 1, b 3, b 4, b 5, b 6, b 7 and b 9 are non negative, b 10, b 12, b 13, b 14 must satisfy the following inequalities (2.17) Finally, using equations (2.12), the equality for the constant terms between F (x 1, x 2, x 3, x 4, x 5, x 6 ) and H can easily be verified. Conclusions This paper presents a deterministic model for the transmission dynamics of Hepatitis C virus infection. The formulated model, realistically, allows HCV transmission by acutely and chronically infected individuals. Most importantly, the model includes a compartment of vaccinated individuals, and considers the effect of a waning vaccine on the transfer of individuals from one compartment to another. The model was rigorously analyzed to gain insights into its qualitative dynamics. We obtained the following results:
class Solution { public: vector<int> sortArrayByParity(vector<int>& A) { auto is_even = [] (auto e) {return !(e & 1);}; partition(A.begin(), A.end(), is_even); return A; } };
<gh_stars>0 # -*- coding: utf-8 -*- """ Created on Tue Jan 21 12:49:57 2020 @author: sdoggett """ ##Use Open Street Maps to find grocery stores and transit stops from OSMPythonTools.overpass import Overpass, overpassQueryBuilder from OSMPythonTools.nominatim import Nominatim nominatim = Nominatim() overpass = Overpass() areaId = nominatim.query('Oakland, California').areaId() def get_supermarkets(overpass,areaId): query = overpassQueryBuilder(area=areaId, elementType='node', selector='"shop"="supermarket"', includeGeometry=True, out='body') result = overpass.query(query) output = {} for x in result.elements(): nodeID = x.id() shopName = x.tag('name') coord = [x.lat(),x.lon()] output[nodeID] = [shopName, coord] return output def get_convenience_store(overpass,areaId): query = overpassQueryBuilder(area=areaId, elementType='node', selector='"shop"="convenience"', includeGeometry=True, out='body') result = overpass.query(query) output = {} for x in result.elements(): nodeID = x.id() shopName = x.tag('name') coord = [x.lat(),x.lon()] output[nodeID] = [shopName, coord] return output def get_pharmacy(overpass,areaId): query = overpassQueryBuilder(area=areaId, elementType='node', selector='"amenity"="pharmacy"', includeGeometry=True, out='body') result = overpass.query(query) output = {} for x in result.elements(): nodeID = x.id() shopName = x.tag('name') coord = [x.lat(),x.lon()] output[nodeID] = [shopName, coord] return output def get_bus_stops(overpass,areaId): query = overpassQueryBuilder(area=areaId, elementType='node', selector='"highway"="bus stop"', includeGeometry=True, out='body') result = overpass.query(query) output = {} for x in result.elements(): nodeID = x.id() stopName = x.tag('name') routes = x.tag('route_ref') coord = [x.lat(),x.lon()] output[nodeID] = [stopName,routes, coord] return output def get_BART(overpass,areaId): query = overpassQueryBuilder(area=areaId, elementType='node', selector=['"network" = "BART"','"railway"="station"'], includeGeometry=True, out='body') result = overpass.query(query) output = {} for x in result.elements(): nodeID = x.id() stopName = x.tag('name') coord = [x.lat(),x.lon()] output[nodeID] = [stopName, coord] return output x = get_pharmacy(overpass, areaId) print(x) import geopandas as gpd import osmnx as ox import networkx as nx ox.config(log_console=True, use_cache=True) ox.__version__ location_point = (37.829617, -122.278865) dest = (37.829405, -122.280013) # same point again, but create network only of nodes within 500m along the network from point G3 = ox.graph_from_point(location_point, distance=500, distance_type='network',network_type='walk') fig, ax = ox.plot_graph(G3) origin_node = ox.get_nearest_node(G3, location_point) dest_node = ox.get_nearest_node(G3, dest) G_projected = ox.project_graph(G3) nc = ['r' if (node==origin_node or node==dest_node) else '#336699' for node in G_projected.nodes()] ns = [50 if (node==origin_node or node==dest_node) else 8 for node in G_projected.nodes()] fig, ax = ox.plot_graph(G_projected, node_size=ns, node_color=nc, node_zorder=2) route = nx.shortest_path(G_projected, origin_node, dest_node, weight='length') fig, ax = ox.plot_graph_route(G_projected, route, node_size=0) l =nx.shortest_path_length(G_projected, origin_node, dest_node, weight='length') import pandas as pd import numpy as np import pandana as pdna from pandana.loaders import osm import warnings warnings.filterwarnings('ignore') tmp = [-122.8662, 37.1373, -121.4798, 38.2158] # Reordered for Pandana functions bbox = [tmp[1], tmp[0], tmp[3], tmp[2]] poi_df = osm.node_query(*bbox, tags='shop=supermarket') x, y = poi_df['lon'], poi_df['lat'] store = pd.HDFStore('osm_bayarea.h5') nodes = store.nodes edges = store.edges print(nodes.head(3)) print(edges.head(3)) net=pdna.Network(nodes.x, nodes.y, edges["from"], edges["to"], edges[["weight"]]) net.precompute(3000) net.set_pois("supermarkets", 2000, 10, x, y) a = net.nearest_pois(2000, "supermarkets", num_pois=10) print(a.head(1))
/// return and remove the largest key fn del_max(&mut self) -> Option<Key> { let max = self.pq[1].take(); self.pq.swap(1, self.n); self.n -= 1; self.sink(1); let len = self.pq.len(); if self.n > 0 && self.n == (len - 1) / 4 { self.resize(len / 2); } max }
// EncryptData simply takes a plaintext string and a public key armoured // string and returns an armoured, encrypted version of the plaintext. // This is the 'end-to-end' nature of RIPACrypt - our servers never see a // users private key so can never decrypt their data. func EncryptData(clearText, publicKey string) (string, error) { keyBuffer := bytes.NewBufferString(publicKey) entityList, err := openpgp.ReadArmoredKeyRing(keyBuffer) if err == nil { buf := new(bytes.Buffer) packetConf := packet.Config{DefaultHash: crypto.SHA256} w, err := openpgp.Encrypt(buf, entityList, nil, nil, &packetConf) if err != nil { return "", err } _, err = w.Write([]byte(clearText)) if err != nil { return "", err } err = w.Close() if err != nil { return "", err } bytes, err := ioutil.ReadAll(buf) if err != nil { return "", err } encStr := base64.StdEncoding.EncodeToString(bytes) return encStr, nil } return "", err }
from playsound import playsound import os, sys, pathlib, time, copy from PyQt5.QtWidgets import * from PyQt5.QtCore import Qt, QSize from PyQt5.QtGui import QPalette, QColor, QFont, QIcon, QPixmap, QKeySequence from PyQt5 import QtCore from PyQt5.Qt import QTransform sys.path.append("") from machine.emulator import Turing_machine_emulator from machine.getmachine import Get_Machine class Window(QMainWindow): def __init__(self): super().__init__() # Initializer which calls constructor for QWidgself.initializeUI() # Call function used to set up window self.initializeUI() self.run_button self.pause_button #self.stop_button #self.save_button self.reset_button self.run_speed = 0 self.emulator = Turing_machine_emulator() self.saved_tape = copy.copy(self.emulator.tape) self.saved_position = copy.copy(self.emulator.position) self.run_activated = False self.pause_activated = False self.stop_activated = False def initializeUI(self): self.setGeometry(100, 100, 1440, 1024) # x, y, width, y_coord self.setWindowTitle('Turing Machine Simulator') self.displayPanels() self.createMenu() self.displayTape() self.displayToolbar() self.displayUndertape_panel() self.textEditor() self.show() def textEditor(self): text_edit = QPlainTextEdit(self) text_edit.resize(1000, 450) text_edit.move(10, 220) def displayPanels(self): ###Toolbar panel#### Toolbar = QLabel(self) Toolbar.resize(1440, 79) Toolbar.move(0,0) Toolbar.setStyleSheet("background-color:rgb(54,54,54);") current_directory = str(pathlib.Path(__file__).parent.absolute()) path = current_directory + '/icons/State_text' #print(path) State_text_pic = QPixmap(path) State_text = QLabel(self) State_text.resize(137, 27) State_text.move(1150, 30) State_text.setPixmap(State_text_pic) ############ def createMenu(self): menu = self.menuBar() font = QFont("Helvetica [Cronyx]", 10) font.setStretch(100) menu.setFont(font) menu.adjustSize() exit_act = QAction('Exit', self) exit_act.setShortcut('Ctrl+Q') exit_act.triggered.connect(self.close) file_menu = menu.addMenu('File') #Run_menu = menu.addMenu('Run') #Export_menu = menu.addMenu('Export') #Compile_menu = menu.addMenu('Compile') file_menu.addAction(exit_act) menu.setNativeMenuBar(False) menu.setStyleSheet(""" QMenuBar { background-color: rgb(54,54,54); color: rgb(255,156,255); border: 1px black; } QMenuBar::item { background-color: rgb(49,49,49); color: rgb(255,156,255); } QMenuBar::item::selected { background-color: rgb(45,45,45); } QMenu { background-color: rgb(49,49,49); color: rgb(255,156,255); border: 1px black; } QMenu::item::selected { background-color: rgb(45,45,45); } """) def create_Toolbar_button(self, size1, size2, icon_size1, icon_size2, x, y, short_path, connection): current_directory = str(pathlib.Path(__file__).parent.absolute()) path = current_directory + short_path button_icon = QIcon() button_icon.addPixmap(QPixmap(path), QIcon.Normal, QIcon.Off) button = QPushButton(self) button.clicked.connect(connection) button.resize(size1, size2) button.move(x, y) button.setIcon(button_icon) button.setIconSize(QSize(icon_size1, icon_size2)) button.setStyleSheet(""" QPushButton::hover { border: none; background-color: rgb(50,50,50) } QPushButton { border: none; } """) return button def displayToolbar(self): y_coord = 35 x_coord = 0 #create_Toolbar_button(self, size1, size2, icon_size1, icon_size2, x, y, short_path) ####Run Button#### self.run_button = self.create_Toolbar_button(74, 36, 31, 25, x_coord, y_coord, '/icons/run_button4', self.run_buttonClicked) ################## x_coord += 74 ###Pause Button### self.pause_button = self.create_Toolbar_button(74, 36, 14, 25, x_coord, y_coord, '/icons/pause_button', self.pause_buttonClicked) ################## x_coord += 74 ####Stop Button#### self.stop_button = self.create_Toolbar_button(74, 36, 20, 25, x_coord, y_coord, '/icons/stop_button5', self.stop_buttonClicked) ################### x_coord += 74 ####Save Button#### self.save_button = self.create_Toolbar_button(74, 36, 25, 25, x_coord, y_coord, '/icons/save_button', self.save_buttonClicked) ################### x_coord += 74 ####Reset Button#### self.reset_button = self.create_Toolbar_button(74, 36, 25, 25, x_coord, y_coord, '/icons/reset_button', self.reset_buttonClicked) #################### x_coord += 74 ####Clear Button#### self.clear_button = self.create_Toolbar_button(74, 36, 25, 25, x_coord, y_coord, '/icons/clear_button', self.clear_buttonClicked) #################### x_coord += 74 ####Step Button#### self.step_button = self.create_Toolbar_button(74, 36, 36, 25, x_coord, y_coord, '/icons/step_button', self.step_buttonClicked) #################### x_coord += 74 ####Fisrt state Button#### self.first_state_button = self.create_Toolbar_button(74, 36, 25, 25, x_coord, y_coord, '/icons/first_state_button', self.first_state_buttonClicked) #################### x_coord += 74 self.state_line = QLineEdit(self) self.state_line.setAlignment(Qt.AlignCenter) # The default alignmeis AlignLeft self.state_line.move(1150+137+5, 28) self.state_line.resize(54, 27) # Change size of entry field self.state_line.setMaxLength(4) self.state_line.setStyleSheet("background-color:rgb(37,37,38); color:rgb(255,0,255);") self.state_line.setFont(QFont("Bruno Ace",20)) self.state_line.setText('1') def displayTape(self): ####Pointer#### current_directory = str(pathlib.Path(__file__).parent.absolute()) path = current_directory + '/icons/pointer4' run_button_icon = QIcon() run_button_icon.addPixmap(QPixmap(path), QIcon.Normal, QIcon.Off) pointer = QLabel(self) pointer.resize(48,32) pixmap = QPixmap(path) pointer.setPixmap(pixmap) pointer.move(694, 179) ######### ####Left Button#### path = current_directory + '/icons/left_button2' left_button_icon = QIcon() left_button_icon.addPixmap(QPixmap(path), QIcon.Normal, QIcon.Off) left_button = QPushButton(self) left_button.clicked.connect(self.left_buttonClicked) left_button.resize(45, 80) left_button.move(0, 95) left_button.setIcon(left_button_icon) left_button.setIconSize(QSize(20, 80)) left_button.setStyleSheet(""" QPushButton::hover { border: none; background-color: rgb(45,50,55); } QPushButton { border: none; text-align:center; } """) # rgb(49,54,59) self.left_button = left_button ######### ####Right Button#### path = current_directory + '/icons/right_button2' right_button_icon = QIcon() right_button_icon.addPixmap(QPixmap(path), QIcon.Normal, QIcon.Off) right_button = QPushButton(self) right_button.clicked.connect(self.right_buttonClicked) right_button.resize(45, 80) right_button.move(1395, 95) right_button.setIcon(right_button_icon) right_button.setIconSize(QSize(20, 80)) right_button.setStyleSheet(""" QPushButton::hover { border: none; background-color: rgb(45,50,55) } QPushButton { border: none; } """) self.right_button = right_button ######### ####Tape##### self.name_entry = list() for i in range(0,27): self.name_entry.append(QLineEdit(self)) self.name_entry[i].setAlignment(Qt.AlignCenter) # The default alignmeis AlignLeft self.name_entry[i].move(45+i*50, 95) self.name_entry[i].resize(46, 80) # Change size of entry field self.name_entry[i].setMaxLength(1) self.name_entry[i].setStyleSheet("background-color:rgb(255,255,240); color:rgb(78,78,78);") self.name_entry[i].setFont(QFont("Roboto",50)) self.name_entry[i].setText('') def displayUndertape_panel(self): return def input_data(self, Emulator): for i in range(len(self.name_entry)): done = False try: Emulator.tape[i-len(self.name_entry)//2+Emulator.position] except KeyError: if i <= 0: if self.name_entry[i].text() == '': temp_dict = {i-len(self.name_entry)//2+Emulator.position : ' '} #????????????? temp_dict.update(Emulator.tape) Emulator.tape = temp_dict else: temp_dict = {i-len(self.name_entry)//2+Emulator.position : self.name_entry[i].text()} #????????????? temp_dict.update(Emulator.tape) Emulator.tape = temp_dict done = True else: if self.name_entry[i].text() == '': Emulator.tape[i-len(self.name_entry)//2+Emulator.position] = ' ' else: Emulator.tape[i-len(self.name_entry)//2+Emulator.position] = self.name_entry[i].text() done = True if done == False: if self.name_entry[i].text() == '': Emulator.tape[i-len(self.name_entry)//2+Emulator.position] = ' ' else: Emulator.tape[i-len(self.name_entry)//2+Emulator.position] = self.name_entry[i].text() def get_data(self, Emulator): for i in range(len(self.name_entry)): try: self.name_entry[i].setText(Emulator.tape[i-13+Emulator.position]) except KeyError: self.name_entry[i].setText('') if self.name_entry[i].text() == ' ': self.name_entry[i].setText('') def change_button_icon(self, short_path, size1, size2, button): current_directory = str(pathlib.Path(__file__).parent.absolute()) path = current_directory + short_path button_icon = QIcon() button_icon.addPixmap(QPixmap(path), QIcon.Normal, QIcon.Off) button.setIcon(button_icon) button.setIconSize(QSize(size1, size2)) def left_buttonClicked(self): self.change_button_icon('/icons/left_button2_activated', 20, 80, self.left_button) QApplication.processEvents() time.sleep(0.05) ################# self.input_data(self.emulator) self.emulator.position = self.emulator.position-1 self.get_data(self.emulator) ################# self.change_button_icon('/icons/left_button2', 20, 80, self.left_button) def right_buttonClicked(self): self.change_button_icon('/icons/right_button2_activated', 20, 80, self.right_button) QApplication.processEvents() time.sleep(0.05) ######################## self.input_data(self.emulator) self.emulator.position = self.emulator.position+1 self.get_data(self.emulator) ######################## self.change_button_icon('/icons/right_button2', 20, 80, self.right_button) def pause_buttonClicked(self): if self.run_activated == False: self.change_button_icon('/icons/pause_button_activated', 10, 25, self.pause_button) QApplication.processEvents() time.sleep(0.05) self.change_button_icon('/icons/pause_button', 14, 25, self.pause_button) return self.change_button_icon('/icons/pause_button_activated', 14, 25, self.pause_button) QApplication.processEvents() ################# self.pause_activated = True ################# return def stop_buttonClicked(self): if self.run_activated == False: self.change_button_icon('/icons/stop_button5_activated', 14, 25, self.stop_button) QApplication.processEvents() time.sleep(0.05) self.change_button_icon('/icons/stop_button5', 25, 25, self.stop_button) return self.change_button_icon('/icons/stop_button5_activated', 14, 25, self.stop_button) QApplication.processEvents() ################# self.stop_activated = True ################# return def clear_buttonClicked(self): if self.run_activated == True: self.change_button_icon('/icons/clear_button_activated', 14, 25, self.clear_button) QApplication.processEvents() time.sleep(0.05) self.change_button_icon('/icons/clear_button', 25, 25, self.stop_button) QMessageBox().information(self, "Clear", "Ви не можете стерти ленту під час роботи емулятора!", QMessageBox.Ok, QMessageBox.Ok) return self.change_button_icon('/icons/clear_button_activated', 14, 25, self.clear_button) QApplication.processEvents() time.sleep(0.05) self.change_button_icon('/icons/clear_button', 25, 25, self.clear_button) clear_tape = tape = [" "]*27 self.emulator_tape = dict() for i in range(-13, len(clear_tape)//2 + 1): self.emulator.tape[i] = clear_tape[i+13] self.emulator.position = 0 self.get_data(self.emulator) return def step_buttonClicked(self): self.change_button_icon('/icons/step_button_activated', 36, 25, self.step_button) QApplication.processEvents() time.sleep(0.05) Machine = Get_Machine() self.input_data(self.emulator) print(self.emulator.tape) print(self.emulator.position) emulate = 1 current_directory = str(pathlib.Path(__file__).parent.absolute()) #path = current_directory + '/sounds/test3.mp3' emulate = self.emulator.emulate_one_step(Machine) self.get_data(self.emulator) QApplication.processEvents() #playsound(path) self.state_line.setText(str(self.emulator.state)) if emulate == 0: QMessageBox().information(self, "Emulator", "Machine halted successfully", QMessageBox.Ok, QMessageBox.Ok) self.emulator.state = 1 self.change_button_icon('/icons/step_button', 36, 25, self.step_button) return def stop_buttonClicked(self): if self.run_activated == False: self.change_button_icon('/icons/stop_button5_activated', 14, 25, self.stop_button) QApplication.processEvents() time.sleep(0.05) self.change_button_icon('/icons/stop_button5', 25, 25, self.stop_button) return self.change_button_icon('/icons/stop_button5_activated', 14, 25, self.stop_button) QApplication.processEvents() ################# self.stop_activated = True ################# return def run_buttonClicked(self): if self.run_activated == False: if self.pause_activated == True: self.pause_activated = False self.change_button_icon('/icons/pause_button', 14, 25, self.pause_button) self.run_activated = True self.change_button_icon('/icons/run_button_activated2', 36, 35, self.run_button) QApplication.processEvents() time.sleep(0.05) Machine = Get_Machine() self.input_data(self.emulator) print(self.emulator.tape) print(self.emulator.position) emulate = 1 current_directory = str(pathlib.Path(__file__).parent.absolute()) #path = current_directory + '/sounds/test3.mp3' while (emulate == 1): if self.pause_activated == True: self.run_activated = False self.change_button_icon('/icons/run_button4', 31, 25, self.run_button) return if self.stop_activated == True: self.stop_activated = False self.emulator.state = 1 self.change_button_icon('/icons/run_button4', 31, 25, self.run_button) time.sleep(0.05) self.change_button_icon('/icons/stop_button5', 25, 25, self.stop_button) self.run_activated = False return emulate = self.emulator.emulate_one_step(Machine) self.get_data(self.emulator) self.state_line.setText(str(self.emulator.state)) QApplication.processEvents() #playsound(path) time.sleep(self.run_speed) self.emulator.state = 1 QMessageBox().information(self, "Emulator", "Machine halted successfully", QMessageBox.Ok, QMessageBox.Ok) self.change_button_icon('/icons/run_button4', 31, 25, self.run_button) self.run_activated = False else: return def reset_buttonClicked(self): self.change_button_icon('/icons/reset_button_activated', 20, 25, self.reset_button) QApplication.processEvents() time.sleep(0.05) self.emulator.tape = copy.copy(self.saved_tape) self.emulator.position = copy.copy(self.saved_position) self.get_data(self.emulator) self.change_button_icon('/icons/reset_button', 25, 25, self.reset_button) def first_state_buttonClicked(self): self.change_button_icon('/icons/first_state_button_activated', 20, 25, self.first_state_button) QApplication.processEvents() time.sleep(0.05) self.emulator.state = 1 self.change_button_icon('/icons/first_state_button', 25, 25, self.first_state_button) def save_buttonClicked(self): self.change_button_icon('/icons/save_button_activated', 20, 25, self.save_button) QApplication.processEvents() self.input_data(self.emulator) self.saved_tape = copy.copy(self.emulator.tape) self.saved_position = copy.copy(self.emulator.position) time.sleep(0.05) self.change_button_icon('/icons/save_button', 25, 25, self.save_button) return def state_text_buttonClicked(self): return # Run program if __name__ == '__main__': palette = QPalette() palette.setColor(QPalette.Window, QColor(39, 41, 45)) palette.setColor(QPalette.WindowText, Qt.white) palette.setColor(QPalette.Base, QColor(25, 25, 25)) palette.setColor(QPalette.AlternateBase, QColor(53, 53, 53)) palette.setColor(QPalette.ToolTipBase, Qt.white) palette.setColor(QPalette.ToolTipText, Qt.white) palette.setColor(QPalette.Text, Qt.white) palette.setColor(QPalette.Button, QColor(53, 53, 53)) palette.setColor(QPalette.ButtonText, Qt.white) palette.setColor(QPalette.BrightText, Qt.red) palette.setColor(QPalette.Link, QColor(42, 130, 218)) palette.setColor(QPalette.Highlight, QColor(42, 130, 218)) palette.setColor(QPalette.HighlightedText, Qt.black) app = QApplication(sys.argv) app.setPalette(palette) window = Window() sys.exit(app.exec_())
package iservice.sdk.module.impl; import iservice.sdk.entity.Key; import iservice.sdk.exception.ServiceSDKException; import iservice.sdk.module.IKeyDAO; import iservice.sdk.module.IKeyService; import iservice.sdk.util.AddressUtils; import org.bitcoinj.core.Bech32; import org.bitcoinj.crypto.ChildNumber; import org.bitcoinj.crypto.DeterministicKey; import org.bitcoinj.crypto.HDUtils; import org.bitcoinj.wallet.DeterministicKeyChain; import org.bitcoinj.wallet.DeterministicSeed; import org.bitcoinj.wallet.UnreadableWalletException; import java.util.List; /** * AbstractKeyServiceImpl * * @author Yelong * @since v1.0 */ public abstract class AbstractKeyServiceImpl implements IKeyService { private static final String HD_PATH = "M/44H/118H/0H/0/0"; private static final String HRP = "iaa"; private IKeyDAO keyDAO; AbstractKeyServiceImpl(IKeyDAO keyDAO) { this.keyDAO = keyDAO != null ? keyDAO : new DefaultKeyDAOImpl(); } @Override public String showAddress(String name) throws ServiceSDKException { Key key = this.keyDAO.read(name); return key.getAddress(); } @Override public void deleteKey(String name, String password) throws ServiceSDKException { Key key = this.keyDAO.read(name); this.keyDAO.decrypt(key.getPrivKey(), password); // Check password this.keyDAO.delete(name); } final DeterministicKey generateDeterministicKey(String mnemonic) throws ServiceSDKException { DeterministicSeed seed; try { seed = new DeterministicSeed(mnemonic, null, "", 0); } catch (UnreadableWalletException e) { e.printStackTrace(); throw new ServiceSDKException("Error generating deterministic key from mnemonic", e); } DeterministicKeyChain chain = DeterministicKeyChain.builder().seed(seed).build(); List<ChildNumber> keyPath = HDUtils.parsePath(HD_PATH); return chain.getKeyByPath(keyPath, true); } final String toBech32(byte[] pubkeyHex) { byte[] bits = AddressUtils.convertBits(pubkeyHex, 0, pubkeyHex.length, 8, 5, true); return Bech32.encode(HRP, bits); } final void saveKey(String name, String password, String address, byte[] privKey) throws ServiceSDKException { byte[] encrypted = this.keyDAO.encrypt(privKey, password); Key key = new Key(address, encrypted); this.keyDAO.write(name, key); } final Key getKey(String name, String password) throws ServiceSDKException { Key key = this.keyDAO.read(name); byte[] decrypted = this.keyDAO.decrypt(key.getPrivKey(), password); key.setPrivKey(decrypted); return key; } }
<reponame>hoastyle/lib_robot_build // Character Traits for use by standard string and iostream -*- C++ -*- // Copyright (C) 1997-2015 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library 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 General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/char_traits.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{string} */ // // ISO C++ 14882: 21 Strings library // #ifndef _CHAR_TRAITS_H #define _CHAR_TRAITS_H 1 #pragma GCC system_header #include <bits/stl_algobase.h> // std::copy, std::fill_n #include <bits/postypes.h> // For streampos #include <cwchar> // For WEOF, wmemmove, wmemset, etc. namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Mapping from character type to associated types. * * @note This is an implementation class for the generic version * of char_traits. It defines int_type, off_type, pos_type, and * state_type. By default these are unsigned long, streamoff, * streampos, and mbstate_t. Users who need a different set of * types, but who don't need to change the definitions of any function * defined in char_traits, can specialize __gnu_cxx::_Char_types * while leaving __gnu_cxx::char_traits alone. */ template<typename _CharT> struct _Char_types { typedef unsigned long int_type; typedef std::streampos pos_type; typedef std::streamoff off_type; typedef std::mbstate_t state_type; }; /** * @brief Base class used to implement std::char_traits. * * @note For any given actual character type, this definition is * probably wrong. (Most of the member functions are likely to be * right, but the int_type and state_type typedefs, and the eof() * member function, are likely to be wrong.) The reason this class * exists is so users can specialize it. Classes in namespace std * may not be specialized for fundamental types, but classes in * namespace __gnu_cxx may be. * * See https://gcc.gnu.org/onlinedocs/libstdc++/manual/strings.html#strings.string.character_types * for advice on how to make use of this class for @a unusual character * types. Also, check out include/ext/pod_char_traits.h. */ template<typename _CharT> struct char_traits { typedef _CharT char_type; typedef typename _Char_types<_CharT>::int_type int_type; typedef typename _Char_types<_CharT>::pos_type pos_type; typedef typename _Char_types<_CharT>::off_type off_type; typedef typename _Char_types<_CharT>::state_type state_type; static void assign(char_type& __c1, const char_type& __c2) { __c1 = __c2; } static _GLIBCXX_CONSTEXPR bool eq(const char_type& __c1, const char_type& __c2) { return __c1 == __c2; } static _GLIBCXX_CONSTEXPR bool lt(const char_type& __c1, const char_type& __c2) { return __c1 < __c2; } static int compare(const char_type* __s1, const char_type* __s2, std::size_t __n); static std::size_t length(const char_type* __s); static const char_type* find(const char_type* __s, std::size_t __n, const char_type& __a); static char_type* move(char_type* __s1, const char_type* __s2, std::size_t __n); static char_type* copy(char_type* __s1, const char_type* __s2, std::size_t __n); static char_type* assign(char_type* __s, std::size_t __n, char_type __a); static _GLIBCXX_CONSTEXPR char_type to_char_type(const int_type& __c) { return static_cast<char_type>(__c); } static _GLIBCXX_CONSTEXPR int_type to_int_type(const char_type& __c) { return static_cast<int_type>(__c); } static _GLIBCXX_CONSTEXPR bool eq_int_type(const int_type& __c1, const int_type& __c2) { return __c1 == __c2; } static _GLIBCXX_CONSTEXPR int_type eof() { return static_cast<int_type>(_GLIBCXX_STDIO_EOF); } static _GLIBCXX_CONSTEXPR int_type not_eof(const int_type& __c) { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); } }; template<typename _CharT> int char_traits<_CharT>:: compare(const char_type* __s1, const char_type* __s2, std::size_t __n) { for (std::size_t __i = 0; __i < __n; ++__i) if (lt(__s1[__i], __s2[__i])) return -1; else if (lt(__s2[__i], __s1[__i])) return 1; return 0; } template<typename _CharT> std::size_t char_traits<_CharT>:: length(const char_type* __p) { std::size_t __i = 0; while (!eq(__p[__i], char_type())) ++__i; return __i; } template<typename _CharT> const typename char_traits<_CharT>::char_type* char_traits<_CharT>:: find(const char_type* __s, std::size_t __n, const char_type& __a) { for (std::size_t __i = 0; __i < __n; ++__i) if (eq(__s[__i], __a)) return __s + __i; return 0; } template<typename _CharT> typename char_traits<_CharT>::char_type* char_traits<_CharT>:: move(char_type* __s1, const char_type* __s2, std::size_t __n) { return static_cast<_CharT*>(__builtin_memmove(__s1, __s2, __n * sizeof(char_type))); } template<typename _CharT> typename char_traits<_CharT>::char_type* char_traits<_CharT>:: copy(char_type* __s1, const char_type* __s2, std::size_t __n) { // NB: Inline std::copy so no recursive dependencies. std::copy(__s2, __s2 + __n, __s1); return __s1; } template<typename _CharT> typename char_traits<_CharT>::char_type* char_traits<_CharT>:: assign(char_type* __s, std::size_t __n, char_type __a) { // NB: Inline std::fill_n so no recursive dependencies. std::fill_n(__s, __n, __a); return __s; } _GLIBCXX_END_NAMESPACE_VERSION } // namespace namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION // 21.1 /** * @brief Basis for explicit traits specializations. * * @note For any given actual character type, this definition is * probably wrong. Since this is just a thin wrapper around * __gnu_cxx::char_traits, it is possible to achieve a more * appropriate definition by specializing __gnu_cxx::char_traits. * * See https://gcc.gnu.org/onlinedocs/libstdc++/manual/strings.html#strings.string.character_types * for advice on how to make use of this class for @a unusual character * types. Also, check out include/ext/pod_char_traits.h. */ template<class _CharT> struct char_traits : public __gnu_cxx::char_traits<_CharT> { }; /// 21.1.3.1 char_traits specializations template<> struct char_traits<char> { typedef char char_type; typedef int int_type; typedef streampos pos_type; typedef streamoff off_type; typedef mbstate_t state_type; static void assign(char_type& __c1, const char_type& __c2) _GLIBCXX_NOEXCEPT { __c1 = __c2; } static _GLIBCXX_CONSTEXPR bool eq(const char_type& __c1, const char_type& __c2) _GLIBCXX_NOEXCEPT { return __c1 == __c2; } static _GLIBCXX_CONSTEXPR bool lt(const char_type& __c1, const char_type& __c2) _GLIBCXX_NOEXCEPT { // LWG 467. return (static_cast<unsigned char>(__c1) < static_cast<unsigned char>(__c2)); } static int compare(const char_type* __s1, const char_type* __s2, size_t __n) { return __builtin_memcmp(__s1, __s2, __n); } static size_t length(const char_type* __s) { return __builtin_strlen(__s); } static const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { return static_cast<const char_type*>(__builtin_memchr(__s, __a, __n)); } static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { return static_cast<char_type*>(__builtin_memmove(__s1, __s2, __n)); } static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n)); } static char_type* assign(char_type* __s, size_t __n, char_type __a) { return static_cast<char_type*>(__builtin_memset(__s, __a, __n)); } static _GLIBCXX_CONSTEXPR char_type to_char_type(const int_type& __c) _GLIBCXX_NOEXCEPT { return static_cast<char_type>(__c); } // To keep both the byte 0xff and the eof symbol 0xffffffff // from ending up as 0xffffffff. static _GLIBCXX_CONSTEXPR int_type to_int_type(const char_type& __c) _GLIBCXX_NOEXCEPT { return static_cast<int_type>(static_cast<unsigned char>(__c)); } static _GLIBCXX_CONSTEXPR bool eq_int_type(const int_type& __c1, const int_type& __c2) _GLIBCXX_NOEXCEPT { return __c1 == __c2; } static _GLIBCXX_CONSTEXPR int_type eof() _GLIBCXX_NOEXCEPT { return static_cast<int_type>(_GLIBCXX_STDIO_EOF); } static _GLIBCXX_CONSTEXPR int_type not_eof(const int_type& __c) _GLIBCXX_NOEXCEPT { return (__c == eof()) ? 0 : __c; } }; #ifdef _GLIBCXX_USE_WCHAR_T /// 21.1.3.2 char_traits specializations template<> struct char_traits<wchar_t> { typedef wchar_t char_type; typedef wint_t int_type; typedef streamoff off_type; typedef wstreampos pos_type; typedef mbstate_t state_type; static void assign(char_type& __c1, const char_type& __c2) _GLIBCXX_NOEXCEPT { __c1 = __c2; } static _GLIBCXX_CONSTEXPR bool eq(const char_type& __c1, const char_type& __c2) _GLIBCXX_NOEXCEPT { return __c1 == __c2; } static _GLIBCXX_CONSTEXPR bool lt(const char_type& __c1, const char_type& __c2) _GLIBCXX_NOEXCEPT { return __c1 < __c2; } static int compare(const char_type* __s1, const char_type* __s2, size_t __n) { return wmemcmp(__s1, __s2, __n); } static size_t length(const char_type* __s) { return wcslen(__s); } static const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { return wmemchr(__s, __a, __n); } static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { return wmemmove(__s1, __s2, __n); } static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { return wmemcpy(__s1, __s2, __n); } static char_type* assign(char_type* __s, size_t __n, char_type __a) { return wmemset(__s, __a, __n); } static _GLIBCXX_CONSTEXPR char_type to_char_type(const int_type& __c) _GLIBCXX_NOEXCEPT { return char_type(__c); } static _GLIBCXX_CONSTEXPR int_type to_int_type(const char_type& __c) _GLIBCXX_NOEXCEPT { return int_type(__c); } static _GLIBCXX_CONSTEXPR bool eq_int_type(const int_type& __c1, const int_type& __c2) _GLIBCXX_NOEXCEPT { return __c1 == __c2; } static _GLIBCXX_CONSTEXPR int_type eof() _GLIBCXX_NOEXCEPT { return static_cast<int_type>(WEOF); } static _GLIBCXX_CONSTEXPR int_type not_eof(const int_type& __c) _GLIBCXX_NOEXCEPT { return eq_int_type(__c, eof()) ? 0 : __c; } }; #endif //_GLIBCXX_USE_WCHAR_T _GLIBCXX_END_NAMESPACE_VERSION } // namespace #if ((__cplusplus >= 201103L) \ && defined(_GLIBCXX_USE_C99_STDINT_TR1)) #include <cstdint> namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION template<> struct char_traits<char16_t> { typedef char16_t char_type; typedef uint_least16_t int_type; typedef streamoff off_type; typedef u16streampos pos_type; typedef mbstate_t state_type; static void assign(char_type& __c1, const char_type& __c2) noexcept { __c1 = __c2; } static constexpr bool eq(const char_type& __c1, const char_type& __c2) noexcept { return __c1 == __c2; } static constexpr bool lt(const char_type& __c1, const char_type& __c2) noexcept { return __c1 < __c2; } static int compare(const char_type* __s1, const char_type* __s2, size_t __n) { for (size_t __i = 0; __i < __n; ++__i) if (lt(__s1[__i], __s2[__i])) return -1; else if (lt(__s2[__i], __s1[__i])) return 1; return 0; } static size_t length(const char_type* __s) { size_t __i = 0; while (!eq(__s[__i], char_type())) ++__i; return __i; } static const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { for (size_t __i = 0; __i < __n; ++__i) if (eq(__s[__i], __a)) return __s + __i; return 0; } static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { return (static_cast<char_type*> (__builtin_memmove(__s1, __s2, __n * sizeof(char_type)))); } static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { return (static_cast<char_type*> (__builtin_memcpy(__s1, __s2, __n * sizeof(char_type)))); } static char_type* assign(char_type* __s, size_t __n, char_type __a) { for (size_t __i = 0; __i < __n; ++__i) assign(__s[__i], __a); return __s; } static constexpr char_type to_char_type(const int_type& __c) noexcept { return char_type(__c); } static constexpr int_type to_int_type(const char_type& __c) noexcept { return int_type(__c); } static constexpr bool eq_int_type(const int_type& __c1, const int_type& __c2) noexcept { return __c1 == __c2; } static constexpr int_type eof() noexcept { return static_cast<int_type>(-1); } static constexpr int_type not_eof(const int_type& __c) noexcept { return eq_int_type(__c, eof()) ? 0 : __c; } }; template<> struct char_traits<char32_t> { typedef char32_t char_type; typedef uint_least32_t int_type; typedef streamoff off_type; typedef u32streampos pos_type; typedef mbstate_t state_type; static void assign(char_type& __c1, const char_type& __c2) noexcept { __c1 = __c2; } static constexpr bool eq(const char_type& __c1, const char_type& __c2) noexcept { return __c1 == __c2; } static constexpr bool lt(const char_type& __c1, const char_type& __c2) noexcept { return __c1 < __c2; } static int compare(const char_type* __s1, const char_type* __s2, size_t __n) { for (size_t __i = 0; __i < __n; ++__i) if (lt(__s1[__i], __s2[__i])) return -1; else if (lt(__s2[__i], __s1[__i])) return 1; return 0; } static size_t length(const char_type* __s) { size_t __i = 0; while (!eq(__s[__i], char_type())) ++__i; return __i; } static const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { for (size_t __i = 0; __i < __n; ++__i) if (eq(__s[__i], __a)) return __s + __i; return 0; } static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { return (static_cast<char_type*> (__builtin_memmove(__s1, __s2, __n * sizeof(char_type)))); } static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { return (static_cast<char_type*> (__builtin_memcpy(__s1, __s2, __n * sizeof(char_type)))); } static char_type* assign(char_type* __s, size_t __n, char_type __a) { for (size_t __i = 0; __i < __n; ++__i) assign(__s[__i], __a); return __s; } static constexpr char_type to_char_type(const int_type& __c) noexcept { return char_type(__c); } static constexpr int_type to_int_type(const char_type& __c) noexcept { return int_type(__c); } static constexpr bool eq_int_type(const int_type& __c1, const int_type& __c2) noexcept { return __c1 == __c2; } static constexpr int_type eof() noexcept { return static_cast<int_type>(-1); } static constexpr int_type not_eof(const int_type& __c) noexcept { return eq_int_type(__c, eof()) ? 0 : __c; } }; _GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif #endif // _CHAR_TRAITS_H
Glucagon-Like Peptide-1 Receptor Agonists and Strategies To Improve Their Efficiency. Type 2 diabetes mellitus (T2DM) is increasing in global prevalence and is associated with serious health problems (e.g., cardiovascular disease). Various treatment options are available for T2DM, including the incretin hormone glucagon-like peptide-1 (GLP-1). GLP-1 is a therapeutic peptide secreted from the intestines following food intake, which stimulates the secretion of insulin from the pancreas. The native GLP-1 has a very short plasma half-life, owning to renal clearance and degradation by the enzyme dipeptidyl peptidase-4. To overcome this issue, various GLP-1 agonists with increased resistance to proteolytic degradation and reduced renal clearance have been developed, with several currently marketed. Strategies, such as controlled release delivery systems, methods to reduce renal clearance (e.g., PEGylation and conjugation to antibodies), and methods to improve proteolytic stability (e.g., stapling, cyclization, and glycosylation) provide means to further improve the ability of GLP-1 analogs. These will be discussed in this literature review.
Flexible Cooperative Game Theory Tool for Peer-to-Peer Energy Trading Analysis This paper presents an extensible and adaptable tool with which to study the use of cooperative game theory for allocating rewards to prosumers in peer-to-peer (P2P) energy trading systems. With the aim of expanding the use of renewable generation, the tool is a combination of the cooperative game theory platform and a specific game which focuses on a prosumer P2P network in a distribution network feeder. The final platform is able to run user defined P2P trading games, including the aforementioned one, over multiple trading intervals. It has two inbuilt allocation schemes which can be tested on the games for fairness and stability.
More Disciplined Approach Cecilia Muñoz, who served as Mr. Obama’s chief domestic policy adviser, said she was alarmed by the speed with which Mr. Trump and his team have learned to put their immigration agenda into effect. “The travel ban was a case of bureaucratic incompetence,” she said. “They made rookie mistakes. But they clearly learned from that experience. For the moment, all of the momentum is in the direction of very ugly, very extreme, very harmful policies.” By year’s end, the chaos and disorganization that marked Mr. Trump’s earliest actions on immigration had given way to a more disciplined approach that yielded concrete results, steered in large part by Mr. Kelly, a retired four-star Marine general. As secretary of homeland security, he had helped unleash immigration officers who felt constrained under Mr. Obama. They arrested 143,000 people in 2017, a sharp uptick, and deported more than 225,000. Later, as White House chief of staff, Mr. Kelly quietly persuaded the president to drop his talk of Mexico paying for the wall. But he has advocated on behalf of the president’s restrictionist vision, defying his reputation as a moderator of Mr. Trump’s hard-line instincts. In September, a third version of the president’s travel ban was issued with little fanfare and new legal justifications. Then, Mr. Trump overruled objections from diplomats, capping refugee admissions at 45,000 for 2018, the lowest since 1986. In November, the president ended a humanitarian program that granted residency to 59,000 Haitians since a 2010 earthquake ravaged their country. As the new year approached, officials began considering a plan to separate parents from their children when families are caught entering the country illegally, a move that immigrant groups called draconian. At times, though, Mr. Trump has shown an openness to a different approach. In private discussions, he returns periodically to the idea of a “comprehensive immigration” compromise, though aides have warned him against using the phrase because it is seen by his core supporters as code for amnesty. During a fall dinner with Democratic leaders, Mr. Trump explored the possibility of a bargain to legalize Dreamers in exchange for border security.
use super::Container; use std::fs::{self, File}; use std::io::{self, BufRead, BufReader, Read, Result}; use std::path::Path; use std::env; use procfs::process::Process; pub fn container() -> Container { if detect_vz() { return Container::OpenVZ } if detect_wsl() { return Container::WSL } if detect_proot() { return Container::PRoot } if let Some(container) = check_container_manager() { return container; } if let Some(container) = detect_systemd_container() { return container; } if let Some(container) = detect_init_env() { return container; } Container::None } fn detect_vz() -> bool { Path::new("/proc/vz").exists() && !Path::new("/proc/bc").exists() } fn detect_wsl() -> bool { let osrelease = Path::new("/proc/sys/kernel/osrelease"); if osrelease.exists() { if let Ok(osrelease) = File::open(osrelease) { let mut reader = BufReader::new(osrelease); let mut buf = String::new(); let _ = reader.read_line(&mut buf); if buf.contains("Microsoft") || buf.contains("WSL") { return true } } } return false } fn detect_proot() -> bool { if let Ok(status) = Process::myself().and_then(|s| s.status()) { let tracerpid = status.tracerpid; if tracerpid != 0 { if let Ok(ptrace_comm) = File::open(format!("/proc/{}/comm", tracerpid)) { let mut reader = BufReader::new(ptrace_comm); let mut buf = String::new(); let _ = reader.read_line(&mut buf); if buf.starts_with("proot") { return true; } } } } false } fn check_container_manager() -> Option<Container> { let path = Path::new("/run/systemd/container-manager"); if !path.exists() { return None } if let Ok(container) = File::open(path) { let mut reader = BufReader::new(container); let mut buf = String::new(); let _ = reader.read_line(&mut buf); return parse_container_from_manager(buf) } None } fn parse_container_from_manager(manager: String) -> Option<Container> { return if &manager[..] == "oci" { let c = detect_container_files(); return if c == Container::None { None } else { Some(c) } } else { Some(Container::from(&manager[..])) } } fn detect_container_files() -> Container { let container_file_table = vec![("/run/.containerenv", Container::Podman), ("/.dockerenv", Container::Docker)]; for container_file in container_file_table { if Path::new(container_file.0).exists() { return container_file.1; } } Container::Other } fn detect_init_env() -> Option<Container> { return if std::process::id() == 1 { match env::var("container") { Ok(v) => Some(Container::from(v)), Err(_) => None, } } else { if let Ok(proc) = Process::new(1) { if let Ok(e) = proc.environ() { e.get(&std::ffi::OsString::from("container")).map(|v| Container::from(v.to_str().unwrap_or("".into()))) } else { None } } else { None } } } fn detect_systemd_container() -> Option<Container> { let path = Path::new("/run/systemd/container"); if !path.exists() { return None } if let Ok(container) = File::open(path) { let mut reader = BufReader::new(container); let mut buf = String::new(); let _ = reader.read_line(&mut buf); return Some(Container::from(buf)) } None }
package test_helpers import ( "crypto/rand" "crypto/rsa" "crypto/x509" "encoding/pem" "errors" "fmt" "io/ioutil" "os" "os/exec" "path/filepath" "strings" "time" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gexec" slclient "github.com/maximilien/softlayer-go/client" datatypes "github.com/maximilien/softlayer-go/data_types" softlayer "github.com/maximilien/softlayer-go/softlayer" ) var ( TIMEOUT time.Duration POLLING_INTERVAL time.Duration ) const ( TEST_NOTES_PREFIX = "TEST:softlayer-go" TEST_LABEL_PREFIX = "TEST:softlayer-go" MAX_WAIT_RETRIES = 10 WAIT_TIME = 5 ) func FindTestVirtualGuests() ([]datatypes.SoftLayer_Virtual_Guest, error) { accountService, err := CreateAccountService() if err != nil { return []datatypes.SoftLayer_Virtual_Guest{}, err } virtualGuests, err := accountService.GetVirtualGuests() if err != nil { return []datatypes.SoftLayer_Virtual_Guest{}, err } testVirtualGuests := []datatypes.SoftLayer_Virtual_Guest{} for _, vGuest := range virtualGuests { if strings.Contains(vGuest.Notes, TEST_NOTES_PREFIX) { testVirtualGuests = append(testVirtualGuests, vGuest) } } return testVirtualGuests, nil } func FindTestVirtualDiskImages() ([]datatypes.SoftLayer_Virtual_Disk_Image, error) { accountService, err := CreateAccountService() if err != nil { return []datatypes.SoftLayer_Virtual_Disk_Image{}, err } virtualDiskImages, err := accountService.GetVirtualDiskImages() if err != nil { return []datatypes.SoftLayer_Virtual_Disk_Image{}, err } testVirtualDiskImages := []datatypes.SoftLayer_Virtual_Disk_Image{} for _, vDI := range virtualDiskImages { if strings.Contains(vDI.Description, TEST_NOTES_PREFIX) { testVirtualDiskImages = append(testVirtualDiskImages, vDI) } } return testVirtualDiskImages, nil } func FindTestNetworkStorage() ([]datatypes.SoftLayer_Network_Storage, error) { accountService, err := CreateAccountService() if err != nil { return []datatypes.SoftLayer_Network_Storage{}, err } networkStorageArray, err := accountService.GetNetworkStorage() if err != nil { return []datatypes.SoftLayer_Network_Storage{}, err } testNetworkStorageArray := []datatypes.SoftLayer_Network_Storage{} for _, storage := range networkStorageArray { if strings.Contains(storage.Notes, TEST_NOTES_PREFIX) { testNetworkStorageArray = append(testNetworkStorageArray, storage) } } return testNetworkStorageArray, nil } func FindTestSshKeys() ([]datatypes.SoftLayer_Security_Ssh_Key, error) { accountService, err := CreateAccountService() if err != nil { return []datatypes.SoftLayer_Security_Ssh_Key{}, err } sshKeys, err := accountService.GetSshKeys() if err != nil { return []datatypes.SoftLayer_Security_Ssh_Key{}, err } testSshKeys := []datatypes.SoftLayer_Security_Ssh_Key{} for _, key := range sshKeys { if key.Notes == TEST_NOTES_PREFIX { testSshKeys = append(testSshKeys, key) } } return testSshKeys, nil } func GetUsernameAndApiKey() (string, string, error) { username := os.Getenv("SL_USERNAME") if username == "" { return "", "", errors.New("SL_USERNAME environment must be set") } apiKey := os.Getenv("SL_API_KEY") if apiKey == "" { return username, "", errors.New("SL_API_KEY environment must be set") } return username, apiKey, nil } func CreateAccountService() (softlayer.SoftLayer_Account_Service, error) { username, apiKey, err := GetUsernameAndApiKey() if err != nil { return nil, err } client := slclient.NewSoftLayerClient(username, apiKey) accountService, err := client.GetSoftLayer_Account_Service() if err != nil { return nil, err } return accountService, nil } func CreateVirtualGuestService() (softlayer.SoftLayer_Virtual_Guest_Service, error) { username, apiKey, err := GetUsernameAndApiKey() if err != nil { return nil, err } client := slclient.NewSoftLayerClient(username, apiKey) virtualGuestService, err := client.GetSoftLayer_Virtual_Guest_Service() if err != nil { return nil, err } return virtualGuestService, nil } func CreateSecuritySshKeyService() (softlayer.SoftLayer_Security_Ssh_Key_Service, error) { username, apiKey, err := GetUsernameAndApiKey() if err != nil { return nil, err } client := slclient.NewSoftLayerClient(username, apiKey) sshKeyService, err := client.GetSoftLayer_Security_Ssh_Key_Service() if err != nil { return nil, err } return sshKeyService, nil } // TODO: need to refine and merge the CreateXXXService in test_helpers func CreateProductPackageService() (softlayer.SoftLayer_Product_Package_Service, error) { username, apiKey, err := GetUsernameAndApiKey() if err != nil { return nil, err } client := slclient.NewSoftLayerClient(username, apiKey) productPackageService, err := client.GetSoftLayer_Product_Package_Service() if err != nil { return nil, err } return productPackageService, nil } func CreateNetworkStorageService() (softlayer.SoftLayer_Network_Storage_Service, error) { username, apiKey, err := GetUsernameAndApiKey() if err != nil { return nil, err } client := slclient.NewSoftLayerClient(username, apiKey) networkStorageService, err := client.GetSoftLayer_Network_Storage_Service() if err != nil { return nil, err } return networkStorageService, nil } func FindAndDeleteTestSshKeys() error { sshKeys, err := FindTestSshKeys() if err != nil { return err } sshKeyService, err := CreateSecuritySshKeyService() if err != nil { return err } for _, sshKey := range sshKeys { deleted, err := sshKeyService.DeleteObject(sshKey.Id) if err != nil { return err } if !deleted { return errors.New(fmt.Sprintf("Could not delete ssh key with id: %d", sshKey.Id)) } } return nil } func FindAndDeleteTestVirtualGuests() ([]int, error) { virtualGuests, err := FindTestVirtualGuests() if err != nil { return []int{}, err } virtualGuestService, err := CreateVirtualGuestService() if err != nil { return []int{}, err } virtualGuestIds := []int{} for _, virtualGuest := range virtualGuests { virtualGuestIds = append(virtualGuestIds, virtualGuest.Id) deleted, err := virtualGuestService.DeleteObject(virtualGuest.Id) if err != nil { return []int{}, err } if !deleted { return []int{}, errors.New(fmt.Sprintf("Could not delete virtual guest with id: %d", virtualGuest.Id)) } } return virtualGuestIds, nil } func MarkVirtualGuestAsTest(virtualGuest datatypes.SoftLayer_Virtual_Guest) error { virtualGuestService, err := CreateVirtualGuestService() if err != nil { return err } vgTemplate := datatypes.SoftLayer_Virtual_Guest{ Notes: TEST_NOTES_PREFIX, } edited, err := virtualGuestService.EditObject(virtualGuest.Id, vgTemplate) if err != nil { return err } if edited == false { return errors.New(fmt.Sprintf("Could not edit virtual guest with id: %d", virtualGuest.Id)) } return nil } func FileExists(filePath string) bool { _, err := os.Stat(filePath) if err != nil { return false } return !os.IsNotExist(err) } func generateSshKeyUsingGo() (string, string, error) { privateKey, err := rsa.GenerateKey(rand.Reader, 2014) if err != nil { return "", "", err } fmt.Printf("----> creating ssh private key using Golang\n") privateKeyDer := x509.MarshalPKCS1PrivateKey(privateKey) privateKeyBlock := pem.Block{ Type: "RSA PRIVATE KEY", Headers: nil, Bytes: privateKeyDer, } privateKeyPem := string(pem.EncodeToMemory(&privateKeyBlock)) fmt.Printf("----> creating ssh public key using Golang\n") publicKey := privateKey.PublicKey publicKeyDer, err := x509.MarshalPKIXPublicKey(&publicKey) if err != nil { return "", "", err } publicKeyBlock := pem.Block{ Type: "PUBLIC KEY", Headers: nil, Bytes: publicKeyDer, } publicKeyPem := string(pem.EncodeToMemory(&publicKeyBlock)) return privateKeyPem, publicKeyPem, nil } func generateSshKeyUsingSshKeyGen() (string, string, error) { tmpDir, err := ioutil.TempDir("", "generateSshKeyUsingSshKeyGen") if err != nil { return "", "", err } rsaKeyFileName := filepath.Join(tmpDir, "ssh_key_file.rsa") rsaKeyFileNamePub := rsaKeyFileName + ".pub" sshKeyGen, err := exec.LookPath("ssh-keygen") if err != nil { return "", "", err } out, err := exec.Command(sshKeyGen, "-f", rsaKeyFileName, "-t", "rsa", "-N", "").Output() //DEBUG fmt.Println("========= output ") fmt.Println(string(out)) //END DEBUG if err != nil { return "", "", err } privateKey, err := ioutil.ReadFile(rsaKeyFileName) if err != nil { return "", "", err } publicKey, err := ioutil.ReadFile(rsaKeyFileNamePub) if err != nil { return "", "", err } err = os.RemoveAll(tmpDir) if err != nil { return "", "", err } return string(privateKey), string(publicKey), nil } func GenerateSshKey() (string, string, error) { return generateSshKeyUsingSshKeyGen() } func CreateTestSshKey() (datatypes.SoftLayer_Security_Ssh_Key, string) { _, testSshKeyValue, err := GenerateSshKey() Expect(err).ToNot(HaveOccurred()) sshKey := datatypes.SoftLayer_Security_Ssh_Key{ Key: strings.Trim(string(testSshKeyValue), "\n"), Label: TEST_LABEL_PREFIX, Notes: TEST_NOTES_PREFIX, } sshKeyService, err := CreateSecuritySshKeyService() Expect(err).ToNot(HaveOccurred()) fmt.Printf("----> creating ssh key in SL\n") createdSshKey, err := sshKeyService.CreateObject(sshKey) Expect(err).ToNot(HaveOccurred()) Expect(createdSshKey.Key).To(Equal(sshKey.Key), "key") Expect(createdSshKey.Label).To(Equal(sshKey.Label), "label") Expect(createdSshKey.Notes).To(Equal(sshKey.Notes), "notes") Expect(createdSshKey.CreateDate).ToNot(BeNil(), "createDate") Expect(createdSshKey.Id).To(BeNumerically(">", 0), "id") Expect(createdSshKey.ModifyDate).To(BeNil(), "modifyDate") fmt.Printf("----> created ssh key: %d\n in SL", createdSshKey.Id) return createdSshKey, string(testSshKeyValue) } func CreateVirtualGuestAndMarkItTest(securitySshKeys []datatypes.SoftLayer_Security_Ssh_Key) datatypes.SoftLayer_Virtual_Guest { sshKeys := make([]datatypes.SshKey, len(securitySshKeys)) for i, securitySshKey := range securitySshKeys { sshKeys[i] = datatypes.SshKey{Id: securitySshKey.Id} } virtualGuestTemplate := datatypes.SoftLayer_Virtual_Guest_Template{ Hostname: "test", Domain: "softlayergo.com", StartCpus: 1, MaxMemory: 1024, Datacenter: datatypes.Datacenter{ Name: "ams01", }, SshKeys: sshKeys, HourlyBillingFlag: true, LocalDiskFlag: true, OperatingSystemReferenceCode: "UBUNTU_LATEST", } virtualGuestService, err := CreateVirtualGuestService() Expect(err).ToNot(HaveOccurred()) fmt.Printf("----> creating new virtual guest\n") virtualGuest, err := virtualGuestService.CreateObject(virtualGuestTemplate) Expect(err).ToNot(HaveOccurred()) fmt.Printf("----> created virtual guest: %d\n", virtualGuest.Id) WaitForVirtualGuestToBeRunning(virtualGuest.Id) WaitForVirtualGuestToHaveNoActiveTransactions(virtualGuest.Id) fmt.Printf("----> marking virtual guest with TEST:softlayer-go\n") err = MarkVirtualGuestAsTest(virtualGuest) Expect(err).ToNot(HaveOccurred(), "Could not mark virtual guest as test") fmt.Printf("----> marked virtual guest with TEST:softlayer-go\n") return virtualGuest } func DeleteVirtualGuest(virtualGuestId int) { virtualGuestService, err := CreateVirtualGuestService() Expect(err).ToNot(HaveOccurred()) fmt.Printf("----> deleting virtual guest: %d\n", virtualGuestId) deleted, err := virtualGuestService.DeleteObject(virtualGuestId) Expect(err).ToNot(HaveOccurred()) Expect(deleted).To(BeTrue(), "could not delete virtual guest") WaitForVirtualGuestToHaveNoActiveTransactions(virtualGuestId) } func DeleteSshKey(sshKeyId int) { sshKeyService, err := CreateSecuritySshKeyService() Expect(err).ToNot(HaveOccurred()) fmt.Printf("----> deleting ssh key: %d\n", sshKeyId) deleted, err := sshKeyService.DeleteObject(sshKeyId) Expect(err).ToNot(HaveOccurred()) Expect(deleted).To(BeTrue(), "could not delete ssh key") WaitForDeletedSshKeyToNoLongerBePresent(sshKeyId) } func WaitForVirtualGuest(virtualGuestId int, targetState string, timeout time.Duration) { virtualGuestService, err := CreateVirtualGuestService() Expect(err).ToNot(HaveOccurred()) fmt.Printf("----> waiting for virtual guest: %d, until %s\n", virtualGuestId, targetState) Eventually(func() string { vgPowerState, err := virtualGuestService.GetPowerState(virtualGuestId) Expect(err).ToNot(HaveOccurred()) fmt.Printf("----> virtual guest: %d, has power state: %s\n", virtualGuestId, vgPowerState.KeyName) return vgPowerState.KeyName }, timeout, POLLING_INTERVAL).Should(Equal(targetState), fmt.Sprintf("failed waiting for virtual guest to be %s", targetState)) } func WaitForVirtualGuestToBeRunning(virtualGuestId int) { WaitForVirtualGuest(virtualGuestId, "RUNNING", TIMEOUT) } func WaitForVirtualGuestToHaveNoActiveTransactions(virtualGuestId int) { virtualGuestService, err := CreateVirtualGuestService() Expect(err).ToNot(HaveOccurred()) fmt.Printf("----> waiting for virtual guest to have no active transactions pending\n") Eventually(func() int { activeTransactions, err := virtualGuestService.GetActiveTransactions(virtualGuestId) Expect(err).ToNot(HaveOccurred()) fmt.Printf("----> virtual guest: %d, has %d active transactions\n", virtualGuestId, len(activeTransactions)) return len(activeTransactions) }, TIMEOUT, POLLING_INTERVAL).Should(Equal(0), "failed waiting for virtual guest to have no active transactions") } func WaitForDeletedSshKeyToNoLongerBePresent(sshKeyId int) { accountService, err := CreateAccountService() Expect(err).ToNot(HaveOccurred()) fmt.Printf("----> waiting for deleted ssh key to no longer be present\n") Eventually(func() bool { sshKeys, err := accountService.GetSshKeys() Expect(err).ToNot(HaveOccurred()) deleted := true for _, sshKey := range sshKeys { if sshKey.Id == sshKeyId { deleted = false } } return deleted }, TIMEOUT, POLLING_INTERVAL).Should(BeTrue(), "failed waiting for deleted ssh key to be removed from list of ssh keys") } func WaitForCreatedSshKeyToBePresent(sshKeyId int) { accountService, err := CreateAccountService() Expect(err).ToNot(HaveOccurred()) fmt.Printf("----> waiting for created ssh key to be present\n") Eventually(func() bool { sshKeys, err := accountService.GetSshKeys() Expect(err).ToNot(HaveOccurred()) keyPresent := false for _, sshKey := range sshKeys { if sshKey.Id == sshKeyId { keyPresent = true } } return keyPresent }, TIMEOUT, POLLING_INTERVAL).Should(BeTrue(), "created ssh key but not in the list of ssh keys") } func SetUserDataToVirtualGuest(virtualGuestId int, metadata string) { virtualGuestService, err := CreateVirtualGuestService() Expect(err).ToNot(HaveOccurred()) success, err := virtualGuestService.SetMetadata(virtualGuestId, metadata) Expect(err).ToNot(HaveOccurred()) Expect(success).To(BeTrue()) fmt.Printf(fmt.Sprintf("----> successfully set metadata: `%s` to virtual guest instance: %d\n", metadata, virtualGuestId)) } func ConfigureMetadataDiskOnVirtualGuest(virtualGuestId int) datatypes.SoftLayer_Provisioning_Version1_Transaction { virtualGuestService, err := CreateVirtualGuestService() Expect(err).ToNot(HaveOccurred()) transaction, err := virtualGuestService.ConfigureMetadataDisk(virtualGuestId) Expect(err).ToNot(HaveOccurred()) fmt.Printf(fmt.Sprintf("----> successfully configured metadata disk for virtual guest instance: %d\n", virtualGuestId)) return transaction } func SetUserMetadataAndConfigureDisk(virtualGuestId int, userMetadata string) datatypes.SoftLayer_Provisioning_Version1_Transaction { SetUserDataToVirtualGuest(virtualGuestId, userMetadata) transaction := ConfigureMetadataDiskOnVirtualGuest(virtualGuestId) Expect(transaction.Id).ToNot(Equal(0)) return transaction } func RunCommand(timeout time.Duration, cmd string, args ...string) *Session { command := exec.Command(cmd, args...) session, err := Start(command, GinkgoWriter, GinkgoWriter) Ω(err).ShouldNot(HaveOccurred()) session.Wait(timeout) return session } func ScpToVirtualGuest(virtualGuestId int, sshKeyFilePath string, localFilePath string, remotePath string) { virtualGuestService, err := CreateVirtualGuestService() Expect(err).ToNot(HaveOccurred()) virtualGuest, err := virtualGuestService.GetObject(virtualGuestId) Expect(err).ToNot(HaveOccurred()) fmt.Printf("----> sending SCP command: %s\n", fmt.Sprintf("scp -i %s %s root@%s:%s", sshKeyFilePath, localFilePath, virtualGuest.PrimaryIpAddress, remotePath)) session := RunCommand(TIMEOUT, "scp", "-o", "StrictHostKeyChecking=no", "-i", sshKeyFilePath, localFilePath, fmt.Sprintf("root@%s:%s", virtualGuest.PrimaryIpAddress, remotePath)) Ω(session.ExitCode()).Should(Equal(0)) } func SshExecOnVirtualGuest(virtualGuestId int, sshKeyFilePath string, remoteFilePath string, args ...string) int { virtualGuestService, err := CreateVirtualGuestService() Expect(err).ToNot(HaveOccurred()) virtualGuest, err := virtualGuestService.GetObject(virtualGuestId) Expect(err).ToNot(HaveOccurred()) fmt.Printf("----> sending SSH command: %s\n", fmt.Sprintf("ssh -i %s root@%s '%s \"%s\"'", sshKeyFilePath, virtualGuest.PrimaryIpAddress, remoteFilePath, args[0])) session := RunCommand(TIMEOUT, "ssh", "-o", "StrictHostKeyChecking=no", "-i", sshKeyFilePath, fmt.Sprintf("root@%s", virtualGuest.PrimaryIpAddress), fmt.Sprintf("%s \"%s\"", remoteFilePath, args[0])) return session.ExitCode() } func TestUserMetadata(userMetadata, sshKeyValue string) { workingDir, err := os.Getwd() Expect(err).ToNot(HaveOccurred()) sshKeyFilePath := filepath.Join(workingDir, "sshTemp") err = ioutil.WriteFile(sshKeyFilePath, []byte(sshKeyValue), 600) defer os.Remove(sshKeyFilePath) Expect(err).ToNot(HaveOccurred()) fetchUserMetadataShFilePath := filepath.Join(workingDir, "..", "scripts", "fetch_user_metadata.sh") Expect(err).ToNot(HaveOccurred()) ScpToVirtualGuest(6396994, sshKeyFilePath, fetchUserMetadataShFilePath, "/tmp") retCode := SshExecOnVirtualGuest(6396994, sshKeyFilePath, "/tmp/fetch_user_metadata.sh", userMetadata) Expect(retCode).To(Equal(0)) } func WaitForIscsiStorageToBeDeleted(storageId int) { accountService, err := CreateAccountService() Expect(err).ToNot(HaveOccurred()) fmt.Printf("----> waiting for created iSCSI volume to be deleted\n") Eventually(func() bool { storages, err := accountService.GetIscsiNetworkStorage() Expect(err).ToNot(HaveOccurred()) deletedFlag := false for _, storage := range storages { if storage.Id == storageId && storage.BillingItem == nil { deletedFlag = true } } return deletedFlag }, TIMEOUT, POLLING_INTERVAL).Should(BeTrue(), "created iSCSI volume but not deleted successfully") } func GetVirtualGuestPrimaryIpAddress(virtualGuestId int) string { virtualGuestService, err := CreateVirtualGuestService() Expect(err).ToNot(HaveOccurred()) vgIpAddress, err := virtualGuestService.GetPrimaryIpAddress(virtualGuestId) Expect(err).ToNot(HaveOccurred()) return vgIpAddress }
Twitter's like vs. favorite debate isn't just about hearts and stars. Photo illustration by Slate. Icons courtesy Facebook, Twitter and Thinkstock. The Twitterati were abuzz earlier this week when the social-networking service replaced the star (which denoted “favorite,” according to the company) with a heart (“like”). Their angst prompted a semiintense debate and more than a few get-a-life interjections from people who said, correctly, that the world has more important things to worry about. While I’m among those who think Twitter made a mistake—I’ll suggest an easy fix in a minute—I also think the situation reminds us of an issue that’s genuinely important: namely the reality that you and I aren’t much more than pawns in the operations of the giant, centralized enterprises that we use every day to communicate. We are changing our star icon for favorites to a heart and we’ll be calling them likes. We want to make Twitter easier and more rewarding to use, and we know that at times the star could be confusing, especially to newcomers. You might like a lot of things, but not everything can be your favorite. For people who can’t wrap their brains around giving multiple meanings to the heart icon, clever programmers have already restored the star icon, albeit in a limited way, by creating a browser plug-in that replaces the heart. But it works only in your local browser and is irrelevant to others. In a way, this discussion is Facebook’s doing, because the dominant social network made the “like” button so integral years ago. Facebook’s goal was twofold: to add a signaling system for users but more (in my opinion) to spread the button around the Web, making it nearly ubiquitous, so Facebook could track people everywhere. But even Facebook has admitted that like doesn’t always apply, which is why it is experimenting with emoji-based reactions. Much more important in all this is the reality that Twitter and Facebook and other centralized services are in a position to make such decisions in the first place. They can change the nature of our conversations, because they own the platforms. They are working harder and harder to reduce the wider Web—and email and independent applications and services—to afterthoughts, no longer the once-vibrant and decentralized ecosystem for communicating, assembling, and innovating. They can do so because you and I have ceded our own choices to them, apart from the binary use-or-not decision we make when we sign up. So when I ask Twitter to add the checkmark, I’m a supplicant, not a customer. In a world where we own less and less and get a mere license to use more and more, that’s our role. We need to reverse course, and soon.
package io.github.cavweb20.xml.sax.echo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.xml.sax.ErrorHandler; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; /** * @author cavweb20 * */ public class TestErrorHandler implements ErrorHandler { /** * Private variables. Setting up the logging properties. */ private static Logger LOG = LoggerFactory.getLogger(TestErrorHandler.class); /** * Report warnings, and continue parsing. * @param e SAXParseException variable. */ public void warning(SAXParseException e) throws SAXException { LOG.warn(e.getMessage()); LOG.warn(e.getSystemId() + " - Line: " + e.getLineNumber() + " - Column: " + e.getColumnNumber()); } /** * Report recoverable errors, and continue parsing. * @param e SAXParseException variable. */ public void error(SAXParseException e) throws SAXException { LOG.error(e.getMessage()); LOG.error(e.getSystemId() + " - Line: " + e.getLineNumber() + " - Column: " + e.getColumnNumber()); } /** * Report fatal errors, and continue parsing. * Note: results are no longer reliable once a fatal error has * been reported. * @param e SAXParseException variable. */ public void fatalError(SAXParseException e) throws SAXException { LOG.error(e.getMessage()); LOG.error(e.getSystemId() + " - Line: " + e.getLineNumber() + " - Column: " + e.getColumnNumber()); } }
Can racial disparity in health between black and white Americans be attributed to racial disparities in body weight and socioeconomic status? Few studies have examined to what extent racial disparities in chronic health conditions (CHCs) are attributable to racial differences in body weight (measured as body mass index ) and socioeconomic status (SES) among older adults. To address this gap, using longitudinal data from the Health and Retirement Study, the current study examined risk factors of CHC trajectory including race, BMI, and SES. The sample consists of 22,560 in 1998, 20,825 in 2000, and 19,004 in 2002. Data analysis was done through latent growth curve modeling. As expected, older adults presented an increasing trajectory of CHCs over time. Black Americans presented a significantly more negative CHC trajectory than did their white counterparts, confirming racial disparity in health over time. Consequent hierarchical analyses revealed that racial disparity in CHC trajectory can be explained by racial disparity in BMI and that racial disparity in BMI can be attributed to racial disparity in SES. Because low SES is closely related to unhealthy diet and negative health behaviors that may subsequently lead to obesity and chronic health conditions, the findings suggest that to address racial disparity in CHCs, it is important for social workers to continuously try to mitigate racial inequality in SES.
CharcotLeyden crystals: do they exist in veterinary species? A case report and literature review The CharcotLeyden crystal (CLC) is a major human eosinophil protein that readily crystallizes; these crystals are common in eosinophilic diseases. Although anecdotal existence of these crystals is known in veterinary pathology, definitive reports do not exist, to our knowledge. We identified eosinophilic crystals in a laryngeal myxosarcoma from a 2-y-old, spayed female, Labrador Retriever dog that were tentatively interpreted as CLCs. However, ZiehlNeelsen acid-fast stain was negative, arguing against CLCs. The crystals stained red with Masson trichrome, precluding collagen. Periodic acidSchiff and alcian blue were negative. The crystals stained positively with Okajima, and no myoglobin immunoreactivity was detected, supporting their identity as hemoglobin crystals. In the absence of a hematologic abnormality, these crystals were interpreted to be abnormal hemoglobin breakdown products. Protein sequence comparison was pursued to determine whether a protein similar to CLC exists in mammals. Only 3 nonhuman primate species, the Sumatran orangutan (Pongo abelii), rhesus macaque (Macaca mulatta), and cynomolgus monkey (Macaca fascicularis), had a sequence similarity of >80%. Of the crystal-forming residues, 12 of 54 (22%) were different in the Sumatran orangutan and 15 of 54 (28%) were different in the Macaca spp., which may affect the crystallization process. The lack of reports of CLCs in nonhuman species and our results collectively suggest that CLCs are human-specific.
Various aspects of the present disclosure relate generally to a floor, and specifically to a unitary floor, and a method of fabricating a unitary floor. Large containers are often utilized for storing items and/or for transporting items from one location to another. For instance, a semi-trailer is a type of container that is pulled by a road tractor, thus providing a convenient and widely used means to transport goods across public roads including interstates, highways, and other roadways. One of the most common types of semi-trailer, known as a box trailer, is essentially a box-shaped container on wheels, making the semi-trailer suitable for temporarily storing, securing, and hauling various types of cargo. For instance, a box trailer includes a container that is typically about eight feet (about 2.44 meters) wide and about 13 feet (about 3.96 meters) high. A box trailer also has a relatively long overall length, e.g., a length ranging from about 28 feet (about 8.53 meters) to over 50 feet (about 15.24 meters) in length in some circumstances. A box trailer has one or more doors, typically located along the back of the trailer, to provide ingress and egress for loading contents into, and unloading contents from, the trailer. For instance, workers operating forklift trucks, pallet jacks, and other materials handling devices can cooperate to move cargo into the trailer for transportation to a desired destination. Once a trailer is loaded, the doors can be closed and latched shut from the outside.
<filename>source/window.h #pragma once #include <windows.h> LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); class Window { public: Window(); Window(const Window&) = delete; Window& operator =(const Window&) = delete; ~Window(); bool ProcessMessages(); private: HINSTANCE m_hInstance; HWND m_hWnd; };
Here's a horrifying story just in time for Halloween: In Tokyo, a patient farted during surgery, which ignited a fire that led to burns all over her body. The incident happened back in April, but the Tokyo Medical University Hospital report was released on October 28th after experts determined there were no flammable materials present during the surgery. So how did it happen? Doctors were operating on the patient's cervix with a laser when she suddenly farted, igniting the laser and badly burning her lower body. "When the patient's intestinal gas leaked into the space of the operation (room), it ignited with the irradiation of the laser, and the burning spread, eventually reaching the surgical drape and causing the fire," the report reads. So, yep, the fire was caused entirely by the fart. No making any "talk about silent but deadly!" jokes, OK? (H/T Asahi Shimbun)
Five coaches and the engine of a passenger train derailed in Kokrajhar district of Assam in the early hours today, seriously injuring its engine driver and causing minor injuries to some passengers. Northeast Frontier Railway spokesman Jayamta Sarma said that the accident occurred between Salakati and Basugaon at 5.15 AM as the 55753 UP Sifung passenger train was about to negotiate a bridge. All the passengers of the train coming from Alipurduar in Bengal to Guwahati were transhipped from the accident site, Sarma said. While the engine driver was admitted to hospital, the passengers with minor injuries were given first aid, the spokesman said. As the railway track was blocked due to the derailment, other trains might be delayed, he added.
Too hard to swallow! An 80-year-old woman presented with a 4-month history of intermittent oropharyngeal dysphagia and aspiration, particularly after eating peas. She had no significant medical history and denied additional symptomatology. Gastroscopy revealed a smooth lesion arising in the pharynx abutting the epiglottis (figure 1) but was otherwise unremarkable. Pillow sign was negative. No neck masses were palpable on examination after endoscopy. Figure 1 Endoscopic appearance of the pharynx. 1. What is the endoscopic finding and what are the
Theory of constraints: is it a theory and a good one? In this study, we attempted to advance the academic dialogue towards establishing TOC as a formal operations management theory, so it can continue improving practice. We link the component parts of the TOC and map the theoretical arrangement to the consensual definitional components and properties of a theory. Also, we examine whether TOC satisfy the virtues of a good theory (uniqueness, parsimony, conservation, generalisability, fecundity, internal consistency, empirical riskiness, and abstraction). Consequently, a practical outcome of our study stems from demonstrating the utility of the goodness criteria as a useful instrument for examining future theories in the field of operations. From a practitioner's standpoint, by establishing a strong theoretical foundation for TOC, we assist managers deploying it to gain better understanding of TOC elements and ultimately avoid implementation failures. Also, we increase the credibility of TOC in the eyes of senior executives. The study concludes by sketching new avenues for future research that have industrial relevance for successful TOC implementation efforts.
// GetPriorThreeDSecureData returns the PriorThreeDSecureData field. func (t *ThreeDSecure) GetPriorThreeDSecureData() *ThreeDSecureData { if t == nil { return nil } return t.PriorThreeDSecureData }
Early environment and child-to-adult growth trajectories in the 1958 British birth cohort. BACKGROUND Genetics and environmental conditions early in life are known to influence height. However, evidence is restricted to studies conducted at a specific age, and thus the effect on the entire growth trajectory has been neglected. OBJECTIVE The objective was to determine when parental height and factors early in offspring life start to affect offspring height, when these variables have the strongest effect, and whether these variables persist to adulthood. DESIGN Longitudinal data from the 1958 British birth cohort (all of whom were born during 1 wk in March 1958), including height measurements at 7, 11, 16, and 33 y of age, were analyzed by using multivariate multilevel response models. RESULTS Parental height, birth weight, maternal smoking during pregnancy, breastfeeding, parental divorce, and socioeconomic factors were all significantly associated with childhood height, but their effects differed thereafter. Parental height and birth weight were most strongly associated with offspring height, and their effects persisted (adjusted increase in adult height: 2 cm for 1 SD of maternal or paternal height, or 1 kg of birth weight). Socioeconomic disadvantage (manual social class, large family size, and overcrowded households) was associated with substantial deficits of 2-3 cm (adjusted estimates) in height at 7 y. Catch-up growth was apparent but was insufficient to overcome the initial insult on growth; the adjusted deficit was as high as 1 cm in adulthood. CONCLUSIONS Children from disadvantaged backgrounds have a delayed pattern of growth before the pubertal spurt, which is followed by catch-up growth. The health consequences of this pattern of growth need to be examined in future studies.
import { Sponsor } from './sponsorsData' import * as mapboxgl from 'mapbox-gl' declare global { var mapboxgl: mapboxgl var MapBoxGeocoder: any interface Window { sponsorsData: Sponsor[] map: mapboxgl.Map } }
import Mock from 'mockjs'; import setupMock, { successResponseWrap, failResponseWrap, } from '@/utils/setup-mock'; import { MockParams } from '@/types/mock'; import { isLogin } from '@/utils/auth'; setupMock({ setup() { // Mock.XHR.prototype.withCredentials = true; // 用户信息 Mock.mock(new RegExp('/api/user/info'), () => { if (isLogin()) { const role = window.localStorage.getItem('userRole') || 'admin'; return successResponseWrap({ name: '王立群', avatar: '//lf1-xgcdn-tos.pstatp.com/obj/vcloud/vadmin/start.8e0e4855ee346a46ccff8ff3e24db27b.png', email: '<EMAIL>', job: 'frontend', jobName: '前端艺术家', organization: 'Frontend', organizationName: '前端', location: 'beijing', locationName: '北京', introduction: '人潇洒,性温存', personalWebsite: 'https://www.arco.design', phone: '150****0000', registrationDate: '2013-05-10 12:10:00', accountId: '15012312300', certification: 1, role, }); } return failResponseWrap(null, 50008, '未登录'); }); // 登录 Mock.mock(new RegExp('/api/user/login'), (params: MockParams) => { const { username, password } = JSON.parse(params.body); if (!username) { return failResponseWrap(null, 50000, '用户名不能为空'); } if (!password) { return failResponseWrap(null, 50000, '密码不能为空'); } if (username === 'admin' && password === '<PASSWORD>') { window.localStorage.setItem('userRole', 'admin'); return successResponseWrap({ token: '<PASSWORD>', }); } if (username === 'user' && password === '<PASSWORD>') { window.localStorage.setItem('userRole', 'user'); return successResponseWrap({ token: '<PASSWORD>', }); } return failResponseWrap(null, 50000, '账号或者密码错误'); }); // 登出 Mock.mock(new RegExp('/api/user/logout'), () => { return successResponseWrap(null); }); }, });
Forehead Flap Ballooning for Scar Revision IntRoductIon In cosmetic and reconstructive surgery, face and neck reconstruction is considered as one of the most important and most difficult surgeries to perform. The major problem faced by a surgeon in these cases is the lack of similar skin with anatomical and functional features of facial skin. The classical example of the physiological tissue expansion commonly observed is the laxity of the abdominal wall during pregnancy. The other example of the tissue expansion can be seen in the skin overlying the tumor. IntRoductIon In cosmetic and reconstructive surgery, face and neck reconstruction is considered as one of the most important and most difficult surgeries to perform. The major problem faced by a surgeon in these cases is the lack of similar skin with anatomical and functional features of facial skin. The classical example of the physiological tissue expansion commonly observed is the laxity of the abdominal wall during pregnancy. The other example of the tissue expansion can be seen in the skin overlying the tumor. The first person to expand the skin for reconstructive purposes was Neuman, by placing the inflatable balloon subcutaneously. The lack of adequate soft tissues required for reconstruction also restricts surgical treatment. Tissue expansion has become a strategy to solve these shortcomings in soft tissue over the past 25 years. This method has the remarkable ability to generate skin that fits almost absolutely perfectly the color, texture, and sensation required for reconstruction in a specific area. Compared to other plastic surgery techniques, tissue expansion enhances the closure of large soft-tissue defects in donor areas without additional scars. The artificial silicone implants are placed in the tissue planes below the skin and are periodically inflated, exerting a constant pressure on the skin which makes it to expand. Tissue expanders are principally based on the mechanical and the biological creep in which mechanical creep is the morphological changes occurring at cellular level in response to applied stress and biological creep is the resultant expansion of skin surface. The mechanical and biological creep should be identical to acquire an optimum growth. The periodic inflation of the implant is done until the desired dimension of tissue is achieved. In this whole process, there is concurrent thinning of the dermis with thickening of epidermis, and the alignment of collagen fibrins occurs till complete remodeling. This procedure has the phenomenal ability of regeneration of skin with perfect match of color, texture, and sensation necessary for reconstruction. There is an excellent closure of extensive soft-tissue defects without additional scars in the donor area with tissue expanders as compared with other methods of plastic surgery. Due to temporary inconvenience and cosmetic deformity caused by the procedure of tissue expansion, patient education, the scar was 4.5 cm 2.5 cm approximately and had a sunken appearance. A CT scan was obtained of the head and neck region to rule out any bony defect at the forehead site along with routine blood test . Surgical procedure The patient was draped and painted under aseptic condition. The procedure was carried out under local anesthesia, 10 cm long incision was made on the previous scar line, and then dissection was carried out on both sides of the incision in the subgaleal plane, and simultaneously, pockets were created on either side of incision. A 50 ml tissue expander was used in this case. The port of the expander was placed in the subgaleal layer in the pocket created on the left side lateral to the scar, acceptance and compliance are essential. This procedure is commonly indicated for the correction of posttraumatic or postoperative alopecia, treatment of baldness, expansion of forehead skin before total nasal reconstruction, expansion of postauricular skin before reconstruction of external ear, scar revision, and burns excision. case RepoRt A 38-year-old man reported to our hospital with the chief complaint of a scar on the forehead . On taking the history, the patient revealed that he sustained a bullet injury 6 years back on his face, leading to the destruction of facial structures, including hard and soft tissues. The patient was then immediately carried to a local hospital where primary management was done. After 6 months, the patient underwent nasal reconstruction surgery due to severely compromised facial aesthetics. For reconstruction of the nose, a forehead flap was taken, leading to the hypotrophic scar. On examination, the patient presented with a hypotrophic scar on the left side of forehead. The scar was 10 cm above the left eyebrow. Due to receding hairline, the scar was clearly visible. The size of Figure 3]. The placement of the expander was anteroinferior to the cicatrix as to rectify the old linear scar present inferior to the cicatrix measuring 8 cm. After 10 days, sutures were removed, and inflation was done with a no 24 scalp vein set along with 10 ml syringe . The patient was recalled after every week for consequently 4 weeks. At every visit, the expander was inflated with 8 ml normal saline until volume reached up to 32 ml. The expander along with the port was removed 2 weeks' postexpansion . The hypotrophic scar was excised , and primary closure was done with 3-0 vicryl 6-0 prolene and staples, respectively . Staples were used to hold both the ends together as there occurs a phenomenon of tissue stretch-back according to which the expanded tissue stretched over a long period contracted immediately after the tension is released. This can result into a wide stretched scar, a secondary distortion of adjacent mobile structure or hypertrophicity of the scar and suture removal was done after 15 days . Results The patient was regularly followed up for 6 months after the procedure . The preceding hypotrophic scar on the patient's forehead completely disappeared post 6 months' follow-up. This procedure showed excellent results since both the hypotrophic scar and the previous incision scar were completely extinct. Successful scalp reconstruction requires careful preoperative preparation and reliable intraoperative results. Detailed knowledge of scalp anatomy, skin biomechanics, hair physiology, and the range of local tissue rearrangements available enables excellent esthetic reconstruction. Declaration of patient consent The authors certify that they have obtained all appropriate patient consent forms. In the form the patient(s) has/have given his/her/their consent for his/her/their images and other clinical information to be reported in the journal. The patients understand that their names and initials will not be published and due efforts will be made to conceal their identity, but anonymity cannot be guaranteed. Financial support and sponsorship Nil. Conflicts of interest There are no conflicts of interest. dIscussIon Nowadays, cutaneous expansion is used progressively in reconstructive surgery for treating a variety of problems such as burns alopecia scar revision in children and adults. With the use of this technique, the reconstruction of many acquired and congenital defects has been made possible. In tissue expanders, various shapes available are standard round, rectangular, and crescent. In the maxillofacial region, the volumetric range of the expander lies between 1 and 250 ml. Tissue expansion is an effective method for treating multiple extensive postburn scar deformities, which makes it possible to increase the amount of normal tissue available for reconstruction with a similar color and texture to that of the area of defect. The restored texture and color of the flap should be in good assimilation with the recipient region with respect to the use of tissue expanders. In this study, the assimilation with the surrounding skin of the color of the flap, consistency, and thickness was satisfactory. It is very important to choose the size, shape, and position of the tissue expander and injection port location. Motamed et al. used rectangular tissue expanders, stating that flap design possibilities could be expanded using these expanders. Taking a study done by Van Rappard et al., into consideration, the round expander was selected. He stated two methods of selection of round expanders, one was based on diameter, and another method was based on the circumference of the balloon portion of expander in our case, the diameter of the base of the expander was 2.5 times as large as the defect. As the expansion procedure progresses, there is an increase in the number and caliber of the random and axial pattern vessel present within the flap which leads to the increase in blood flow to the extended flaps, ultimately leading to very negligible chances of ischemic necrosis of the flap. No deforming secondary defects, no distant flaps, best color match, texture, hair-bearing, better vascularity, best survival of the reconstruction are some of the advantages of tissue expansion. The disadvantages of the tissue expander are discomfort, deformity during inflation. This procedure is not appropriate for all lesions, including large lesions which cannot be resected by onetime expansion, lesions without adequate surrounding normal skin tissue to insert an expander, and lesions with a propensity to metastasize implantation. In our case report, the method of tissue expansion was most suitable as the lesion was small-sized which was not possible to excise or suture directly in one stage or serial excision procedures. conclusIon
/** * Created by InSight Suen on 2017/8/9. * Countdown timer */ public class PointProgress extends View { private static final String TAG = "PointProgress"; private static final boolean DEBUG = true; public static final int DEFAULT_MAX_VALUE = 100; public static final int DEFAULT_PAINT_RADIUS = ViewUtils.dp2px(4); public static final int DEFAULT_STROKE_WIDTH = ViewUtils.dp2px(2); private float mPaintRadius; private int mMax; private int mProgress; private boolean mPaused = true; private Paint mPointPaint; private Paint mForegroundPaint; private Paint mBackgroundPaint; private RectF mRectF; public PointProgress(Context context) { this(context, null); } public PointProgress(Context context, @Nullable AttributeSet attrs) { this(context, attrs, 0); } public PointProgress(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); TypedArray ta = getResources().obtainAttributes(attrs, R.styleable.PointProgress); mProgress = ta.getInt(R.styleable.PointProgress_progress, 0); mMax = ta.getInt(R.styleable.PointProgress_max, DEFAULT_MAX_VALUE); if (mProgress < 0) { mProgress = 0; } else if (mProgress > mMax) { mProgress = mMax; } mPaintRadius = ta.getDimensionPixelSize( R.styleable.PointProgress_paint_radius, DEFAULT_PAINT_RADIUS); float strokeWidth = ta.getDimensionPixelSize( R.styleable.PointProgress_stroke_width, DEFAULT_STROKE_WIDTH); int backgroundColor = ta.getColor(R.styleable.PointProgress_background_color, Color.argb(0x0, 0x0, 0x0, 0x0)); int primaryColor = ta.getColor(R.styleable.PointProgress_primary_color, Color.rgb(0x82, 0xb1, 0xff)); ta.recycle(); initPaint(primaryColor, backgroundColor, strokeWidth); } private void initPaint(int primaryColor, int backgroundColor, float strokeWidth) { mPointPaint = new Paint(Paint.ANTI_ALIAS_FLAG); mPointPaint.setColor(primaryColor); mPointPaint.setStyle(Paint.Style.FILL); mForegroundPaint = new Paint(Paint.ANTI_ALIAS_FLAG); mForegroundPaint.setColor(primaryColor); mForegroundPaint.setStyle(Paint.Style.STROKE); mForegroundPaint.setStrokeWidth(strokeWidth); mBackgroundPaint = new Paint(Paint.ANTI_ALIAS_FLAG); mBackgroundPaint.setColor(backgroundColor); mBackgroundPaint.setStyle(Paint.Style.FILL); mBackgroundPaint.setStrokeWidth(strokeWidth); } @Override protected void onDraw(Canvas canvas) { long startTime; if (DEBUG) { startTime = SystemClock.elapsedRealtime(); } int contentWidth = getWidth() - getPaddingLeft() - getPaddingRight(); int contentHeight = getHeight() - getPaddingTop() -getPaddingBottom(); float radius = (Math.min(contentWidth, contentHeight) - mPaintRadius * 2) / 2; float centerX = getPaddingLeft() + contentWidth / 2; float centerY = getPaddingTop() + contentHeight / 2; canvas.drawCircle(centerX, centerY, radius, mBackgroundPaint); if (mRectF == null) { mRectF = new RectF(); int left = (int) (centerX - radius); int top = (int) (centerY - radius); int right = (int) (centerX + radius); int bottom = (int) (centerY + radius); mRectF.set(left, top, right, bottom); } float angle = (float) mProgress / mMax * 360; canvas.drawArc(mRectF, -90, angle, false, mForegroundPaint); if (mProgress > 0 && mProgress < mMax) { double radians = Math.toRadians(angle); canvas.drawCircle(centerX + (float) Math.sin(radians) * radius, centerY - (float) Math.cos(radians) * radius, mPaintRadius, mPointPaint); } if (DEBUG) { Log.d(TAG, "onDraw: time used=" + (SystemClock.elapsedRealtime() - startTime)); } } public void setProgress(int progress) { mProgress = progress; invalidate(); } public void setMax(int max) { mMax = max; invalidate(); } }
#pragma once #include "Configuration.h" #include <FileSystem.h> #include <atomic> #include <fstream> #include <iostream> #include <map> #include <memory> #include <mutex> #include <string> #include <thread> const std::string DOMAIN_FOLDER = "DOMAIN_FOLDER"; const std::string DOMAIN_CONFIG_FOLDER = "DOMAIN_CONFIG_FOLDER"; namespace essentials { class SystemConfig { protected: std::string rootPath; std::string logPath; std::string configPath; std::string hostname; std::mutex configsMapMutex; std::map<std::string, std::shared_ptr<Configuration>> configs; const char NODE_NAME_SEPERATOR = '_'; public: static SystemConfig& getInstance(); void shutdown(); std::string robotNodeName(const std::string& nodeName); int getOwnRobotID(); int getRobotID(const std::string& name); std::string getHostname(); void setHostname(const std::string& newHostname); void resetHostname(); Configuration* operator[](const std::string& s); std::string getRootPath(); std::string getConfigPath(); std::string getLogPath(); void setRootPath(std::string rootPath); void setConfigPath(std::string configPath); std::string getEnv(const std::string& var); private: SystemConfig(); ~SystemConfig(){}; }; }
<gh_stars>0 package gohttp import ( "github.com/stretchr/testify/assert" "testing" ) func TestParser_Headers(t *testing.T) { tests := []struct { input []string want map[string]string }{ { input: []string{"--123", ""}, want: map[string]string{}, }, { input: []string{"--", "foo:bar"}, want: map[string]string{"foo": "bar"}, }, { input: []string{"--header:=dxss", "foo:bar", "baz:qux"}, want: map[string]string{"foo": "bar", "baz": "qux"}, }, { input: []string{"a=b", "foo:bar", "c=d", "baz:qux", "f==q", "foo: baz", "foo1: baz baz "}, want: map[string]string{"foo": "baz", "baz": "qux", "foo1": "baz baz"}, }, { input: []string{"baz::qux", "foo:baz"}, want: map[string]string{"foo": "baz"}, }, } for _, tt := range tests { p := NewDefaultParser(tt.input) assert.Equal(t, tt.want, p.Headers()) } } func TestParser_QueryParams(t *testing.T) { tests := []struct { input []string want map[string]string }{ { input: []string{"foo==bar", "foo2:bar2", "baz==qux"}, want: map[string]string{"foo": "bar", "baz": "qux"}, }, { input: []string{"foo==bar", "baz:=qux"}, want: map[string]string{"foo": "bar"}, }, { input: []string{"foo==bar", "baz===qux"}, want: map[string]string{"foo": "bar", "baz": "=qux"}, }, } for _, tt := range tests { p := NewDefaultParser(tt.input) assert.Equal(t, tt.want, p.QueryParams()) } }
You may have since forgotten, but today was the original kick-off day for Nokia World 2012. With the big show canceled and the devices already launched, we instead opted to drop by the smartphone maker's headquarters just outside Helsinki. We're spending three days here in Finland, meeting with executives to get an inside look at the company's next-generation smartphone lineup. Our first face-to-face is with Nokia's chief executive himself, Stephen Elop, who has generously offered up 30 minutes to answer your questions. Because of the time constraints, we won't be able to accommodate every request, but we'll certainly do our best. There are two ways to submit your questions: leave a comment below, or you can send us a tweet @EngadgetLive -- once the session begins, we'll only be able to accept messages through Twitter, and you're welcome to ask questions before we start and as a follow-up to Stephen's responses, as well. In order to accommodate the largest possible audience, we'll be using our liveblog tool to post both questions and answers, so bookmark this page and hop on over there at 4AM Eastern tomorrow. As always, you'll also find the local time just below. Now about those questions...
Heterogeneity in Trust of Cancer Information among Hispanic Adults in the United States: An Analysis of the Health Information National Trends Survey Background: Hispanics are differentially burdened by inequities in cancer outcomes. Increasing knowledge about cancer and cancer services among Hispanics may aid in reducing inequities, but little is known about what information sources are considered most effective or most trusted by this diverse population. The goal of this study was to examine heterogeneity in trust of cancer information from various media sources among U.S. Hispanic adults. Methods: Using data from the Health Information National Trends Survey (HINTS) 4, Cycles 2 and 4 and HINTS 5, Cycle 2, we examined nine trust questions, divided into four domains of health communication sources . Independent variables examined were gender, Hispanic ethnic categories (Mexican American, Cuban/Puerto Rican, and other Hispanics), age, education, income, language, and nativity. We used multivariable logistic regression with survey weights to identify independent predictors of cancer information source use and trust. Results: Of the 1,512 respondents, trust in sources ranged from 27% for radio to 91% for doctors. In multivariable models, Cubans/Puerto Ricans were twice as likely to trust cancer information from print media compared with Mexican Americans. Hispanics 75 years and older were nearly three times as likely to trust cancer information from religious organizations compared with those ages 18 to 34. Hispanic women were 59% more likely to trust cancer information from the Internet compared with men. Conclusions: Subgroup variability in source use and trust may be masked by broad racial and ethnic categories. Impact: Among Hispanics, there is significant variation by ethnicity and other sociodemographics in trust of sources of cancer information across multiple constructs, with notable implications for disseminating cancer information.
#Find how many circular primes are there below one million. import time S = time.time() def primesL_than(n): primes = [] check = [True for n in range(0, n+1)] for i in range(2, n+1): if check[i] == True: primes.append(i) for j in range((i)**2,n+1,(i)): try: check[j] = False except: pass return primes primes = [str(x) for x in primesL_than(1000000)] circular_primes = [] for prime in primes: rotations = [] for index in prime: rotations.append(prime) prime = prime[-1] + prime[:-1] circular = True for number in rotations: if not number in primes: circular = False if circular == True: for number in rotations: if int(number) in circular_primes: pass else: circular_primes.append(int(number)) print(len(circular_primes)) E = time.time() print(E-S)
A look at the smaller cousin of Art Lebedev's Optimus Maximus OLED keyboard. If the Optimus Maximus keyboard is a little too over the top for you, the upcoming Optimus Pultius may be more suitable. Instead of a full keyboard, this one has only 15 keys, each sporting an individual OLED display which can be customized to show whatever graphic you want. So, if you like what you see in the image above, you will be able to launch certain applications quickly or use some Photoshop shortcuts without memorizing the key combinations. The value of something like that is you'll have something cool on your desk--a great way to one-up your colleagues. Though given the Maximus' $1,877 whopper of a sticker shock, one-upmanship won't come cheap. Look out for it at the end of this year or early next year.
// GetEnumByLine gets enum by provided line. // This ensures thread safety. func (p *proto) GetEnumByLine(line int) (e Enum, ok bool) { p.mu.RLock() e, ok = p.lineToEnum[line] p.mu.RUnlock() return }
Differences in patient rating of care provided by BSN and ADN students. Nursing has discussed widely and with fervor the level of education required to provide quality nursing care for clients. No clear consensus has developed but studies tend to show that especially in the hospital setting, baccalaureate (BSN) and associate degree (ADN) nurses initially practice at a similar level. No studies identified compared patient ratings of BSN and ADN nurses. In this study ratings of care provided by BSN and ADN students were compared. Patients, students and instructors rated the student sample using Watson's Patient Satisfaction Rating Scale. Using Pearson correlations and t-tests, the overall satisfaction with care was assessed as "very positive" by patients, faculty and students alike. A significant correlation was found between faculty and patient ratings. Results support earlier findings and demonstrate similarities rather than differences in care provided by the two levels of students. Implications for nursing education and practice are discussed.
Glutaminase isoenzymes as key regulators in metabolic and oxidative stress against cancer. Cancer cells require a robust supply of reduced nitrogen to produce nucleotides, non-essential amino acids and a high cellular redox activity. Glutamine provides a major substrate for respiration as well as nitrogen for the production of proteins, hexosamines, and macromolecules. Therefore, glutamine is one of key molecules in cancer metabolism during cell proliferation. The notion of targeting glutamine metabolism in cancer, originally rationalized by the number of pathways fed by this nutrient, has been reinforced by more recent studies demonstrating that its metabolism is regulated by oncogenes. Glutamine can exert its effects by modulating redox homeostasis, bioenergetics, nitrogen balance or other functions, including by being a precursor of glutathione, the major nonenzymatic cellular antioxidant. Glutaminase (GA) is the first enzyme that converts glutamine to glutamate, which is in turn converted to alpha-ketoglutarate for further metabolism in the tricarboxylic acid cycle. Different GA isoforms in mammals are encoded by two genes, Gls and Gls2. As each enzymatic form of GA has distinct kinetic and molecular characteristics, it has been speculated that the differential regulation of GA isoforms may reflect distinct functions or requirements in different tissues or cell states. GA encoded by Gls gene (GLS) has been demonstrated to be regulated by oncogenes and to support tumor cell growth. GA encoded by Gls2 gene (GLS2) reduces cellular sensitivity to reactive oxygen species associated apoptosis possibly through glutathione-dependent antioxidant defense, and therefore to behave more like a tumor suppressor. Thus, modulation of GA function may be a new therapeutic target for cancer treatment.
#include "util.h" float fmt(float n) { if(fabsf(n) < 0.0001) return 0; return n; } const unsigned long globe_Crc32Table[256]={ 0x00000000,0x04c11db7,0x09823b6e,0x0d4326d9,0x130476dc,0x17c56b6b,0x1a864db2,0x1e475005, 0x2608edb8,0x22c9f00f,0x2f8ad6d6,0x2b4bcb61,0x350c9b64,0x31cd86d3,0x3c8ea00a,0x384fbdbd, 0x4c11db70,0x48d0c6c7,0x4593e01e,0x4152fda9,0x5f15adac,0x5bd4b01b,0x569796c2,0x52568b75, 0x6a1936c8,0x6ed82b7f,0x639b0da6,0x675a1011,0x791d4014,0x7ddc5da3,0x709f7b7a,0x745e66cd, 0x9823b6e0,0x9ce2ab57,0x91a18d8e,0x95609039,0x8b27c03c,0x8fe6dd8b,0x82a5fb52,0x8664e6e5, 0xbe2b5b58,0xbaea46ef,0xb7a96036,0xb3687d81,0xad2f2d84,0xa9ee3033,0xa4ad16ea,0xa06c0b5d, 0xd4326d90,0xd0f37027,0xddb056fe,0xd9714b49,0xc7361b4c,0xc3f706fb,0xceb42022,0xca753d95, 0xf23a8028,0xf6fb9d9f,0xfbb8bb46,0xff79a6f1,0xe13ef6f4,0xe5ffeb43,0xe8bccd9a,0xec7dd02d, 0x34867077,0x30476dc0,0x3d044b19,0x39c556ae,0x278206ab,0x23431b1c,0x2e003dc5,0x2ac12072, 0x128e9dcf,0x164f8078,0x1b0ca6a1,0x1fcdbb16,0x018aeb13,0x054bf6a4,0x0808d07d,0x0cc9cdca, 0x7897ab07,0x7c56b6b0,0x71159069,0x75d48dde,0x6b93dddb,0x6f52c06c,0x6211e6b5,0x66d0fb02, 0x5e9f46bf,0x5a5e5b08,0x571d7dd1,0x53dc6066,0x4d9b3063,0x495a2dd4,0x44190b0d,0x40d816ba, 0xaca5c697,0xa864db20,0xa527fdf9,0xa1e6e04e,0xbfa1b04b,0xbb60adfc,0xb6238b25,0xb2e29692, 0x8aad2b2f,0x8e6c3698,0x832f1041,0x87ee0df6,0x99a95df3,0x9d684044,0x902b669d,0x94ea7b2a, 0xe0b41de7,0xe4750050,0xe9362689,0xedf73b3e,0xf3b06b3b,0xf771768c,0xfa325055,0xfef34de2, 0xc6bcf05f,0xc27dede8,0xcf3ecb31,0xcbffd686,0xd5b88683,0xd1799b34,0xdc3abded,0xd8fba05a, 0x690ce0ee,0x6dcdfd59,0x608edb80,0x644fc637,0x7a089632,0x7ec98b85,0x738aad5c,0x774bb0eb, 0x4f040d56,0x4bc510e1,0x46863638,0x42472b8f,0x5c007b8a,0x58c1663d,0x558240e4,0x51435d53, 0x251d3b9e,0x21dc2629,0x2c9f00f0,0x285e1d47,0x36194d42,0x32d850f5,0x3f9b762c,0x3b5a6b9b, 0x0315d626,0x07d4cb91,0x0a97ed48,0x0e56f0ff,0x1011a0fa,0x14d0bd4d,0x19939b94,0x1d528623, 0xf12f560e,0xf5ee4bb9,0xf8ad6d60,0xfc6c70d7,0xe22b20d2,0xe6ea3d65,0xeba91bbc,0xef68060b, 0xd727bbb6,0xd3e6a601,0xdea580d8,0xda649d6f,0xc423cd6a,0xc0e2d0dd,0xcda1f604,0xc960ebb3, 0xbd3e8d7e,0xb9ff90c9,0xb4bcb610,0xb07daba7,0xae3afba2,0xaafbe615,0xa7b8c0cc,0xa379dd7b, 0x9b3660c6,0x9ff77d71,0x92b45ba8,0x9675461f,0x8832161a,0x8cf30bad,0x81b02d74,0x857130c3, 0x5d8a9099,0x594b8d2e,0x5408abf7,0x50c9b640,0x4e8ee645,0x4a4ffbf2,0x470cdd2b,0x43cdc09c, 0x7b827d21,0x7f436096,0x7200464f,0x76c15bf8,0x68860bfd,0x6c47164a,0x61043093,0x65c52d24, 0x119b4be9,0x155a565e,0x18197087,0x1cd86d30,0x029f3d35,0x065e2082,0x0b1d065b,0x0fdc1bec, 0x3793a651,0x3352bbe6,0x3e119d3f,0x3ad08088,0x2497d08d,0x2056cd3a,0x2d15ebe3,0x29d4f654, 0xc5a92679,0xc1683bce,0xcc2b1d17,0xc8ea00a0,0xd6ad50a5,0xd26c4d12,0xdf2f6bcb,0xdbee767c, 0xe3a1cbc1,0xe760d676,0xea23f0af,0xeee2ed18,0xf0a5bd1d,0xf464a0aa,0xf9278673,0xfde69bc4, 0x89b8fd09,0x8d79e0be,0x803ac667,0x84fbdbd0,0x9abc8bd5,0x9e7d9662,0x933eb0bb,0x97ffad0c, 0xafb010b1,0xab710d06,0xa6322bdf,0xa2f33668,0xbcb4666d,0xb8757bda,0xb5365d03,0xb1f740b4 }; bool Util::mkdir(const char *path) { char DirName[256]; strcpy(DirName, path); for(int t = 0; t < strlen(DirName); t++) { if(DirName[t] == '\\') DirName[t] = '/'; } int len = strlen(DirName); if(DirName[len-1] != '/') strcat(DirName, "/"); len = strlen(DirName); for(int i = 1; i<len; i++) { if(DirName[i]=='/') { DirName[i] = 0; if(access(DirName, 0) != 0) { if(::mkdir(DirName, 0755) == -1) { cout << "[Util]mkdir failed: " << DirName << endl; return false; } } DirName[i] = '/'; } } return true; } void Util::fname(const char* path, char* name) { int i; for(i = strlen(path); i > 0; i--) { if(path[i] == '/' || path[i] == '\\') { break; } } strcpy(name, path+i+1); } void Util::fpath(const char* path, char* dir) { strcpy(dir, path); for(int i = strlen(dir); i > 0; i--) { if(dir[i] == '/' || dir[i] == '\\') { dir[i] = '\0'; break; } } } void Util::fcopy(const char* path, const char* dest, bool delflag) { char p[256]; Util::fpath(path, p); Util::mkdir(p); Util::fpath(dest, p); Util::mkdir(p); strcpy(p, dest); for(int t = 0; t < strlen(p); t++) { if(p[t] == '\\') p[t] = '/'; } cout <<"[OP]copy " << path << " -> " << p << endl; ifstream in(path, ios::in|ios::binary); if(in.is_open()) { ofstream out(p, ios::out|ios::binary); out << in.rdbuf(); out.close(); in.close(); if(delflag) ::remove(path); } } const char* Util::guess(const char *data) { //MAGIC //AKK-SKEL-SKIN //SMM-SCN-NAV-GMB //DDS->DDS //BMP->BM //JPG->0xd8ff static const char *TagList[11] = {"SKEL", "SKIN", "AKK", "QTD", "SMM", "SCN", "NAV", "GMB", "TRN", "DDS", "BM"}; static const char *ExtList[11] = {".skel", ".skin", ".fak", ".qtd", ".smm", ".scn", ".nav", ".gmb", ".trn", ".dds", ".bmp"}; for(int i = 0; i < 11; i ++) { bool flag = true; const char *tag = TagList[i]; for(int j = 0; j < strlen(tag); j ++) { if(data[j] != tag[j]) { flag = false; break; } } if(flag) return ExtList[i]; } if(data[0] == (char)0xff && data[1] == (char)0xd8) return ".jpg"; if(data[0] == (char)0x00 && data[1] == (char)0x00) return ".tga"; return ""; } //----------------------------------------------------------------------------- // 计算32位CRC,比一般算法快速很多 //----------------------------------------------------------------------------- uint32 Util::crc32(const char* pData, int nByteCount) { if( nByteCount <= 0 ) return 0; uint32 unResult = *pData++ << 24; if( --nByteCount > 0 ) { unResult |= *pData++ << 16; if( --nByteCount > 0 ) { unResult |= *pData++ << 8; if( --nByteCount > 0 ) unResult |= *pData++; } } unResult = ~ unResult; while( --nByteCount > 0 ) { unResult = (unResult << 8 | *pData) ^ globe_Crc32Table[unResult >> 24]; pData++; } return ~unResult; } void Util::transSkin(const char* dest) { mkdir(dest); ifstream ff("res/skinlist"); char path[256]; char tex[256]; int n; while(true) { ff >> path >> n; if(ff.eof()) break; cout << path << " "<< n << endl; for(int i = 0; i < n; i ++) { ff >> tex; int m = 0; while(tex[m]) { tex[m] = tolower(tex[m]); m++; } char dir[256]; Util::fpath(tex, dir); int pcrc = Util::crc32(dir, strlen(dir)); int crc = Util::crc32(tex, strlen(tex)); char srcPath[256]; sprintf(srcPath, "../gameres/system.cpk/%X/%X.tga", pcrc, crc); char dstPath[256]; strcpy(dstPath, dest); strcat(dstPath, tex); for(int m = 0; m < strlen(dstPath); m ++) if(dstPath[m] == '\\') dstPath[m] = '/'; Util::fcopy(srcPath, dstPath, false); tex[m-3] = 'd'; tex[m-2] = 'd'; tex[m-1] = 's'; crc = Util::crc32(tex, strlen(tex)); sprintf(srcPath, "../gameres/system.cpk/%X/%X.tga", pcrc, crc); tex[m-3] = 't'; tex[m-2] = 'g'; tex[m-1] = 'a'; strcpy(dstPath, dest); strcat(dstPath, tex); for(int m = 0; m < strlen(dstPath); m ++) if(dstPath[m] == '\\') dstPath[m] = '/'; Util::fcopy(srcPath, dstPath, false); } char skinPath[256]; strcpy(skinPath, dest); strcat(skinPath, tex); if(n > 1) { for(int t = strlen(skinPath); t > 0; t--) { if(skinPath[t] == '.') skinPath[t] = '\0'; if(skinPath[t] == '_') { skinPath[t] = '\0'; break; } } strcat(skinPath, ".skin"); } else { int t = strlen(skinPath); skinPath[t-3] = 's'; skinPath[t-2] = 'k'; skinPath[t-1] = 'i'; skinPath[t] = 'n'; skinPath[t+1] = '\0'; } Util::fcopy(path, skinPath, false); } } void Util::transSkel(const char* dest) { mkdir(dest); ifstream ff("res/skellist"); char path[256]; int n; while(true) { ff >> path >> n; //cout << path << endl; if(ff.eof()) break; char name[256] = {0}; char last[32] = {0}; char temp[32] = {0}; for(int i = 0; i < n; i ++) { ff >> temp; if(strcmp(temp, last) != 0) { if(i > 0) strcat(name, "_"); strcat(name, temp); strcpy(last, temp); } } char tdir[32] = {0}; int d1 = 0; int d2 = 0; for(int i = strlen(path); i > 0; i--) { if(path[i] == '/') { if(d1 == 0) d1 = i; else { d2 = i; break; } } } strncpy(tdir, path + d2 + 1, d1 - d2); char skelPath[256]; strcpy(skelPath, dest); strcat(skelPath, tdir); strcat(skelPath, name); strcat(skelPath, ".skel"); cout << "copy skel file: " << skelPath << endl; Util::fcopy(path, skelPath, false); } } void Util::transSmm(const char* dest) { mkdir(dest); ifstream ff("res/smmlist"); char path[256]; char tex[256]; int n; while(true) { ff >> path >> n; if(ff.eof()) break; cout << path << " "<< n << endl; char dir[256]; int pcrc; int crc; for(int i = 0; i < n; i ++) { ff >> tex; int m = 0; while(tex[m]) { tex[m] = tolower(tex[m]); m++; } cout << tex << endl; Util::fpath(tex, dir); pcrc = Util::crc32(dir, strlen(dir)); crc = Util::crc32(tex, strlen(tex)); char srcPath[256]; sprintf(srcPath, "../gameres/system.cpk/%X/%X.tga", pcrc, crc); char dstPath[256]; strcpy(dstPath, dest); strcat(dstPath, tex); Util::fcopy(srcPath, dstPath, false); tex[m-3] = 'd'; tex[m-2] = 'd'; tex[m-1] = 's'; crc = Util::crc32(tex, strlen(tex)); sprintf(srcPath, "../gameres/system.cpk/%X/%X.tga", pcrc, crc); tex[m-3] = 't'; tex[m-2] = 'g'; tex[m-1] = 'a'; strcpy(dstPath, dest); strcat(dstPath, tex); Util::fcopy(srcPath, dstPath, false); } int dirLen = strlen(dir); const char *tagList = "cdngbjqzs"; for(int i = 0; i < 99; i++) { for(int j = 0; j < strlen(tagList); j++) { dir[dirLen] = '\\'; dir[dirLen + 1] = tagList[j]; dir[dirLen + 2] = 48 + i/10; dir[dirLen + 3] = 48 + i%10; dir[dirLen + 4] = '.'; dir[dirLen + 5] = 'f'; dir[dirLen + 6] = 's'; dir[dirLen + 7] = 'm'; dir[dirLen + 8] = '\0'; char crcPath[256]; crc = Util::crc32(dir, strlen(dir)); sprintf(crcPath, "../gameres/system.cpk/%X/%X.smm", pcrc, crc); if(strcmp(path, crcPath) == 0) { strcpy(tex, dir); i = 100; break; } } } char smmPath[256]; strcpy(smmPath, dest); strcat(smmPath, tex); for(int t = strlen(smmPath); t > 0; t--) if(smmPath[t] == '\\') smmPath[t] = '/'; for(int t = strlen(smmPath); t > 0; t--) { if(smmPath[t] == '.') smmPath[t] = '\0'; if(smmPath[t] == '_') { smmPath[t] = '\0'; break; } } strcat(smmPath, ".smm"); Util::fcopy(path, smmPath, false); } } void Util::transFak(const char* dest) { mkdir(dest); ifstream ff("res/faklist"); char path[256]; char tex[256]; int n; while(true) { ff >> path >> n; if(ff.eof()) break; cout << path << " "<< n << endl; ff.getline(tex, 256); for(int i = 0; i < n; i ++) { ff.getline(tex, 256); cout << tex << endl; int m = 0; while(tex[m]) { tex[m] = tolower(tex[m]); m++; } char dir[256]; Util::fpath(tex, dir); int pcrc = Util::crc32(dir, strlen(dir)); int crc = Util::crc32(tex, strlen(tex)); char srcPath[256]; sprintf(srcPath, "../gameres/system.cpk/%X/%X.tga", pcrc, crc); char dstPath[256]; strcpy(dstPath, dest); strcat(dstPath, tex); for(int m = 0; m < strlen(dstPath); m ++) if(dstPath[m] == '\\') dstPath[m] = '/'; Util::fcopy(srcPath, dstPath, false); tex[m-3] = 'd'; tex[m-2] = 'd'; tex[m-1] = 's'; crc = Util::crc32(tex, strlen(tex)); sprintf(srcPath, "../gameres/system.cpk/%X/%X.tga", pcrc, crc); tex[m-3] = 't'; tex[m-2] = 'g'; tex[m-1] = 'a'; strcpy(dstPath, dest); strcat(dstPath, tex); for(int m = 0; m < strlen(dstPath); m ++) if(dstPath[m] == '\\') dstPath[m] = '/'; Util::fcopy(srcPath, dstPath, false); } char fakPath[256]; strcpy(fakPath, dest); strcat(fakPath, tex); if(n > 1) { for(int t = strlen(fakPath); t > 0; t--) { if(fakPath[t] == '.') fakPath[t] = '\0'; if(fakPath[t] == '_') { fakPath[t] = '\0'; break; } } strcat(fakPath, ".fak"); } else { int t = strlen(fakPath); fakPath[t-3] = 'f'; fakPath[t-2] = 'a'; fakPath[t-1] = 'k'; fakPath[t] = '\0'; } Util::fcopy(path, fakPath, false); } }
Nitric oxide reduction by non-thermal plasma and catalysis Combustion of fossil fuels produces millions of tons of air pollutants such as NOx and SO2. The high cost and operating difficulties of prevailing selective catalytic reduction (SCR) process are driving R&D efforts towards alternative technologies and modifications to the SCR technology. Non-thermal plasma technique has been found to be one of the most promising technologies for NOx removal. In the present study, a non-thermal plasma technique in the form of dielectric barrier discharge (DBD) has been extensively investigated for the removal of NOx. The main variables including electrical parameters, chemical compounds and flow conditions are identified and studied in terms of their effects on NO/NOx conversions. Significant increases in NO/NO x conversions of 90% and 40% are observed in the presence of both O 2 and H2O than in the presence of either O2 or H2O alone. Addition of 1000 ppm ethylene to the NO/O2/CO 2/N2 mixture almost promotes 100% NO oxidation to NO 2. The chemistry of plasma reactions is discussed. The DBD system is found to be effective for NO oxidization into NO2 and HNO 3. Kinetics studies have also been made for NO-O2 reaction under plasma conditions. A rate equation has been proposed, -d/dt = kp 1/2 1/2 with kp = 0.0143exp(-1865/E d) showing that a reaction can be initiated at much lower activation energy under plasma conditions. A hybrid plasma-catalyst (P-C) system has been developed to achieve the synergy. gamma-Al2O3 and laboratory-prepared tungsten catalysts have been used in the hybrid P-C experiments. The improvement in NOx removal by the P-C system is about 15% compared to by the SCR alone when 1000--3000 ppm of methane or ethylene is added to the inlet gas stream. There is no formation of N2O (greenhouse gas) in the PC system when inlet gas contains moisture or ethylene. DBD reactor design parameters have also been investigated in terms of SO2 oxidation to SO3 with respect to reactor geometry, dielectric material and thickness. The DBD technique has the great potential to replace the prevailing combined SCR and flue gas disulfurization (FGD) processes both technically and economically. The P-C system has the potential to be used for the removal of NOx from diesel engine exhausts.
P106 Where is the care in healthcare? Mother perspectives of caring for a child with narcolepsy When caring for a child with a chronic illness, primary caregivers become care coordinators, system navigators, and illness experts. There is limited research on the challenges faced by family/carers of a child with narcolepsy. Twenty participants who self-identified as a family/carer of a child with narcolepsy were interviewed, all of whom were mothers. Prior thematic analysis of submissions made by family/carers to the parliamentary inquiry informed interview questions. Interviews were analysed using the framework approach by a team of six multidisciplinary researchers. Three themes were identified. Adjustment, communication and coping encapsulates challenges associated with diagnosis, the mental health toll it has on the whole family, and the limited support available to mothers. Healthcare journey of narcolepsy families described challenges faced in the healthcare system, with mothers speaking of dismissal of their concerns and experiences of a lack of equity when accessing quality healthcare services for their child. Independence, support, and resources unveiled the challenges carers faced accessing disability and academic supports at school and the workplace, underscoring mothers concerns for the future independence of their child. Mothers felt they had limited control over the trajectory of their childs healthcare journey and emphasized the adverse psychological effect narcolepsy had on the entire family. There was an expectation that clinicians should be providing more information and support than currently is provided, across areas that traditionally are not within the healthcare domain. This raises important questions around who is responsible for providing this information and where is sourced from.
. Histological and biomicroscopic methods were used to study the effects of toxic lemic and meningococcal microbial fractions on mesenteric blood microcirculation in rats. Aggregation ability of red blood cells and thrombocytes was investigated. The sublethal dose of meningococcal toxins was shown to induce marked impairment in the blood microcirculation 30 minutes after intravenous administration. The lethal dose of lemic toxins manifests itself later (in 2-4 hours). Meningococcal toxins are characterized by the increase in the aggregation ability of erythrocytes and thrombocytes in initial observation periods; lemic toxins increase the thrombocyte aggregation and produce almost no effect on erythrocyte aggregation.
"They have a big problem coming up," the zombie drama's new showrunner tells THR about the events of "Infected." The survivors of The Walking Dead faced two new threats Sunday in the second episode of its fourth season, after Patrick, who succumbed to a flu and turned overnight, terrorized the gated community of the prison. During the hour, Zombie Patrick attacks what used to be his own community, spreading both the flu (which seemingly has also taken out the pigs) and turning more members of the group into walkers. As for the source of the virus, that continues to remain a mystery -- as does just who is baiting the undead to the weakening gates of the prison. As if that weren't enough, the prison gang is forced to contend with a murderer among its ranks after Karen and another resident are seemingly burned alive in the final moments of "Infected." The Hollywood Reporter caught up with showrunner Scott M. Gimple to dissect the episode. The flu has spread to Karen -- does that narrow down the origins of the virus to either animals or water? One thing I really dug about this story when we were talking about it [in the writers' room] is that because of the third-world situation that they're in -- it's almost medieval -- they don't get to know; they don't have a lab to take samples and look at stuff under microscopes. They need to roll with it and figure it out in a really difficult situation to do so. And the audience has to, too. Carol (Melissa McBride) is now charged with caring for two young girls, Lizzie and Mika. What will she do differently after losing Sophia now that she's arming everyone? She lost her daughter in a horrible way, and she absolutely got the memo regarding everything that happened with that. Carol was already teaching the children at the prison how to protect themselves at all costs to make sure that they don't become victims [like Sophia ultimately was]. With these two girls, she's going to continue that. It hits her now in a much deeper way -- these are her daughters now for all intents and purposes, and suddenly she's a mom again. She was pretty determined even before she was in that position, so it's only going to get more intense that way. Mika, the younger of the sisters, reveals that Lizzie is "messed up, not weak." In the comics, Sophia grappled with sanity while she was at the prison. Is this a remix of her story with Carl? Yes. There's a couple things going on there that's taking elements of various stories from the prison and elsewhere in the comic. In the comic, Sophia winds up essentially becoming Maggie's daughter. Kids wind up with other people in the comic. That was something that absolutely came from the comic. Yes, Sophia in the comic, after losing Carol, was not completely looking at the world the right way; she didn't even remember Carol very quickly in the comic, which happened at the farm. A lot of this stuff is subliminal. Having read the comic as much as I have, even after the fact, I realized something that Robert [Kirkman] did. One of my favorite covers of all-time of The Walking Dead was Carl and Sofia holding hands in front of the fences with the walkers. I'm sure that that influenced stuff in [episodes] 401 and 402. That contrast of innocence with threats and death -- there's a whole lot of remixing going on there. The group is now divided between those who have been exposed to the flu, leaving Michonne (Danai Gurira), Maggie (Lauren Cohan) and Carl (Chandler Riggs) split from the rest of the group. How will that change the leadership within the prison? The council is getting broken up, and all stability at the prison -- all these things that they built -- are being challenged and compromised. The momentum to this is not good for them holding on to what they have. The group thinks someone is leaving mice near the fence -- which could be another threat from within their walls. How long can this group stay at the prison? It looks like that might be what's going on; that's what they're speculating it is. They're going to be tested. The thing I love is that you find safety in this world. You find these walls, and then those walls start closing in on you. And what the hell do you then? Someone is feeding rats to the walkers and drawing them to the fences of the prison. Could Bob (Larry Gilliard Jr.) be connected to this? We don't know much about him before Daryl brings him to the prison. There's a lot of speculation online with that, and I shall not comment! But I will say that Bob does have a lot going on under the surface. Michonne starts crying while holding Rick's baby, Judith. She was a mother in the comics. Could we see more of her backstory in flashbacks this year? Michonne's story is very much tied in to finding out more about how she became who she is. One of my goals was to explore all of these characters to the nth-degree. Michonne has a lot of mystery about her. And as a reader of the comic and that Michonne one shot -- which wasn't in the comic -- and even a viewer of the show, I want to find out more about these characters, and I want to know how Michonne wound up the Michonne we know and love. Why does Carl tell Rick (Andrew Lincoln) that Carol is teaching the kids how to defend themselves after she asked him not to? He's his father's son, and that shows the strength of their relationship. Even though Carl did share this information, he also shared that he thought Rick should let her continue doing what she's doing. He did it with a recommendation and to maybe surprise this sad moment that Rick knows his son is right and that Carol is right. What we were shooting for was to see these two on the same page. Carl has not been totally down with the changes that have happened to his life and has moved away from being a soldier. But he is down with being his father's son; he appreciates that. To see Rick go toward Carl's line of thinking is a strong family moment for them. Was there any part of that that was Carl manipulating Rick in order to get his gun back? Considering the path that Carl was on at the end of season three when it was a question of whether he was going to be more like the Governor (David Morrissey) or his father, it seemed like it could have been in line with his dark leanings. That's the goal: to show even though he still has that desire to be the soldier, he still wants to be his father's son and he wants to follow his dad's lead. There has been a change in Carl that Rick fostered that he enacted. Rick (Andrew Lincoln) realizes he can't continue to take a back seat anymore and resumes carrying his holster and gun. How will he change going forward? We started him off in a very peaceful place -- as peaceful as you can get on this show. He's achieved something for his family and for himself and the people around him. Clara said to him, "It's almost like a curse -- you don't get to come back from the things you've done." From the time he got back from there, that pig -- one of the symbols of what he achieved with his farm life -- had died. Things are getting taken away from him: There goes the farm, there's a gun in his son's hand, and he'd taken that gun out of his hand, and things are slowly being taken away from him. All the things he's achieved, he's going to be challenged whether he can hold on to them. Whether it's his identity, his family, his relationship to the people in the prison, it's all coming to a head very quickly. The prison is very susceptible now to the walkers. How much longer can they stay there? We've shown from the beginning that they have to do this regular maintenance on those fences -- meaning taking out walkers at fences. They're a little busy right now, and they're not at full strength but they need to be. They have a big problem coming up. We've talked about different locations this season, so who knows what can happen. Who knows, maybe they'll pull it off and maybe that requires another location. Maybe other locations come from them not pulling it off. It comes to a head sooner than later. Tyreese finds Karen (Melissa Ponzio) has been killed and dragged outside, where her body -- and David, who was also sick -- were burned. Were these preventative slayings, or is someone targeting people who are sick with the flu? Those were the two sickest people who were put away from everybody else. We also know some weird and scary things have been going on at the prison. So was it because they were sick? Was it because they were easy targets set away from everyone? I can only speculate along with you even though I totally know the answer (laughs). Totally possible. Maybe, maybe not! It's a totally lame answer. But I will tell you this: It will be answered sooner rather than later. Tyreese (Chad Coleman) had this peaceful approach to living in this world -- with Karen. How will her death change him? That is a terrific question. We don't know Tyreese's full story, but the way he carries himself, he hasn't lost much the same way that some other people have since the turn. He hasn't lost his wife -- I'm not saying he had one -- but compared to Rick, he hasn't had these crushing losses. This is a very defining moment for him; it's his first big loss. Everybody has lost something, and everybody has lost this world, but for Tyreese, this is the first big loss he's had. It will change him, and it's going to deeply affect him. We're going to see those effects right at the start of the next episode. Who do you think is behind the two slayings? Do you think the flu, fence bait and killings is the work of the same person? Hit the comments below with your thoughts. The Walking Dead airs Sundays at 9 p.m. on AMC.
def export_hit_ids_to_csv(modeladmin, request, queryset): results = [u'appraise_id,srclang,trglang'] for result in queryset: if isinstance(result, HIT): _attr = result.hit_attributes _values = [] _values.append(result.hit_id) _values.append(_attr['source-language']) _values.append(_attr['target-language']) results.append(u",".join(_values)) export_csv = u"\n".join(results) export_csv = export_csv + u"\n" return HttpResponse(export_csv, mimetype='text/plain')
Page To Screen In Page To Screen, we compare a movie to the book that spawned it. The analysis goes into deep detail about specific plot points—in other words, you’ve been warned. Richard Linklater makes films that are so gentle and devoid of conflict it’s easy to miss how daring they are. Movies like Waking Life, Boyhood or the Before series—all of which are basically unprecedented in either their structure or production—have made him the most original American director working today. Advertisement This made Linklater an appropriate—if unexpected—choice to adapt Eric Schlosser’s nonfiction Fast Food Nation, a book that investigated the massive complexity hiding behind the most placid facade imaginable. Appropriate, because Linklater’s quiet radicalism matched the book’s shocking revelations—but unexpected, because Linklater seems like the last person out to ruffle feathers. It’s easy to imagine a political filmmaker making an angrier version of this story, one filled with righteous fury against the industry, or a satirical director turning it into a dark comedy that juxtaposes bright corporate facades against dark reality—Ronald McDonald as thug. Both of those approaches might have been valid, but Linklater’s feels like the right take for this material. Because fast food is ubiquitous, and because pretty much everyone has eaten it at one point or another, a more accusatory tone probably would’ve fallen on deaf or hostile ears. While Linklater’s film contains anger about the injustices it portrays, it’s mostly thoughtful about what it means to live in an accelerated and homogenized culture, taking stock of what has been lost by these huge and very new trends. The fast-food industry is about as close as Linklater ever got to featuring a villain in his movies, but he’s not storming the gates with pitchforks. First things first: Fast Food Nation is an anthropological book, covering the impact the industry has had on health, economics, culture, and the food supply. It covers a lot of ground, much of it fascinating. It’s remarkable how many of the issues Schlosser discusses remain a major part of the food debate, and how prescient his analysis proved to be. (Few of his worst-case scenarios haven’t come to pass, though some seem to have peaked and faded.) The pages contain a lot of statistics and a lot of history, as well as sequences where he simply explains the logistics involved in, say, creating billions of French fries everyday. But they lack any elements that would qualify as movie-adaptation-friendly, like developed characters or an extended story. Comparisons between the movie and book, in other words, are basically impossible if you’re talking style or content. There are a lot of characters in the film, but none of them have a direct equivalent in the book. Source material with such limited narrative potential might have been a problem for other directors, but Slacker showed that Linklater doesn’t need plot or characters to make a successful film. This is a guy, after all, who views his formless Dazed And Confused as “too plot-driven,” and scaled down further in the “spiritual sequel” Everybody Wants Some. Advertisement So despite the nature of its source, Fast Food Nation might be Linklater’s most incident-heavy picture. It takes the form of one of those everything-is-connected dramas, with a cheeseburger playing the part that oil did in Syriana and drugs did in Traffic. There’s also a dash of David Lynch in the grotesque places the story goes; just as Blue Velvet starts by literally burrowing under the surface of an idealized small-town America, Nation opens with a tracking shot that slides through a commercial-ready fast food joint, ending with a queasy zoom into a greasy patty. A popular criticism of the film was that the book would’ve been better suited by the documentary format, and some viewed Food, Inc. and Super Size Me as the “real” adaptations by delivering the book’s information more explicitly. (It was apparently decided that a narrative film would have better box-office prospects, though Super Size Me outgrossed it by a factor of 10.) This point of view isn’t wholly wrong, given how the script—written by Linklater and Schlosser, the latter a former playwright—seems constructed to include political points rather than being driven by characters. The book’s major themes—the sections about migrant labor, health effects, and working conditions—are translated into the book’s central plotlines, while the secondary points aren’t dramatized so much as relegated to dialogue. The book notes how franchise locations are popular targets for criminals, so characters speculate about why a nearby McDonald’s was robbed. We read that wage-depressing McJobs led to a rise in meth usage, and are shown the ruins of an exploded meth lab. A point about how female migrant workers are likely to experience sexual harassment manifests itself in an asshole slaughterhouse manager (played by Bobby Cannavale) molesting an illegal immigrant played by Ana Claudia Talancón. There’s a brief scene in a flavor lab, one that mirrors the in-book Schlosser learning how chemically laden fast food is. Schlosser writes extensively about the homogenization of culture that came with global franchises, so Ethan Hawke shows up to give a very Linklater-esque rant about it. About the only issue the film doesn’t broach is the international focus Schlosser brings in at the end of the book, looking at how the Golden Arches are a legitimate symbol of freedom for former Soviet territories, even as McDonald’s culture-crushing expansion continues apace. Advertisement The politics are coherent, but frequently shoehorned into the proceedings. That said, this doesn’t play as awkwardly as it might with another director. Few Linklater films read as overtly political, but because most feature what are basically aimless dorm-room discussions about the meaning of life, it isn’t too big a leap for him to go to literal dorm-room rants about the state of the world. Fast Food Nation features the Linklater touch for dialogue and naturalistic performances, which means it’s never hard to watch, though it is best when it goes for subtlety. A Godard-ian shot where a car passes by endless franchises—apparently, the only businesses in the area—makes the point of Hawke’s rant in a far more elegant way, while a recurring motif of corporate flags outflanking the stars and stripes deftly conveys the film’s position on who actually holds the power. In the story that takes up much of the film’s first half, a new fast-food marketing executive (Greg Kinnear) investigates a report that his chain’s meat features a high presence of fecal matter. (While the film names and shows real-life establishments, Kinnear works at the fictional, albeit thinly veiled “Mickey’s,” famous for serving “the Big One.”) The investigation takes Kinnear to meet ranchers and suppliers, a tactic that allows the filmmakers to explain the logistics and scale of the industry. This material is often quite interesting, but only in a documentary way: It falls flat as drama. Kinnear’s character’s most defining characteristic is that he watches a lot of pay-per-view porn on his trip (this is thematically on point, with porn—like fast food—a poor-but-convenient substitute for the real thing). There are effective cameos by Bruce Willis as a meat supplier and Kris Kristofferson as a rancher, but ultimately this storyline is purely informative. (In what would eventually become a cameo, that’s Boyhood’s Ellar Coltrane playing Kinnear’s son.) The second of the film’s threads is a little juicier, following a fast-food worker who goes from hating her job to rebelling against it, eventually attempting to free a herd of slaughterhouse-bound cows. The turn to activism isn’t particularly convincing: This KFC alum can assure you that political considerations fell well below factors like the 10-cents-above-minimum-wage pay, the long hours, and the exhausting nature of the work when it came to reasons to hate the job. But Ashley Johnson gives an endearing performance as a young woman struggling to balance her ideals with responsibilities like school and financial necessity. The other material here—including disaffected coworker Paul Dano, who spits into burgers—doesn’t work as well. The fact that teenagers have to work crappy jobs isn’t compelling, or even a problem in any political sense; soul-sucking jobs are not a phenomenon created by the modern franchised world, in other words. Perhaps it would have been useful for Linklater to cast at least one non-teenage worker to underline how these are jobs of last resort for all types of people, as well as being a major contributor to widening income inequality. Advertisement The final plot is by far the most compelling, and one that could have filled an entire movie on its own. It follows a group of Mexican workers who cross the border and struggle their way through terrible jobs that put them at severe risk of injury. (Along with Talancón, they’re played by Catalina Sandino Moreno—an Oscar nominee for Maria Full Of Grace—and Wilmer Valderrama, whose easygoing charm and nuance here were a mild revelation after his role as Fez in That ’70s Show.) This story offers inherent drama and stakes, something that can’t be said of the film’s other thirds, and the narrative and political material dovetails here in a way it doesn’t elsewhere. We can see why businesses use these workers who toil for less pay than their American equivalents and don’t have the same protections, and why the workers are desperate enough to take the jobs. For once, the characters inform the politics, making clear why the damaging cycle exists and perpetuates itself. (Oddly, the film doesn’t try to fit in any points about lax government regulations or about how anti-union fast food companies are—two issues discussed at length in the book.) The film builds to Moreno being forced to take a job on the “kill floor” of a slaughterhouse. The scene is certainly hellish—apparently real footage, definitely not for the squeamish—but it plays more like a “meat is murder” point than a coherent argument against industrialized farming. In a way, that’s the movie in a nutshell: The points are all being made, but in questionable service to the film’s drama. At times, Fast Food Nation feels like the cinematic version of one of the burgers whose path it tracks—cobbled together from a bunch of disparate parts, and unlikely to go down easy. Start with: Fast Food Nation is a curious entry in Linklater’s filmography. It isn’t bad by any means, but he’s made so many films that are so much better, it inevitably falls toward the bottom of any ranking. As a public service announcement, the movie is comprehensive, and it pays more attention to dialogue and characters than most narrative polemics that are designed to convert instead of entertain. Still, the book is far more illuminating, and there’s little doubt that nonfiction is the appropriate medium for this message. Stick with the book.
<reponame>leon0707/playground import threading def delayed_func(): print('hi') if __name__ == '__main__': t = threading.Timer(2, delayed_func) t.start() # t.cancel() print('print after 2 secs')
class Madgwick: """ Madgwick filter for sensor fusion of IMU The class fuses the roll, pitch and yaw from accelrometer and magneotmeter with gyroscope. reference article : https://www.x-io.co.uk/res/doc/madgwick_internal_report.pdf refer to examples of the git repo """ def __init__(self, b = 0.1): """ Initialises all the variables. The option of setting your own values is given in the form of set functions """ GyroMeasError = np.pi * (40.0 / 180.0) self.beta = np.sqrt(3.0 / 4.0) * GyroMeasError # self.beta = b self.q = np.array([1.0, 0.0, 0.0, 0.0]) self.roll = 0 self.pitch = 0 self.yaw = 0 def computeOrientation(self, q): """ Computes euler angles from quaternion Parameter --------- q: array containing quaternion vals """ self.yaw = np.degrees(np.arctan2(2*q[1]*q[2] + 2*q[0]*q[3],\ q[0]*q[0] + q[1]*q[1] - q[2]*q[2] -q[3]*q[3])) self.pitch = np.degrees(-1*np.arcsin(2*(q[1]*q[3] - q[0]*q[2]))) self.roll = np.degrees(np.arctan2(2*q[0]*q[1] + 2*q[2]*q[3],\ q[0]*q[0] + q[3]*q[3] - q[1]*q[1] - q[2]*q[2])) def quaternionMul(self, q1, q2): """ Provides quaternion multiplication Parameters ---------- q1: array containing quaternion vals q2: array containing quaternion vals Return ------ finalq: new quaternion obtained from q1*q2 """ mat1 = np.array([[0,1,0,0],[-1,0,0,0],[0,0,0,1],[0,0,-1,0]]) mat2 = np.array([[0,0,1,0],[0,0,0,-1],[-1,0,0,0],[0,1,0,0]]) mat3 = np.array([[0,0,0,1],[0,0,1,0],[0,-1,0,0],[-1,0,0,0]]) k1 = np.matmul(q1,mat1)[np.newaxis,:].T k2 = np.matmul(q1,mat2)[np.newaxis,:].T k3 = np.matmul(q1,mat3)[np.newaxis,:].T k0 = q1[np.newaxis,:].T mat = np.concatenate((k0,k1,k2,k3), axis = 1) finalq = np.matmul(mat,q2) return finalq def getAccelJacobian(self, q): jacob = np.array([[-2.0*q[2], 2.0*q[3], -2.0*q[0], 2.0*q[1]],\ [2.0*q[1], 2.0*q[0], 2.0*q[3], 2.0*q[2]],\ [0.0, -4.0*q[1], -4.0*q[2], 0.0]]) return jacob def getAccelFunction(self, q, a): func = np.array([[2.0*(q[1]*q[3] - q[0]*q[2]) - a[1]],\ [2.0*(q[0]*q[1] + q[2]*q[3]) - a[2]],\ [2.0*(0.5 - q[1]*q[1] - q[2]*q[2]) - a[3]]]) return func def normalizeq(self, q): """ Normalizing quaternion Parameters ---------- q: array containing quaternion vals Return ------ q: Normalized quaternion """ qLength = np.sqrt(np.sum(np.square(q))) q = q/qLength return q def updateRollAndPitch(self, ax, ay, az, gx, gy, gz, dt): """ Computes roll and pitch Parameters ---------- ax: float acceleration in x axis ay: float acceleration in y axis az: float acceleration in z axis gx: float angular velocity about x axis gy: float angular velocity about y axis dt: float time interval for kalman filter to be applied Note: It saves the roll and pitch in the class properties itself. You can directly call them by classname.roll """ g = np.array([0.0, gx, gy, gz]) g = np.radians(g) qDot = 0.5*(self.quaternionMul(self.q,g)) a = np.array([0.0, ax, ay, az]) a = self.normalizeq(a) accelJacob = self.getAccelJacobian(self.q) accelF = self.getAccelFunction(self.q, a) deltaF = self.normalizeq(np.squeeze(np.matmul(accelJacob.T, accelF))) self.q = self.q + (qDot - self.beta*deltaF)*dt self.q = self.normalizeq(self.q) self.computeOrientation(self.q) def getMagJacob(self, q, b): magJacob = np.array([[-2*b[3]*q[2], 2*b[3]*q[3], -4*b[1]*q[2] -2*b[3]*q[0], -4*b[1]*q[3] +2*b[3]*q[1] ],\ [-2*b[1]*q[3] +2*b[3]*q[1], 2*b[1]*q[2] +2*b[3]*q[0], 2*b[1]*q[1] +2*b[3]*q[3], -2*b[1]*q[0] +2*b[3]*q[2]],\ [2*b[1]*q[2], 2*b[1]*q[3] -4*b[3]*q[1], 2*b[1]*q[0] -4*b[3]*q[2], 2*b[1]*q[1]]]) return magJacob def getMagFunc(self, q, b, m): magFunc = np.array([[2*b[1]*(0.5 - q[2]*q[2] - q[3]*q[3]) +2*b[3]*(q[1]*q[3] - q[0]*q[2]) - m[1]],\ [2*b[1]*(q[1]*q[2] - q[0]*q[3]) +2*b[3]*(q[0]*q[1] + q[2]*q[3]) - m[2]],\ [2*b[1]*(q[0]*q[2] + q[1]*q[3]) +2*b[3]*(0.5 - q[1]*q[1] -q[2]*q[2]) -m[3]]]) return magFunc def getRotationMat(self, q): rotMat = np.array([[2*q[0]*q[0] -1 + 2*q[1]*q[1], 2*(q[1]*q[2] - q[0]*q[3]), 2*(q[1]*q[3] + q[0]*q[2])],\ [2*(q[1]*q[2] + q[0]*q[3]), 2*q[0]*q[0] -1 + 2*q[2]*q[2], 2*(q[2]*q[3] - q[0]*q[1])],\ [2*(q[1]*q[3] - q[0]*q[2]), 2*(q[2]*q[3] + q[0]*q[1]), 2*q[0]*q[0] -1 +2*q[3]*q[3]]]) return rotMat def updateRollPitchYaw(self, ax, ay, az, gx, gy, gz, mx, my, mz, dt): """ Computes roll, pitch and yaw Parameters ---------- ax: float acceleration in x axis ay: float acceleration in y axis az: float acceleration in z axis gx: float angular velocity about x axis gy: float angular velocity about y axis gz: float angular velocity about z axis mx: float magnetic moment about x axis my: float magnetic moment about y axis mz: float magnetic moment about z axis dt: float time interval for kalman filter to be applied Note: It saves the roll, pitch and yaw in the class properties itself. You can directly call them by classname.roll """ g = np.array([0.0, gx, gy, gz]) g = np.radians(g) qDot = 0.5*(self.quaternionMul(self.q,g)) a = np.array([0.0, ax, ay, az]) a = self.normalizeq(a) accelJacob = self.getAccelJacobian(self.q) accelF = self.getAccelFunction(self.q, a) m = np.array([0.0, mx, my, mz]) m = self.normalizeq(m) q_rot_mat = self.getRotationMat(self.q) h = np.matmul(q_rot_mat,m[1:]) b = np.array([0.0, 1, 0.0, h[2]]) b[1] = np.sqrt(np.sum(h[0]*h[0] + h[1]*h[1])) magJacob = self.getMagJacob(self.q, b) magFunc = self.getMagFunc(self.q, b, m) finalJacob = np.concatenate((accelJacob,magJacob), axis=0) finalFunc = np.concatenate((accelF, magFunc), axis=0) deltaF = self.normalizeq(np.squeeze(np.matmul(finalJacob.T, finalFunc))) self.q = self.q + (qDot - self.beta*deltaF)*dt self.q = self.normalizeq(self.q) self.computeOrientation(self.q) @property def roll(self): return self._roll @roll.setter def roll(self, roll): self._roll = roll @property def pitch(self): return self._pitch @pitch.setter def pitch(self, pitch): self._pitch = pitch @property def yaw(self): return self._yaw @yaw.setter def yaw(self, yaw): self._yaw = yaw @property def beta(self): return self._beta @beta.setter def beta(self, beta): if beta >= 0 and beta <= 1: self._beta = beta else: raise Exception("Please put beta value between 0 and 1") @property def q(self): return self._q @q.setter def q(self, q): if q is not None and q.shape[0] == 4: self._q = q else: raise Exception("q has to be a numpy array of 4 elements")
<gh_stars>10-100 /* ### * IP: GHIDRA * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ghidra.javaclass.format.attributes; import ghidra.app.util.bin.BinaryReader; import ghidra.program.model.data.DataType; import ghidra.program.model.data.StructureDataType; import ghidra.util.exception.DuplicateNameException; import java.io.IOException; /** * NOTE: THE FOLLOWING TEXT EXTRACTED FROM JVMS7.PDF * <p> * The Synthetic attribute is a fixed-length attribute in the attributes table of a * ClassFile, field_info or method_info structure. * A class member that does not appear in the source code must be marked using a Synthetic * attribute, or else it must have its ACC_SYNTHETIC flag set. The only exceptions * to this requirement are compiler-generated methods which are not considered * implementation artifacts, namely the instance initialization method representing a * default constructor of the Java programming language, the class initialization * method, and the Enum.values() and Enum.valueOf() methods. * <p> * The value of the attribute_name_index item must be a valid index into * the constant_pool table. The constant_pool entry at that index must be a * CONSTANT_Utf8_info structure representing the string "Synthetic". */ public class SyntheticAttribute extends AbstractAttributeInfo { public SyntheticAttribute( BinaryReader reader ) throws IOException { super( reader ); } @Override public DataType toDataType() throws DuplicateNameException, IOException { StructureDataType structure = getBaseStructure( "Synthetic_attribute" ); return structure; } }
Physical Fitness as It Pertains to Sustained Military Operations Abstract : With the development of the technical ability to maintain almost the same level of combat intensity during the twilight and nighttime hours as during daylight, it appears that combat in the future may require NATO units to perform continuous, high-intensity operations for periods exceeding 48 hours. One of the major effects will be the loss of sleep which leads to decrements in human performance. This chapter considers two general elements of human combat performance, physical performance and mental performance, and explores the relationship of physical fitness to each. Existing literature suggests that sleep deprivation does not affect maximal aerobic power, may affect muscle strength and endurance, does not impair well-learned, gross motor tasks, but does lead to deterioration of the speed with which coordinated hand and are movements can be made. It appears that the physical work rate that can be maintained nearly continuously is related to level of physical fitness. This is the case whether the work rate is limited by the cardiovascular respiratory capacity or muscle physiology. Determination of required levels of fitness for sustaining military operations awaits suitable detailing and physiological measurement during realistic combat scenarios.
/** * concatenante many strings * * @param lines String array to concatenate * @param separator String * @return cat lines */ public static String cat(List lines, String separator) { StringBuilder sb = new StringBuilder(); for (Object l : lines) { sb.append(l.toString()).append(separator); } return sb.toString(); }
<reponame>ramkrsna/virtual-storage-manager<gh_stars>100-1000 # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2014 Intel Inc. # All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the"License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. from vsm.api import common import logging LOG = logging.getLogger(__name__) class ViewBuilder(common.ViewBuilder): _collection_name = "licenses" def basic(self, request, license): LOG.info("license api view %s " % license) return { "license_status": { 'license_accept': license['license_accept'], } }
<gh_stars>0 #!flask/bin/python from aplicacao import variavel_aplicacao variavel_aplicacao.run(debug=True)
If nothing else, one would hope that the war in Iraq would dispel the myth that wars can be fought through the seemingly bloodless medium of "smart" bombs. Max Boot, in his meticulously researched new book, War Made New: Technology, Warfare, and the Course of History, 1500 to Today, does as much as any other writer of recent vintage to bring the fleshy reality of warfare back into view by looking at how technological advances, coupled with the innovations of field commanders, have changed warfare over the past five centuries. Boot divides revolutions in warfare from 1500 to the present into four main categories: The Gunpowder Revolution, the Industrial Revolution, the Second Industrial Revolution, and the Information Revolution. While the weaponry and the tactics from one "revolution" to the next vary greatly, Boot identifies a few factors that have spanned the centuries. The first is that change rarely comes from outside the military. "At best, civilians can play a supporting role in aiding military mavericks against their bureaucratic foes," Boot writes. For the most part, Boot stays away from politics and touches on economics only briefly in order to explain how innovations in tactics or weaponry have allowed smaller, or less wealthy, nations to beat back their seemingly more formidable foes. "The rise and fall of nations," he writes, " ... is largely a tale of which ones took advantage of these military and naval revolutions and which ones did not. Sheer size or wealth was not a good predictor of military outcomes." In his examination of the "gunpowder revolution," Boot details three examples of a larger, richer party losing to a smaller but smarter opponent: the defeat of the Spanish Armada (outgunned by the more adaptable British fleet), the battle at Brietenfeld (where Swedish King Gustavus Adolphus used innovations in troop deployment and artillery to best the Imperial Army of the Hapsburg Empire during the Thirty Years' War in the first half of the 17th century), and the Maratha Confederacy (in which British Major-General Wellesley cut down a vastly superior force of Indian irregulars). During the "industrial revolutions," which stretch from the mid-19th century to the end of World War II, the innovations in weaponry took a decidedly more deadly turn, when countries like Japan, Germany, and the United States bested their competitors in the development of railroads (which allowed for better troop transit) and machine guns (which helped the British to defeat numerically superior forces in Africa and India in the late 19th century). A good portion of Boot's treatment of the "information revolution" deals with the already well-documented military prowess of the United States during the latter half of the 20th century. Boot's chapters on the Afghan and Iraq wars are evocative, but have been more thoroughly documented in books like Steve Coll's "Ghost Wars" and "Cobra II" by Michael Gordon and Bernard Trainor. That said, "War Made New" remains a timely and important work, providing an excellent thumbnail sketch of the sometimes simultaneous strokes of genius, luck, and technological smarts that kings and generals have used for centuries to best their enemies in the field. • Paul McLeary is a reporter for the Columbia Review of Journalism.
const uint8_t tank_battalion_prg[] = { 0x01, 0x12, 0x0b, 0x12, 0xd1, 0x02, 0x9e, 0x34, 0x36, 0x32, 0x31, 0x00, 0x00, 0x00, 0xa2, 0x19, 0xb5, 0x02, 0x9d, 0xf9, 0x1a, 0xca, 0x10, 0xf8, 0x20, 0xcc, 0xff, 0xa9, 0x0e, 0x20, 0xd2, 0xff, 0x20, 0x81, 0x12, 0xba, 0x8e, 0x9e, 0x5c, 0xa9, 0x00, 0x85, 0x02, 0xa9, 0x1c, 0x85, 0x03, 0xa9, 0x00, 0xf0, 0x18, 0xad, 0x14, 0x03, 0xae, 0x15, 0x03, 0x8d, 0xc2, 0x54, 0x8e, 0xc3, 0x54, 0xa9, 0x7a, 0xa2, 0x12, 0x78, 0x8d, 0x14, 0x03, 0x8e, 0x15, 0x03, 0x58, 0x20, 0xa4, 0x12, 0x20, 0x88, 0x52, 0x20, 0xa8, 0x52, 0x48, 0xa9, 0x00, 0xf0, 0x0e, 0xad, 0xc2, 0x54, 0xae, 0xc3, 0x54, 0x78, 0x8d, 0x14, 0x03, 0x8e, 0x15, 0x03, 0x58, 0xa2, 0x19, 0xbd, 0xf9, 0x1a, 0x95, 0x02, 0xca, 0x10, 0xf8, 0x68, 0x85, 0x90, 0xae, 0x9e, 0x5c, 0x9a, 0x4c, 0x8a, 0xff, 0xd8, 0x20, 0xc4, 0x54, 0x4c, 0xc1, 0x54, 0xa9, 0x47, 0x85, 0x0a, 0xa9, 0x5b, 0x85, 0x0b, 0xa9, 0x00, 0xa8, 0xa2, 0x01, 0xf0, 0x0a, 0x91, 0x0a, 0xc8, 0xd0, 0xfb, 0xe6, 0x0b, 0xca, 0xd0, 0xf6, 0xc0, 0x5c, 0xf0, 0x05, 0x91, 0x0a, 0xc8, 0xd0, 0xf7, 0x60, 0xa0, 0x00, 0xf0, 0x07, 0xa9, 0xb1, 0xa2, 0x12, 0x4c, 0xe2, 0x54, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x03, 0x05, 0x20, 0x20, 0x20, 0x13, 0x15, 0x20, 0x20, 0x20, 0x20, 0x93, 0x83, 0x8f, 0x92, 0x85, 0x20, 0x20, 0x02, 0x02, 0x20, 0x20, 0x20, 0x20, 0x20, 0x04, 0x06, 0xb0, 0x20, 0x20, 0x13, 0x16, 0x20, 0xb0, 0x20, 0x20, 0x20, 0x20, 0x20, 0xb0, 0xb0, 0x20, 0x20, 0x02, 0x02, 0xb0, 0xb0, 0x20, 0x20, 0x05, 0x07, 0x07, 0x01, 0x07, 0x05, 0x01, 0x04, 0x01, 0x01, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x03, 0x01, 0x05, 0x05, 0x00, 0x00, 0x07, 0x07, 0x01, 0x07, 0x01, 0x01, 0x04, 0x06, 0x01, 0x05, 0x06, 0x06, 0x06, 0x06, 0x01, 0x01, 0x01, 0x03, 0x03, 0x03, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x25, 0x05, 0x1d, 0x05, 0x25, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x20, 0x20, 0x20, 0x20, 0x20, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x21, 0x21, 0x39, 0x25, 0x25, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x20, 0x20, 0x20, 0x20, 0x20, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x64, 0x24, 0x27, 0x20, 0x20, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x24, 0x24, 0x24, 0xa4, 0xa4, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x94, 0x14, 0x74, 0x14, 0x94, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0xa4, 0xa4, 0xa4, 0xa4, 0xa4, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x94, 0x94, 0x64, 0x94, 0x94, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0xa4, 0xa4, 0xa4, 0xa4, 0xa4, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0xa1, 0xa1, 0xb9, 0xa5, 0xa5, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x29, 0x29, 0x29, 0x29, 0x29, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x01, 0x09, 0x03, 0x04, 0x02, 0x02, 0x03, 0x08, 0x03, 0x02, 0x07, 0x06, 0x05, 0x05, 0x03, 0x0d, 0x02, 0x07, 0x03, 0x11, 0x02, 0x09, 0x03, 0x13, 0x03, 0x02, 0x07, 0x15, 0x01, 0x05, 0x0e, 0x01, 0x03, 0x02, 0x0e, 0x06, 0x07, 0x02, 0x0c, 0x0d, 0x02, 0x08, 0x0e, 0x11, 0x07, 0x02, 0x12, 0x03, 0x02, 0x02, 0x12, 0x07, 0x04, 0x02, 0x12, 0x11, 0x04, 0x02, 0x12, 0x15, 0x01, 0x05, 0x16, 0x03, 0x02, 0x05, 0x14, 0x07, 0x02, 0x07, 0x16, 0x0b, 0x04, 0x02, 0x16, 0x11, 0x02, 0x05, 0x19, 0x15, 0x01, 0x02, 0x1a, 0x0b, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x01, 0x02, 0x03, 0x06, 0x05, 0x02, 0x03, 0x0d, 0x02, 0x07, 0x03, 0x11, 0x02, 0x09, 0x03, 0x15, 0x01, 0x02, 0x07, 0x15, 0x01, 0x05, 0x05, 0x09, 0x02, 0x07, 0x07, 0x06, 0x01, 0x05, 0x07, 0x03, 0x01, 0x07, 0x10, 0x01, 0x03, 0x01, 0x0e, 0x06, 0x0d, 0x02, 0x0c, 0x0d, 0x02, 0x08, 0x10, 0x15, 0x03, 0x01, 0x12, 0x07, 0x04, 0x02, 0x13, 0x03, 0x02, 0x08, 0x16, 0x07, 0x02, 0x05, 0x16, 0x0b, 0x04, 0x02, 0x12, 0x11, 0x02, 0x09, 0x13, 0x15, 0x01, 0x08, 0x1a, 0x0b, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x0b, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x02, 0x04, 0x03, 0x07, 0x02, 0x09, 0x03, 0x0b, 0x02, 0x09, 0x03, 0x0f, 0x02, 0x09, 0x03, 0x13, 0x03, 0x03, 0x08, 0x13, 0x03, 0x04, 0x09, 0x03, 0x02, 0x09, 0x0e, 0x05, 0x07, 0x02, 0x0e, 0x0e, 0x08, 0x02, 0x14, 0x03, 0x02, 0x07, 0x12, 0x07, 0x02, 0x02, 0x12, 0x0b, 0x04, 0x02, 0x12, 0x14, 0x02, 0x02, 0x16, 0x07, 0x02, 0x05, 0x16, 0x0b, 0x04, 0x02, 0x10, 0x11, 0x01, 0x0b, 0x16, 0x14, 0x02, 0x05, 0x1a, 0x0b, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x02, 0x09, 0x03, 0x07, 0x02, 0x09, 0x03, 0x0b, 0x02, 0x08, 0x03, 0x0f, 0x01, 0x08, 0x03, 0x12, 0x01, 0x09, 0x03, 0x15, 0x01, 0x09, 0x0e, 0x01, 0x02, 0x02, 0x0e, 0x05, 0x03, 0x02, 0x0d, 0x0a, 0x05, 0x02, 0x0e, 0x11, 0x05, 0x02, 0x12, 0x03, 0x02, 0x09, 0x12, 0x07, 0x01, 0x09, 0x11, 0x0a, 0x02, 0x07, 0x11, 0x0e, 0x01, 0x07, 0x10, 0x11, 0x01, 0x0b, 0x12, 0x14, 0x02, 0x02, 0x16, 0x14, 0x02, 0x05, 0x1a, 0x0b, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x02, 0x04, 0x03, 0x07, 0x02, 0x04, 0x03, 0x0b, 0x02, 0x04, 0x03, 0x0f, 0x02, 0x04, 0x03, 0x13, 0x03, 0x04, 0x09, 0x03, 0x02, 0x04, 0x09, 0x07, 0x02, 0x04, 0x09, 0x0b, 0x02, 0x04, 0x09, 0x0f, 0x02, 0x04, 0x09, 0x13, 0x03, 0x04, 0x0f, 0x03, 0x02, 0x05, 0x0f, 0x07, 0x02, 0x05, 0x0f, 0x0b, 0x02, 0x05, 0x0f, 0x0f, 0x02, 0x05, 0x0f, 0x13, 0x03, 0x05, 0x16, 0x03, 0x02, 0x04, 0x16, 0x07, 0x02, 0x04, 0x16, 0x0b, 0x04, 0x02, 0x16, 0x11, 0x01, 0x05, 0x16, 0x14, 0x02, 0x05, 0x1a, 0x0b, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x05, 0x01, 0x03, 0x0a, 0x01, 0x06, 0x03, 0x0d, 0x02, 0x06, 0x03, 0x11, 0x02, 0x06, 0x03, 0x15, 0x01, 0x05, 0x06, 0x03, 0x05, 0x01, 0x07, 0x07, 0x01, 0x03, 0x09, 0x03, 0x02, 0x05, 0x15, 0x07, 0x04, 0x02, 0x0b, 0x0d, 0x06, 0x02, 0x0a, 0x15, 0x01, 0x03, 0x10, 0x03, 0x05, 0x02, 0x0f, 0x11, 0x05, 0x02, 0x0d, 0x0d, 0x02, 0x0a, 0x0e, 0x0a, 0x01, 0x09, 0x14, 0x03, 0x02, 0x07, 0x12, 0x07, 0x01, 0x09, 0x11, 0x11, 0x01, 0x0a, 0x13, 0x14, 0x02, 0x03, 0x18, 0x14, 0x02, 0x03, 0x1a, 0x0b, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x01, 0x01, 0x0d, 0x07, 0x04, 0x01, 0x10, 0x0a, 0x07, 0x01, 0x0b, 0x09, 0x0a, 0x01, 0x0c, 0x0a, 0x0a, 0x01, 0x0b, 0x0a, 0x0e, 0x01, 0x0b, 0x0e, 0x0b, 0x03, 0x01, 0x0a, 0x11, 0x01, 0x0b, 0x07, 0x14, 0x01, 0x0e, 0x0a, 0x17, 0x01, 0x0d, 0x19, 0x04, 0x01, 0x02, 0x19, 0x05, 0x04, 0x01, 0x17, 0x08, 0x01, 0x02, 0x17, 0x11, 0x01, 0x03, 0x19, 0x11, 0x05, 0x01, 0x1a, 0x15, 0x01, 0x01, 0x04, 0x08, 0x01, 0x02, 0x03, 0x0a, 0x01, 0x05, 0x03, 0x0e, 0x01, 0x05, 0x04, 0x10, 0x01, 0x02, 0x03, 0x09, 0x01, 0x01, 0x05, 0x09, 0x01, 0x01, 0x03, 0x0f, 0x01, 0x01, 0x05, 0x0f, 0x01, 0x01, 0x1a, 0x0b, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0xad, 0xe4, 0xed, 0xc9, 0x05, 0xf0, 0x07, 0xc9, 0x0c, 0xf0, 0x0e, 0x4c, 0xc4, 0x17, 0xa2, 0x43, 0x8e, 0x26, 0x91, 0xa2, 0x42, 0xa9, 0x75, 0xd0, 0x0b, 0xa2, 0x86, 0x8e, 0x26, 0x91, 0xa2, 0x56, 0xa9, 0x82, 0xd0, 0x00, 0xcd, 0x04, 0x90, 0xd0, 0xfb, 0x8e, 0x25, 0x91, 0x78, 0xa2, 0xc5, 0xa0, 0x17, 0x8e, 0x14, 0x03, 0x8c, 0x15, 0x03, 0x58, 0x60, 0xa9, 0x01, 0x8d, 0xe3, 0x17, 0xad, 0xe4, 0x17, 0x0a, 0x0a, 0x0a, 0x18, 0x6d, 0xe4, 0x17, 0x18, 0x69, 0xc1, 0x8d, 0xe4, 0x17, 0xee, 0xe5, 0x17, 0xee, 0xe6, 0x17, 0x4c, 0xbf, 0xea, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x06, 0x06, 0x06, 0x0f, 0x0f, 0x0f, 0x1e, 0x1e, 0x50, 0xa0, 0x03, 0x03, 0x01, 0x02, 0x03, 0x04, 0x05, 0x07, 0x08, 0x16, 0x03, 0x05, 0x07, 0x09, 0x0b, 0x0d, 0x0f, 0x31, 0x35, 0x49, 0x21, 0x39, 0x21, 0x5b, 0x02, 0x01, 0x07, 0x02, 0x01, 0x02, 0x01, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x60, 0x60, 0x80, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x32, 0x00, 0x4b, 0x00, 0x64, 0x00, 0x7d, 0x00, 0x96, 0x00, 0xaf, 0x00, 0xc8, 0x00, 0xe1, 0x00, 0xfa, 0x00, 0x13, 0x01, 0x2c, 0x01, 0x45, 0x01, 0x5e, 0x01, 0x77, 0x01, 0x90, 0x01, 0xa9, 0x01, 0xc2, 0x01, 0xdb, 0x01, 0xf4, 0x01, 0x0d, 0x02, 0x26, 0x02, 0x3f, 0x02, 0x58, 0x02, 0x71, 0x02, 0x8a, 0x02, 0xa3, 0x02, 0xbc, 0x02, 0xd5, 0x02, 0xee, 0x02, 0x07, 0x03, 0x20, 0x03, 0x39, 0x03, 0x52, 0x03, 0x6b, 0x03, 0x00, 0x10, 0x19, 0x10, 0x32, 0x10, 0x4b, 0x10, 0x64, 0x10, 0x7d, 0x10, 0x96, 0x10, 0xaf, 0x10, 0xc8, 0x10, 0xe1, 0x10, 0xfa, 0x10, 0x13, 0x11, 0x2c, 0x11, 0x45, 0x11, 0x5e, 0x11, 0x77, 0x11, 0x90, 0x11, 0xa9, 0x11, 0xc2, 0x11, 0xdb, 0x11, 0xf4, 0x11, 0x0d, 0x12, 0x26, 0x12, 0x3f, 0x12, 0x58, 0x12, 0x71, 0x12, 0x8a, 0x12, 0xa3, 0x12, 0xbc, 0x12, 0xd5, 0x12, 0xee, 0x12, 0x07, 0x13, 0x20, 0x13, 0x39, 0x13, 0x52, 0x13, 0x6b, 0x13, 0x00, 0x94, 0x19, 0x94, 0x32, 0x94, 0x4b, 0x94, 0x64, 0x94, 0x7d, 0x94, 0x96, 0x94, 0xaf, 0x94, 0xc8, 0x94, 0xe1, 0x94, 0xfa, 0x94, 0x13, 0x95, 0x2c, 0x95, 0x45, 0x95, 0x5e, 0x95, 0x77, 0x95, 0x90, 0x95, 0xa9, 0x95, 0xc2, 0x95, 0xdb, 0x95, 0xf4, 0x95, 0x0d, 0x96, 0x26, 0x96, 0x3f, 0x96, 0x58, 0x96, 0x71, 0x96, 0x8a, 0x96, 0xa3, 0x96, 0xbc, 0x96, 0xd5, 0x96, 0xee, 0x96, 0x07, 0x97, 0x20, 0x97, 0x39, 0x97, 0x52, 0x97, 0x6b, 0x97, 0x76, 0x78, 0x7a, 0x7c, 0x7c, 0x7a, 0x78, 0x76, 0x74, 0x72, 0x70, 0x6e, 0x6e, 0x70, 0x72, 0x74, 0x00, 0x04, 0x08, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x03, 0x07, 0x0b, 0x0f, 0xe7, 0x32, 0xff, 0x02, 0x01, 0x01, 0x19, 0x19, 0x00, 0x00, 0xff, 0x01, 0xff, 0x01, 0x00, 0x00, 0x19, 0x00, 0x01, 0x00, 0x1a, 0x01, 0x1a, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0x01, 0xff, 0x00, 0x00, 0x01, 0x01, 0x19, 0x19, 0x0f, 0x00, 0x0e, 0x00, 0x0d, 0x00, 0x0c, 0x00, 0x0a, 0x00, 0x09, 0x00, 0x0f, 0x00, 0x0e, 0x00, 0x0d, 0x00, 0x0c, 0x00, 0x0a, 0x01, 0x06, 0x01, 0x05, 0x01, 0x04, 0x01, 0x03, 0x01, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x0a, 0x00, 0x09, 0x00, 0x08, 0x00, 0x07, 0x00, 0x05, 0x00, 0x04, 0x00, 0x0a, 0x00, 0x09, 0x00, 0x08, 0x01, 0x07, 0x01, 0x05, 0x01, 0x04, 0x01, 0x03, 0x01, 0x02, 0x01, 0x01, 0x01, 0x00, 0x01, 0xff, 0xff, 0x01, 0x02, 0x09, 0x04, 0x08, 0x04, 0x07, 0x04, 0x03, 0x04, 0x02, 0x06, 0x01, 0x06, 0x00, 0x00, 0xff, 0xff, 0x01, 0x02, 0x05, 0x02, 0x06, 0x02, 0x07, 0x02, 0x03, 0x02, 0x01, 0x02, 0xff, 0xff, 0x01, 0x00, 0x05, 0x00, 0x06, 0x01, 0x07, 0x01, 0x03, 0x01, 0x01, 0x02, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x8c, 0x01, 0x00, 0x53, 0x19, 0x03, 0x8c, 0x01, 0x00, 0x79, 0x19, 0x03, 0x8c, 0x02, 0x00, 0x9b, 0x19, 0x00, 0x80, 0x00, 0x01, 0xad, 0x19, 0x00, 0x84, 0x00, 0x01, 0xbb, 0x19, 0x20, 0x33, 0x30, 0x00, 0x20, 0x20, 0x20, 0x00, 0x20, 0x36, 0x30, 0x00, 0x20, 0x20, 0x20, 0x00, 0x31, 0x35, 0x30, 0x00, 0x20, 0x20, 0x20, 0x00, 0x33, 0x30, 0x30, 0x00, 0x20, 0x20, 0x20, 0x00, 0x38, 0x30, 0x30, 0x00, 0x20, 0x20, 0x20, 0x00, 0x20, 0x3f, 0x00, 0xc7, 0xc1, 0xcd, 0xc5, 0x20,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, 0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0x2d, 0x33, 0x32, 0x37, 0x36, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x38, 0x10, 0x10, 0xee, 0xfe, 0xfe, 0xfe, 0xc6, 0x00, 0x03, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x19, 0x1b, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x18, 0x00, 0xc0, 0xc0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x98, 0xd8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0x18, 0x18, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1b, 0x19, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x03, 0x00, 0x18, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xd8, 0x98, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x7f, 0x7f, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 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fb, 0xfb, 0x00, 0xbf, 0xbf, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfb, 0xfb, 0xfb, 0x00, 0xb0, 0xb0, 0xb0, 0x00, 0xf0, 0xf0, 0xf0, 0x00, 0x0d, 0x0d, 0x0d, 0x00, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa9, 0x00, 0x8d, 0x13, 0x91, 0x8d, 0x22, 0x91, 0xa9, 0x0f, 0x8d, 0x0e, 0x90, 0xa9, 0x47, 0xa2, 0x5b, 0x20, 0x10, 0x54, 0xa2, 0x00, 0xa9, 0x9b, 0x20, 0xba, 0x51, 0xa9, 0x20, 0x8d, 0xdb, 0x5b, 0xa9, 0x03, 0x8d, 0xd6, 0x5b, 0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c, 0x4a, 0x53, 0xa9, 0x02, 0x20, 0xb1, 0x50, 0xa9, 0x00, 0x20, 0xd2, 0x50, 0xa9, 0x00, 0x20, 0xb9, 0x50, 0xad, 0x05, 0x90, 0x29, 0xf0, 0x8d, 0xe3, 0x5b, 0x09, 0x0f, 0x8d, 0x05, 0x90, 0xad, 0x00, 0x90, 0x8d, 0xe3, 0x5b, 0x38, 0xe9, 0x02, 0x8d, 0x00, 0x90, 0xad, 0x02, 0x90, 0x8d, 0xe3, 0x5b, 0x29, 0x80, 0x09, 0x19, 0x8d, 0x02, 0x90, 0xad, 0x01, 0x90, 0x8d, 0xe3, 0x5b, 0x38, 0xe9, 0x14, 0x8d, 0x01, 0x90, 0xad, 0x03, 0x90, 0x8d, 0xe3, 0x5b, 0x29, 0x81, 0x09, 0x40, 0x8d, 0x03, 0x90, 0xad, 0x13, 0x91, 0x8d, 0x62, 0x54, 0xad, 0x22, 0x91, 0x8d, 0x63, 0x54, 0x60, 0xa2, 0x00, 0xad, 0xda, 0x5b, 0x38, 0xe9, 0x01, 0xb0, 0x01, 0xca, 0x86, 0x12, 0x0a, 0x26, 0x12, 0x18, 0x69, 0x7d, 0x85, 0x0a, 0xa5, 0x12, 0x69, 0x54, 0x85, 0x0b, 0xa0, 0x01, 0xb1, 0x0a, 0x8d, 0xe5, 0x5b, 0x88, 0xb1, 0x0a, 0x8d, 0xe4, 0x5b, 0xad, 0xdf, 0x5b, 0xf0, 0x1f, 0xa2, 0x00, 0xad, 0x64, 0x54, 0x0a, 0x90, 0x02, 0xe8, 0x18, 0x69, 0xa9, 0x85, 0x0a, 0x8a, 0x69, 0x54, 0x85, 0x0b, 0xc8, 0xb1, 0x0a, 0x8d, 0xe5, 0x5b, 0x88, 0xb1, 0x0a, 0x8d, 0xe4, 0x5b, 0x20, 0xdb, 0x52, 0x98, 0xa0, 0x05, 0x91, 0x02, 0x88, 0x91, 0x02, 0xa9, 0x19, 0x88, 0x91, 0x02, 0xa9, 0x20, 0x88, 0x91, 0x02, 0x88, 0x91, 0x02, 0xa9, 0x00, 0x88, 0x91, 0x02, 0x20, 0xee, 0x27, 0xad, 0xe4, 0x5b, 0x85, 0x0a, 0xad, 0xe5, 0x5b, 0x85, 0x0b, 0xa0, 0x02, 0xb1, 0x0a, 0xf0, 0x68, 0x20, 0xdb, 0x52, 0xad, 0xe4, 0x5b, 0x85, 0x0a, 0xad, 0xe5, 0x5b, 0x85, 0x0b, 0x88, 0xb1, 0x0a, 0xa0, 0x05, 0x91, 0x02, 0xad, 0xe4, 0x5b, 0x85, 0x0a, 0xad, 0xe5, 0x5b, 0x85, 0x0b, 0xa0, 0x00, 0xb1, 0x0a, 0xa0, 0x04, 0x91, 0x02, 0xad, 0xe4, 0x5b, 0x85, 0x0a, 0xad, 0xe5, 0x5b, 0x85, 0x0b, 0xa0, 0x02, 0xb1, 0x0a, 0xc8, 0x91, 0x02, 0xad, 0xe4, 0x5b, 0x85, 0x0a, 0xad, 0xe5, 0x5b, 0x85, 0x0b, 0xb1, 0x0a, 0x88, 0x91, 0x02, 0xa9, 0x52, 0x88, 0x91, 0x02, 0xa9, 0x02, 0x88, 0x91, 0x02, 0x20, 0xee, 0x27, 0xad, 0xe4, 0x5b, 0xae, 0xe5, 0x5b, 0x18, 0x69, 0x04, 0x90, 0x01, 0xe8, 0x8d, 0xe4, 0x5b, 0x8e, 0xe5, 0x5b, 0x4c, 0x63, 0x22, 0x20, 0xdb, 0x52, 0xa9, 0x0c, 0xa0, 0x05, 0x91, 0x02, 0xa9, 0x1b, 0x88, 0x91, 0x02, 0xa9, 0x02, 0x88, 0x91, 0x02, 0x88, 0x91, 0x02, 0xa9, 0x20, 0x88, 0x91, 0x02, 0xa9, 0x05, 0x88, 0x91, 0x02, 0x20, 0xee, 0x27, 0x20, 0xdb, 0x52, 0xa9, 0x00, 0xa0, 0x05, 0x91, 0x02, 0x88, 0x91, 0x02, 0xa9, 0x19, 0x88, 0x91, 0x02, 0xa9, 0x01, 0x88, 0x91, 0x02, 0xa9, 0xe6, 0x88, 0x91, 0x02, 0xa9, 0x05, 0x88, 0x91, 0x02, 0x20, 0xee, 0x27, 0x20, 0xdb, 0x52, 0xa9, 0x00, 0xa0, 0x05, 0x91, 0x02, 0x88, 0x91, 0x02, 0xa9, 0x01, 0x88, 0x91, 0x02, 0xa9, 0x20, 0x88, 0x91, 0x02, 0xa9, 0xe6, 0x88, 0x91, 0x02, 0xa9, 0x05, 0x88, 0x91, 0x02, 0x20, 0xee, 0x27, 0x20, 0xdb, 0x52, 0xa9, 0x18, 0xa0, 0x05, 0x91, 0x02, 0xa9, 0x00, 0x88, 0x91, 0x02, 0xa9, 0x01, 0x88, 0x91, 0x02, 0xa9, 0x20, 0x88, 0x91, 0x02, 0xa9, 0xe6, 0x88, 0x91, 0x02, 0xa9, 0x05, 0x88, 0x91, 0x02, 0x20, 0xee, 0x27, 0x20, 0xdb, 0x52, 0xa9, 0x00, 0xa0, 0x05, 0x91, 0x02, 0xa9, 0x1d, 0x88, 0x91, 0x02, 0xa9, 0x19, 0x88, 0x91, 0x02, 0xa9, 0x01, 0x88, 0x91, 0x02, 0xa9, 0xe6, 0x88, 0x91, 0x02, 0xa9, 0x05, 0x88, 0x91, 0x02, 0x20, 0xee, 0x27, 0x20, 0xe8, 0x52, 0xa9, 0x00, 0xa0, 0x07, 0x91, 0x02, 0xa9, 0x1e, 0x88, 0x91, 0x02, 0xa9, 0x19, 0x88, 0x91, 0x02, 0xa9, 0x02, 0x88, 0x91, 0x02, 0xa9, 0x00, 0xa0, 0x02, 0x91, 0x02, 0xc8, 0xa9, 0x14, 0x91, 0x02, 0xa9, 0x32, 0xa0, 0x00, 0x91, 0x02, 0xc8, 0xa9, 0x14, 0x91, 0x02, 0x20, 0xb2, 0x28, 0xa9, 0x07, 0xa2, 0x55, 0x20, 0x10, 0x54, 0xa2, 0x10, 0xa9, 0x00, 0x20, 0x10, 0x54, 0xa2, 0x03, 0xa9, 0x20, 0x20, 0x79, 0x51, 0xa9, 0x27, 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b, 0x8d, 0xeb, 0x5b, 0x8d, 0xec, 0x5b, 0xad, 0xdf, 0x5b, 0xd0, 0x09, 0xa8, 0xb1, 0x02, 0x20, 0xfa, 0x53, 0x20, 0x92, 0x4a, 0xa0, 0x00, 0xb1, 0x02, 0xf0, 0x03, 0x20, 0xf7, 0x21, 0xa0, 0x00, 0x20, 0x26, 0x20, 0x20, 0xc1, 0x52, 0xa9, 0x00, 0xa0, 0x03, 0x91, 0x02, 0x88, 0x91, 0x02, 0xa9, 0x19, 0x88, 0x91, 0x02, 0xa9, 0x1e, 0x88, 0x91, 0x02, 0x20, 0x1b, 0x45, 0x20, 0xe8, 0x52, 0xa9, 0x00, 0xa0, 0x07, 0x91, 0x02, 0xa9, 0x1e, 0x88, 0x91, 0x02, 0xa9, 0x19, 0x88, 0x91, 0x02, 0xa9, 0x02, 0x88, 0x91, 0x02, 0xa9, 0x00, 0xa0, 0x02, 0x91, 0x02, 0xc8, 0xa9, 0x14, 0x91, 0x02, 0xa9, 0x32, 0xa0, 0x00, 0x91, 0x02, 0xc8, 0xa9, 0x14, 0x91, 0x02, 0x20, 0xb2, 0x28, 0xad, 0xdf, 0x5b, 0xf0, 0x24, 0x20, 0xdb, 0x52, 0xa9, 0x0c, 0xa0, 0x05, 0x91, 0x02, 0xa9, 0x1e, 0x88, 0x91, 0x02, 0xa9, 0x24, 0xa0, 0x02, 0x91, 0x02, 0xc8, 0xa9, 0x1a, 0x91, 0x02, 0xa9, 0x01, 0xa8, 0x91, 0x02, 0x88, 0x91, 0x02, 0x20, 0xa8, 0x4d, 0xad, 0xde, 0x5b, 0xf0, 0x0b, 0xad, 0x49, 0x5b, 0x0d, 0x4a, 0x5b, 0xd0, 0x03, 0x4c, 0x23, 0x53, 0xa0, 0x00, 0x20, 0x27, 0x48, 0xad, 0x4f, 0x5b, 0x18, 0x69, 0x01, 0x8d, 0x4f, 0x5b, 0xad, 0xeb, 0x5b, 0xc9, 0x05, 0x90, 0x05, 0xa9, 0x00, 0x8d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 0x08, 0xb1, 0x0a, 0xaa, 0x88, 0xb1, 0x0a, 0xe0, 0x00, 0xf0, 0x03, 0x4c, 0x32, 0x53, 0xc9, 0x00, 0xf0, 0x03, 0x4c, 0x32, 0x53, 0xad, 0xff, 0x5b, 0x85, 0x0a, 0xad, 0x00, 0x5c, 0x85, 0x0b, 0xa9, 0x80, 0xa0, 0x01, 0x91, 0x0a, 0xad, 0xff, 0x5b, 0x85, 0x0a, 0xad, 0x00, 0x5c, 0x85, 0x0b, 0xa9, 0x80, 0xc8, 0x91, 0x0a, 0xad, 0xff, 0x5b, 0xae, 0x00, 0x5c, 0x20, 0x10, 0x54, 0xa0, 0x03, 0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x85, 0x0a, 0x86, 0x0b, 0xa0, 0x11, 0xb1, 0x0a, 0xaa, 0x88, 0xb1, 0x0a, 0x85, 0x0a, 0x8a, 0x18, 0x69, 0x19, 0x85, 0x0b, 0xa0, 0x1f, 0xb1, 0x0a, 0x85, 0x04, 0xa0, 0x03, 0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x85, 0x0a, 0x86, 0x0b, 0xa0, 0x0e, 0xa2, 0x00, 0xb1, 0x0a, 0x18, 0x65, 0x04, 0x90, 0x01, 0xe8, 0x20, 0x10, 0x54, 0xa0, 0x05, 0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x85, 0x0a, 0x86, 0x0b, 0xa0, 0x11, 0xb1, 0x0a, 0xaa, 0x88, 0xb1, 0x0a, 0x18, 0x69, 0x33, 0xa8, 0x8a, 0x69, 0x19, 0xaa, 0x98, 0xa0, 0x00, 0x20, 0x59, 0x53, 0x20, 0x20, 0x52, 0xa0, 0x03, 0x20, 0x26, 0x54, 0xad, 0xff, 0x5b, 0xae, 0x00, 0x5c, 0x20, 0x10, 0x54, 0xa0, 0x03, 0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x85, 0x0a, 0x86, 0x0b, 0xa0, 0x11, 0xb1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0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x85, 0x04, 0x86, 0x05, 0x85, 0x0a, 0x86, 0x0b, 0xb1, 0x0a, 0x38, 0xe9, 0x01, 0x91, 0x04, 0xc8, 0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x85, 0x0a, 0x86, 0x0b, 0xb1, 0x0a, 0xc9, 0x01, 0x90, 0x03, 0x4c, 0x32, 0x53, 0xc8, 0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x85, 0x04, 0x86, 0x05, 0x85, 0x0a, 0x86, 0x0b, 0xa0, 0x08, 0xb1, 0x0a, 0xaa, 0x88, 0xb1, 0x0a, 0x18, 0x69, 0x01, 0x90, 0x01, 0xe8, 0x91, 0x04, 0xc8, 0x8a, 0x91, 0x04, 0x4c, 0x32, 0x53, 0xac, 0x18, 0x5c, 0xb9, 0x06, 0x18, 0x8d, 0x17, 0x5c, 0xa0, 0x01, 0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x85, 0x0a, 0x86, 0x0b, 0xa9, 0x07, 0x91, 0x0a, 0xad, 0x17, 0x5c, 0xc9, 0x08, 0x90, 0x47, 0xad, 0x17, 0x5c, 0xc9, 0x0f, 0xf0, 0x40, 0x20, 0xc1, 0x52, 0xa0, 0x05, 0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x85, 0x0a, 0x86, 0x0b, 0x88, 0xb1, 0x0a, 0x91, 0x02, 0xa0, 0x05, 0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x85, 0x0a, 0x86, 0x0b, 0xb1, 0x0a, 0xa0, 0x02, 0x91, 0x02, 0xac, 0x18, 0x5c, 0xb9, 0x0d, 0x18, 0xa0, 0x01, 0x91, 0x02, 0xac, 0x18, 0x5c, 0xb9, 0x14, 0x18, 0xa0, 0x00, 0x91, 0x02, 0x20, 0x71, 0x44, 0x4c, 0xc8, 0x34, 0x20, 0xc1, 0x52, 0xa0, 0x05, 0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x85, 0x0a, 0x86, 0x0b, 0x88, 0xb1, 0x0a, 0x91, 0x02, 0xa0, 0x05, 0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x85, 0x0a, 0x86, 0x0b, 0xb1, 0x0a, 0xa0, 0x02, 0x91, 0x02, 0xac, 0x18, 0x5c, 0xb9, 0x0d, 0x18, 0xa0, 0x01, 0x91, 0x02, 0xac, 0x18, 0x5c, 0xb9, 0x14, 0x18, 0xa0, 0x00, 0x91, 0x02, 0x20, 0x64, 0x43, 0xa0, 0x01, 0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x85, 0x0a, 0x86, 0x0b, 0xad, 0x17, 0x5c, 0xa0, 0x07, 0x91, 0x0a, 0xc8, 0xa9, 0x00, 0x91, 0x0a, 0x4c, 0x32, 0x53, 0xac, 0x18, 0x5c, 0xb9, 0x1b, 0x18, 0x8d, 0x16, 0x5c, 0xa0, 0x01, 0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x85, 0x04, 0x86, 0x05, 0x85, 0x0a, 0x86, 0x0b, 0xb1, 0x0a, 0x38, 0xe9, 0x01, 0x91, 0x04, 0xc8, 0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x85, 0x0a, 0x86, 0x0b, 0xb1, 0x0a, 0xc9, 0x01, 0x90, 0x03, 0x4c, 0x32, 0x53, 0xc8, 0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x20, 0x10, 0x54, 0x20, 0xe3, 0x3c, 0x20, 0xc1, 0x52, 0xa0, 0x05, 0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x85, 0x0a, 0x86, 0x0b, 0x88, 0xb1, 0x0a, 0x91, 0x02, 0xa0, 0x05, 0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x85, 0x0a, 0x86, 0x0b, 0xb1, 0x0a, 0xa0, 0x02, 0x91, 0x02, 0xad, 0x16, 0x5c, 0x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a, 0x88, 0xb1, 0x0a, 0xe0, 0x5b, 0xd0, 0x04, 0xc9, 0xb5, 0xf0, 0x05, 0xa9, 0x01, 0x8d, 0xde, 0x5b, 0xa0, 0x01, 0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x20, 0x10, 0x54, 0x20, 0xe3, 0x3c, 0x20, 0xc1, 0x52, 0xa0, 0x05, 0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x85, 0x0a, 0x86, 0x0b, 0x88, 0xb1, 0x0a, 0x91, 0x02, 0xa0, 0x05, 0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x85, 0x0a, 0x86, 0x0b, 0xb1, 0x0a, 0xa0, 0x02, 0x91, 0x02, 0xad, 0x16, 0x5c, 0x88, 0x91, 0x02, 0xad, 0x16, 0x5c, 0x88, 0x91, 0x02, 0x20, 0x1b, 0x45, 0x4c, 0x32, 0x53, 0xa0, 0x01, 0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x85, 0x04, 0x86, 0x05, 0x85, 0x0a, 0x86, 0x0b, 0xb1, 0x0a, 0x38, 0xe9, 0x01, 0x91, 0x04, 0xc8, 0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x85, 0x0a, 0x86, 0x0b, 0xb1, 0x0a, 0xf0, 0x03, 0x4c, 0x32, 0x53, 0xc8, 0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x85, 0x04, 0x86, 0x05, 0x85, 0x0a, 0x86, 0x0b, 0xa0, 0x03, 0xb1, 0x0a, 0x38, 0xe9, 0x01, 0x91, 0x04, 0xa0, 0x01, 0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x85, 0x04, 0x86, 0x05, 0x85, 0x0a, 0x86, 0x0b, 0xa0, 0x04, 0xb1, 0x0a, 0x38, 0xe9, 0x01, 0x91, 0x04, 0xa0, 0x01, 0xb1, 0x02, 0xaa, 0x88, 0xb1, 0x02, 0x85, 0x0a, 0x86, 0x0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a0, 0x03, 0xb1, 0x02, 0xa0, 0x00, 0x91, 0x0a, 0xad, 0x51, 0x5c, 0xae, 0x52, 0x5c, 0x18, 0x6d, 0x50, 0x5c, 0x90, 0x01, 0xe8, 0x85, 0x0a, 0x86, 0x0b, 0xa0, 0x03, 0xb1, 0x02, 0x18, 0x69, 0x01, 0xa0, 0x00, 0x91, 0x0a, 0xad, 0x53, 0x5c, 0x85, 0x0a, 0xad, 0x54, 0x5c, 0x85, 0x0b, 0xa0, 0x02, 0xb1, 0x02, 0xa0, 0x00, 0x91, 0x0a, 0xad, 0x53, 0x5c, 0xae, 0x54, 0x5c, 0x18, 0x6d, 0x50, 0x5c, 0x90, 0x01, 0xe8, 0x85, 0x0a, 0x86, 0x0b, 0xa0, 0x02, 0xb1, 0x02, 0xa0, 0x00, 0x91, 0x0a, 0x4c, 0x4f, 0x53, 0xa0, 0x02, 0xa2, 0x00, 0xb1, 0x02, 0x0a, 0x90, 0x02, 0xe8, 0x18, 0x69, 0x7b, 0x85, 0x0a, 0x8a, 0x69, 0x18, 0x85, 0x0b, 0x88, 0xb1, 0x0a, 0xaa, 0x88, 0xb1, 0x0a, 0x85, 0x0a, 0x86, 0x0b, 0xa0, 0x03, 0xb1, 0x02, 0x18, 0x65, 0x0a, 0xa6, 0x0b, 0x90, 0x01, 0xe8, 0x8d, 0x55, 0x5c, 0x8e, 0x56, 0x5c, 0x85, 0x0a, 0x86, 0x0b, 0xa0, 0x01, 0xb1, 0x02, 0x88, 0x91, 0x0a, 0xad, 0x55, 0x5c, 0xae, 0x56, 0x5c, 0x18, 0x69, 0x19, 0x90, 0x01, 0xe8, 0x85, 0x0a, 0x86, 0x0b, 0xc8, 0xb1, 0x02, 0x18, 0x69, 0x01, 0x88, 0x91, 0x0a, 0xad, 0x55, 0x5c, 0xae, 0x56, 0x5c, 0x18, 0x69, 0x01, 0x90, 0x01, 0xe8, 0x85, 0x0a, 0x86, 0x0b, 0xc8, 0xb1, 0x02, 0x18, 0x69, 0x02, 0x88, 0x91, 0x0a, 0xad, 0x55, 0x5c, 0xae, 0x56, 0x5c, 0x18, 0x69, 0x19, 0x90, 0x02, 0xe8, 0x18, 0x69, 0x01, 0x90, 0x01, 0xe8, 0x85, 0x0a, 0x86, 0x0b, 0xc8, 0xb1, 0x02, 0x18, 0x69, 0x03, 0x88, 0x91, 0x0a, 0xa0, 0x02, 0xa2, 0x00, 0xb1, 0x02, 0x0a, 0x90, 0x02, 0xe8, 0x18, 0x69, 0xc3, 0x85, 0x0a, 0x8a, 0x69, 0x18, 0x85, 0x0b, 0x88, 0xb1, 0x0a, 0xaa, 0x88, 0xb1, 0x0a, 0x85, 0x0a, 0x86, 0x0b, 0xa0, 0x03, 0xb1, 0x02, 0x18, 0x65, 0x0a, 0xa6, 0x0b, 0x90, 0x01, 0xe8, 0x8d, 0x55, 0x5c, 0x8e, 0x56, 0x5c, 0x85, 0x0a, 0x86, 0x0b, 0xa0, 0x00, 0xb1, 0x02, 0x91, 0x0a, 0xad, 0x55, 0x5c, 0xae, 0x56, 0x5c, 0x18, 0x69, 0x19, 0x90, 0x01, 0xe8, 0x85, 0x0a, 0x86, 0x0b, 0xb1, 0x02, 0x91, 0x0a, 0xad, 0x55, 0x5c, 0xae, 0x56, 0x5c, 0x18, 0x69, 0x01, 0x90, 0x01, 0xe8, 0x85, 0x0a, 0x86, 0x0b, 0xb1, 0x02, 0x91, 0x0a, 0xad, 0x55, 0x5c, 0xae, 0x56, 0x5c, 0x18, 0x69, 0x19, 0x90, 0x02, 0xe8, 0x18, 0x69, 0x01, 0x90, 0x01, 0xe8, 0x85, 0x0a, 0x86, 0x0b, 0xb1, 0x02, 0x91, 0x0a, 0x4c, 0x45, 0x53, 0xa0, 0x03, 0xb1, 0x02, 0x18, 0x69, 0x04, 0x8d, 0x5b, 0x5c, 0x88, 0xb1, 0x02, 0x18, 0x69, 0x04, 0x8d, 0x5c, 0x5c, 0xc8, 0xb1, 0x02, 0x8d, 0x57, 0x5c, 0xcd, 0x5b,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, 0x91, 0x02, 0xc8, 0xad, 0x6b, 0x5c, 0x91, 0x02, 0xa9, 0x01, 0xa8, 0x91, 0x02, 0xa9, 0x05, 0x88, 0x91, 0x02, 0x20, 0x8e, 0x4e, 0x20, 0xdb, 0x52, 0xa9, 0x08, 0xa0, 0x05, 0x91, 0x02, 0xa9, 0x1f, 0x88, 0x91, 0x02, 0xad, 0xda, 0x5b, 0xa0, 0x02, 0x91, 0x02, 0xc8, 0xa9, 0x00, 0x91, 0x02, 0xa9, 0x01, 0xa8, 0x91, 0x02, 0xa9, 0x02, 0x88, 0x91, 0x02, 0x20, 0x8e, 0x4e, 0x20, 0xdb, 0x52, 0xa9, 0x03, 0xa0, 0x05, 0x91, 0x02, 0xa9, 0x1f, 0x88, 0x91, 0x02, 0xad, 0xd6, 0x5b, 0xa0, 0x02, 0x91, 0x02, 0xc8, 0xa9, 0x00, 0x91, 0x02, 0xa9, 0x01, 0xa8, 0x91, 0x02, 0xa9, 0x00, 0x88, 0x91, 0x02, 0x20, 0x8e, 0x4e, 0x20, 0xdb, 0x52, 0xa9, 0x15, 0xa0, 0x05, 0x91, 0x02, 0xa9, 0x1f, 0x88, 0x91, 0x02, 0xad, 0xd8, 0x5b, 0xa0, 0x02, 0x91, 0x02, 0xc8, 0xa9, 0x00, 0x91, 0x02, 0xa9, 0x01, 0xa8, 0x91, 0x02, 0xa9, 0x02, 0x88, 0x91, 0x02, 0x20, 0x8e, 0x4e, 0xad, 0xd8, 0x5b, 0xc9, 0x04, 0xb0, 0x05, 0xa9, 0x20, 0x8d, 0x01, 0x13, 0xad, 0xd8, 0x5b, 0xc9, 0x03, 0xb0, 0x05, 0xa9, 0x20, 0x8d, 0x1a, 0x13, 0xad, 0xd8, 0x5b, 0xc9, 0x02, 0xb0, 0x05, 0xa9, 0x20, 0x8d, 0x02, 0x13, 0xad, 0xd8, 0x5b, 0xd0, 0x05, 0xa9, 0x20, 0x8d, 0x1b, 0x13, 0x60, 0xa2, 0x00, 0xa9, 0x04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, 0x5c, 0x85, 0x0b, 0xa0, 0x05, 0xb1, 0x0a, 0xaa, 0x88, 0xb1, 0x0a, 0x85, 0x0a, 0x86, 0x0b, 0xa0, 0x00, 0xb1, 0x0a, 0x8d, 0x0e, 0x90, 0xad, 0x6e, 0x5c, 0x85, 0x0a, 0xad, 0x6f, 0x5c, 0x85, 0x0b, 0xa0, 0x05, 0xb1, 0x0a, 0xaa, 0x88, 0xb1, 0x0a, 0x85, 0x0a, 0x86, 0x0b, 0xa0, 0x01, 0xb1, 0x0a, 0x8d, 0x4b, 0x5b, 0xa9, 0x00, 0x8d, 0x4c, 0x5b, 0x60, 0x20, 0xdb, 0x52, 0xa9, 0x00, 0xa0, 0x05, 0x91, 0x02, 0x88, 0x91, 0x02, 0xa9, 0x19, 0x88, 0x91, 0x02, 0xa9, 0x20, 0x88, 0x91, 0x02, 0x88, 0x91, 0x02, 0xa9, 0x00, 0x88, 0x91, 0x02, 0x20, 0xee, 0x27, 0xa0, 0x00, 0xb1, 0x02, 0xf0, 0x4b, 0x20, 0xdb, 0x52, 0xa9, 0x09, 0xa0, 0x05, 0x91, 0x02, 0xa9, 0x0c, 0x88, 0x91, 0x02, 0xa9, 0x2b, 0xa0, 0x02, 0x91, 0x02, 0xc8, 0xa9, 0x1a, 0x91, 0x02, 0xa9, 0x01, 0xa8, 0x91, 0x02, 0x88, 0x91, 0x02, 0x20, 0xa8, 0x4d, 0x20, 0xdb, 0x52, 0xa9, 0x10, 0xa0, 0x05, 0x91, 0x02, 0xa9, 0x0c, 0x88, 0x91, 0x02, 0xad, 0xda, 0x5b, 0xa0, 0x02, 0x91, 0x02, 0xc8, 0xa9, 0x00, 0x91, 0x02, 0xa9, 0x01, 0xa8, 0x91, 0x02, 0xa9, 0x00, 0x88, 0x91, 0x02, 0x20, 0x8e, 0x4e, 0x20, 0xdb, 0x52, 0xa9, 0x0a, 0xa0, 0x05, 0x91, 0x02, 0xa9, 0x14, 0x88, 0x91, 0x02, 0xa9, 0x33, 0xa0, 0x02, 0x91, 0x02, 0xc8, 0xa9, 0x1a, 0x91, 0x02, 0xa9, 0x01, 0xa8, 0x91, 0x02, 0x88, 0x91, 0x02, 0x20, 0xa8, 0x4d, 0xa9, 0x00, 0x8d, 0x76, 0x5c, 0x8d, 0x77, 0x5c, 0xad, 0x77, 0x5c, 0xc9, 0x61, 0xd0, 0x05, 0xad, 0x76, 0x5c, 0xc9, 0xa8, 0x90, 0x03, 0x4c, 0x23, 0x53, 0xad, 0x76, 0x5c, 0xae, 0x77, 0x5c, 0x18, 0x69, 0x01, 0x90, 0x01, 0xe8, 0x8d, 0x76, 0x5c, 0x8e, 0x77, 0x5c, 0x4c, 0x30, 0x4b, 0xa9, 0x00, 0x8d, 0x78, 0x5c, 0xa9, 0x03, 0x8d, 0x79, 0x5c, 0xa9, 0x02, 0x8d, 0x7a, 0x5c, 0xa9, 0x00, 0x8d, 0x7b, 0x5c, 0x8d, 0x7c, 0x5c, 0x20, 0xdb, 0x52, 0xa9, 0x00, 0xa0, 0x05, 0x91, 0x02, 0x88, 0x91, 0x02, 0xa9, 0x19, 0x88, 0x91, 0x02, 0xa9, 0x20, 0x88, 0x91, 0x02, 0x88, 0x91, 0x02, 0xa9, 0x00, 0x88, 0x91, 0x02, 0x20, 0xee, 0x27, 0xad, 0x62, 0x54, 0x8d, 0x13, 0x91, 0xad, 0x63, 0x54, 0x8d, 0x22, 0x91, 0x20, 0xdb, 0x52, 0xad, 0x79, 0x5c, 0xa0, 0x05, 0x91, 0x02, 0xad, 0x7a, 0x5c, 0x88, 0x91, 0x02, 0xa9, 0x3c, 0xa0, 0x02, 0x91, 0x02, 0xc8, 0xa9, 0x1a, 0x91, 0x02, 0xa9, 0x01, 0xa8, 0x91, 0x02, 0x88, 0x91, 0x02, 0x20, 0xa8, 0x4d, 0x20, 0xdb, 0x52, 0xad, 0x79, 0x5c, 0xa0, 0x05, 0x91, 0x02, 0xad, 0x7a, 0x5c, 0x18, 0x69, 0x06, 0x88, 0x91, 0x02, 0xa9, 0x4d, 0xa0, 0x02, 0x91, 0x02, 0xc8, 0xa9, 0x1a, 0x91, 0x02, 0xa9, 0x01, 0xa8, 0x91, 0x02, 0x88, 0x91, 0x02, 0x20, 0xa8, 0x4d, 0x20, 0xdb, 0x52, 0xad, 0x79, 0x5c, 0xa0, 0x05, 0x91, 0x02, 0xad, 0x7a, 0x5c, 0x18, 0x69, 0x0a, 0x88, 0x91, 0x02, 0xa9, 0x5a, 0xa0, 0x02, 0x91, 0x02, 0xc8, 0xa9, 0x1a, 0x91, 0x02, 0xa9, 0x01, 0xa8, 0x91, 0x02, 0x88, 0x91, 0x02, 0x20, 0xa8, 0x4d, 0x20, 0xdb, 0x52, 0xad, 0x79, 0x5c, 0xa0, 0x05, 0x91, 0x02, 0xad, 0x7a, 0x5c, 0x18, 0x69, 0x0d, 0x88, 0x91, 0x02, 0xa9, 0x6e, 0xa0, 0x02, 0x91, 0x02, 0xc8, 0xa9, 0x1a, 0x91, 0x02, 0xa9, 0x01, 0xa8, 0x91, 0x02, 0x88, 0x91, 0x02, 0x20, 0xa8, 0x4d, 0x20, 0xc1, 0x52, 0xad, 0x79, 0x5c, 0x18, 0x69, 0x0e, 0xa0, 0x03, 0x91, 0x02, 0xad, 0x7a, 0x5c, 0x18, 0x69, 0x0c, 0x88, 0x91, 0x02, 0xa9, 0x1c, 0x88, 0x91, 0x02, 0xa9, 0x07, 0x88, 0x91, 0x02, 0x20, 0x64, 0x43, 0x20, 0xdb, 0x52, 0xad, 0x79, 0x5c, 0xa0, 0x05, 0x91, 0x02, 0xad, 0x7a, 0x5c, 0x18, 0x69, 0x12, 0x88, 0x91, 0x02, 0xa9, 0x7b, 0xa0, 0x02, 0x91, 0x02, 0xc8, 0xa9, 0x1a, 0x91, 0x02, 0xa9, 0x01, 0xa8, 0x91, 0x02, 0x88, 0x91, 0x02, 0x20, 0xa8, 0x4d, 0x20, 0xc1, 0x52, 0xad, 0x79, 0x5c, 0x18, 0x69, 0x06, 0xa0, 0x03, 0x91, 0x02, 0xad, 0x7a, 0x5c, 0x18, 0x69, 0x11, 0x88, 0x91, 0x02, 0xad, 0x27, 0x19, 0x88, 0x91, 0x02, 0xa9, 0x03, 0x88, 0x91, 0x02, 0x20, 0x64, 0x43, 0xa9, 0x00, 0x8d, 0x78, 0x5c, 0xc9, 0x0b, 0xb0, 0x5d, 0x20, 0xdb, 0x52, 0xad, 0x79, 0x5c, 0x18, 0x69, 0x08, 0xa0, 0x05, 0x91, 0x02, 0xad, 0x7a, 0x5c, 0x18, 0x69, 0x12, 0x88, 0x91, 0x02, 0xa2, 0x00, 0xad, 0x78, 0x5c, 0x0a, 0x90, 0x02, 0xe8, 0x18, 0x69, 0x67, 0x85, 0x0a, 0x8a, 0x69, 0x54, 0x85, 0x0b, 0xa0, 0x01, 0xb1, 0x0a, 0xaa, 0x88, 0xb1, 0x0a, 0xa0, 0x02, 0x91, 0x02, 0xc8, 0x8a, 0x91, 0x02, 0xa9, 0x01, 0xa8, 0x91, 0x02, 0x88, 0x91, 0x02, 0x20, 0xa8, 0x4d, 0xa9, 0x01, 0x20, 0xfa, 0x53, 0x20, 0x40, 0x4f, 0xaa, 0xf0, 0x05, 0xa2, 0x00, 0xa9, 0x01, 0x60, 0xad, 0x78, 0x5c, 0x18, 0x69, 0x01, 0x4c, 0xad, 0x4c, 0x20, 0xdb, 0x52, 0xad, 0x79, 0x5c, 0xa0, 0x05, 0x91, 0x02, 0xad, 0x79, 0x5c, 0x18, 0x69, 0x16, 0x88, 0x91, 0x02, 0xa9, 0x8e, 0xa0, 0x02, 0x91, 0x02, 0xc8, 0xa9, 0x1a, 0x91, 0x02, 0xa9, 0x01, 0xa8, 0x91, 0x02, 0x88, 0x91, 0x02, 0x20, 0xa8, 0x4d, 0x20, 0xdb, 0x52, 0xa9, 0x00, 0xa0, 0x05, 0x91, 0x02, 0xa9, 0x1d, 0x88, 0x91, 0x02, 0xa9, 0x9f, 0xa0, 0x02, 0x91, 0x02, 0xc8, 0xa9, 0x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b, 0x8d, 0x9c, 0x5c, 0xa5, 0x91, 0x29, 0x02, 0x8d, 0x9b, 0x5c, 0xad, 0x9c, 0x5c, 0xc9, 0x17, 0xf0, 0x21, 0xc9, 0x1f, 0xd0, 0x34, 0xad, 0x9b, 0x5c, 0xf0, 0x0c, 0xad, 0x01, 0x90, 0x18, 0x69, 0x01, 0x8d, 0x01, 0x90, 0x4c, 0xc9, 0x4f, 0xad, 0x01, 0x90, 0x38, 0xe9, 0x01, 0x8d, 0x01, 0x90, 0x4c, 0xc9, 0x4f, 0xad, 0x9b, 0x5c, 0xf0, 0x09, 0xad, 0x00, 0x90, 0x18, 0x69, 0x01, 0x4c, 0xc6, 0x4f, 0xad, 0x00, 0x90, 0x38, 0xe9, 0x01, 0x8d, 0x00, 0x90, 0xad, 0x9c, 0x5c, 0xc9, 0x1f, 0xf0, 0x0a, 0xad, 0x9c, 0x5c, 0xc9, 0x17, 0xf0, 0x03, 0x4c, 0x70, 0x50, 0x20, 0xdb, 0x52, 0xa9, 0x00, 0xa0, 0x05, 0x91, 0x02, 0x88, 0x91, 0x02, 0xa9, 0x98, 0xa0, 0x02, 0x91, 0x02, 0xc8, 0xa9, 0x5c, 0x91, 0x02, 0xa9, 0x05, 0xa0, 0x01, 0x91, 0x02, 0x98, 0x88, 0x91, 0x02, 0x20, 0xa8, 0x4d, 0x20, 0xdb, 0x52, 0xa9, 0x18, 0xa0, 0x05, 0x91, 0x02, 0xa9, 0x00, 0x88, 0x91, 0x02, 0xa9, 0x98, 0xa0, 0x02, 0x91, 0x02, 0xc8, 0xa9, 0x5c, 0x91, 0x02, 0xa9, 0x05, 0xa0, 0x01, 0x91, 0x02, 0x98, 0x88, 0x91, 0x02, 0x20, 0xa8, 0x4d, 0x20, 0xdb, 0x52, 0xa9, 0x00, 0xa0, 0x05, 0x91, 0x02, 0xa9, 0x1f, 0x88, 0x91, 0x02, 0xa9, 0x98, 0xa0, 0x02, 0x91, 0x02, 0xc8, 0xa9, 0x5c, 0x91, 0x02, 0xa9, 0x05, 0xa0, 0x01, 0x91, 0x02, 0x98, 0x88, 0x91, 0x02, 0x20, 0xa8, 0x4d, 0x20, 0xdb, 0x52, 0xa9, 0x18, 0xa0, 0x05, 0x91, 0x02, 0xa9, 0x1f, 0x88, 0x91, 0x02, 0xa9, 0x98, 0xa0, 0x02, 0x91, 0x02, 0xc8, 0xa9, 0x5c, 0x91, 0x02, 0xa9, 0x05, 0xa0, 0x01, 0x91, 0x02, 0x98, 0x88, 0x91, 0x02, 0x20, 0xa8, 0x4d, 0xad, 0x9d, 0x5c, 0x18, 0x69, 0x01, 0x4c, 0x4d, 0x4f, 0xa2, 0x00, 0x8a, 0x4c, 0x23, 0x53, 0xa9, 0x00, 0x8d, 0x0e, 0x90, 0x8d, 0x0d, 0x90, 0x8d, 0x0a, 0x90, 0x8d, 0x0b, 0x90, 0x8d, 0x0c, 0x90, 0x8d, 0x49, 0x5b, 0x8d, 0x4a, 0x5b, 0x60, 0xa0, 0x00, 0x20, 0x8c, 0x17, 0xa0, 0x00, 0x20, 0x9c, 0x21, 0xa0, 0x00, 0x20, 0x6c, 0x24, 0xa9, 0x00, 0x20, 0xfa, 0x53, 0x20, 0xfd, 0x23, 0x4c, 0xa1, 0x50, 0xae, 0x86, 0x02, 0x8d, 0x86, 0x02, 0x8a, 0x60, 0x0a, 0x0a, 0x0a, 0x0a, 0x85, 0x12, 0x78, 0xad, 0x0f, 0x90, 0x29, 0x0f, 0xaa, 0x05, 0x12, 0x8d, 0x0f, 0x90, 0x58, 0x8a, 0x4a, 0x4a, 0x4a, 0x4a, 0x60, 0x29, 0x07, 0x85, 0x12, 0x78, 0xad, 0x0f, 0x90, 0x29, 0xf8, 0xaa, 0x05, 0x12, 0x8d, 0x0f, 0x90, 0x58, 0x8a, 0x60, 0x85, 0x12, 0xa0, 0x00, 0xb1, 0x02, 0x85, 0x0c, 0x85, 0x0e, 0xc8, 0xb1, 0x02, 0x85, 0x0d, 0x85, 0x0f, 0xc8, 0xb1,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0xaa, 0x86, 0x0d, 0x88, 0xb1, 0x02, 0x85, 0x0c, 0x60, 0x85, 0x0e, 0x86, 0x0f, 0xa2, 0x00, 0xf0, 0x08, 0x85, 0x0e, 0x86, 0x0f, 0x20, 0x2a, 0x53, 0xaa, 0xa0, 0x01, 0xb1, 0x02, 0x85, 0x0b, 0x88, 0xb1, 0x02, 0x85, 0x0a, 0x46, 0x0f, 0x66, 0x0e, 0x90, 0x09, 0x8a, 0x91, 0x0a, 0xe6, 0x0a, 0xd0, 0x02, 0xe6, 0x0b, 0xa5, 0x0a, 0x18, 0x65, 0x0e, 0x85, 0x0c, 0xa5, 0x0b, 0x65, 0x0f, 0x85, 0x0d, 0x8a, 0xa6, 0x0f, 0xf0, 0x13, 0x91, 0x0a, 0x91, 0x0c, 0xc8, 0x91, 0x0a, 0x91, 0x0c, 0xc8, 0xd0, 0xf4, 0xe6, 0x0b, 0xe6, 0x0d, 0xca, 0xd0, 0xed, 0xa4, 0x0e, 0xd0, 0x07, 0x4c, 0x2a, 0x53, 0x91, 0x0a, 0x91, 0x0c, 0x88, 0xd0, 0xf9, 0x91, 0x0a, 0x91, 0x0c, 0x4c, 0x2a, 0x53, 0xa2, 0x00, 0x18, 0xa0, 0x00, 0x71, 0x02, 0xc8, 0x48, 0x8a, 0x71, 0x02, 0xaa, 0x18, 0xa5, 0x02, 0x69, 0x02, 0x85, 0x02, 0x90, 0x02, 0xe6, 0x03, 0x68, 0x60, 0xa0, 0x00, 0x18, 0x71, 0x02, 0x91, 0x02, 0x48, 0xc8, 0x8a, 0x71, 0x02, 0x91, 0x02, 0xaa, 0x68, 0x60, 0xc8, 0x48, 0x18, 0x98, 0x65, 0x02, 0x85, 0x02, 0x90, 0x02, 0xe6, 0x03, 0x68, 0x60, 0x86, 0x12, 0xe0, 0x80, 0x66, 0x12, 0x6a, 0xa6, 0x12, 0x60, 0x86, 0x12, 0xe0, 0x80, 0x66, 0x12, 0x6a, 0xe0, 0x80, 0x66, 0x12, 0x6a, 0xe0, 0x80, 0x66, 0x12, 0x6a, 0xe0, 0x80, 0x66, 0x12, 0x6a, 0xa6, 0x12, 0x60, 0xe0, 0x00, 0xd0, 0x06, 0xaa, 0xd0, 0x03, 0xa9, 0x01, 0x60, 0xa2, 0x00, 0x8a, 0x60, 0xad, 0x9f, 0x5c, 0xae, 0xa0, 0x5c, 0x20, 0x10, 0x54, 0xad, 0xa1, 0x5c, 0xae, 0xa2, 0x5c, 0x20, 0x10, 0x54, 0xa0, 0x04, 0x4c, 0x97, 0x50, 0x49, 0xff, 0x48, 0x8a, 0x49, 0xff, 0xaa, 0x68, 0x60, 0xa0, 0x00, 0xf0, 0x07, 0xa9, 0xf9, 0xa2, 0x1a, 0x4c, 0xe2, 0x54, 0x60, 0xa5, 0x02, 0x38, 0xe9, 0x03, 0x85, 0x02, 0x90, 0x01, 0x60, 0xc6, 0x03, 0x60, 0xa5, 0x02, 0x38, 0xe9, 0x04, 0x85, 0x02, 0x90, 0x01, 0x60, 0xc6, 0x03, 0x60, 0xa5, 0x02, 0x38, 0xe9, 0x05, 0x85, 0x02, 0x90, 0x01, 0x60, 0xc6, 0x03, 0x60, 0xa5, 0x02, 0x38, 0xe9, 0x06, 0x85, 0x02, 0x90, 0x01, 0x60, 0xc6, 0x03, 0x60, 0xa5, 0x02, 0x38, 0xe9, 0x08, 0x85, 0x02, 0x90, 0x01, 0x60, 0xc6, 0x03, 0x60, 0xa2, 0x00, 0x85, 0x04, 0x86, 0x05, 0xa0, 0x00, 0xb1, 0x02, 0xaa, 0xe6, 0x02, 0xd0, 0x02, 0xe6, 0x03, 0xb1, 0x02, 0xe6, 0x02, 0xd0, 0x02, 0xe6, 0x03, 0x38, 0xe5, 0x05, 0xd0, 0x09, 0xe4, 0x04, 0xf0, 0x04, 0x69, 0xff, 0x09, 0x01, 0x60, 0x50, 0xfd, 0x49, 0xff, 0x09, 0x01, 0x60, 0xe6, 0x02, 0xd0, 0x02, 0xe6, 0x03, 0x60, 0xa0, 0x01, 0x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0x01, 0xb1, 0x02, 0x85, 0x05, 0x88, 0xb1, 0x02, 0x85, 0x04, 0x68, 0x4c, 0x32, 0x53, 0xa0, 0x00, 0xb1, 0x02, 0xa4, 0x02, 0xf0, 0x07, 0xc6, 0x02, 0xa0, 0x00, 0x91, 0x02, 0x60, 0xc6, 0x03, 0xc6, 0x02, 0x91, 0x02, 0x60, 0xa9, 0x00, 0xa2, 0x00, 0x48, 0xa5, 0x02, 0x38, 0xe9, 0x02, 0x85, 0x02, 0xb0, 0x02, 0xc6, 0x03, 0xa0, 0x01, 0x8a, 0x91, 0x02, 0x68, 0x88, 0x91, 0x02, 0x60, 0x48, 0x84, 0x12, 0xa0, 0x01, 0xb1, 0x02, 0x85, 0x0b, 0x88, 0xb1, 0x02, 0x85, 0x0a, 0xa4, 0x12, 0x68, 0x91, 0x0a, 0x4c, 0x32, 0x53, 0xa0, 0x00, 0x91, 0x02, 0xc8, 0x48, 0x8a, 0x91, 0x02, 0x68, 0x60, 0x84, 0x12, 0x48, 0xa0, 0x01, 0xb1, 0x02, 0x85, 0x0b, 0x88, 0xb1, 0x02, 0x85, 0x0a, 0xa4, 0x12, 0xc8, 0x8a, 0x91, 0x0a, 0x88, 0x68, 0x91, 0x0a, 0x4c, 0x32, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0xed, 0x19, 0xf1, 0x19, 0xf5, 0x19, 0xf9, 0x19, 0xfd, 0x19, 0x01, 0x1a, 0x05, 0x1a, 0x09, 0x1a, 0x0d, 0x1a, 0x11, 0x1a, 0x15, 0x1a, 0x24, 0x15, 0x80, 0x15, 0xd4, 0x15, 0xdc, 0x15, 0x28, 0x16, 0xd4, 0x15, 0x74, 0x16, 0xcc, 0x16, 0xd4, 0x15, 0xdc, 0x15, 0xcc, 0x16, 0x28, 0x16, 0xd4, 0x15, 0xdc, 0x15, 0xd4, 0x15, 0x74, 0x16, 0x80, 0x15, 0xcc, 0x16, 0xcc, 0x16, 0x24, 0x15, 0x74, 0x16, 0x24, 0x17, 0x24, 0x15, 0x80, 0x15, 0xd4, 0x15, 0xdc, 0x15, 0x28, 0x16, 0x74, 0x16, 0xcc, 0x16, 0x24, 0x17, 0x0a, 0x90, 0x0b, 0x90, 0x0c, 0x90, 0x0d, 0x90, 0x4c, 0x00, 0x00, 0xa0, 0x00, 0x18, 0x88, 0xb9, 0xf9, 0x1a, 0x8d, 0xda, 0x54, 0x88, 0xb9, 0xf9, 0x1a, 0x8d, 0xd9, 0x54, 0x8c, 0xde, 0x54, 0x20, 0xff, 0xff, 0xb0, 0x04, 0xa0, 0xff, 0xd0, 0xe6, 0x60, 0x8d, 0xf0, 0x54, 0x8e, 0xf1, 0x54, 0x8d, 0xf7, 0x54, 0x8e, 0xf8, 0x54, 0x88, 0xb9, 0xff, 0xff, 0x8d, 0x01, 0x55, 0x88, 0xb9, 0xff, 0xff, 0x8d, 0x00, 0x55, 0x8c, 0x03, 0x55, 0x20, 0xff, 0xff, 0xa0, 0xff, 0xd0, 0xe8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; char const * tank_battalion_filename = "Tank Battalion 16K.PRG";
def _change_detection(self) -> np.array: arm_mask = self.count_arm_after_detection >= self.sw_size campaign_mask = np.zeros(shape=self.campaign.get_n_sub_campaigns(), dtype=np.bool) for i in range(self.campaign.get_n_sub_campaigns()): campaign_arm_mask = np.abs(self.last_sw_arm_rewards[i][arm_mask[i]][:, 0:self.sw_size // 2].sum(axis=1) - self.last_sw_arm_rewards[i][arm_mask[i]][:, -self.sw_size // 2:].sum( axis=1)) > self.cd_threshold campaign_mask[i] = campaign_arm_mask.any() if campaign_mask.any(): campaign_mask = np.ones(shape=self.campaign.get_n_sub_campaigns(), dtype=bool) return campaign_mask
<reponame>HHawking/redis-geo-demo package com.hhawking.redis.geo.demo.utils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; import redis.clients.jedis.GeoCoordinate; import redis.clients.jedis.GeoRadiusResponse; import redis.clients.jedis.GeoUnit; import redis.clients.jedis.Jedis; import redis.clients.jedis.exceptions.JedisException; import java.util.HashMap; import java.util.List; import java.util.Map; /** * @title: JedisGeo * @Author: HH * @Date: 2019-8-1 16:22 */ @Component public class JedisGeo { private final static Logger logger = LoggerFactory.getLogger(JedisGeo.class); private static final String GEO_KEY = "rxd-geo"; public long geoAddbat(String list){ return geoAddbat(GEO_KEY, list); } private long geoAddbat(final String key, final String list){ long res = 0; Map<String, GeoCoordinate> addmap = new HashMap<>(); for(String str : list.split(";")){ String[] s=str.split(","); if(s.length < 3) { continue; } addmap.put(s[2], new GeoCoordinate(Double.parseDouble(s[0]), Double.parseDouble(s[1]))); } if(addmap.size() > 0){ try(Jedis jedis = RedisUtils.getJedis()) { res = jedis.geoadd(key, addmap); } catch (JedisException e) { logger.error("", e); } return res; } else { return 0; } } public long geoAdd(String longitude, String latitude, final String member) throws NumberFormatException{ return geoAdd(GEO_KEY, Double.parseDouble(longitude), Double.parseDouble(latitude), member); } public long geoAdd(double longitude, double latitude, final String member){ return geoAdd(GEO_KEY, longitude, latitude, member); } private long geoAdd(final String key, double longitude, double latitude, String member){ long res = 0; if(member==null || member.length()<1) { return 0; } try(Jedis jedis = RedisUtils.getJedis()) { if(isMessyCode(member)) { logger.info("----geoAdd---longitude={},latitude={},address={}",longitude, latitude,member); } else{ member = String.format("%s#**#%f-%f", member, longitude, latitude); res = jedis.geoadd(String.format("%s_%d_%d", key, (int)longitude, (int)latitude), longitude, latitude, member); } } catch (JedisException e) { logger.error("", e); } return res; } public long geoDel(String longitude, String latitude, final String member) throws NumberFormatException{ return geoDel(GEO_KEY, Double.parseDouble(longitude), Double.parseDouble(latitude), member); } public long geoDel(double longitude, double latitude, final String member){ return geoDel(GEO_KEY, longitude, latitude, member); } private long geoDel(final String key, double longitude, double latitude, String member){ if(StringUtils.isBlank(member)) { return 0; } long res = 0; try(Jedis jedis = RedisUtils.getJedis()) { res = jedis.zrem(String.format("%s_%d_%d", key, (int)longitude, (int)latitude), member); if(res==0){ member = String.format("%s#**#%f-%f", member, longitude, latitude); res = jedis.zrem(String.format("%s_%d_%d", key, (int)longitude, (int)latitude), member); } } catch (JedisException e) { logger.error("", e); } return res; } /** * 通过经纬度与范围获取地址 * @param longitude 经度 * @param latitude 纬度 * @param radius 范围 * @return */ public String geoRadius(String longitude, String latitude, double radius){ return geoRadius(GEO_KEY, Double.parseDouble(longitude), Double.parseDouble(latitude), radius); } /** * 通过经纬度与范围获取地址 * @param longitude 经度 * @param latitude 纬度 * @param radius 范围 * @return */ public String geoRadius(double longitude, double latitude, double radius){ return geoRadius(GEO_KEY, longitude, latitude, radius); } private String geoRadius(final String key, double longitude, double latitude, double radius) { List<GeoRadiusResponse> value; String result = null; double dis = radius; try(Jedis jedis = RedisUtils.getJedis()) { value = jedis.georadius(String.format("%s_%d_%d", key, (int)longitude, (int)latitude), longitude, latitude, radius, GeoUnit.M); if(value==null||value.isEmpty()){ return null; } for (GeoRadiusResponse tmp : value) { if(dis > tmp.getDistance()) { dis = tmp.getDistance(); result = tmp.getMemberByString(); } } } catch (JedisException e) { logger.error("", e); } if (StringUtils.isBlank(result)){ return null; } int index = result.indexOf("#**#"); if(index > 0) { result = result.substring(0, index); } return result; } /** * 判断字符串是否乱码 * 当从Unicode编码向某个字符集转换时,如果在该字符集中没有对应的编码,则得到0x3f(即问号字符?) * 从其他字符集向Unicode编码转换时,如果这个二进制数在该字符集中没有标识任何的字符,则得到的结果是0xfffd * @param str * @return true存在乱码,false不存在乱码 */ private boolean isMessyCode(String str) { for (int i = 0; i < str.length(); i++) { char c = str.charAt(i); if ((int) c == 0xfffd) { return true; } } return false; } }
// Returns a symbol name for an error message. static std::string maybeDemangleSymbol(StringRef symName) { if (config->demangle) { std::string prefix; StringRef prefixless = symName; if (prefixless.consume_front("__imp_")) prefix = "__declspec(dllimport) "; StringRef demangleInput = prefixless; if (config->machine == I386) demangleInput.consume_front("_"); std::string demangled = demangle(std::string(demangleInput)); if (demangled != demangleInput) return prefix + demangle(std::string(demangleInput)); return (prefix + prefixless).str(); } return std::string(symName); }
1 / 1 Thunder Bay Police Service Board chair, Celina Reitberger, publicly acknowledged that systemic racism exists in the police service during a Reconciliation Circle on Sunday. (Photos by Doug Diaczuk - Tbnewswatch.com). THUNDER BAY - To hear the acknowledgement of the existence of systemic racism in the Thunder Bay Police Service and Board, and to receive an apology, left elder Rita Fenton moved beyond words. The Thunder Bay Police Services Board publicly acknowledged that systemic racism exists in the local police service and apologized to the Indigenous community during a Reconciliation Circle on Sunday. The acknowledgement and apology comes in the wake of Senator Murray Sinclair’s report issued by the Ontario Civilian Police Commission that found the Police Board failed the Indigenous community, as well as Independent Police Review Director, Gerry McNeilly’s, report that found systemic racism exists in the police service at an institutional level. The Reconciliation Circle was held at Ka-Na-Chi-Hih and the hall was filled with First Nations people, members of the Thunder Bay Police Service, including chief Sylvie Hauth, the public, and representatives from the city of Thunder Bay, though Mayor Bill Mauro, who also has a seat on the Police Services Board, was not in attendance. Celina Reitberger, who was elected chair of the Police Services Board in December, said the public acknowledgement and apology is the first significant step moving forward for the board. Following the acknowledgement and apology, the floor was opened to the public to share recommendations, ideas, and solutions, which Reitberger said is a voice that has been silenced for too long. The Police Services Board will also be undergoing Indigenous cultural training in February and governance training in March. All decisions of the board are currently the responsibility of Thomas Lockwood, who has been appointed as an administrator. All board members must complete the training before being granted voting rights. Lockwood echoed Reitberger’s comments of this being the first step in what will be a long and ongoing process. A second circle will be held in the near future, Reitberger said, providing people with an opportunity to share their experiences with the Police Services Board and the Police Service. For Baxter and Fenton, having that voice, that space to share experiences, solutions, and ideas moving forward is what is going to help reestablish trust between the Indigenous community and the police service.
<reponame>alexdevteam/audeo #ifndef AUDEO_SOUND_HPP_ #define AUDEO_SOUND_HPP_ #include <cstdint> #include <utility> #include <functional> namespace audeo { class Sound { public: Sound() : handle(-1) {} Sound(std::int64_t handle) : handle(handle) {} Sound(Sound const&) = default; Sound(Sound&&) = default; Sound& operator=(Sound const&) = default; Sound& operator=(Sound&&) = default; std::int64_t value() const { return handle; } bool operator==(Sound const& rhs) const { return handle == rhs.handle; } bool operator!=(Sound const& rhs) const { return handle != rhs.handle; } private: std::int64_t handle; }; } // namespace audeo namespace std { template<> struct hash<audeo::Sound> { size_t operator()(audeo::Sound const& x) const { return hash<std::int64_t>()(x.value()); } }; } // namespace std #endif
from discord.ext import commands import random import discord class choke: def __init__(self, bot): self.bot = bot @commands.command(pass_context=True) async def choke(self, context, member: discord.Member): """choke someone!""" author = context.message.author.mention mention = member.mention choke = "**{0} got choked by {1}!**" choices = ['https://i.pinimg.com/originals/c8/50/da/c850daccaff312f7aa1c6cb23b62b512.gif', 'https://i.pinimg.com/originals/de/65/28/de6528ed86c887ff598c39b6e97df7e2.gif', 'https://78.media.tumblr.com/79675353fbeeed25969255ec6ee82a0f/tumblr_n94nbhTTM41rb06tgo1_r2_500.gif', 'https://data.whicdn.com/images/107788263/original.gif', 'https://m.popkey.co/505e5c/p8ONy.gif', 'http://i817.photobucket.com/albums/zz93/KawaiiLollypop/Hetalia/hap23-b.gif', 'https://pa1.narvii.com/6064/3789e7bbafc6a77d908bd8501e378d0e4e604144_hq.gif'] image = random.choice(choices) embed = discord.Embed(description=choke.format(mention, author), colour=discord.Colour.blue()) embed.set_image(url=image) await self.bot.say(embed=embed) def setup(bot): n = choke(bot) bot.add_cog(n)
Desmopressin testing in von Willebrand disease: Lowering the burden Abstract Background Individuals with von Willebrand disease (VWD) require desmopressin testing because of interindividual response differences. However, testing is burdensome, while not all patients may need extensive testing. Objectives To provide von Willebrand factor (VWF) cutoffs that predict desmopressin nonresponse and thereby identify individuals who do not need extensive testing in a retrospective cohort. We validated these cutoffs in a prospective cohort. Patients and Methods We included 376 patients (Type 1 VWD with VWF activity <0.30IU/ml: n = 112; with VWF:Act 0.300.50IU/ml: n = 206; Type 2 VWD: n = 58; ages, 576years) from January 2000 to July 2020. We collected VWF:Act and factor VIII activity (FVIII:C) at baseline and several time points after desmopressin (T1T6). We defined response as VWF:Act and FVIII:C 0.50IU/ml or greater at T1 and T4. We compared VWF:Act and FVIII:C distribution (historically lowest level, baseline, and T1) between responders and nonresponders and determined cutoffs discriminating between these groups. Results were validated in a group of 30 individuals. Results All individuals with Type 1 VWD and Type 2 VWD, respectively, with baseline VWF:Act 0.34IU/ml or greater or 0.28IU/ml or greater were responders. In individuals with T1 VWF:Act ≥0.89IU/ml (Type 1 VWD) or T1 VWF:Act 1.10 IU/ml or greater (Type 2 VWD), response remained at T4. Conclusion Desmopressin testing is not needed when lowest historical VWF:Act is 0.30IU/ml or greater. In patients with Type 1 VWD who require testing, measurements after T1 are often not needed. In patients with Type 2 VWD who require testing, we advise performing T1 and T4 measurements. Essentials Desmopressin testing is time consuming and burdensome for patients and health care professionals. We analyzed the outcomes of patients with von Willebrand disease (VWD) after a desmopressin test dose. The majority of patients with Type 1 VWD respond well to desmopressin and do not need testing. Von Willebrand factor levels before testing predict which patients will respond to desmopressin. | INTRODUC TI ON Von Willebrand disease (VWD) is a bleeding disorder caused by a deficiency or qualitative defect of von Willebrand factor (VWF). VWF is essential for both primary and secondary hemostasis. It facilitates platelet plug formation at sites of vascular damage and functions as a chaperone protein for factor VIII (FVIII), which it protects from proteolytic degradation in the circulation. VWD is categorized into three types. 1 Type 1 is defined as a partial VWF deficiency (VWF less than 0.50 IU/ml) in individuals with a family history of VWD and/or abnormal bleeding, and Type 3 as a complete deficiency of VWF. Type 2 comprises several qualitative VWF defects, classified as Types 2A, 2B, 2M, and 2N. Bleeding in individuals with VWD can be prevented or treated with either desmopressin (1-deamino-8D-arginine vasopressin) or VWF-containing concentrates. Desmopressin stimulates the release of VWF from vascular endothelial cells into the circulation, resulting in increased levels of FVIII. 2 After desmopressin administration, the maximum VWF and FVIII response and the duration of response differ significantly between patients, whereas the response in a single individual is reproducible and consistent over time. 3 It is therefore common practice for individuals who are potentially eligible for desmopressin treatment to first undergo desmopressin testing to determine their individual response. Individuals with Type 2B and Type 3, respectively, are not eligible for treatment with desmopressin because of the risk of thrombocytopenia and because of the severely impaired synthesis of VWF. 4 In most situations, desmopressin testing involves administering an intravenous dose of 0.3 g/kg of desmopressin diluted in 50 ml NaCl 0.9% over 30 min, and measuring VWF and FVIII at several time points (usually at baseline and 1 and 4 h after desmopressin administration). 5 Various experts and studies have proposed different definitions of clinical response. Most commonly, complete responders are defined by VWF ristocetin cofactor activity (VWF:RCo) and FVIII levels of 0.50 IU/ml or higher after desmopressin. The most recent international guidelines on the management of VWD state that a patient is considered responsive to desmopressin if his or her VWF level increases at least two times over baseline level, and if both VWF and FVIII levels of >0.50 IU/ ml are achieved after administration of desmopressin. 5 In these guidelines, it is recommended that VWF:Act levels should be increased to ≥0.50 IU/ml before performing a minor invasive procedure, and a desmopressin test should be performed before starting treatment with desmopressin in patients with a VWF baseline level less than 0.30 IU/ml. However, this level is mainly based on expert opinion. In this study, we retrospectively collected desmopressin test data from a large group of individuals with different types of VWD and analyzed plasma VWF and FVIII levels at various time points after desmopressin administration. Our primary aim was to provide relevant cutoff levels for prediction of an individual's response to desmopressin and to identify individuals who do not require a complete desmopressin test or no desmopressin test at all. Our second aim was to validate these cutoff levels by applying them to a cohort of prospectively included patients who underwent desmopressin testing. We hypothesize that many patients, especially those with Type 1 VWD, will not need testing if certain cutoff levels are applied. By limiting desmopressin testing in general and by decreasing the number of blood samples needed to be taken during testing, health care professionals will save time, and patient burden as well as health care costs will be reduced. | Patient selection-initial cohort The initial cohort was derived from a retrospective, single-center cohort study. We included all individuals with VWD (defined as having a positive family history of VWD and/or abnormal bleeding and historically lowest VWF antigen (VWF:Ag), VWF activity (VWF:Act), and/or VWF collagen binding (VWF:CB) less than 0.50 IU/ml or FVIII less than 0.40 IU/ml in the case of Type 2N VWD), in whom a desmopressin test was performed between January 1, 2000, and June 1, 2020, at the Erasmus University Medical Center Rotterdam, the Netherlands. | Patient selection-validation cohort To validate the results from the initial cohort, we analyzed data of patients who were prospectively included in the OPTI-CLOT: To WiN study (Netherlands Trial Register, trial registration number: NL7212; www.trial regis ter.nl) between June 2019 and July 2020 from the Erasmus University Medical Center Rotterdam and University Medical Center Groningen, using the same inclusion criteria as for the retrospective cohort. All individuals included in this cohort provided signed informed consent. | Ethics review The study protocol for the retrospective study (number: MEC-2020-0683), as well as the study protocol for the prospective OPTI-CLOT: To WiN study was reviewed and approved by the Medical Ethics Committee of the Erasmus University Medical Center Rotterdam. | Desmopressin testing In all patients, a single intravenous desmopressin test dose of 0.3 g/kg was administered in 30 min. Venous blood samples were routinely obtained immediately before desmopressin administration (baseline) and at 1, 3 and 6 h after desmopressin administration (T1, T3, T6) in adults, and at baseline, T1, T2, T4, and T6 in children, according to local protocol. | Clinical response definition Primarily, we defined responders as individuals with both VWF:Act and FVIII:C ≥0.50 IU/ml at T1 and T4, as the most recent international guidelines recommend that levels of VWF:Act and FVIII:C before performing a minor invasive procedure should be 0.50 IU/ml or greater. 5 Nonresponders were defined as individuals with VWF:Act and/or FVIII:C <0.50 IU/ml at T1 and/or T4. Secondarily, we investigated the fold increase in VWF:Act over baseline as an additional measure of efficacy. | Statistical analysis Descriptive data are presented as numbers with percentages for categorical variables and as means with standard deviations or medians with interquartile ranges for continuous data, depending on the distribution of the data. In case the VWF or FVIII level measured was below the lower limit of quantification (LLOQ), we calculated LLOQ √ 2 and imputed the outcome. As timing of measurements differed between children and adults, we calculated VWF:Act and FVIII:C at T4 for adults as follows: We compared the distribution of VWF:Act and FVIII:C between responders and nonresponders to establish sensitivity and specificity of the test for Type 1 VWD and Type 2 VWD separately. In addition, we performed receiver operating characteristic (ROC) analysis to determine specific cutoffs that discriminated best between responders and nonresponders. We performed logistic regression analysis to assess the influence of sex and age on desmopressin response. We performed statistical analysis with IBM SPSS statistics for Windows version 25.0 and GraphPad Prism version 8.4.3. | Patients We included 376 individuals in the initial cohort: In Figure 1, the individual VWF:Act levels measured in the different disease types at different time points during desmopressin testing are plotted and categorized into responders and nonresponders. In patients with Type 1 VWD and historically lowest VWF less than 0.30 IU/ml, females were more likely to respond than males (odds ratio likely to have historically lowest VWF:Act <0.10 IU/ml. We did not find a difference in response between children (less than 16 years) and adults (16 years or older). In Type 2, we did not find a significant difference in response between males and females, but children (less than 16 years) were less likely to respond than adults (16 years or older) (OR, 0.08; 95% CI, 0.02-0.42; p = 0.003). All individuals who showed an increase in VWF:Act also showed an increase in FVIII:C and vice versa. We did not observe very large or unexpected discrepancies between fold increase in VWF:Act and FVIII:C in any of the subjects. In 10 of the 376 patients (3%), VWF:Act increased less than twofold over baseline at T1 (range, | Desmopressin response rates in the prospective validation cohort Twenty-six of the 30 patients were responders (87%). In Type 1 VWD (VWF less than 0.30 IU/ml), 91% (n = 10/11) classified as responder and all patients with historically lowest VWF levels between 0.30 and 0.50 IU/ml (100%) were responders. Forty percent of the patients with Type 2 VWD (n = 2/5) were responders (Table 3). All VWF:Act responders were also FVIII:C responders. None of the patients had a VWF:Act or FVIII:C increase less than twofold over baseline. | Receiver operating characteristic analysis We used ROC curves to analyze the potential of VWF:Act and FVIII:C at different time points (baseline, T1, and historically lowest level) to predict desmopressin nonresponse. As only three patients Note: Data are presented as mean ± SD, n (%) or median (interquartile range). Italic entries to emphasize the different types of type 2 VWD. Abbreviations: FVIII:C, factor VIII activity; VWD, von Willebrand disease; VWF:Act, von Willebrand factor activity; VWF:Ag, von Willebrand factor antigen; VWF:CB, von Willebrand factor collagen binding. a Number of subjects (total cohort) with missing data: blood group (n = 10), VWF:CB at baseline and fold increase over baseline (n = 5). The optimal predictive baseline cutoff-the VWF:Act level with the highest sensitivity and specificity-is 0.23 IU/ml in Type 1 VWD (VWF <0.30 IU/ml) and 0.15 IU/ml in Type 2 VWD. The most sensitive predictive baseline cut-off-the level with 100% sensitivity, at which no nonresponders will be missed-is 0.34 IU/ml in Type 1 VWD (VWF less than 0.30 IU/ml) and 0.28 in Type 2 VWD. In Figure 1, the different cutoffs at baseline, T1, and historically lowest level are visualized. The predictive potential of VWF:Act is shown in Figure 2 and Table 4. | Validation of cutoffs in the prospective cohort In the only patient with nonresponding Type 1 VWD (VWF less with desmopressin in patients with a VWF baseline level less than 0.30 IU/ml. 5 Our data therefore confirm this guideline, which was mainly based on expert opinion. | DISCUSS ION If a desmopressin test is required, VWF:Act should be measured before and at least at 1 and 4 h after desmopressin administration to quantify the peak as well as the duration of the response. If it is logistically possible to acquire VWF:Act results from the laboratory rapidly after T1 blood withdrawal, the test may be terminated in patients with Type 1 VWD (VWF less than 0.30 IU/ml) if T1 VWF:Act is less than 0.50 or 0.89 IU/ml or greater, as the patient will surely be a nonresponder or a responder, respectively. In patients with Type 2A and Type 2M VWD who qualify for desmopressin testing (baseline VWF:Act less than 0.30 IU/ml), we strongly advise to always perform measurements at T1 as well as T4 (Figure 3). Our results show that the use of historically lowest VWF:Act levels is not recommended when deciding if desmopressin testing should be performed, as these levels are least predictive of desmopressin response. This is in accordance with the most recent guidelines, which recommend to perform a desmopressin test shortly after diagnosis. 11 Our results do not apply to patients with Type 2N, as the number of patients with Type 2N in our study was too small and was therefore excluded from the analysis. If the approach as described above is adopted in clinical practice, In the 2021 guidelines on the management of VWD, responsiveness to desmopressin is defined as an increase of the baseline VWF level of at least twofold, combined with the achievement of both VWF and FVIII levels of greater than 0.50 IU/ml. 5 However, when evaluating the criterion of a twofold VWF:Act increase over baseline, we found that this does not add any value when VWF:Act and FVIII:C of 0.50 IU/ml or above at T1 and T4 are regarded as responsiveness, as the few patients who showed a less than twofold increase over baseline already had baseline levels ≥0.50 IU/ml. We found that in Type 1 VWD, females are more likely to respond than males, and that the number of responders in Type 2 VWD seems to increase with age. These results correlate with earlier findings that clearance of VWF is lower in females, and that bioavailability of VWF increases with age. 10 The difference between females and males in Type 1 can possibly be explained because females are more often diagnosed with VWD Type 1 than males because of the hemostatic challenges they undergo, such as menstruation and childbirth. Overall, women diagnosed with Type 1 VWD therefore tend to have milder laboratory abnormalities. 12 As it is well known that coagulation factor levels do not always correlate with bleeding tendency, it is important that clinicians do not only establish desmopressin responsiveness based on coagulation factor levels when deciding which treatment modality to choose, but also take the bleeding tendency and type of VWD of the individual patient into account. In the initial cohort, 3 Current guidelines are in accordance with our finding that patients with Type 1 VWD with VWF levels less than 0.30 IU/ml need testing. 5 The results of the Type 2 VWD cohort would, however, benefit from replication in a larger cohort, with especially larger numbers of patients with Type 2M and 2N VWD. Furthermore, in patients with Type 1, 2A, and 2M VWD, it is not strictly necessary to measure FVIII, as all VWF:Act responders in our study were also FVIII responders. Application of this testing protocol in clinical practice will reduce both patient burden and time investments by health care professionals, as well as health care costs. AUTH O R CO NTR I B UTI O N S JH designed the study, performed analyses, and wrote the manu-
<reponame>vamsirajendra/usergrid /* * * * Licensed to the Apache Software Foundation (ASF) under one or more * * contributor license agreements. The ASF licenses this file to You * * under the Apache License, Version 2.0 (the "License"); you may not * * use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. For additional information regarding * * copyright in this work, please see the NOTICE file in the top level * * directory of this distribution. * */ package org.apache.usergrid.rest; import org.apache.usergrid.rest.test.resource.AbstractRestIT; import org.apache.usergrid.rest.test.resource.model.ApiResponse; import org.apache.usergrid.rest.test.resource.model.QueryParameters; import org.apache.usergrid.rest.test.resource.model.Token; import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature; import org.junit.Ignore; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.ws.rs.client.WebTarget; import javax.ws.rs.core.MediaType; import java.util.HashMap; import java.util.Map; import static org.junit.Assert.*; /** * test index creation */ public class IndexResourceIT extends AbstractRestIT { //Used for all MUUserResourceITTests private Logger LOG = LoggerFactory.getLogger(IndexResourceIT.class); public IndexResourceIT(){ } @Test public void testCaseReindexEndpoint() { //Create Collection Map payload = new HashMap<>( ); payload.put( "name","wazer wifle!!" ); ApiResponse collectionResponse = clientSetup.getRestClient() .pathResource( getOrgAppPath( "storelatlons" ) ).post( payload ); assertNotNull( collectionResponse ); //try reindex endpoint with ALl mixed case characters Token superUserToken = clientSetup.getRestClient().management().token() .get(clientSetup.getSuperuserName(),clientSetup.getSuperuserPassword()); QueryParameters queryParameters = new QueryParameters(); queryParameters.addParam( "access_token",superUserToken.getAccessToken()); ApiResponse result = clientSetup.getRestClient() .pathResource( "system/index/rebuild/" + clientSetup.getAppUuid() + "/StOrElaTloNs" ) .post( false, ApiResponse.class, null, queryParameters, true ); assertNotNull(result); //try the reindex endpoint with all lowercase Characters queryParameters = new QueryParameters(); queryParameters.addParam( "access_token",clientSetup.getSuperuserToken().getAccessToken() ); result = clientSetup.getRestClient() .pathResource( "system/index/rebuild/"+clientSetup.getAppUuid()+"/storelatlons" ) .post( false, ApiResponse.class,null,queryParameters,true); String status = result.getProperties().get("jobId").toString(); assertNotNull( result ); WebTarget res = clientSetup.getRestClient() .pathResource( "system/index/rebuild/" + result.getProperties() .get( "jobId" ).toString() ) .getTarget(); HttpAuthenticationFeature feature = HttpAuthenticationFeature.basicBuilder() .credentials( "superuser", "<PASSWORD>password" ).build(); result = res.register( feature ).request().get( ApiResponse.class ); assertNotNull( result ); assertEquals(status,result.getProperties().get("jobId").toString()); } @Ignore @Test public void TestAddIndex() throws Exception{ Map<String, Object> data = new HashMap<String, Object>(); data.put( "replicas", 0 ); data.put( "shards", 1 ); data.put( "writeConsistency", "one" ); String appId = this.clientSetup.getAppUuid(); // change the password as admin. The old password isn't required org.apache.usergrid.rest.test.resource.model.ApiResponse node = null; try { WebTarget resource = this.clientSetup.getRestClient().pathResource("/system/index/" + appId).getTarget(); HttpAuthenticationFeature feature = HttpAuthenticationFeature.basicBuilder() .credentials( "superuser", "<PASSWORD>" ).build(); node = resource.register( feature ).request() .accept( MediaType.APPLICATION_JSON ) .get( org.apache.usergrid.rest.test.resource.model.ApiResponse.class); } catch (Exception e) { LOG.error("failed", e); fail(e.toString()); } assertNotNull( node ); } }
President Trump Donald John TrumpGrassroots America shows the people support Donald Trump Trump speaks to rebel Libyan general attacking Tripoli Dem lawmaker: Mueller report shows 'substantial body of evidence' on obstruction MORE's former campaign chairman, Paul Manafort Paul John ManafortNew normal: A president can freely interfere with investigations without going to jail Kremlin: No evidence of election interference in Mueller report Heavily redacted Mueller report leaves major questions unanswered MORE, reportedly discussed with Ecuador officials brokering a deal that would result in WikiLeaks founder Julian Assange being handed over to the U.S. The New York Times, citing three people familiar with the discussions, reported on Monday that Manafort traveled to Ecuador in May 2017 to offer his services to Ecuador's incoming president, Lenín Moreno. Manafort made the trip to focus on arranging a deal in which China would agree to invest in the South American nation's power system, the Times reported. But the newspaper reports that in at least two meetings, Moreno and his aides talked about ridding themselves of Assange. Assange has been staying in an Ecuadorean Embassy in London since 2012. Moreno and his aide reportedly suggested to Manafort that they could hand over Assange in exchange for a concession such as debt relief from the U.S. Manafort reportedly suggested that he could help the country negotiate a deal. Manafort's final meeting in Ecuador was followed just days later by special counsel Robert Mueller Robert Swan MuellerSasse: US should applaud choice of Mueller to lead Russia probe MORE's appointment to lead the investigation into Russian interference in the 2016 election. Manafort's discussions with Moreno concluded without any deal, the Times reported. The newspaper said that there is no evidence that Manafort was working on behalf of the Trump administration in the reported negotiations over Assange. It added that there is also no evidence that Manafort's involvement in the talks was part of any concerns about WikiLeaks's role in released hacked Democratic emails during the lead-up to the 2016 election. Jason Maloni, a spokesman for Manafort, told the Times that Moreno broached the idea about Assange to Manafort. Manafort was convicted of eight counts of bank and tax fraud earlier this year. He agreed to cooperate with special counsel Mueller as part of his investigation. His cooperation came in exchange for a plea deal that helped him avoid a second federal trial, but he now faces jail time for allegedly lying to prosecutors. The Guardian reported last month that Manafort met with Assange multiple times before the 2016 presidential election. Both WikiLeaks and Manafort have fiercely denied the details in the report.
<filename>src/components/spinner/spinner.styles.ts<gh_stars>0 import { VariantProps } from "@stitches/core"; import { spin } from "@/styled-system/keyframes"; import { css } from "@/styled-system/stitches.config"; export const spinnerStyles = css({ display: "inline-block", borderColor: "currentColor", borderStyle: "solid", borderRadius: "$full", borderWidth: "2px", borderBottomColor: "transparent", borderLeftColor: "transparent", animationName: `${spin}`, animationDuration: "0.45s", animationTimingFunction: "linear", animationIterationCount: "infinite", variants: { size: { xs: { boxSize: "0.75rem", }, sm: { boxSize: "1rem", }, md: { boxSize: "1.5rem", }, lg: { boxSize: "2rem", }, xl: { boxSize: "3rem", }, }, }, }); export type SpinnerVariants = VariantProps<typeof spinnerStyles>;
// Sequence Header File #ifndef __SEQUENCE__ #define __SEQUENCE__ #include "BlockStream.h" #include "Interface.h" #include "TaskManager.h" class ICARUS_Instance; class CSequence { typedef list < CSequence * > sequence_l; typedef map < int, CSequence *> sequenceID_m; typedef list < CBlock * > block_l; public: //Constructors / Destructors CSequence( void ); ~CSequence( void ); //Creation and deletion static CSequence *Create( void ); void Delete( void ); //Organization functions void AddChild( CSequence * ); void RemoveChild( CSequence * ); void SetParent( CSequence * ); CSequence *GetParent( void ) const { return m_parent; } //Block manipulation CBlock *PopCommand( int ); int PushCommand( CBlock *, int ); //Flag utilties void SetFlag( int ); void RemoveFlag( int, bool = false ); int HasFlag( int ); int GetFlags( void ) const { return m_flags; } void SetFlags( int flags ) { m_flags = flags; } //Various encapsulation utilities int GetIterations( void ) const { return m_iterations; } void SetIterations( int it ) { m_iterations = it; } int GetID( void ) const { return m_id; } void SetID( int id ) { m_id = id; } CSequence *GetReturn( void ) const { return m_return; } void SetReturn ( CSequence *sequence ); int GetNumCommands( void ) const { return m_numCommands; } int GetNumChildren( void ) const { return m_numChildren; } CSequence *GetChild( int id ); bool HasChild( CSequence *sequence ); void SetOwner( ICARUS_Instance *owner ) { m_owner = owner; } int Save( void ); int Load( void ); protected: int SaveCommand( CBlock *block ); ICARUS_Instance *m_owner; //Organization information sequence_l m_children; sequenceID_m m_childrenMap; int m_numChildren; CSequence *m_parent; CSequence *m_return; //Data information block_l m_commands; int m_flags; int m_iterations; int m_id; int m_numCommands; }; #endif //__SEQUENCE__
Empirical signatures of shape phase transitions in nuclei with odd nucleon numbers Nuclear level density at low excitation energies is proposed as an indicator of the first order phase transitions in nuclei. The new signature, a maximum value of the level density at the critical point, appears to be sensitive to the detailed way the phase transition takes place in different nuclear regions: it is consistent with phase coexistence in the N=90 region, and with a rapid crossing of the two phases, without their coexistence/mixing at the critical point in the N=60 region, respectively. Candidates for critical point nuclei are proposed for odd-mass and odd-odd nuclei, using correlations between relative excitation energies, and their ratios, for structures (bands) based on unique-parity orbitals. I. INTRODUCTION Quantum phase transitions (QPT) in nuclei appear at zero temperature, and represent rapid changes in the equilibrium deformation of the ground state, induced by the variation of a nonthermal control parameter -the number of nucleons, due to the competition of phases with different shapes. Such changes in the shape of the ground state influence the evolution of various nuclear properties, and, in order to characterize this type of QPT (called also shape phase transition -SPT), it is important to identify observables that can play the role of order parameters, allowing to observe how these critical phenomena take place. Because the natural control parameter in nuclei, the nucleon number, has only integer values, its discontinuous variation smoothes out the discontinuities at the phase transition point (or critical point). Both experimental and theoretical studies propose various ways to assess the different signatures of the SPTs: the discontinuous behavior of nuclear properties that can be related to order parameters and the characterization of the type of transition (first or second order), the coexistence of the two phases, and the possible realization of critical points in real nuclei. There are several review papers which present the nuclear QPT domain from phenomenological point of view, as well as based on theoretical nuclear structure models such as the Interacting Boson Model or the geometric (or collective) model. Most of the theoretical and experimental studies concentrated until now mainly on the even-even nuclei. The reason is that the evolution of many experimental observables of these nuclei can be followed over extended nuclear regions thus allowing to identify and characterize the discontinuities that are typical of SPT. Also, in the even-even nuclei, in order to describe the phase transitional nuclei, Iachello introduced, in addition to the three IBM benchmarks of collective behavior (spherical nuclei * Electronic address: bucurescu@tandem.nipne.ro -or with U dynamical symmetry, -soft nuclei -with O dynamical symmetry, and nuclei with axially symmetric deformation -with SU dynamical symmetry), the concept of critical point symmetries. He proposed two such models, called E for the second order phase transition (between spherical, U nuclei and soft, O nuclei), and X for the first order phase transition (between spherical, U nuclei and symmetrically deformed, SU nuclei). In contrast, the oddmass and odd-odd nuclei were much less studied until now, because of their more complicated structure. Experimentally, it is difficult to find, for such nuclei, observables that can be followed over extended nuclear regions; theoretically, the dynamical situation created by extraparticle(s) added to the even-even core, is more complex. Only during the last decade there has been a boost of studies (both theoretical and experimental) devoted to these nuclei. In this work we further extend our previous empirical approach to SPT in odd-mass nuclei, by focusing on experimental quantities that can be used as order parameters for all types of nuclei, both even-even and with odd numbers of nucleons. The nuclear level density at low excitation energies is proposed as a novel indicator for first order SPT. Other aspects of a SPT, such as phase coexistence and critical point nuclei are considered as well. II. EMPIRICAL OBSERVABLES AS EFFECTIVE ORDER PARAMETERS Because the equilibrium deformation of the ground state is not an observable, one recurses to the so-called effective order parameters, which are experimental observables sensitive to SPT occurrence. Reference addressed this problem by determining the order parameter (deformation) both classically, with a Landau-type of potential, and by quantum calculation within the IBM. This study emphasized that (i) the finiteness of the nuclei leads to a certain smoothing of the expected discontinuities but that this is not a dominating effect, and (ii) the advantage in the nuclear case is that properties of both ground state and excited states can be measured. One can then use as effective order parameters observables related both to the ground state and to excited states, which may present distinct signatures for the characterization of the SPT. Generally, the critical behavior of excited states may differ from that of the ground state, and thus lead to a slightly different critical point in some cases. In the following we briefly review the effective order parameters used until now to identify signatures of the SPTs. A. Nuclear mass-related quantities These may be considered the most basic ones because they are related to the ground state properties. Nuclear masses or binding energies comprise the sum of all binding effects in a nucleus (single-particle and residual interactions). However, their values (in MeV) are very large and thus obscure the effects (of a few MeV) produced by changing the nuclear deformation. It is therefore convenable to use nuclear mass-based quantities which are of a differential nature and consequently more sensitive to changes, such as different separation energies. One of the most useful such quantities is the twoneutron separation energy S 2n, proposed long ago in a paper which studied the classical limit of IBM, and intensively used since then to identify and characterize SPTs (see, and, for a few recent references, ). For a chain of isotopes, S 2n shows an almost linear decrease with increasing N, with discontinuities at the shell closures and at the critical points of first order SPTs. The change at the critical point shows up as a flattening or even an increase of the curve, which translates into a singularity/kink in the derivative of S 2n with respect to N. For the second order SPTs S 2n shows a discontinuity only in its first derivative. This behavior was discussed in many papers (see quoted references). The basic character of S 2n as a direct signature of the SPT comes from its expression as, where B is the binding energy (the energy of the ground state). It is therefore proportional to the first derivative of the nuclear binding energy with respect to the order parameter N, and thus plays a role in the characterization of the QPT similar to that of the free energy and its derivatives with respect to the order parameter in the classical case. The differential variation of S 2n (therefore the second derivative of B) peaks at the critical point of the SU to U transition, the peak being a function in the infinite-size limit (infinite number of bosons), and showing a smoother behavior for realistic numbers of bosons. Other quantities expressing various mass differences, such as -particle decay energies Q(), double decay energies Q(2), as well as other decay energies or Q-values, are also useful to characterize SPT in nuclei. One should emphasize that such mass-related quan-tities as presented above are available for a large number of nuclei (as they are derived from mass tables ) and can be used to identify and characterize SPT in any kind of nuclei (even-even or with odd N and/or odd Z). B. Nuclear radii and related quantities Nuclear charge radii are sensitive to shell/subshell closures, and also to changes in the ground state deformation (actually, they are directly related to the 2 deformation parameter). Therefore, similar to the two-neutron separation energies, nuclear radii and their differential variation show discontinuities and kinks at shell closure and critical points, respectively. Measured nuclear charge radii are available for many nuclei of all types. Quantities that were considered as signatures of the SPT are the average squared charge radii <r 2 > and their differential variations, like the isotope shifts (differences between two adjacent isotopes with mass A and A + 2), and the isomer shifts . The later are sensitive to the type of the SPT (first or second order). From the list presented above, one can see that most of the experimental quantities used until now as signatures (or order parameters) of SPTs in nuclei refer to even-even nuclei. It is therefore of utmost importance to enlarge this list with other quantities that can be used for all types of nuclei. Previous results, both theoretical calculations and experimental findings, indicated that at the critical point of the transition between spherical and axially deformed shapes the excited nuclear states have a peculiar behavior. Thus, IBM calculations predicted that the spectrum of the low-lying excited 0 + states was maximally compressed at this point, this behavior persisting for higher spins as well. Experimental studies of the two-neutron transfer reaction (p, t), which is particularly suited to evidence 0 + states, showed that the nucleus 154 Gd, known as a good example of X critical point nucleus (for the transition from spherical to axially deformed nuclei) had indeed an enhanced number of lowlying (up to 2.5 MeV) 0 + states, compared to other nuclei in the same region. These results have led to the expectation that, near the critical point, there may be an enhancement of the density of levels at low excitation energies. In order to investigate this possibility we examine now experimentally determined nuclear level densities. We refer to the results of Ref. for the nuclear level densities at relatively low excitation energies. In that work, the total level density (E) was determined for individual nuclei by fitting both the cumulative numbers of known low-lying levels and the density of neutron resonances, with the back-shifted Fermi gas model formula (BSFG), with the free parameters a and the energy shift E 1. The nuclei for which this procedure can be applied is limited to about 300, as they are of the stable-nucleus-plus-oneneutron type. The fitting procedure is described in. The result of the individual fits to all these nuclei (between 18 F and 251 Cf) are shown in the inset of Fig. 1. The values of a show an almost linear dependence on A, on which oscillations due to shell effects are superimposed. Note that for nuclei with comparable mass values, the larger the parameter a, the larger is the level density, therefore one can use a as a measure of the level density. By observing correlations between the parameters a and E 1 and different experimental quantities, the following compact empirical formulas were proposed to describe these experimental values: where S = S + 0.5 P a, with the shell correction S = B LD − B exp being the difference between the binding. Formulas and can be used to predict level densities of nuclei for which these are not known or cannot be measured, by using only quantities from the mass tables. One remarks in the inset of Fig. 1 a set of nuclei with mass A ≈ 150 which significantly deviate from the average trajectory of the data. The big graph of Fig. 1 presents in detail the region with these nuclei. One observes that the isotopes of Nd to Dy with N around 90 have larger level densities than other nuclei from this mass region, their a values being about 18 MeV −1, compared to about 16.5 MeV −1 of the average behavior. These are exactly the nuclei near/at the N = 90 critical point of the well known transition from spherical to axially deformed nuclei in this mass region. Therefore, another signature of the first order SPT from this region is an increase of the level density at the critical point. The examination of the experimental level densities at the neutron resonance energy brings further support to this conclusion. Figure 2 shows the experimental values of the density of the s-wave neutron resonances 0, as determined from the average level spacings of these resonances. The same set of nuclei, around the critical point at N = 90, shows almost the largest 0 values observed in the ≈ 300 nuclei, some of them comparable to values observed only in some transactinide nuclei. One should remark here that the set of about 300 nuclei represented in both Figs. 1 and 2, for which experimental a and 0 values are known, is rather restricted, as it comprises only nuclei that can be obtained from stable targets plus one neutron. The SPT region with the peak around the N = 90 critical point shows up so well because it contains, fortunately, many such nuclei, thus allowing to see a meaningful correlation between the SPT and the level density both at low excitation energies and at the neutron resonance energy. However, many key nuclei from this region, close to the critical point, cannot appear in these plots (such as, e.g., 150 Nd), and this is generally the case for other nuclear regions where first order SPTs occur. In order to see how this first order SPT occurs as a function of the neutron number N (the control parameter) in the level densities of all nuclei from the mass ≈150 region we rely on formula for the parameter a, which describes reasonably well the set of the 300 experimentally investigated nuclei. Figure 3 shows how a evolves as a function of N for all types of nuclei with Z between 56 (Ba) and 70 (Yb). The curves passing through small symbols are the values predicted by Eq.. One can see that they describe reasonably well the few existing experimental data from this region (the big symbols, representing the values obtained by individual fits to those nuclei ), which suggest themselves the existence of maxima around N ≈90. For all four types of nuclei (with both even and odd numbers of nucleons) the curves of the isotopic chains between Z = 60 (Nd) and Z = 67 (Ho) present a maximum for a (maximum level density) around the critical value N = 90. For isotopes with larger Z this maximum gradually shifts to larger N and diminishes, while for smaller Z it does not exist. It is thus seen that the main correction in Eq. to the almost linear dependence on A, which is due to the "shell correction" S, contains information not only on the shell closure but on the occurrence of the shape phase transition as well -which is not surprising, as it is determined by the nuclear masses. As Figs. 1 to 3 show, the nuclear level density at low energies, represented by the main parameter a of its BSFG model description is a good signature for the SPT at N = 90, the nuclei near the critical point having the largest level densities. This confirms the predictions of the IBM calculations for the maximization of 0 + states density at the U to SU transition point, and corroborates the experimental findings for the numbers of 0 + states in nuclei from the same region. The meaning of this level density enhancement at relatively low energies may be related to the special potential well of the nuclei near the critical point. It is expected that in such nuclei the potential well is broadened (in the deformation space) due to the nearly degenerated spherical and deformed coexisting minima, with a small barrier between them. As states can exist in ei-ther minimum, such a potential well can accommodate more states, their large density and the small barrier favoring the state mixing. Therefore, the enhancement of the level density, clearly shown in the presented data for the mass ≈150 region, is consistent with the phase coexistence, another phenomenon expected for a first order SPT. It is interesting to apply the present approach based on the level density to other well established nuclear regions showing a first order SPT. One of these, well known for its very rapid transition, is the A ≈ 100 (Sr -Zr) region, with the critical point at N = 60. Before looking at level densities, we first make a comparative analysis of the the A ≈ 150 and A ≈ 100 regions, using general order parameters that can be applied to all types of nuclei, that is, the quantities S 2n and <r 2 > discussed in Sec. I. Actually, we have used their differential variation (difference between two successive isotopes) which acts as a "magnifying glass" in highlighting the discontinuities associated with the SPT. Figure 4 displays the differential variation dS 2n of the two-neutron separation energy, and d<r 2 > of the mean square charge radius, respectively, for the nuclei in the region of the STP at N = 90, separated for the four types of nuclei according to their nucleon numbers. S 2n can be examined for both even-even nuclei and nuclei with odd numbers of nucleons, as shown in some recent papers. Its behavior in this mass region was considered in detail in Refs., by examining its deformation-dependent part, as well as the odd-even effects. It was found that the signal for the emerging SPT is enhanced by the extra-single particle(s) in comparison with that from the adjacent even-even nuclei, and that pairing plays the major role in driving the phase transition. The enhancement of the signal for the SPT can be also seen in graphs (a) to (d) of Fig. 4, the amplitude of the kink at N ≈ 90 being larger for the odd nuclei than for the even-even ones, with the largest effect in the odd-odd nuclei, in agreement with the findings of Ref.. A recent study of Sm and Eu nuclei, with a core-quasiparticle coupling Hamiltonian based on the energy dependence functionals, explained the enhancement of the SPT in the odd-mass nuclei by a shape polarization effect of the unpaired proton, which, before the critical neutron number 90 couples to Sm cores, and starting from N = 90 couples predominantly to Gd cores which have larger quadrupole deformation and smaller pairing. Graphs (e) to (h) in Fig. 4 show the differential variation of the mean square charge radius for the same nuclei from the left column of the figure, whenever these quantities are available. The aspect of these graphs in the region N ≈ 90 is similar to that of the corresponding graphs from the left side, also showing the enhancement of the signal in the nuclei with odd number of protons. Actually, a similarity between the graphs of various differential observables (these two and those of some other spectroscopic observables available only for even-even nuclei) as a function of N, was remarked in Ref.. Figure 5 is the analog of Fig. 4, for the region with mass A ≈ 100, with its fastest known shape phase transition at N = 60. It looks rather similar to Fig. 4, except for the smaller number of isotope chains which show the SPT in the graphs (a) -(d) of dS 2n. There is a clear sig- Figures 4 and 5 show a rather close similarity between the two regions, with clear signatures of first order SPT appearing at N = 90 and N = 60, respectively. We examine now how the SPT in the Sr -Zr region appears in the evolution of the level density. Figure 6 is similar to Fig. 3, it displays the level density parameter a for the isotopic chains from Kr to Rh. Unfortunately, there are no experimentally determined level densities for the rather neutron-rich nuclei around the critical point N = 60. There are only several nuclei with experimental points (big filled symbols), all below N = 60, the trend of their evolution with N being reasonably well repro-duced by Eq.. We rely therefore on formula to examine how the level density evolves in this region. It is likely that this formula predicts with reasonable accuracy the level density parameter a at least for the cases when experimental masses are used (in Fig. 6 the points calculated from extrapolated masses -from Ref., are distinguished by open small symbols and dashed curves). The shape phase transition (kinks in Fig. 5) is indicated by a discontinuity in the evolution of a, shown by the change of slope at N = 60, after which the values remain almost constant (Fig. 6). 36 This behavior is different from that of the nuclei from the Sm region (Fig. 3). The lack of a maximum of the level density at the critical point N = 60 in Fig. 6 may indicate that in the Sr -Zr region there is no phase coexistence at the critical point. This situation corroborates the results of recent large scale Monte Carlo shell model calculations which describe very well the characteristics of nuclei in this region, namely, 96 Zr and the SPT at N = 60. In all nuclei from this region, from 96 Zr to 110 Zr, these calculations predict coexistence of various shapes: spherical, prolate, oblate, and triaxial, the mechanism describing quantitatively the low-energy structure of these nuclei being the type II shell evolution. The SPT in the Sr -Zr region is a rather special one, the transition from nuclei with spherical ground state to nuclei with axially deformed ground state being a rather abrupt one, the two competing configurations crossing each other without significant interaction between them. The same situation appears in the similar transition from 96 Sr and 98 Sr, where Coulomb excitation studies showed that the prolate (g.s.) and spherical (excited) coexisting configurations of 98 Sr have a very weak mixing. In the Sm region this transition is comparatively more gradual, and takes place through a critical point where the two phases coexist and mix with each other. A discussion of the shape coexistence and phase coexistence phenomena can be found in. We conclude this section by stating that the analysis of these two nuclear regions shows that shape phase transition and phase mixing in nuclei can appear in different forms and with different characteristics, as also remarked in. V. CRITICAL POINT NUCLEI Besides the abrupt change in the order parameter (ground state equilibrium deformation) and the phase coexistence phenomenon, a third feature of the SPT in nuclei is the possible experimental occurrence of critical point nuclei. Because the number of nucleons is an inte-ger, the nuclear properties change discretely, and in principle it may happen that real nuclei do not lie exactly at the critical point. The identification of nuclei with critical point features in the even-even case has mainly been based on comparison of spectroscopic observables with the parameter-free predictions of the critical point symmetries E and X. Thus, for the first order SPT a number of nuclei with X properties were proposed in the rare earths region, in particular the N = 90 nuclei 150 Nd, 152 Sm, 154 Gd, 156 Dy, as well as other possible candidates in heavier rare earths. IBM calculations also allowed localization of the critical phase transition points (see, e.g., Ref. ). For the odd-mass nuclei, there are also theoretical developments of critical point symmetries. Thus, Iachello introduced the critical point Bose-Fermi symmetry E(5/4) for the case of a j = 3/2 particle coupled to an E core, subsequently extended into the E(5/12) model by considering a multi-j case: coupling of a particle in j = 1/2, 3/2, 5/2 orbits. The X(5/(2j + 1)) model was proposed for cases in which a particle in a j orbit is coupled to an X core. As empirical studies of different order parameters show (see also previous sections of this work), the first order SPTs in odd-mass nuclei are strongly correlated to those taking place in the adjacent even-even nuclei. The role of the unpaired particle on the SPT was also studied within the Interacting Boson-Fermion model (IBFM) calculations, where the theoretical results are compared to experimental evidence on the occurrence of phase transitions in Pm, Eu, and Tb proton-odd nuclei. The IBFM study of a particle in the j = 1/2, 3/2 and 5/2 orbitals showed that the position of the critical point in the odd nucleus is shifted with respect to that in the even-even core, with a magnitude proportional to 1/N (N the number of active bosons). Newer developments refer to a microscopic framework based on the nuclear energy density functional theory. In Ref., the energy density functionals method and a fermion-boson coupling scheme were used, and calculated spectroscopic observables indicate sharp irregularities at mass 151 for the Eu isotopes, and at mass 153 for the odd Sm isotopes. This type of study was recently refined, by using a core-quasiparticlecoupling Hamiltonian based on energy density functionals. Compared to the even-even case, approaches to describe the structure of odd-mass nuclei in a global way are only at their beginning. Besides studies highlighting the role of the unpaired particle on the SPT (usually manifested in an enhancement of the transition), there is also interest, at present, in empirically finding critical point nuclei with odd N and/or odd Z. Thus, in Ref., it is proposed to identify critical point odd-mass nuclei by looking for the phase coexistence phenomenon, which should take place around the critical point of a first order SPT. In that work the experimentally observed low-lying structure in the odd Sm nuclei was examined. The several known low-lying bands known in these nuclei show that in 151 Sm there are coexisting rotational and vibrational bands (phases), whereas the structure of 153 Sm is dominated by rotational structures. Therefore, it was proposed that, because 151 Sm shows more clearly shape coexistence features, it is closer to the critical point. For the odd-mass nuclei, a method based on correlations between excitation energies has been rather useful to identify critical point nuclei. This kind of analysis was first proposed by Ref., and represents an empirical way to circumvent the integer nucleon number problem. It consists in using as a control parameter an empirical quantity, such as E(2 + 1 ) in even-even nuclei, which, for many nuclei in a region, presents a nearly continuous distribution. Other quantities , represented as a function of E(2 + 1 ), follow simple, compact trajectories, for large regions of nuclei, with distinct anomalies, characteristic of a phase transition, at E(2 + 1 ) values similar to that of 152 Sm (≈150 keV) where phase coexistence was suggested. The same is true for other differential observables. A similar procedure was subsequently proposed for odd-mass nuclei. In order to be able to cover large nuclear regions, the structures (bands) determined by unique parity orbitals (UPO) were considered because they practically do not mix with other orbitals and thus lead to nearly identical effects for any UPO. Excitation energies relative to that of the state of spin j (the spin of the UPO) were defined within the favoured quasiband E(j +2), E(j +4), with E(I) = E * (I)−E * (j), and also the ratio R j+4/j+2 = E(j + 4)/E(j + 2), similar to E(2 + 1 ), E(4 + 1 ), and R 4/2 for the even-even nuclei. E(j + 4) displays compact trajectories when represented as a function of E(j + 2) (the effective control parameter), for the different investigated UPOs. In particular, for the nuclei of mass ≈ 150, where there are rich data for the i 13/2 UPO, this correlation has a "turning point" for nuclei near N ≈ 90 at a minimum energy E c (j + 2) ≈ 200 keV, which is correlated with the critical point of their even-even cores, with E c (2 + 1 ) ≈ 150 keV. In the odd-mass nuclei this kind of correlation allows a rather direct identification of possible critical point nuclei, based on their proximity to the critical (turning) point E c (j + 2). Figure 7 shows the correlation between R j+4/j+2 and E(j + 2) of i 13/2 structures in the evenodd isotopes from Sm to Os. Although less compact than the correlation of E(j +4) versus E(j +2) (Fig. 6 of ), it allows a better visualisation of each isotopic chain. In Fig. 7, for each isotopic chain, with increasing mass, R j+4/j+2 (and E(j +4) ) first increases as E(j +2) decreases, this trend reversing at the critical (turning) point at E c (j +2) ≈ 200 keV. One should remark that the maximum of compression of the favoured band at the critical point corroborates well the maximum level density at the same point discussed in Sec. II. Based on the individual isotopic curves in Fig. 7 5 show a very clear SPT signature for the odd-odd nuclei (Pm, Eu, and Tb in the mass-150 region, and Rb and Y in the mass-100 region, respectively). The complicated structure of these nuclei makes it difficult to follow observables related to excitation energies. In the case of Tb (Z = 65) one could, nevertheless, identify and follow the evolution of the same structure, namely a band with the (h 11/2, i 13/2 ) structure, for three nuclei around N = 89 where one can see the strong SPT signature in Fig. 4. Figure 8(a) shows a correlation between excitation energies within this band, relative to the state of spin 12 (which is the sum of the spins of the two orbitals), similar to the case of UPO states in the odd-mass nuclei. One can see that the evolution of the three nuclei shows a "turning point" at 154 Tb (N = 89), which may be proposed as a candidate for critical point nucleus. Figure 8(b) shows that this band is maximally compressed at N = 89, similar to the odd-mass nuclei, and in agreement with expectations based on the level density argument. One should also remark that the same argument, of largest level density at the critical point nuclei, seems to be confirmed also for the N = 89 nucleus 150 Pm (Fig. 4), for which a large density of low-lying excited levels was observed through the (d, ) reaction, unlike for other nuclei in the same mass region (cf. Fig. 1 of ). As studies of signatures of the first order SPT in odd-odd nuclei in the mass regions ≈ 150 and ≈ 100, should concentrate on the best candidates for critical point nuclei 150 Pm, 152 Eu, 154 Tb, and 96 Rb, 98 Y, 100 Nb, respectively. VI. CONCLUSIONS In this work it has been shown that the nuclear level density at low excitation energy constitutes a good indicator for the first order shape phase transitions in nuclei. The level density displays a maximum value at the critical point, and this was tested in detail for the known SPT at N = 90. This maximum value also discloses the phase coexistence phenomenon at the critical point. It is gratifying that this novel indicator can be studied for all kinds of nuclei, even-even, odd-mass, and odd-odd. A comparison has been presented between two well known first order SPTs, those at N = 90 and N = 60, by using effective order parameters that are applicable to all types of nuclei: the differential variation of the two-neutron separation energy S 2n, of the mean square radius < r 2 >, and the level density (as represented by the a parameter of its BSFG description). While the first two such quantities are very similar in the two nuclear regions, just indicating a rapid change of properties, the one based on the level density appears as more shaded, as it indicates some differences related to the way the two SPTs take place: while the transition at N = 90 is more gradual and indicates phase coexistence and mixing, the one at N = 60 is consistent with a very rapid crossing of the two phases, without coexistence and mixing between them. Finally, we discuss the problem of assessing critical point nuclei in the case of the odd-mass and odd-odd nuclei. For the odd-mass nuclei, the method is based on the correlations between excitation energies, and their ratios, of the unique parity orbital structures (bands). It is shown, by examining the ratio R j+4/j+2 = E(j + 4)/E(j + 2) versus E(j + 2) (with j -the unique parity orbital spin), that candidates for the critical point nuclei can be proposed by looking at their proximity to the critical energy (E c ≈ 200 keV in the case of nuclei with i 13/2 bands from the N = 90 region), which appears as a turning point in these graphs. The pattern of these correlations can be used to tell whether the critical point is very close to a certain real nucleus, or it falls between two real nuclei. An example of such correlations is also given for a restricted number of odd-odd nuclei from the same region. Both the odd-mass and odd-odd nuclei display a maximum compression of the band structures near the critical point of a first order SPT, in agreement with the other criterion, of maximum level density. Some candidates of critical odd-odd nuclei are proposed on the basis of the employed empirical investigations.
Overview of Psychiatric Ethics VI: Newer Approaches to the Field Objective: The aim of this paper is to consider two recent approaches to moral philosophy postmodernism and discourse ethics and evaluate their potential contribution to psychiatric ethics. Conclusion: Postmodern ethics arose from the perceived moral failures of the grand theories of ethics, as evident in the horrors of the twentieth century. As a result, such approaches to ethics emphasize the individual's moral situation in a particular context, such as the doctorpatient relationship. Postmodern approaches have some relevance to current and future psychiatric practice. Discourse ethics sees ethical norms generated by a process of a discourse procedure, in which all members of a discourse are able to express their views. Discourse ethics allows the generation of moral norms, which are universal in as far as all those affected by them can accept their consequences. Applied to professional ethics, psychiatrists are members of a large group engaged in a discourse with diverse parts of society, yet exist within small moral communities in which micro-discourses are compatible with different individual ethical positions.
// Services returns all services in a cluster func (u *Outback) Services(c *ecs.Cluster) ([]string, error) { res, err := u.ECS.ListServices(&ecs.ListServicesInput{ Cluster: c.ClusterArn, }) if err != nil { return nil, errors.Wrap(err, errFailedToListServices) } r := regexp.MustCompile(`([^\/]+)$`) services := make([]string, len(res.ServiceArns)) for i, service := range res.ServiceArns { services[i] = r.FindString(*service) } return services, nil }
# SPDX-License-Identifier: MIT # Copyright (C) 2018-present iced project and contributors # ⚠️This file was generated by GENERATOR!🦹‍♂️ # pylint: disable=invalid-name # pylint: disable=line-too-long # pylint: disable=too-many-lines """ The code size (16/32/64) that was used when an instruction was decoded """ import typing if typing.TYPE_CHECKING: from ._iced_x86_py import CodeSize else: CodeSize = int UNKNOWN: CodeSize = 0 # type: ignore """ Unknown size """ CODE16: CodeSize = 1 # type: ignore """ 16-bit code """ CODE32: CodeSize = 2 # type: ignore """ 32-bit code """ CODE64: CodeSize = 3 # type: ignore """ 64-bit code """
package es.upm.oeg.librairy.api.tests; import com.mashape.unirest.http.exceptions.UnirestException; import es.upm.oeg.librairy.api.executors.ParallelExecutor; import es.upm.oeg.librairy.api.facade.model.avro.*; import es.upm.oeg.librairy.api.io.reader.Reader; import es.upm.oeg.librairy.api.io.reader.ReaderFactory; import es.upm.oeg.librairy.api.io.writer.Writer; import es.upm.oeg.librairy.api.io.writer.WriterFactory; import es.upm.oeg.librairy.api.model.Document; import es.upm.oeg.librairy.api.service.InferenceService; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; import java.util.*; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; /** * @author <NAME>, Carlos <<EMAIL>> */ public class MoveDocumentsIntTest { private static final Logger LOG = LoggerFactory.getLogger(MoveDocumentsIntTest.class); @Test public void moveDocs() throws UnirestException, IOException { String model = "http://librairy.linkeddata.es/jrc-en-model"; DataSource fromSource = DataSource.newBuilder() .setCache(false) .setFilter("source_s:oo-api") .setDataFields( DataFields.newBuilder() .setId("id") .setName("name_s") .setText(Arrays.asList("txt_t")) .setLabels(Arrays.asList("labels_t")) .setExtra(Arrays.asList("size_i","format_s","lang_s","source_s")) .build() ) .setFormat(ReaderFormat.SOLR_CORE) .setOffset(0) .setSize(-1) .setUrl("http://librairy.linkeddata.es/solr/documents") .build(); DataSink dataSink = DataSink.newBuilder() .setFormat(WriterFormat.SOLR_CORE) .setUrl("http://librairy.linkeddata.es/solr/tbfy") .build(); Reader reader = new ReaderFactory().newFrom(fromSource); Optional<Document> doc = Optional.empty(); Writer writer = new WriterFactory().newFrom(dataSink); InferenceService inferenceService = new InferenceService(); AtomicInteger counter = new AtomicInteger(); ParallelExecutor executor = new ParallelExecutor(); while( (doc = reader.next()).isPresent()){ final Document document = doc.get(); executor.submit(() -> { try{ Map<String,Object> data = new HashMap<>(); data.put("name_s",document.getName()); data.put("txt_t",document.getText()); data.put("labels_t",document.getLabels().stream().collect(Collectors.joining(" "))); data.put("size_i", document.getExtraData().get("size_i")); data.put("format_s", document.getExtraData().get("format_s")); data.put("lang_s", document.getExtraData().get("lang_s")); data.put("source_s", document.getExtraData().get("source_s")); if (Integer.valueOf((String) data.get("size_i")) !=0){ LOG.info("[" + counter.incrementAndGet()+"] getting topics from : " + document.getId()); Map<Integer, List<String>> topics = inferenceService.getTopicNamesByRelevance(document.getText(), model); topics.entrySet().forEach(entry -> data.put("topics"+entry.getKey()+"_t", entry.getValue().stream().sorted().collect(Collectors.joining(" ")))); } writer.save(document.getId(), data); }catch (Exception e){ LOG.error("Unexpected error",e); } }); } executor.awaitTermination(1l, TimeUnit.HOURS); writer.close(); LOG.info(counter.get() + " documents moved"); } @Test public void moveLabels() throws UnirestException, IOException { DataSource fromSource = DataSource.newBuilder() .setCache(false) .setDataFields( DataFields.newBuilder() .setId("id") .setExtra(Arrays.asList("related_t","de_s","en_s","fr_s","it_s","es_s","root_t","thesaurus_s")) .build() ) .setFormat(ReaderFormat.SOLR_CORE) .setOffset(0) .setSize(-1) .setUrl("http://librairy.linkeddata.es/solr/categories") .build(); DataSink dataSink = DataSink.newBuilder() .setFormat(WriterFormat.SOLR_CORE) .setUrl("http://librairy.linkeddata.es/solr/eurovoc") .build(); Reader reader = new ReaderFactory().newFrom(fromSource); Optional<Document> doc = Optional.empty(); Writer writer = new WriterFactory().newFrom(dataSink); InferenceService inferenceService = new InferenceService(); AtomicInteger counter = new AtomicInteger(); ParallelExecutor executor = new ParallelExecutor(); while( (doc = reader.next()).isPresent()){ final Document document = doc.get(); executor.submit(() -> { try{ Map<String,Object> data = new HashMap<>(); data.put("related_t", document.getExtraData().get("related_t")); data.put("de_s", document.getExtraData().get("de_s")); data.put("fr_s", document.getExtraData().get("fr_s")); data.put("en_s", document.getExtraData().get("en_s")); data.put("es_s", document.getExtraData().get("es_s")); data.put("it_s", document.getExtraData().get("it_s")); data.put("root_t", document.getExtraData().get("root_t")); data.put("thesaurus_s", document.getExtraData().get("thesaurus_s")); writer.save(document.getId(), data); }catch (Exception e){ LOG.error("Unexpected error",e); } }); } executor.awaitTermination(1l, TimeUnit.HOURS); writer.close(); LOG.info(counter.get() + " documents moved"); } }
Improved quality of care for cardiovascular disease for Latinos seen in high proportion Latino vs low proportion Latino clinics. BACKGROUND Primary care practices that concentrate linguistically and culturally appropriate services for Latinos may result in higher cardiology consultation rates and improved process measure performance for patients with coronary artery disease (CAD) and congestive heart failure (CHF). METHODS Multivariable Cox proportional-hazards regression was used to assess differences in referral at high proportion (HP) vs low proportion (LP) practices. Multivariable Poisson regression was used to assess the frequency of follow-up consultation. RESULTS Among the 9,761 patients, 9,168 had CAD, 4,444 had CHF, and 3,851 had both conditions. Latinos comprised 11% of the CAD cohort and 11% of the CHF cohort. Multivariable analyses showed higher consultation rates for Latinos at HP practices for CAD and CHF. Blacks and Whites at HP practices had no significant differences in rates of consultation compared to those in LP practices. Latinos at HP practices had 25% more consultations for CAD and 23% more consultations for CHF than Latinos at LP practices. Latinos at HP clinics had higher overall mean quality performance on clinical measures for both CAD and CHF. Latinos at an LP clinic had the largest improvement in quality performance with consultation. CONCLUSIONS Among Latinos with CAD or CHF receiving care within a single large academic care network, Latino patients at HP practices have higher rates of cardiologist consultation and performance on CVD process measures compared to Latino patients at LP practices. Elucidating the essential components of individual practice environments that provide higher quality of care for Latinos will allow for well designed systems to reduce health care disparities.
Efficiency of sequencing by hybridization on oligonucleotide matrix supplemented by measurement of the distance between DNA segments. DNA sequencing by hybridization on oligonucleotide microchip (SHOM) allows the determination of a spectrum of overlapping oligonucleotides constituting a DNA fragment that hybridizes to form perfect duplexes with an array of immobilized oligonucleotides and, as a result, enables reconstitution of the nucleotide sequence of the fragment. In longer DNA fragments, unambiguous reconstitution of DNA sequence is often impeded by the presence of repetitive regions and simple sequence repeats. Here it is demonstrated that SHOM supplemented by measurement of the distance between certain sites (for example, restriction sites or priming sites for PCR) within the analyzed DNA enables sequencing of much longer DNA fragments, containing repeats of different complexity.
More than 400 companies have won spots on the General Services Administration's new Section 8(a) Streamlined Technology Acquisition Resources for Services contract, known as Stars. With a ceiling of $15 billion over seven years and eight distinct functional areas, Stars reflects the success of its predecessor contract, the Federal Acquisition Services Technology contract, or Fast, GSA officials said. Over its seven-year life, Fast was used to award about $2 billion in contracts to nearly 200 small businesses. Like Fast, the new contract is an indefinite-delivery, indefinite-quantity deal designed to offer 8(a) businesses a vehicle to win work with federal agencies. Throughout the contract's three-year period and two two-year options, the companies will compete with each other for task orders of up to $3 million each within their functional areas. GSA awarded contracts to 434 companies. For one of the winning companies, Stars increases the efficiency of governmentwide acquisition contracts. "Because the rates have already been negotiated, the projects will accelerate without the traditional paperwork," said Ola Bamgbose, president and chief executive officer of e-Management Inc. of Silver Spring, Md. e-Management became an 8(a) last year and has $4 million in annual revenue, Bamgbose said. Its largest customer is the Energy Department. The company won a spot on Stars under the computer systems and design services functional area. Another benefit of Stars, Bamgbose said, "is that we can offer a variety of contracts for our customers to select from, so it is easier for them to choose, and we can invest more of our time in providing better services." Arrowhead Global Solutions Inc. of McLean, Va., also won Stars, despite its graduation from 8(a) status a few weeks before winning the contract, said Nora Taylor, vice president of contracts. Arrowhead won a spot in four functional areas: computer systems design services, computer facilities management services, other computer related service and wired telecommunication carriers. Arrowhead primarily provides the Defense Department with satellite and wireless telecommunication work, but it plans to use Stars to grow "the computer related and IT side of our business," Taylor said. Stars has received largely favorable reviews. "The expectations are that 8(a) Stars will eclipse its predecessors as far as the number of contracts. ? It gives us additional options and flexibility," said Woodie Sharpless, vice president of business development for Technical and Management Resources Inc. Before Stars, TMR of Fairfax, Va., primarily provided the Justice and Defense departments with IT solutions. With its inclusion under four functional areas, Sharpless said Stars will help TMR continue support of those customers. TMR can bid for task orders under the programming, systems design, facilities management and other computer-related services functional areas. While Stars does not prevent TMR and Arrowhead from competing against smaller 8(a) businesses, Taylor praised the contract for its potential to help 8(a) businesses that are not as big as Arrowhead and are "just getting their bearings." Both e-Management and Arrowhead have already put the new contract to use. According to Bamgbose, e-Management will feature 8(a) Stars as a "premier contracting offer," at an IT conference this week. Arrowhead pitched the vehicle to customers as early as two days after the award announcement. "We didn't waste any time," Taylor said.
<filename>geokey/core/tests/logger/test_log_usergroup.py """Tests for logger: model UserGroup.""" from django.test import TestCase from geokey.core.models import LoggerHistory from geokey.users.tests.model_factories import UserFactory from geokey.projects.tests.model_factories import ProjectFactory from geokey.users.tests.model_factories import UserGroupFactory class LogUserGroupTest(TestCase): """Test model UserGroup.""" def setUp(self): """Set up test.""" self.user = UserFactory.create() self.project = ProjectFactory.create(**{ 'creator': self.user}) self.usergroup = UserGroupFactory.create(**{ 'project': self.project}) def test_log_create(self): """Test when user group gets created.""" log_count_init = LoggerHistory.objects.count() usergroup = UserGroupFactory.create(**{ 'project': self.project}) log = LoggerHistory.objects.last() log_count = LoggerHistory.objects.count() self.assertNotEqual(log.user, { 'id': str(self.user.id), 'display_name': self.user.display_name}) self.assertEqual(log.project, { 'id': str(self.project.id), 'name': self.project.name}) self.assertEqual(log.usergroup, { 'id': str(usergroup.id), 'name': usergroup.name}) self.assertEqual(log.category, None) self.assertEqual(log.field, None) self.assertEqual(log.location, None) self.assertEqual(log.observation, None) self.assertEqual(log.comment, None) self.assertEqual(log.subset, None) self.assertEqual(log.action, { 'id': 'created', 'class': 'UserGroup'}) self.assertEqual(log_count, log_count_init + 1) self.assertEqual(log.historical, None) def test_log_delete(self): """Test when user group gets deleted.""" usergroup_id = self.usergroup.id usergroup_name = self.usergroup.name log_count_init = LoggerHistory.objects.count() self.usergroup.delete() log = LoggerHistory.objects.last() log_count = LoggerHistory.objects.count() self.assertNotEqual(log.user, { 'id': str(self.user.id), 'display_name': self.user.display_name}) self.assertEqual(log.project, { 'id': str(self.project.id), 'name': self.project.name}) self.assertEqual(log.usergroup, { 'id': str(usergroup_id), 'name': usergroup_name}) self.assertEqual(log.category, None) self.assertEqual(log.field, None) self.assertEqual(log.location, None) self.assertEqual(log.observation, None) self.assertEqual(log.comment, None) self.assertEqual(log.subset, None) self.assertEqual(log.action, { 'id': 'deleted', 'class': 'UserGroup'}) self.assertEqual(log_count, log_count_init + 1) self.assertEqual(log.historical, None) def test_log_update_name(self): """Test when name changes.""" log_count_init = LoggerHistory.objects.count() original_name = self.usergroup.name self.usergroup.name = '%s UPDATED' % self.usergroup.name self.usergroup.save() log = LoggerHistory.objects.last() log_count = LoggerHistory.objects.count() self.assertNotEqual(log.user, { 'id': str(self.user.id), 'display_name': self.user.display_name}) self.assertEqual(log.project, { 'id': str(self.project.id), 'name': self.project.name}) self.assertEqual(log.usergroup, { 'id': str(self.usergroup.id), 'name': self.usergroup.name}) self.assertEqual(log.category, None) self.assertEqual(log.field, None) self.assertEqual(log.location, None) self.assertEqual(log.observation, None) self.assertEqual(log.comment, None) self.assertEqual(log.subset, None) self.assertEqual(log.action, { 'id': 'updated', 'class': 'UserGroup', 'field': 'name'}) self.assertEqual(log_count, log_count_init + 1) history = self.usergroup.history.get(pk=log.historical.get('id')) self.assertEqual(history.id, self.usergroup.id) self.assertEqual(history.name, original_name) def test_log_update_can_contribute(self): """Test when setting gets set to `can contribute`.""" self.usergroup.can_contribute = False self.usergroup.can_moderate = False self.usergroup.save() log_count_init = LoggerHistory.objects.count() original_can_contribute = self.usergroup.can_contribute original_can_moderate = self.usergroup.can_moderate self.usergroup.can_contribute = True self.usergroup.can_moderate = False self.usergroup.save() log = LoggerHistory.objects.last() log_count = LoggerHistory.objects.count() self.assertNotEqual(log.user, { 'id': str(self.user.id), 'display_name': self.user.display_name}) self.assertEqual(log.project, { 'id': str(self.project.id), 'name': self.project.name}) self.assertEqual(log.usergroup, { 'id': str(self.usergroup.id), 'name': self.usergroup.name}) self.assertEqual(log.category, None) self.assertEqual(log.field, None) self.assertEqual(log.location, None) self.assertEqual(log.observation, None) self.assertEqual(log.comment, None) self.assertEqual(log.subset, None) self.assertEqual(log.action, { 'id': 'updated', 'class': 'UserGroup', 'field': 'can_contribute', 'value': 'True'}) self.assertEqual(log_count, log_count_init + 1) history = self.usergroup.history.get(pk=log.historical.get('id')) self.assertEqual(history.id, self.usergroup.id) self.assertEqual(history.can_contribute, original_can_contribute) self.assertEqual(history.can_moderate, original_can_moderate) self.usergroup.can_contribute = False self.usergroup.can_moderate = True self.usergroup.save() log_count_init = LoggerHistory.objects.count() original_can_contribute = self.usergroup.can_contribute original_can_moderate = self.usergroup.can_moderate self.usergroup.can_contribute = True self.usergroup.can_moderate = False self.usergroup.save() log = LoggerHistory.objects.last() log_count = LoggerHistory.objects.count() self.assertNotEqual(log.user, { 'id': str(self.user.id), 'display_name': self.user.display_name}) self.assertEqual(log.project, { 'id': str(self.project.id), 'name': self.project.name}) self.assertEqual(log.usergroup, { 'id': str(self.usergroup.id), 'name': self.usergroup.name}) self.assertEqual(log.category, None) self.assertEqual(log.field, None) self.assertEqual(log.location, None) self.assertEqual(log.observation, None) self.assertEqual(log.comment, None) self.assertEqual(log.subset, None) self.assertEqual(log.action, { 'id': 'updated', 'class': 'UserGroup', 'field': 'can_contribute', 'value': 'True'}) self.assertEqual(log_count, log_count_init + 1) history = self.usergroup.history.get(pk=log.historical.get('id')) self.assertEqual(history.id, self.usergroup.id) self.assertEqual(history.can_contribute, original_can_contribute) self.assertEqual(history.can_moderate, original_can_moderate) def test_log_update_can_moderate(self): """Test when setting gets set to `can moderate`.""" self.usergroup.can_contribute = False self.usergroup.can_moderate = False self.usergroup.save() log_count_init = LoggerHistory.objects.count() original_can_contribute = self.usergroup.can_contribute original_can_moderate = self.usergroup.can_moderate self.usergroup.can_contribute = True self.usergroup.can_moderate = True self.usergroup.save() log = LoggerHistory.objects.last() log_count = LoggerHistory.objects.count() self.assertNotEqual(log.user, { 'id': str(self.user.id), 'display_name': self.user.display_name}) self.assertEqual(log.project, { 'id': str(self.project.id), 'name': self.project.name}) self.assertEqual(log.usergroup, { 'id': str(self.usergroup.id), 'name': self.usergroup.name}) self.assertEqual(log.category, None) self.assertEqual(log.field, None) self.assertEqual(log.location, None) self.assertEqual(log.observation, None) self.assertEqual(log.comment, None) self.assertEqual(log.subset, None) self.assertEqual(log.action, { 'id': 'updated', 'class': 'UserGroup', 'field': 'can_moderate', 'value': 'True'}) self.assertEqual(log_count, log_count_init + 1) history = self.usergroup.history.get(pk=log.historical.get('id')) self.assertEqual(history.id, self.usergroup.id) self.assertEqual(history.can_contribute, original_can_contribute) self.assertEqual(history.can_moderate, original_can_moderate) self.usergroup.can_contribute = True self.usergroup.can_moderate = False self.usergroup.save() log_count_init = LoggerHistory.objects.count() original_can_contribute = self.usergroup.can_contribute original_can_moderate = self.usergroup.can_moderate self.usergroup.can_contribute = True self.usergroup.can_moderate = True self.usergroup.save() log = LoggerHistory.objects.last() log_count = LoggerHistory.objects.count() self.assertNotEqual(log.user, { 'id': str(self.user.id), 'display_name': self.user.display_name}) self.assertEqual(log.project, { 'id': str(self.project.id), 'name': self.project.name}) self.assertEqual(log.usergroup, { 'id': str(self.usergroup.id), 'name': self.usergroup.name}) self.assertEqual(log.category, None) self.assertEqual(log.field, None) self.assertEqual(log.location, None) self.assertEqual(log.observation, None) self.assertEqual(log.comment, None) self.assertEqual(log.subset, None) self.assertEqual(log.action, { 'id': 'updated', 'class': 'UserGroup', 'field': 'can_moderate', 'value': 'True'}) self.assertEqual(log_count, log_count_init + 1) history = self.usergroup.history.get(pk=log.historical.get('id')) self.assertEqual(history.id, self.usergroup.id) self.assertEqual(history.can_contribute, original_can_contribute) self.assertEqual(history.can_moderate, original_can_moderate) def test_log_update_can_view(self): """Test when setting gets set to `can view`.""" self.usergroup.can_contribute = True self.usergroup.can_moderate = False self.usergroup.save() log_count_init = LoggerHistory.objects.count() original_can_contribute = self.usergroup.can_contribute original_can_moderate = self.usergroup.can_moderate self.usergroup.can_contribute = False self.usergroup.can_moderate = False self.usergroup.save() log = LoggerHistory.objects.last() log_count = LoggerHistory.objects.count() self.assertNotEqual(log.user, { 'id': str(self.user.id), 'display_name': self.user.display_name}) self.assertEqual(log.project, { 'id': str(self.project.id), 'name': self.project.name}) self.assertEqual(log.usergroup, { 'id': str(self.usergroup.id), 'name': self.usergroup.name}) self.assertEqual(log.category, None) self.assertEqual(log.field, None) self.assertEqual(log.location, None) self.assertEqual(log.observation, None) self.assertEqual(log.comment, None) self.assertEqual(log.subset, None) self.assertEqual(log.action, { 'id': 'updated', 'class': 'UserGroup', 'field': 'can_view', 'value': 'True'}) self.assertEqual(log_count, log_count_init + 1) history = self.usergroup.history.get(pk=log.historical.get('id')) self.assertEqual(history.id, self.usergroup.id) self.assertEqual(history.can_contribute, original_can_contribute) self.assertEqual(history.can_moderate, original_can_moderate) self.usergroup.can_contribute = True self.usergroup.can_moderate = True self.usergroup.save() log_count_init = LoggerHistory.objects.count() original_can_contribute = self.usergroup.can_contribute original_can_moderate = self.usergroup.can_moderate self.usergroup.can_contribute = False self.usergroup.can_moderate = False self.usergroup.save() log = LoggerHistory.objects.last() log_count = LoggerHistory.objects.count() self.assertNotEqual(log.user, { 'id': str(self.user.id), 'display_name': self.user.display_name}) self.assertEqual(log.project, { 'id': str(self.project.id), 'name': self.project.name}) self.assertEqual(log.usergroup, { 'id': str(self.usergroup.id), 'name': self.usergroup.name}) self.assertEqual(log.category, None) self.assertEqual(log.field, None) self.assertEqual(log.location, None) self.assertEqual(log.observation, None) self.assertEqual(log.comment, None) self.assertEqual(log.subset, None) self.assertEqual(log.action, { 'id': 'updated', 'class': 'UserGroup', 'field': 'can_view', 'value': 'True'}) self.assertEqual(log_count, log_count_init + 1) history = self.usergroup.history.get(pk=log.historical.get('id')) self.assertEqual(history.id, self.usergroup.id) self.assertEqual(history.can_contribute, original_can_contribute) self.assertEqual(history.can_moderate, original_can_moderate) def test_log_add_user(self): """Test when user is added.""" log_count_init = LoggerHistory.objects.count() new_user = UserFactory.create() self.usergroup.users.add(new_user) log = LoggerHistory.objects.last() log_count = LoggerHistory.objects.count() self.assertNotEqual(log.user, { 'id': str(self.user.id), 'display_name': self.user.display_name}) self.assertEqual(log.project, { 'id': str(self.project.id), 'name': self.project.name}) self.assertEqual(log.usergroup, { 'id': str(self.usergroup.id), 'name': self.usergroup.name}) self.assertEqual(log.category, None) self.assertEqual(log.field, None) self.assertEqual(log.location, None) self.assertEqual(log.observation, None) self.assertEqual(log.comment, None) self.assertEqual(log.subset, None) self.assertEqual(log.action, { 'id': 'updated', 'class': 'UserGroup_users', 'subaction': 'add', 'user_id': str(new_user.id), 'user_display_name': new_user.display_name}) self.assertEqual(log_count, log_count_init + 1) self.assertEqual(log.historical, None) def test_log_remove_user(self): """Test when user is removed.""" existing_user = UserFactory.create() self.usergroup.users.add(existing_user) log_count_init = LoggerHistory.objects.count() self.usergroup.users.remove(existing_user) log = LoggerHistory.objects.last() log_count = LoggerHistory.objects.count() self.assertNotEqual(log.user, { 'id': str(self.user.id), 'display_name': self.user.display_name}) self.assertEqual(log.project, { 'id': str(self.project.id), 'name': self.project.name}) self.assertEqual(log.usergroup, { 'id': str(self.usergroup.id), 'name': self.usergroup.name}) self.assertEqual(log.category, None) self.assertEqual(log.field, None) self.assertEqual(log.location, None) self.assertEqual(log.observation, None) self.assertEqual(log.comment, None) self.assertEqual(log.subset, None) self.assertEqual(log.action, { 'id': 'updated', 'class': 'UserGroup_users', 'subaction': 'remove', 'user_id': str(existing_user.id), 'user_display_name': existing_user.display_name}) self.assertEqual(log_count, log_count_init + 1) self.assertEqual(log.historical, None)
<filename>app/src/androidTest/java/blogr/vpm/fr/blogr/activity/PostPicturesFragmentTest.java package blogr.vpm.fr.blogr.activity; import android.content.Intent; import android.support.test.espresso.DataInteraction; import android.support.test.espresso.Espresso; import android.support.test.espresso.action.ViewActions; import android.support.test.espresso.assertion.ViewAssertions; import android.support.test.espresso.matcher.ViewMatchers; import android.support.v4.view.ViewPager; import android.test.ActivityInstrumentationTestCase2; import android.test.ViewAsserts; import android.test.suitebuilder.annotation.MediumTest; import android.widget.AbsListView; import org.hamcrest.Matchers; import blogr.vpm.fr.blogr.R; import blogr.vpm.fr.blogr.apis.flickr.ParcelableFlickrPhoto; import blogr.vpm.fr.blogr.bean.GithubBlog; import blogr.vpm.fr.blogr.bean.Post; /** * Created by vince on 06/04/15. * <p/> * Stub to test edition */ public class PostPicturesFragmentTest extends ActivityInstrumentationTestCase2<PostEditionActivity> { private static final String pic_url = "http://i.answers.microsoft.com/static/images/msheader.png"; private PostEditionActivity editionActivity; private ViewPager viewPager; public PostPicturesFragmentTest() { super(PostEditionActivity.class); } public void setUp() throws Exception { super.setUp(); setActivityInitialTouchMode(true); Intent i = new Intent(); Post post = new Post("Hello", "Hello World", new GithubBlog("jojo")); post.addFlickrPicture(new ParcelableFlickrPhoto("Some picture", pic_url)); i.putExtra(Post.INTENT_EXTRA_KEY, post); setActivityIntent(i); editionActivity = getActivity(); viewPager = (ViewPager) editionActivity.findViewById(R.id.pager); editionActivity.runOnUiThread(new Runnable() { public void run() { viewPager.setCurrentItem(3); } }); assertNotNull("Pager does not exist", viewPager); Espresso.onView(ViewMatchers.withId(R.id.pager)).perform(ViewActions.swipeRight()); Espresso.onView(ViewMatchers.withId(R.id.pager)).perform(ViewActions.swipeLeft()); } public void testPreConditions() { AbsListView pictures = (AbsListView) editionActivity.findViewById(R.id.pictures); assertNotNull("pictures does not exist", pictures); ViewAsserts.assertOnScreen(editionActivity.getWindow().getDecorView(), pictures); } @MediumTest public void testSwipeAndBack() { AbsListView pictures = (AbsListView) editionActivity.findViewById(R.id.pictures); ViewAsserts.assertOnScreen(editionActivity.getWindow().getDecorView(), pictures); Espresso.onView(ViewMatchers.withId(R.id.pager)).perform(ViewActions.swipeRight()); Espresso.onView(ViewMatchers.withId(R.id.pager)).perform(ViewActions.swipeLeft()); ViewAsserts.assertOnScreen(editionActivity.getWindow().getDecorView(), pictures); assertEquals("Some picture", editionActivity.getCurrentPost().getAllPictures().get(0).getTitle()); assertEquals(pic_url, editionActivity.getCurrentPost().getAllPictures().get(0).getUrlForInsertion()); } @MediumTest public void testPictureClick() { DataInteraction dataInteraction = Espresso.onData(Matchers.anything()).inAdapterView(ViewMatchers.withId(R.id.pictures)).atPosition(0); dataInteraction.check(ViewAssertions.matches(ViewMatchers.withText(Matchers.containsString("Some picture")))); dataInteraction.perform(ViewActions.click()); } @MediumTest public void testInsertFlickrPicture() { DataInteraction dataInteraction = Espresso.onData(Matchers.anything()).inAdapterView(ViewMatchers.withId(R.id.pictures)).atPosition(0); dataInteraction.check(ViewAssertions.matches(ViewMatchers.withText(Matchers.containsString("Some picture")))); dataInteraction.perform(ViewActions.click()); Espresso.onView(ViewMatchers.withId(R.id.action_new)).perform(ViewActions.click()); Espresso.onView(ViewMatchers.withText(R.string.action_insert_flickr)).perform(ViewActions.click()); DataInteraction dataInteraction1 = Espresso.onData(Matchers.anything()).inAdapterView(ViewMatchers.withClassName(Matchers.containsString("ListView"))).atPosition(0); dataInteraction1.perform(ViewActions.click()); assertEquals(2, editionActivity.getCurrentPost().getAllPictures().size()); DataInteraction dataInteraction2 = Espresso.onData(Matchers.anything()).inAdapterView(ViewMatchers.withId(R.id.pictures)).atPosition(1); dataInteraction2.check(ViewAssertions.matches(ViewMatchers.withText(editionActivity.getCurrentPost().getAllPictures().get(1).getTitle()))); } }
04/24/2019 08:07:32 96622613 1 0 0 3372 1 1 Military Military - General 92F Petroleum Supply Specialist 92F Petroleum Supply Specialist Part Time Army National Guard | Saint Cloud, MN (56301) NEW Fuel is one of the most vital components of the Army National Guard. It's what keeps Soldiers pushing onward, and as a Petroleum Supply Specialist, you'll ... NEW Do you match? 04/17/2019 02:16:45 94944898 2 7 0 3730 1 1 Military Military - General 11B Infantryman - Management Training 11B Infantryman - Management Training Part Time Army National Guard | Saint Cloud, MN 7 DAYS AGO Category: Infantry Posted: 11.15.2018 Age Requirements: Must be between the ages of 17 and 35 The Infantry is the backbone of the Army. These Soldiers fill... 7 DAYS AGO Do you match? 04/17/2019 02:16:45 94944895 3 7 0 3730 1 1 Military Military - General 19K M1 Armor Crewman 19K M1 Armor Crewman Part Time Army National Guard | Saint Cloud, MN 7 DAYS AGO Category: Armor and Field Artillery Posted: 11.15.2018 Age Requirements: Must be between the ages of 17 and 35 As an M1 Armor Crewman, you’ll keep your uni... 7 DAYS AGO Do you match? 04/16/2019 10:20:20 94762458 4 8 0 3372 1 1 Military Military - General 11B Infantryman - Management Training 11B Infantryman - Management Training Part Time Army National Guard | Saint Cloud, MN (56301) 8 DAYS AGO The Infantry is the backbone of the Army. These Soldiers fill the literal boots on the ground who are responsible for taking or holding ground during any c... 8 DAYS AGO Do you match? 03/27/2019 18:12:04 90265374 5 27 0 3730 1 1 Military Military - General 92F Petroleum Supply Specialist 92F Petroleum Supply Specialist Part Time Army National Guard | Saint Cloud, MN 28 DAYS AGO Category: Logistics Support Posted: 11.15.2018 Age Requirements: Must be between the ages of 17 and 35 Fuel is one of the most vital components of the Army... 28 DAYS AGO Do you match? 04/13/2019 00:19:25 94185393 6 11 0 3730 1 1 Military Military - General 36B Financial Management Technician 36B Financial Management Technician Part Time Army National Guard | Monticello, MN 11 DAYS AGO Category: Administrative Posted: 11.15.2018 Age Requirements: Must be between the ages of 17 and 35 Budgets need to be balanced, and Soldiers and vendors n... 11 DAYS AGO Do you match?
package offer.subscriber.fetcher.olx; import lombok.AllArgsConstructor; import lombok.ToString; @ToString @AllArgsConstructor public class OlxOffer { private String title; private String link; }
FC Marek Dupnitsa Early history (1919–1947) The people of Dupnitsa watched football being played for the first time by foreign troops stationed in the city during World War I. Over the next several years, four clubs were founded in the city: Slavia, Levski, ZHSK, and Athletic. In 1923, these clubs participated in the formation of the Southwest Football League and, between 1935 and 1944, they frequently took part in the finals of the national tournaments. By 1944, each of the four had their own stadium. Marek (1947–1970) In 1947, Slavia, Levski, ZHSK, and Athletic decided to merge into one club, which was named Marek, after the nickname of Stanke Dimitrov, a local hero of the Communist party. Marek is an abbreviation for Marxist, Antifascist, Revolutionary, Emigrant, Communist. In 1948, Marek became a part of the newly created first division, the Bulgarian A PFG, finishing eighth out of ten clubs in season 1948–49. The club was relegated to 2nd division, B PFG, in 1950. Marek subsequently won promotions to the Bulgarian A PFG in 1952 and 1956, followed by immediate relegation to B PFG the following seasons, 1953 and 1957, respectively. During these years, Marek's greatest achievement was 5th place in the Bulgarian A PFG during the 1960–61 season. The team's coach at that time was Lyuben Petrov. Up until the mid-1970s, Marek bounced back and forth between the first and second divisions of Bulgarian football. Success in Bulgaria and Europe (1975–1981) The most notable successes for Marek came in the late 1970s and early 1980s when the club finished third in the league in 1977 and won the cup in 1978, defeating overwhelming favorites CSKA Sofia 1:0 in front of 75,000 spectators at Vasil Levski Stadium in Sofia. During the 1976–77 season, Marek defeated CSKA twice, home and away, with the scores 2:1 and 3:1. That season, the club led the league for several rounds and at the end the team fought tooth and nail with Slavia Sofia for the third place in the table. Marek won the decisive game against Slavia in Dupnitsa by the score of 1:0, finishing 3rd and earning an entry into the 1977–78 UEFA Cup. This is Marek's best finish to date in the top flight of Bulgarian football. In this period the team also played in Europe: UEFA Cup, Cup Winners' Cup, and Intertoto Cup. Victories include games against Bayern (a 2–0 victory), against Ferencváros of Hungary (a 3–0 victory), and against Aberdeen of Scotland (a 3–2 victory), then led by coach Alex Ferguson. The return leg in Scotland was tied 0–0 until late in the game, when substitute Gordon Strachan scored a goal and led his team to a 3–0 victory. The club also competed in the 1980 Intertoto Cup against IFK Göteborg (2–3, 1–4) – a team that won the UEFA Cup just a year later;B 93 Copenhagen (2–0, 2–3), and Austria Salzburg (4–2, 2–2) to finish second in the group. The following season Marek once again competed in the Intertoto Cup-against Stuttgarter Kickers (0–1, 0–2), Viking (1–2, 0–3), and Willem II (0–1, 1–4) and finished last in its group. Stadium and fans: The team is known for its loyal supporters and the local stadium "Bonchuk Stadium" is infamous for being a difficult place for visiting teams. "Bonchuk Stadium" holds 16,050 people. The town of Dupnitsa was known as the "city on wheels", because thousands of loyal Marek fans would follow the team at away games to remote parts of Bulgaria. Famous players: Among the most famous players of Marek are Kiril Milanov, Dimitar Isakov, Nikolay "Shultz" Krastev, Sasho Pargov, Ivan and Ventzi Petrov, Stoyan Stoyanov (a goalkeeper), Asen Tomov, and Dimitre Dimitrov-Miki. The coach associated with the successes of Marek is Yanko Dinkov. Recent history (2001–2010) In 1983, Marek was relegated to B PFG and then the third division of Bulgarian football. After over a decade of playing in the lower divisions, in 2001 Marek returned triumphantly to the Bulgarian A PFG. As a participant in the Intertoto Cup, Marek tied 1–1 the German Bundesliga club VfL Wolfsburg in 2003, but lost away from home the second leg, 0–2, and was eliminated from the tournament. The team finished 7th at the conclusion of the 2003–04 season, 9th at the end of the 2004–05 season, 11th after the 2005–06 season, and 12th at the end of the 2006–07 football season of the Bulgarian premier division, Bulgarian A PFG (out of 16 teams). In 2006–07, Marek secured its place in the Bulgarian top division for the next season with a 1–0 home win over the powerhouse CSKA Sofia. During the 2007–08 season, Marek was plagued by injuries of key players, several coaching changes and a not-so-well covered conflict between the senior players of the club: Angelo and Yanek Kyuchukov and the club president, Yordan Andreev. Further, the team sold their best and most talented player, Enyo Krastovchev, to Levski Sofia. As a result, the team finished in last place, 16th, with only 5 wins in 30 games, in the Bulgarian A PFG, and was relegated to B PFG for the 2008–09 season. Before the start of the 2008–09 season in B PFG, the team held its pre-season training in France in an attempt by the club President Andreev to compile a team made up exclusively of young foreign players. The team even had a Portuguese coach for the first few games of the season. The regular season started disastrously for Marek. After several consecutive losses, the Portuguese coach was fired, and all but one of the foreign players left the club. Marek barely survived the 2008–09 season in B PFG, finishing 14th out of 16 teams, winning only 7 out of 30 regular season games, scoring 29 and conceding 48 goals. During the 2009–10 season in B PFG, the team was coached by Velin Kostadinov and player-manager Angelo Kyuchukov. The team found more consistency and finished comfortably in 10th place with 41 points. A New Beginning (2010–) The Bulgarian Football Federation denied Marek the license to compete in B PFG for the 2010–11 season due to the team's financial debts. Thus, the club had to start over and compete at the lowest level of Bulgarian football, in the regional amateur league, Zona Rila. The team's new coach became Ivaylo Pargov, a former player for the team. During the 2010–11 season, Marek dominated the local amateur division and after winning all but one of its regular season games, it earned a playoff game against PFC Belasitsa Petrich for the right to play in the third division, Bulgarian V AFG. The play-off game was tied after 90 minutes, 1–1, and Belasitsa went on to win on penalties. Despite the lost playoff and the prospect of spending a second season in the regional amateur league, a number of third division teams declined participation prior to the upcoming 2011–12 season due to financial insolvency. Thus, Marek was administratively promoted to the third division, Bulgarian V AFG for the 2011–12 season. During the 2012–13 season, Marek finished first in the Southwest V AFG and earned automatic promotion to the Bulgarian Second Division. B PFG Marek surprised its numerous fans with a fantastic 2013–14 season in the Second Division, dominating its opponents and securing promotion to A PFG with four games to go. The return to A PFG has proven difficult as Marek finished the 2014–2015 season in 11th place out of 12 teams, and the team was relegated. Marek won only six games the entire season, vs. Haskovo three times, at Cherno More and vs. Slavia Sofia. After the conclusion of the 2014–2015 season Marek did not receive a professional license from the Bulgarian Football Federation due to unpaid financial obligations to government institutions, and the team was relegated to the amateur divisions. Subsequently, Marek was fined by the Bulgarian Football Federation due to "suspicion" of match fixing and the club ownership decided to dissolve the existing club and register a new FC Marek 1915, which started competing from the lowest level of football in Bulgaria – 4th division – during the 2015–2016 season. Following an undefeated season, and navigating through two rounds of playoffs, Marek earned a promotion to 3rd division for season 2016–17.
N = int(input()) A = list(map(int,input().split()))[:N] i = 0 color = 0 T = list(filter(lambda x:x>=3200,A)) A = list(filter(lambda x:x<3200,A)) for R in range(0,2801,400): if len(list(filter(lambda x:x>=R and x<R+400,A)))>0: color+=1 min_color = color max_color = color+len(T) if min_color==0 and len(T)>0: min_color = 1 print(min_color,max_color)
Clinical significance of thyroid visualization on technegas ventilation scintigraphy BackgroundWe investigated the clinical significance of thyroid visualization on technegas (TcG) ventilation scintigraphy (TcGS) based on the hypothesis that this visualization may be correlated with thyroid disease with high radioactive thyroid uptake (RATU). MethodsFrom a total of 1022 consecutive patients undergoing TcG/99mTc macroaggregated albumin ventilation/perfusion (V/Q) scintigraphy to exclude pulmonary embolism, 114 who underwent in vitro thyroid function tests (TFTs) within 2 weeks of the lung scintigraphy were included in the retrospective study. In addition, in 10 patients in whom high RATU was noted on pertechnetate thyroid scintigraphy, TcGS was performed prospectively. The degree of thyroid activity in each patient was graded on a scale of 0 to 2 (grade 0=no or faint uptake; grade 1=mild uptake, but less than the lung; and grade 2=strong uptake, similar to, or more than, the lung). ResultsThyroid uptake was observed on TcGS in 17.5% of the patient group (20/114; 10 with grade 1, 10 with grade 2). Serum T3, T4 and TSH values differed significantly, depending on the grade of thyroid activity. All patients showing grade 2 thyroid uptake were clinically diagnosed as having Graves' disease. None of the 94 patients with grade 0 on TcGS had evidence of hyperthyroidism, although four patients had hypothyroidism. In the prospective group, all patients showed any visualization of the thyroid on TcGS (3 with grade 1, 7 with grade 2). The final diagnoses for these patients were Graves' disease in six, Hashimoto's thyroiditis in three and post-partum thyroiditis in one. ConclusionThyroid visualization during TcGS appears to be correlated with thyroid disease with high RATU. Such a finding may also deserve further evaluation for additional irregularities in thyroid function.
/* create and initialize a new amd64_operand */ static struct amd64_operand *amd64_operand_new(type_bits ts) { struct amd64_operand *o; static int age; o = safe_malloc(sizeof(struct amd64_operand)); o->reg = PSEUDO_REG_NONE; o->idx = PSEUDO_REG_NONE; o->scale = 1; o->ts = ts; o->age = age++; return o; }
<gh_stars>0 #pragma once #include <stdint.h> struct EFI_MEMORY_DESCRIPTOR { uint32_t type; void* physAddr; void* virtAddr; uint64_t numPages; uint64_t attribs; }; extern const char* EFI_MEMORY_TYPE_STRINGS[];
/* * Copyright 2019 GridGain Systems, Inc. and Contributors. * * Licensed under the GridGain Community Edition License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.gridgain.com/products/software/community-edition/gridgain-community-edition-license * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ignite.internal.mxbean; import javax.management.ObjectName; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.SqlConfiguration; import org.apache.ignite.internal.util.IgniteUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Test; /** * Tests the SqlQueryMXBeanImpl JMX properties */ public class SqlQueryMXBeanImplTest extends GridCommonAbstractTest { /** Create test and auto-start the grid */ public SqlQueryMXBeanImplTest() { super(true); } /** * {@inheritDoc} * * set the appropriate SQL Config attrs to test for. */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); cfg.setSqlConfiguration(new SqlConfiguration().setSqlGlobalMemoryQuota("20m").setSqlQueryMemoryQuota("10m"). setLongQueryWarningTimeout(30 * 1000L).setSqlOffloadingEnabled(true)); return cfg; } /** * tests that the JMX attributes are equal to that given in the config. */ @Test public void testSqlQueryMXBeanImplJMXAttrs() throws Exception { checkBean("SQL Query", "SqlQueryMXBeanImpl", "SqlQueryMemoryQuotaBytes", 10485760L); checkBean("SQL Query", "SqlQueryMXBeanImpl", "SqlGlobalMemoryQuotaBytes", 20971520L); checkBean("SQL Query", "SqlQueryMXBeanImpl", "SqlFreeMemoryBytes", 20971520L); checkBean("SQL Query", "SqlQueryMXBeanImpl", "SqlQueryMemoryQuota", "10m"); checkBean("SQL Query", "SqlQueryMXBeanImpl", "SqlGlobalMemoryQuota", "20m"); checkBean("SQL Query", "SqlQueryMXBeanImpl", "LongQueryWarningTimeout", 30000L); checkBean("SQL Query", "SqlQueryMXBeanImpl", "SqlOffloadingEnabled", true); } /** Checks that a bean with the specified group and name is available and has the expected attribute */ private void checkBean(String grp, String name, String attributeName, Object expAttributeVal) throws Exception { ObjectName mBeanName = IgniteUtils.makeMBeanName(grid().name(), grp, name); Object attributeVal = grid().configuration().getMBeanServer().getAttribute(mBeanName, attributeName); assertEquals(expAttributeVal, attributeVal); } }
// /src/image/image_aspect_ratio/materialicons/24px.svg import { createSvgIcon } from './createSvgIcon'; export const SvgImageAspectRatio = createSvgIcon( `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"> <path d="M0 0h24v24H0z" fill="none"/> <path d="M16 10h-2v2h2v-2zm0 4h-2v2h2v-2zm-8-4H6v2h2v-2zm4 0h-2v2h2v-2zm8-6H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V6h16v12z"/> </svg>` );
<reponame>MaggieONeill/salon import java.util.Arrays; import org.junit.*; import static org.junit.Assert.*; import org.junit.Rule; public class ClientTest{ @Rule public DatabaseRule database = new DatabaseRule(); @Test public void all_emptyAtFirst() { assertEquals(Client.all().size(), 0); } @Test public void all_returnsSavedObjects() { Client newClient = new Client("Megan", 1); newClient.save(); assertEquals(Client.all().size(), 1); } @Test public void getName_returnsClients_nameMegan(){ Client newClient = new Client ("Megan", 1); assertEquals("Megan", newClient.getClientName()); } @Test public void getHairdressers_id_returnsCorrectId(){ Client newClient = new Client("Megan", 1); assertEquals(1, newClient.getHairdressersId()); } @Test public void save_addsClientToDatabase(){ Client newClient = new Client("Megan", 1); newClient.save(); assertEquals(true, Client.all().get(0).equals(newClient)); } @Test public void find_findsClientById(){ Client newClient = new Client("Megan", 1); newClient.save(); Client savedClient = Client.find(newClient.getId()); assertEquals(savedClient, newClient); } // @Test // public void equals_overrideIfClientInformationIsDuplicated_true() { // Client newClient = new Client("Megan", 1); // Client oldClient = new Client("Megan", 1); // assertTrue(newClient.equals(oldClient)); // } // // @Test // public void getNameReturnsName(){ // Client client = new Client("Megan", 1); // assertEquals("Megan", client.getClientName()); // } }
/* * Fast Positive Tables (libfpta), aka Позитивные Таблицы. * Copyright 2016-2022 <NAME> <<EMAIL>> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifdef _MSC_VER #define _USE_MATH_DEFINES #endif #include "fpta_test.h" #include "tools.hpp" #include <chrono> #include "../../externals/libfptu/src/erthink/erthink_u2a.h++" static const char testdb_name[] = TEST_DB_DIR "ut_smoke.fpta"; static const char testdb_name_lck[] = TEST_DB_DIR "ut_smoke.fpta" MDBX_LOCK_SUFFIX; static std::string random_string(unsigned len) { static std::string alphabet = "abcdefghijklmnopqrstuvwxyz0123456789"; std::string result; for (unsigned i = 0; i < len; ++i) result.push_back(alphabet[rand() % alphabet.length()]); return result; } TEST(SmokeIndex, Primary) { /* Smoke-проверка жизнеспособности первичных индексов. * * Сценарий: * 1. Создаем базу с одной таблицей, в которой три колонки * и один (primary) индекс. * 2. Добавляем данные: * - добавляем "первую" запись, одновременно пытаясь * добавить в строку-кортеж поля с "плохими" значениями. * - добавляем "вторую" запись, которая отличается от первой * всеми колонками. * - также попутно пытаемся обновить несуществующие записи * и вставить дубликаты. * 3. Читаем добавленное: * - открываем курсор по основному индексу, без фильтра, * на всю таблицу (весь диапазон строк), * и проверяем кол-во записей и дубликатов. * - переходим к последней, читаем и проверяем её (должна быть * "вторая"). * - переходим к первой, читаем и проверяем её (должна быть "первая"). * 4. Удаляем данные: * - сначала "вторую" запись, потом "первую". * - проверяем кол-во записей и дубликатов, eof для курсора. * 5. Завершаем операции и освобождаем ресурсы. */ if (GTEST_IS_EXECUTION_TIMEOUT()) return; if (REMOVE_FILE(testdb_name) != 0) { ASSERT_EQ(ENOENT, errno); } if (REMOVE_FILE(testdb_name_lck) != 0) { ASSERT_EQ(ENOENT, errno); } // открываем/создаем базульку в 1 мегабайт fpta_db *db = nullptr; ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_weak, fpta_regime_default, 1, true, &db)); ASSERT_NE(nullptr, db); // описываем простейшую таблицу с тремя колонками и одним PK fpta_column_set def; fpta_column_set_init(&def); EXPECT_EQ(FPTA_OK, fpta_column_describe("pk_str_uniq", fptu_cstr, fpta_primary_unique_ordered_obverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe("a_uint", fptu_uint64, fpta_index_none, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe("b_fp", fptu_fp64, fpta_index_none, &def)); EXPECT_EQ(FPTA_OK, fpta_column_set_validate(&def)); // запускам транзакцию и создаем таблицу с обозначенным набором колонок fpta_txn *txn = (fpta_txn *)&txn; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_schema, &txn)); ASSERT_NE(nullptr, txn); EXPECT_EQ(FPTA_OK, fpta_table_create(txn, "table_1", &def)); EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); txn = nullptr; // разрушаем описание таблицы EXPECT_EQ(FPTA_OK, fpta_column_set_destroy(&def)); EXPECT_NE(FPTA_OK, fpta_column_set_validate(&def)); // инициализируем идентификаторы таблицы и её колонок fpta_name table, col_pk, col_a, col_b; EXPECT_EQ(FPTA_OK, fpta_table_init(&table, "table_1")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &col_pk, "pk_str_uniq")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &col_a, "a_uint")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &col_b, "b_fp")); // начинаем транзакцию для вставки данных EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_write, &txn)); ASSERT_NE(nullptr, txn); // ради теста делаем привязку вручную EXPECT_EQ(FPTA_OK, fpta_name_refresh_couple(txn, &table, &col_pk)); EXPECT_EQ(FPTA_OK, fpta_name_refresh(txn, &col_a)); EXPECT_EQ(FPTA_OK, fpta_name_refresh(txn, &col_b)); // проверяем информацию о таблице (сейчас таблица пуста) size_t row_count; fpta_table_stat stat; memset(&row_count, 42, sizeof(row_count)); memset(&stat, 42, sizeof(stat)); EXPECT_EQ(FPTA_OK, fpta_table_info(txn, &table, &row_count, &stat)); EXPECT_EQ(0u, row_count); EXPECT_EQ(row_count, stat.row_count); EXPECT_EQ(0u, stat.btree_depth); EXPECT_EQ(0u, stat.large_pages); EXPECT_EQ(0u, stat.branch_pages); EXPECT_EQ(0u, stat.leaf_pages); EXPECT_EQ(0u, stat.total_bytes); // создаем кортеж, который станет первой записью в таблице fptu_rw *pt1 = fptu_alloc(3, 42); ASSERT_NE(nullptr, pt1); ASSERT_STREQ(nullptr, fptu::check(pt1)); // ради проверки пытаемся сделать нехорошее (добавить поля с нарушениями) EXPECT_EQ(FPTA_ETYPE, fpta_upsert_column(pt1, &col_pk, fpta_value_uint(12))); EXPECT_EQ(FPTA_EVALUE, fpta_upsert_column(pt1, &col_a, fpta_value_sint(-34))); EXPECT_EQ(FPTA_ETYPE, fpta_upsert_column(pt1, &col_b, fpta_value_cstr("string"))); // добавляем нормальные значения EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt1, &col_pk, fpta_value_cstr("pk-string"))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt1, &col_a, fpta_value_sint(34))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt1, &col_b, fpta_value_float(56.78))); ASSERT_STREQ(nullptr, fptu::check(pt1)); // создаем еще один кортеж для второй записи fptu_rw *pt2 = fptu_alloc(3, 42); ASSERT_NE(nullptr, pt2); ASSERT_STREQ(nullptr, fptu::check(pt2)); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt2, &col_pk, fpta_value_cstr("zzz"))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt2, &col_a, fpta_value_sint(90))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt2, &col_b, fpta_value_float(12.34))); ASSERT_STREQ(nullptr, fptu::check(pt2)); // пытаемся обновить несуществующую запись EXPECT_EQ(FPTA_NOTFOUND, fpta_update_row(txn, &table, fptu_take_noshrink(pt1))); // вставляем и обновляем EXPECT_EQ(FPTA_OK, fpta_insert_row(txn, &table, fptu_take_noshrink(pt1))); EXPECT_EQ(FPTA_OK, fpta_upsert_row(txn, &table, fptu_take_noshrink(pt1))); EXPECT_EQ(FPTA_OK, fpta_update_row(txn, &table, fptu_take_noshrink(pt1))); EXPECT_EQ(FPTA_KEYEXIST, fpta_insert_row(txn, &table, fptu_take_noshrink(pt1))); // аналогично со второй записью EXPECT_EQ(FPTA_NOTFOUND, fpta_update_row(txn, &table, fptu_take_noshrink(pt2))); EXPECT_EQ(FPTA_OK, fpta_insert_row(txn, &table, fptu_take_noshrink(pt2))); EXPECT_EQ(FPTA_OK, fpta_upsert_row(txn, &table, fptu_take_noshrink(pt2))); EXPECT_EQ(FPTA_OK, fpta_update_row(txn, &table, fptu_take_noshrink(pt2))); EXPECT_EQ(FPTA_KEYEXIST, fpta_insert_row(txn, &table, fptu_take_noshrink(pt2))); // фиксируем изменения EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); // и начинаем следующую транзакцию EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_write, &txn)); ASSERT_NE(nullptr, txn); // открываем простейщий курсор: на всю таблицу, без фильтра fpta_cursor *cursor; EXPECT_EQ(FPTA_OK, fpta_cursor_open(txn, &col_pk, fpta_value_begin(), fpta_value_end(), nullptr, fpta_unsorted_dont_fetch, &cursor)); ASSERT_NE(nullptr, cursor); // узнам сколько записей за курсором (в таблице), // попутно проверяем fpta_cursor_count() с лимитами. size_t count; ASSERT_EQ(FPTA_OK, fpta_cursor_count(cursor, &count, 0)); EXPECT_EQ(0u, count); ASSERT_EQ(FPTA_OK, fpta_cursor_count(cursor, &count, 1)); EXPECT_EQ(1u, count); ASSERT_EQ(FPTA_OK, fpta_cursor_count(cursor, &count, 2)); EXPECT_EQ(2u, count); EXPECT_EQ(FPTA_OK, fpta_cursor_count(cursor, &count, INT_MAX)); EXPECT_EQ(2u, count); // снова проверяем информацию о таблице (сейчас в таблице две строки) memset(&row_count, 42, sizeof(row_count)); memset(&stat, 42, sizeof(stat)); EXPECT_EQ(FPTA_OK, fpta_table_info(txn, &table, &row_count, &stat)); EXPECT_EQ(2u, row_count); EXPECT_EQ(row_count, stat.row_count); EXPECT_EQ(1u, stat.btree_depth); EXPECT_EQ(0u, stat.large_pages); EXPECT_EQ(0u, stat.branch_pages); EXPECT_EQ(1u, stat.leaf_pages); EXPECT_LE(512u, stat.total_bytes); // переходим к последней записи EXPECT_EQ(FPTA_OK, fpta_cursor_move(cursor, fpta_last)); // ради проверки убеждаемся что за курсором есть данные EXPECT_EQ(FPTA_OK, fpta_cursor_eof(cursor)); // считаем повторы, их не должно быть size_t dups; EXPECT_EQ(FPTA_OK, fpta_cursor_dups(cursor, &dups)); EXPECT_EQ(1u, dups); // получаем текущую строку, она должна совпадать со вторым кортежем fptu_ro row2; EXPECT_EQ(FPTA_OK, fpta_cursor_get(cursor, &row2)); ASSERT_STREQ(nullptr, fptu::check(row2)); EXPECT_EQ(fptu_eq, fptu_cmp_tuples(fptu_take_noshrink(pt2), row2)); // позиционируем курсор на конкретное значение ключевого поля fpta_value pk = fpta_value_cstr("pk-string"); EXPECT_EQ(FPTA_OK, fpta_cursor_locate(cursor, true, &pk, nullptr)); EXPECT_EQ(FPTA_OK, fpta_cursor_eof(cursor)); // ради проверки считаем повторы EXPECT_EQ(FPTA_OK, fpta_cursor_dups(cursor, &dups)); EXPECT_EQ(1u, dups); // получаем текущую строку, она должна совпадать с первым кортежем fptu_ro row1; EXPECT_EQ(FPTA_OK, fpta_cursor_get(cursor, &row1)); ASSERT_STREQ(nullptr, fptu::check(row1)); EXPECT_EQ(fptu_eq, fptu_cmp_tuples(fptu_take_noshrink(pt1), row1)); // разрушаем созданные кортежи // на всякий случай предварительно проверяя их ASSERT_STREQ(nullptr, fptu::check(pt1)); free(pt1); pt1 = nullptr; ASSERT_STREQ(nullptr, fptu::check(pt2)); free(pt2); pt2 = nullptr; // удяляем текущую запись через курсор EXPECT_EQ(FPTA_OK, fpta_cursor_delete(cursor)); // считаем сколько записей теперь, должа быть одна EXPECT_EQ(FPTA_OK, fpta_cursor_dups(cursor, &dups)); EXPECT_EQ(1u, dups); // ради теста проверям что данные есть EXPECT_EQ(FPTA_OK, fpta_cursor_eof(cursor)); EXPECT_EQ(FPTA_OK, fpta_cursor_count(cursor, &count, INT_MAX)); EXPECT_EQ(1u, count); // переходим к первой записи EXPECT_EQ(FPTA_OK, fpta_cursor_move(cursor, fpta_first)); // еще раз удаляем запись EXPECT_EQ(FPTA_OK, fpta_cursor_delete(cursor)); // теперь должно быть пусто EXPECT_EQ(FPTA_NODATA, fpta_cursor_dups(cursor, &dups)); EXPECT_EQ(0u, dups); // ради теста проверям что данных больше нет EXPECT_EQ(FPTA_NODATA, fpta_cursor_eof(cursor)); EXPECT_EQ(FPTA_OK, fpta_cursor_count(cursor, &count, INT_MAX)); EXPECT_EQ(0u, count); // закрываем курсор и завершаем транзакцию EXPECT_EQ(FPTA_OK, fpta_cursor_close(cursor)); EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); txn = nullptr; // разрушаем привязанные идентификаторы fpta_name_destroy(&table); fpta_name_destroy(&col_pk); fpta_name_destroy(&col_a); fpta_name_destroy(&col_b); // закрываем базульку EXPECT_EQ(FPTA_SUCCESS, fpta_db_close(db)); ASSERT_TRUE(REMOVE_FILE(testdb_name) == 0); ASSERT_TRUE(REMOVE_FILE(testdb_name_lck) == 0); } TEST(SmokeIndex, Secondary) { /* Smoke-проверка жизнеспособности вторичных индексов. * * Сценарий: * 1. Создаем базу с одной таблицей, в которой три колонки, * и два индекса (primary и secondary). * 2. Добавляем данные: * - добавляем "первую" запись, одновременно пытаясь * добавить в строку-кортеж поля с "плохими" значениями. * - добавляем "вторую" запись, которая отличается от первой * всеми колонками. * - также попутно пытаемся обновить несуществующие записи * и вставить дубликаты. * 3. Читаем добавленное: * - открываем курсор по вторичному индексу, без фильтра, * на всю таблицу (весь диапазон строк), * и проверяем кол-во записей и дубликатов. * - переходим к последней, читаем и проверяем её (должна быть * "вторая"). * - переходим к первой, читаем и проверяем её (должна быть "первая"). * 4. Удаляем данные: * - сначала "вторую" запись, потом "первую". * - проверяем кол-во записей и дубликатов, eof для курсора. * 5. Завершаем операции и освобождаем ресурсы. */ if (GTEST_IS_EXECUTION_TIMEOUT()) return; if (REMOVE_FILE(testdb_name) != 0) { ASSERT_EQ(ENOENT, errno); } if (REMOVE_FILE(testdb_name_lck) != 0) { ASSERT_EQ(ENOENT, errno); } // открываем/создаем базульку в 1 мегабайт fpta_db *db = nullptr; ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_weak, fpta_regime4testing, 1, true, &db)); ASSERT_NE(nullptr, db); // описываем простейшую таблицу с тремя колонками, // одним Primary и одним Secondary fpta_column_set def; fpta_column_set_init(&def); EXPECT_EQ(FPTA_OK, fpta_column_describe("pk_str_uniq", fptu_cstr, fpta_primary_unique_ordered_obverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe( "a_uint", fptu_uint64, fpta_secondary_withdups_ordered_obverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe("b_fp", fptu_fp64, fpta_index_none, &def)); EXPECT_EQ(FPTA_OK, fpta_column_set_validate(&def)); // запускам транзакцию и создаем таблицу с обозначенным набором колонок fpta_txn *txn = (fpta_txn *)&txn; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_schema, &txn)); ASSERT_NE(nullptr, txn); EXPECT_EQ(FPTA_OK, fpta_table_create(txn, "table_1", &def)); EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); txn = nullptr; // разрушаем описание таблицы EXPECT_EQ(FPTA_OK, fpta_column_set_destroy(&def)); EXPECT_NE(FPTA_OK, fpta_column_set_validate(&def)); // инициализируем идентификаторы таблицы и её колонок fpta_name table, col_pk, col_a, col_b; EXPECT_EQ(FPTA_OK, fpta_table_init(&table, "table_1")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &col_pk, "pk_str_uniq")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &col_a, "a_uint")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &col_b, "b_fp")); // начинаем транзакцию для вставки данных EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_write, &txn)); ASSERT_NE(nullptr, txn); // ради теста делаем привязку вручную EXPECT_EQ(FPTA_OK, fpta_name_refresh_couple(txn, &table, &col_pk)); EXPECT_EQ(FPTA_OK, fpta_name_refresh(txn, &col_a)); EXPECT_EQ(FPTA_OK, fpta_name_refresh(txn, &col_b)); // создаем кортеж, который станет первой записью в таблице fptu_rw *pt1 = fptu_alloc(3, 42); ASSERT_NE(nullptr, pt1); ASSERT_STREQ(nullptr, fptu::check(pt1)); // ради проверки пытаемся сделать нехорошее (добавить поля с нарушениями) EXPECT_EQ(FPTA_ETYPE, fpta_upsert_column(pt1, &col_pk, fpta_value_uint(12))); EXPECT_EQ(FPTA_EVALUE, fpta_upsert_column(pt1, &col_a, fpta_value_sint(-34))); EXPECT_EQ(FPTA_ETYPE, fpta_upsert_column(pt1, &col_b, fpta_value_cstr("string"))); // добавляем нормальные значения EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt1, &col_pk, fpta_value_cstr("pk-string"))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt1, &col_a, fpta_value_sint(34))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt1, &col_b, fpta_value_float(56.78))); ASSERT_STREQ(nullptr, fptu::check(pt1)); // создаем еще один кортеж для второй записи fptu_rw *pt2 = fptu_alloc(3, 42); ASSERT_NE(nullptr, pt2); ASSERT_STREQ(nullptr, fptu::check(pt2)); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt2, &col_pk, fpta_value_cstr("zzz"))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt2, &col_a, fpta_value_sint(90))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt2, &col_b, fpta_value_float(12.34))); ASSERT_STREQ(nullptr, fptu::check(pt2)); // пытаемся обновить несуществующую запись EXPECT_EQ(FPTA_NOTFOUND, fpta_update_row(txn, &table, fptu_take_noshrink(pt1))); // вставляем и обновляем EXPECT_EQ(FPTA_OK, fpta_insert_row(txn, &table, fptu_take_noshrink(pt1))); EXPECT_EQ(FPTA_OK, fpta_upsert_row(txn, &table, fptu_take_noshrink(pt1))); EXPECT_EQ(FPTA_OK, fpta_update_row(txn, &table, fptu_take_noshrink(pt1))); EXPECT_EQ(FPTA_KEYEXIST, fpta_insert_row(txn, &table, fptu_take_noshrink(pt1))); // аналогично со второй записью EXPECT_EQ(FPTA_NOTFOUND, fpta_update_row(txn, &table, fptu_take_noshrink(pt2))); EXPECT_EQ(FPTA_OK, fpta_insert_row(txn, &table, fptu_take_noshrink(pt2))); EXPECT_EQ(FPTA_OK, fpta_upsert_row(txn, &table, fptu_take_noshrink(pt2))); EXPECT_EQ(FPTA_OK, fpta_update_row(txn, &table, fptu_take_noshrink(pt2))); EXPECT_EQ(FPTA_KEYEXIST, fpta_insert_row(txn, &table, fptu_take_noshrink(pt2))); // фиксируем изменения EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); // и начинаем следующую транзакцию EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_write, &txn)); ASSERT_NE(nullptr, txn); // открываем простейщий курсор: на всю таблицу, без фильтра fpta_cursor *cursor; EXPECT_EQ(FPTA_OK, fpta_cursor_open(txn, &col_a, fpta_value_begin(), fpta_value_end(), nullptr, fpta_unsorted_dont_fetch, &cursor)); ASSERT_NE(nullptr, cursor); // узнам сколько записей за курсором (в таблице). size_t count; EXPECT_EQ(FPTA_OK, fpta_cursor_count(cursor, &count, INT_MAX)); EXPECT_EQ(2u, count); // переходим к первой записи EXPECT_EQ(FPTA_OK, fpta_cursor_move(cursor, fpta_first)); // ради проверки убеждаемся что за курсором есть данные EXPECT_EQ(FPTA_OK, fpta_cursor_eof(cursor)); // считаем повторы, их не должно быть size_t dups; EXPECT_EQ(FPTA_OK, fpta_cursor_dups(cursor, &dups)); ASSERT_EQ(1u, dups); // переходим к последней записи EXPECT_EQ(FPTA_OK, fpta_cursor_move(cursor, fpta_last)); // ради проверки убеждаемся что за курсором есть данные EXPECT_EQ(FPTA_OK, fpta_cursor_eof(cursor)); // получаем текущую строку, она должна совпадать со вторым кортежем fptu_ro row2; EXPECT_EQ(FPTA_OK, fpta_cursor_get(cursor, &row2)); ASSERT_STREQ(nullptr, fptu::check(row2)); EXPECT_EQ(fptu_eq, fptu_cmp_tuples(fptu_take_noshrink(pt2), row2)); // считаем повторы, их не должно быть EXPECT_EQ(FPTA_OK, fpta_cursor_dups(cursor, &dups)); ASSERT_EQ(1u, dups); // позиционируем курсор на конкретное значение ключевого поля fpta_value pk = fpta_value_uint(34); EXPECT_EQ(FPTA_OK, fpta_cursor_locate(cursor, true, &pk, nullptr)); EXPECT_EQ(FPTA_OK, fpta_cursor_eof(cursor)); // ради проверки считаем повторы EXPECT_EQ(FPTA_OK, fpta_cursor_dups(cursor, &dups)); EXPECT_EQ(1u, dups); // получаем текущую строку, она должна совпадать с первым кортежем fptu_ro row1; EXPECT_EQ(FPTA_OK, fpta_cursor_get(cursor, &row1)); ASSERT_STREQ(nullptr, fptu::check(row1)); EXPECT_EQ(fptu_eq, fptu_cmp_tuples(fptu_take_noshrink(pt1), row1)); // разрушаем созданные кортежи // на всякий случай предварительно проверяя их ASSERT_STREQ(nullptr, fptu::check(pt1)); free(pt1); pt1 = nullptr; ASSERT_STREQ(nullptr, fptu::check(pt2)); free(pt2); pt2 = nullptr; // удяляем текущую запись через курсор EXPECT_EQ(FPTA_OK, fpta_cursor_delete(cursor)); // считаем сколько записей теперь, должа быть одна EXPECT_EQ(FPTA_OK, fpta_cursor_dups(cursor, &dups)); EXPECT_EQ(1u, dups); // ради теста проверям что данные есть EXPECT_EQ(FPTA_OK, fpta_cursor_eof(cursor)); EXPECT_EQ(FPTA_OK, fpta_cursor_count(cursor, &count, INT_MAX)); EXPECT_EQ(1u, count); // переходим к первой записи EXPECT_EQ(FPTA_OK, fpta_cursor_move(cursor, fpta_first)); // еще раз удаляем запись EXPECT_EQ(FPTA_OK, fpta_cursor_delete(cursor)); // теперь должно быть пусто EXPECT_EQ(FPTA_NODATA, fpta_cursor_dups(cursor, &dups)); EXPECT_EQ(0u, dups); // ради теста проверям что данных больше нет EXPECT_EQ(FPTA_NODATA, fpta_cursor_eof(cursor)); EXPECT_EQ(FPTA_OK, fpta_cursor_count(cursor, &count, INT_MAX)); EXPECT_EQ(0u, count); // закрываем курсор и завершаем транзакцию EXPECT_EQ(FPTA_OK, fpta_cursor_close(cursor)); EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); txn = nullptr; // разрушаем привязанные идентификаторы fpta_name_destroy(&table); fpta_name_destroy(&col_pk); fpta_name_destroy(&col_a); fpta_name_destroy(&col_b); // закрываем базульку EXPECT_EQ(FPTA_SUCCESS, fpta_db_close(db)); ASSERT_TRUE(REMOVE_FILE(testdb_name) == 0); ASSERT_TRUE(REMOVE_FILE(testdb_name_lck) == 0); } //---------------------------------------------------------------------------- #include "keygen.hpp" #include <map> #include <memory> #include <set> #include <string> #include <vector> static int mapdup_order2key(int order, int NNN) { int quart = NNN / 4; int offset = 0; int shift = 0; while (order >= quart) { offset += quart >> shift++; order -= quart; } return (order >> shift) + offset; } int mapdup_order2count(int order, int NNN) { int value = mapdup_order2key(order, NNN); int count = 1; for (int n = order; n < NNN; ++n) if (n != order && value == mapdup_order2key(n, NNN)) count++; return count; } TEST(Smoke, mapdup_order2key) { std::map<int, int> checker; const int NNN = 32; for (int order = 0; order < 32; ++order) { int dup = mapdup_order2key(order, NNN); checker[dup] += 1; } EXPECT_EQ(1, checker[0]); EXPECT_EQ(1, checker[1]); EXPECT_EQ(1, checker[2]); EXPECT_EQ(1, checker[3]); EXPECT_EQ(1, checker[4]); EXPECT_EQ(1, checker[5]); EXPECT_EQ(1, checker[6]); EXPECT_EQ(1, checker[7]); EXPECT_EQ(2, checker[8]); EXPECT_EQ(2, checker[9]); EXPECT_EQ(2, checker[10]); EXPECT_EQ(2, checker[11]); EXPECT_EQ(4, checker[12]); EXPECT_EQ(4, checker[13]); EXPECT_EQ(8, checker[14]); EXPECT_EQ(15u, checker.size()); } /* используем для контроля отдельную структуру, чтобы при проблемах/ошибках * явно видеть значения в отладчике. */ struct crud_item { unsigned pk_uint; double se_real; fptu_time time; std::string se_str; crud_item(unsigned pk, const char *str, double real, fptu_time datetime) { pk_uint = pk; se_real = real; time = datetime; se_str.assign(str, strlen(str)); } struct less_pk { bool operator()(const crud_item *left, const crud_item *right) const { return left->pk_uint < right->pk_uint; } }; struct less_str { bool operator()(const crud_item *left, const crud_item *right) const { return left->se_str < right->se_str; } }; struct less_real { bool operator()(const crud_item *left, const crud_item *right) const { return left->se_real < right->se_real; } }; }; class SmokeCRUD : public ::testing::Test { public: bool skipped; scoped_db_guard db_quard; scoped_txn_guard txn_guard; scoped_cursor_guard cursor_guard; fpta_name table, col_uint, col_time, col_str, col_real; // для проверки набора строк и их порядка std::vector<std::unique_ptr<crud_item>> container; std::set<crud_item *, crud_item::less_pk> checker_pk_uint; std::set<crud_item *, crud_item::less_str> checker_str; std::set<crud_item *, crud_item::less_real> checker_real; int ndeleted; void Check(fpta_cursor *cursor) { int move_result = fpta_cursor_move(cursor, fpta_first); if (container.size() - ndeleted == 0) EXPECT_EQ(FPTA_NODATA, move_result); else { EXPECT_EQ(FPTA_OK, move_result); unsigned count = 0; do { ASSERT_EQ(FPTA_OK, fpta_cursor_eof(cursor)); fptu_ro row; ASSERT_EQ(FPTA_OK, fpta_cursor_get(cursor, &row)); SCOPED_TRACE("row #" + std::to_string(count) + ", " + std::to_string(row)); unsigned row_present = 0; for (const auto &item : container) { if (!item) /* пропускаем удаленные строки */ continue; fpta_value value; ASSERT_EQ(FPTA_OK, fpta_get_column(row, &col_uint, &value)); if (item->pk_uint == value.uint) { row_present++; ASSERT_EQ(FPTA_OK, fpta_get_column(row, &col_str, &value)); EXPECT_STREQ(item->se_str.c_str(), value.str); ASSERT_EQ(FPTA_OK, fpta_get_column(row, &col_real, &value)); EXPECT_EQ(item->se_real, value.fp); ASSERT_EQ(FPTA_OK, fpta_get_column(row, &col_time, &value)); EXPECT_EQ(item->time.fixedpoint, value.datetime.fixedpoint); } } ASSERT_EQ(1u, row_present); count++; move_result = fpta_cursor_move(cursor, fpta_next); ASSERT_TRUE(move_result == FPTA_OK || move_result == FPTA_NODATA); } while (move_result == FPTA_OK); EXPECT_EQ(container.size() - ndeleted, count); } } void Check() { ASSERT_TRUE(txn_guard.operator bool()); /* проверяем по PK */ { SCOPED_TRACE("check: pk/uint"); // открываем курсор по col_uint: на всю таблицу, без фильтра scoped_cursor_guard guard; fpta_cursor *cursor; EXPECT_EQ(FPTA_OK, fpta_cursor_open(txn_guard.get(), &col_uint, fpta_value_begin(), fpta_value_end(), nullptr, fpta_unsorted_dont_fetch, &cursor)); ASSERT_NE(nullptr, cursor); guard.reset(cursor); ASSERT_NO_FATAL_FAILURE(Check(cursor)); } /* проверяем по вторичному индексу колонки 'str' */ { SCOPED_TRACE("check: se/str"); // открываем курсор по col_str: на всю таблицу, без фильтра scoped_cursor_guard guard; fpta_cursor *cursor; EXPECT_EQ(FPTA_OK, fpta_cursor_open(txn_guard.get(), &col_str, fpta_value_begin(), fpta_value_end(), nullptr, fpta_unsorted_dont_fetch, &cursor)); ASSERT_NE(nullptr, cursor); guard.reset(cursor); ASSERT_NO_FATAL_FAILURE(Check(cursor)); } /* проверяем по вторичному индексу колонки 'real' */ { SCOPED_TRACE("check: se/real"); // открываем курсор по col_real: на всю таблицу, без фильтра scoped_cursor_guard guard; fpta_cursor *cursor; EXPECT_EQ(FPTA_OK, fpta_cursor_open(txn_guard.get(), &col_real, fpta_value_begin(), fpta_value_end(), nullptr, fpta_unsorted_dont_fetch, &cursor)); ASSERT_NE(nullptr, cursor); guard.reset(cursor); ASSERT_NO_FATAL_FAILURE(Check(cursor)); } } virtual void SetUp() { SCOPED_TRACE("setup"); skipped = GTEST_IS_EXECUTION_TIMEOUT(); if (skipped) return; // инициализируем идентификаторы таблицы и её колонок EXPECT_EQ(FPTA_OK, fpta_table_init(&table, "table_crud")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &col_uint, "uint")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &col_time, "time")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &col_str, "str")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &col_real, "real")); // чистим if (REMOVE_FILE(testdb_name) != 0) { ASSERT_EQ(ENOENT, errno); } if (REMOVE_FILE(testdb_name_lck) != 0) { ASSERT_EQ(ENOENT, errno); } ndeleted = 0; // открываем/создаем базульку в 1 мегабайт fpta_db *db = nullptr; ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_weak, fpta_regime_default, 1, true, &db)); ASSERT_NE(nullptr, db); db_quard.reset(db); // описываем структуру таблицы fpta_column_set def; fpta_column_set_init(&def); EXPECT_EQ(FPTA_OK, fpta_column_describe("time", fptu_datetime, fpta_noindex_nullable, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe("uint", fptu_uint32, fpta_primary_unique_ordered_obverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe( "str", fptu_cstr, fpta_secondary_unique_ordered_reverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe("real", fptu_fp64, fpta_secondary_withdups_unordered, &def)); EXPECT_EQ(FPTA_OK, fpta_column_set_validate(&def)); // запускам транзакцию и создаем таблицу fpta_txn *txn = nullptr; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_schema, &txn)); ASSERT_NE(nullptr, txn); txn_guard.reset(txn); ASSERT_EQ(FPTA_OK, fpta_table_create(txn, "table_crud", &def)); ASSERT_EQ(FPTA_OK, fpta_transaction_end(txn_guard.release(), false)); txn = nullptr; // разрушаем описание таблицы EXPECT_EQ(FPTA_OK, fpta_column_set_destroy(&def)); EXPECT_NE(FPTA_OK, fpta_column_set_validate(&def)); } virtual void TearDown() { if (skipped) return; SCOPED_TRACE("teardown"); // разрушаем привязанные идентификаторы fpta_name_destroy(&table); fpta_name_destroy(&col_uint); fpta_name_destroy(&col_time); fpta_name_destroy(&col_str); fpta_name_destroy(&col_real); // закрываем курсор и завершаем транзакцию if (cursor_guard) { EXPECT_EQ(FPTA_OK, fpta_cursor_close(cursor_guard.release())); } if (txn_guard) { ASSERT_EQ(FPTA_OK, fpta_transaction_end(txn_guard.release(), true)); } if (db_quard) { // закрываем и удаляем базу ASSERT_EQ(FPTA_SUCCESS, fpta_db_close(db_quard.release())); ASSERT_TRUE(REMOVE_FILE(testdb_name) == 0); ASSERT_TRUE(REMOVE_FILE(testdb_name_lck) == 0); } } static unsigned mesh_order4uint(int n, int NNN) { return (37 * (unsigned)n) % NNN; } static int mesh_order4str(int n, int NNN) { return (int)((67 * (unsigned)n + 17) % NNN); } static int mesh_order4real(int n, int NNN) { return (int)((97 * (unsigned)n + 43) % NNN); } static unsigned mesh_order4update(int n, int NNN) { return (11 * (unsigned)n + 23) % NNN; } static unsigned mesh_order4delete(int n, int NNN) { return (5 * (unsigned)n + 13) % NNN; } }; TEST_F(SmokeCRUD, none) { /* Smoke-проверка CRUD операций с участием индексов. * * Сценарий: * Заполняем таблицу и затем обновляем и удаляем часть строк, * как без курсора, так и открывая курсор для каждого из * проиндексированных полей. * * 1. Создаем базу с одной таблицей, в которой: * - четыре колонки и три индекса. * - первичный индекс, для возможности secondary он должен быть * с контролем уникальности. * - два secondary, из которых один с контролем уникальности, * второй неупорядоченный и "с дубликатами". * 2. Добавляем данные: * - последующие шаги требуют не менее 32 строк; * - для колонки с дубликатами реализуем карту: 8x1 (8 уникальных), * 4x2 (4 парных дубля), 2x4 (два значения по 4 раза), * 1x8 (одно значение 8 раз), это делает mapdup_order2key(); * 3. Обновляем строки: * - без курсора и без изменения PK: перебираем все комбинации * сохранения/изменения каждой колонки = 7 комбинаций из 3 колонок; * - через курсор по каждому индексу: перебираем все комбинации * сохранения/изменения каждой колонки = 7 комбинаций из 3 колонок * для каждого из трех индексов; * - попутно пробуем сделать обновление с нарушением уникальности. * = итого: обновляем 28 строк. * 4. Удаляем строки: * - одну без использования курсора; * - по одной через курсор по каждому индексу; * - делаем это как для обновленных строк, так и для нетронутых. * - попутно пробуем удалить несуществующие строки. * - попутно пробуем удалить через fpta_delete() строки * с существующим PK, но различиями в других колонках. * = итого: удаляем 8 строк, из которых 4 не были обновлены. * 5. Проверяем содержимое таблицы и состояние индексов: * - читаем без курсора, fpta_get() для каждого индекса с контролем * уникальности = 3 строки; * - через курсор по каждому индексу ходим по трём строкам (первая, * последняя, туда-сюда), при этом читаем и сверяем значения. * 6. Завершаем операции и освобождаем ресурсы. */ if (skipped) return; // начинаем транзакцию для вставки данных fpta_txn *txn = nullptr; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db_quard.get(), fpta_write, &txn)); ASSERT_NE(nullptr, txn); txn_guard.reset(txn); // связываем идентификаторы с ранее созданной схемой ASSERT_EQ(FPTA_OK, fpta_name_refresh(txn, &table)); ASSERT_EQ(FPTA_OK, fpta_name_refresh(txn, &col_uint)); ASSERT_EQ(FPTA_OK, fpta_name_refresh(txn, &col_time)); ASSERT_EQ(FPTA_OK, fpta_name_refresh(txn, &col_str)); ASSERT_EQ(FPTA_OK, fpta_name_refresh(txn, &col_real)); // инициализируем генератор значений для строковой колонки any_keygen keygen(fptu_cstr, fpta_name_colindex(&col_str)); // создаем кортеж, который будем использовать для заполнения таблицы fptu_rw *row = fptu_alloc(4, fpta_max_keylen * 2); ASSERT_NE(nullptr, row); ASSERT_STREQ(nullptr, fptu::check(row)); cxx11_constexpr_var int NNN = 42; /* создаем достаточно кол-во строк для последующих проверок */ { SCOPED_TRACE("fill"); for (int i = 0; i < NNN; ++i) { /* перемешиваем, так чтобы у полей был независимый порядок */ unsigned pk_uint_value = mesh_order4uint(i, NNN); int order_se_str = mesh_order4str(i, NNN); int order_se_real = mesh_order4real(i, NNN); double se_real_value = mapdup_order2key(order_se_real, NNN) / (double)NNN; SCOPED_TRACE( "add: row " + std::to_string(i) + " of [0.." + std::to_string(NNN) + "), orders: " + std::to_string(pk_uint_value) + " / " + std::to_string(order_se_str) + " / " + std::to_string(order_se_real) + " (" + std::to_string(se_real_value) + ")"); ASSERT_EQ(FPTU_OK, fptu_clear(row)); ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_uint, fpta_value_uint(pk_uint_value))); ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_real, fpta_value_float(se_real_value))); /* пытаемся обновить несуществующую строку */ EXPECT_EQ(FPTA_NOTFOUND, fpta_probe_and_update_row( txn, &table, fptu_take_noshrink(row))); /* пытаемся вставить неполноценную строку, в которой сейчас * не хватает одного из индексируемых полей, поэтому вместо * FPTA_NOTFOUND должно быть возвращено FPTA_COLUMN_MISSING */ EXPECT_EQ(FPTA_COLUMN_MISSING, fpta_probe_and_upsert_row( txn, &table, fptu_take_noshrink(row))); EXPECT_EQ(FPTA_COLUMN_MISSING, fpta_probe_and_insert_row( txn, &table, fptu_take_noshrink(row))); /* добавляем недостающее индексируемое поле */ ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_str, keygen.make(order_se_str, NNN))); /* теперь вставляем новую запись, но пока без поля `time`. * проверяем как insert, так и upsert. */ if (i & 1) { EXPECT_EQ(FPTA_OK, fpta_insert_row(txn, &table, fptu_take_noshrink(row))); } else { EXPECT_EQ(FPTA_OK, fpta_upsert_row(txn, &table, fptu_take_noshrink(row))); } /* пробуем вставить дубликат */ EXPECT_EQ(FPTA_KEYEXIST, fpta_probe_and_insert_row( txn, &table, fptu_take_noshrink(row))); /* добавляем поле `time` с нулевым значением и обновлем */ fptu_time datetime; datetime.fixedpoint = 0; ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_time, fpta_value_datetime(datetime))); EXPECT_EQ(FPTA_OK, fpta_update_row(txn, &table, fptu_take_noshrink(row))); /* обновляем поле `time`, проверяя как update, так и upsert. */ datetime = NOW_FINE(); ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_time, fpta_value_datetime(datetime))); if (i & 2) { EXPECT_EQ(FPTA_OK, fpta_probe_and_update_row(txn, &table, fptu_take_noshrink(row))); } else { EXPECT_EQ(FPTA_OK, fpta_probe_and_upsert_row(txn, &table, fptu_take_noshrink(row))); } /* еще раз пробуем вставить дубликат */ EXPECT_EQ(FPTA_KEYEXIST, fpta_probe_and_insert_row( txn, &table, fptu_take_noshrink(row))); /* обновляем PK и пробуем вставить дубликат по вторичным ключам */ ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_uint, fpta_value_uint(NNN))); EXPECT_EQ(FPTA_KEYEXIST, fpta_probe_and_insert_row( txn, &table, fptu_take_noshrink(row))); // добавляем аналог строки в проверочный набор fpta_value se_str_value; ASSERT_EQ(FPTA_OK, fpta_get_column(fptu_take_noshrink(row), &col_str, &se_str_value)); container.emplace_back(new crud_item(pk_uint_value, se_str_value.str, se_real_value, datetime)); checker_pk_uint.insert(container.back().get()); checker_str.insert(container.back().get()); checker_real.insert(container.back().get()); } } // фиксируем транзакцию и добавленные данные EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn_guard.release(), false)); txn = nullptr; //-------------------------------------------------------------------------- /* При добавлении строк значения полей были перемешаны (сгенерированы в * нелинейном порядке), поэтому из container их можно брать просто * последовательно. Однако, для параметризируемой стохастичности теста * порядок будет еще раз перемешан посредством mesh_order4update(). */ int nn = 0; // начинаем транзакцию для проверочных обновлений EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db_quard.get(), fpta_write, &txn)); ASSERT_NE(nullptr, txn); txn_guard.reset(txn); ASSERT_NO_FATAL_FAILURE(Check()); /* обновляем строки без курсора и без изменения PK */ { SCOPED_TRACE("update.without-cursor"); for (int m = 0; m < 8; ++m) { const auto n = mesh_order4update(nn++, NNN); SCOPED_TRACE("item " + std::to_string(n) + " of [0.." + std::to_string(NNN) + "), change-mask: " + std::to_string(m)); crud_item *item = container[n].get(); SCOPED_TRACE("row-src: pk " + std::to_string(item->pk_uint) + ", str \"" + item->se_str + "\", real " + std::to_string(item->se_real) + ", time " + std::to_string(item->time)); ASSERT_EQ(FPTU_OK, fptu_clear(row)); if (m & 1) item->se_str += "42"; if (m & 2) item->se_real += 42; if (m & 4) item->time.fixedpoint += 42; SCOPED_TRACE("row-dst: pk " + std::to_string(item->pk_uint) + ", str \"" + item->se_str + "\", real " + std::to_string(item->se_real) + ", time " + std::to_string(item->time)); ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_str, fpta_value_str(item->se_str))); ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_real, fpta_value_float(item->se_real))); ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_time, fpta_value_datetime(item->time))); /* пробуем обновить без одного поля */ EXPECT_EQ(FPTA_COLUMN_MISSING, fpta_probe_and_upsert_row( txn, &table, fptu_take_noshrink(row))); /* обновляем строку */ ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_uint, fpta_value_uint(item->pk_uint))); EXPECT_EQ(FPTA_OK, fpta_probe_and_upsert_row(txn, &table, fptu_take_noshrink(row))); ASSERT_NO_FATAL_FAILURE(Check()); } ASSERT_NO_FATAL_FAILURE(Check()); } /* обновляем строки через курсор по col_str. */ { SCOPED_TRACE("update.cursor-ordered_unique_reverse_str"); // открываем курсор по col_str: на всю таблицу, без фильтра fpta_cursor *cursor; EXPECT_EQ(FPTA_OK, fpta_cursor_open(txn, &col_str, fpta_value_begin(), fpta_value_end(), nullptr, fpta_unsorted_dont_fetch, &cursor)); ASSERT_NE(nullptr, cursor); cursor_guard.reset(cursor); for (int m = 0; m < 8; ++m) { const auto n = mesh_order4update(nn++, NNN); SCOPED_TRACE("item " + std::to_string(n) + " of [0.." + std::to_string(NNN) + "), change-mask: " + std::to_string(m)); crud_item *item = container[n].get(); SCOPED_TRACE("row-src: pk " + std::to_string(item->pk_uint) + ", str \"" + item->se_str + "\", real " + std::to_string(item->se_real) + ", time " + std::to_string(item->time)); fpta_value key = fpta_value_str(item->se_str); ASSERT_EQ(FPTA_OK, fpta_cursor_locate(cursor, true, &key, nullptr)); EXPECT_EQ(FPTA_OK, fpta_cursor_eof(cursor)); // ради проверки считаем повторы size_t dups; EXPECT_EQ(FPTA_OK, fpta_cursor_dups(cursor, &dups)); EXPECT_EQ(1u, dups); ASSERT_EQ(FPTU_OK, fptu_clear(row)); if (m & 1) item->pk_uint += NNN; if (m & 2) item->se_real += 42; if (m & 4) item->time.fixedpoint += 42; SCOPED_TRACE("row-dst: pk " + std::to_string(item->pk_uint) + ", str \"" + item->se_str + "\", real " + std::to_string(item->se_real) + ", time " + std::to_string(item->time)); ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_str, fpta_value_str(item->se_str))); ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_real, fpta_value_float(item->se_real))); ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_time, fpta_value_datetime(item->time))); /* пробуем обновить без одного поля */ EXPECT_EQ(FPTA_COLUMN_MISSING, fpta_cursor_probe_and_update(cursor, fptu_take_noshrink(row))); /* обновляем строку */ ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_uint, fpta_value_uint(item->pk_uint))); ASSERT_EQ(FPTA_OK, fpta_cursor_probe_and_update(cursor, fptu_take_noshrink(row))); ASSERT_NO_FATAL_FAILURE(Check()); } // закрываем курсор EXPECT_EQ(FPTA_OK, fpta_cursor_close(cursor_guard.release())); cursor = nullptr; ASSERT_NO_FATAL_FAILURE(Check()); } /* обновляем строки через курсор по col_real. */ { SCOPED_TRACE("update.cursor-se-unordered_withdups_real"); // открываем курсор по col_real: на всю таблицу, без фильтра fpta_cursor *cursor; EXPECT_EQ(FPTA_OK, fpta_cursor_open(txn, &col_real, fpta_value_begin(), fpta_value_end(), nullptr, fpta_unsorted_dont_fetch, &cursor)); ASSERT_NE(nullptr, cursor); cursor_guard.reset(cursor); for (int m = 0; m < 8; ++m) { const auto n = mesh_order4update(nn++, NNN); SCOPED_TRACE("item " + std::to_string(n) + " of [0.." + std::to_string(NNN) + "), change-mask: " + std::to_string(m)); crud_item *item = container[n].get(); SCOPED_TRACE("row-src: pk " + std::to_string(item->pk_uint) + ", str \"" + item->se_str + "\", real " + std::to_string(item->se_real) + ", time " + std::to_string(item->time)); // считаем сколько должно быть повторов int expected_dups = 0; for (auto const &scan : container) if (item->se_real == scan->se_real) expected_dups++; fpta_value key = fpta_value_float(item->se_real); if (expected_dups == 1) { ASSERT_EQ(FPTA_OK, fpta_cursor_locate(cursor, true, &key, nullptr)); } else { /* больше одного значения, точное позиционирование возможно * только по ключу не возможно, создаем фейковую строку с PK * и искомым значением для поиска */ ASSERT_EQ(FPTU_OK, fptu_clear(row)); ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_uint, fpta_value_uint(item->pk_uint))); ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_real, key)); fptu_ro row_value = fptu_take_noshrink(row); /* теперь поиск должен быть успешен */ ASSERT_EQ(FPTA_OK, fpta_cursor_locate(cursor, true, nullptr, &row_value)); } EXPECT_EQ(FPTA_OK, fpta_cursor_eof(cursor)); // проверяем кол-во повторов size_t dups; EXPECT_EQ(FPTA_OK, fpta_cursor_dups(cursor, &dups)); EXPECT_EQ(expected_dups, (int)dups); ASSERT_EQ(FPTU_OK, fptu_clear(row)); if (m & 1) item->pk_uint += NNN; if (m & 2) item->se_str += "42"; if (m & 4) item->time.fixedpoint += 42; SCOPED_TRACE("row-dst: pk " + std::to_string(item->pk_uint) + ", str \"" + item->se_str + "\", real " + std::to_string(item->se_real) + ", time " + std::to_string(item->time)); ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_uint, fpta_value_uint(item->pk_uint))); ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_real, fpta_value_float(item->se_real))); ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_time, fpta_value_datetime(item->time))); /* пробуем обновить без одного поля */ EXPECT_EQ(FPTA_COLUMN_MISSING, fpta_cursor_probe_and_update(cursor, fptu_take_noshrink(row))); /* обновляем строку */ ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_str, fpta_value_str(item->se_str))); ASSERT_EQ(FPTA_OK, fpta_cursor_probe_and_update(cursor, fptu_take_noshrink(row))); ASSERT_NO_FATAL_FAILURE(Check()); } // закрываем курсор EXPECT_EQ(FPTA_OK, fpta_cursor_close(cursor_guard.release())); cursor = nullptr; ASSERT_NO_FATAL_FAILURE(Check()); } /* обновляем строки через курсор по col_uint (PK). */ { SCOPED_TRACE("update.cursor-pk_uint"); // открываем курсор по col_uint: на всю таблицу, без фильтра fpta_cursor *cursor; EXPECT_EQ(FPTA_OK, fpta_cursor_open(txn, &col_uint, fpta_value_begin(), fpta_value_end(), nullptr, fpta_unsorted_dont_fetch, &cursor)); ASSERT_NE(nullptr, cursor); cursor_guard.reset(cursor); for (int m = 0; m < 8; ++m) { const auto n = mesh_order4update(nn++, NNN); SCOPED_TRACE("item " + std::to_string(n) + " of [0.." + std::to_string(NNN) + "), change-mask: " + std::to_string(m)); crud_item *item = container[n].get(); SCOPED_TRACE("row-src: pk " + std::to_string(item->pk_uint) + ", str \"" + item->se_str + "\", real " + std::to_string(item->se_real) + ", time " + std::to_string(item->time)); fpta_value key = fpta_value_uint(item->pk_uint); ASSERT_EQ(FPTA_OK, fpta_cursor_locate(cursor, true, &key, nullptr)); EXPECT_EQ(FPTA_OK, fpta_cursor_eof(cursor)); // ради проверки считаем повторы size_t dups; EXPECT_EQ(FPTA_OK, fpta_cursor_dups(cursor, &dups)); EXPECT_EQ(1u, dups); ASSERT_EQ(FPTU_OK, fptu_clear(row)); if (m & 1) item->se_str += "42"; if (m & 2) item->se_real += 42; if (m & 4) item->time.fixedpoint += 42; SCOPED_TRACE("row-dst: pk " + std::to_string(item->pk_uint) + ", str \"" + item->se_str + "\", real " + std::to_string(item->se_real) + ", time " + std::to_string(item->time)); ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_str, fpta_value_str(item->se_str))); ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_real, fpta_value_float(item->se_real))); ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_time, fpta_value_datetime(item->time))); /* пробуем обновить без одного поля */ EXPECT_EQ(FPTA_COLUMN_MISSING, fpta_cursor_probe_and_update(cursor, fptu_take_noshrink(row))); /* обновляем строку */ ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_uint, fpta_value_uint(item->pk_uint))); EXPECT_EQ(FPTA_OK, fpta_cursor_probe_and_update(cursor, fptu_take_noshrink(row))); ASSERT_NO_FATAL_FAILURE(Check()); } // закрываем курсор EXPECT_EQ(FPTA_OK, fpta_cursor_close(cursor_guard.release())); cursor = nullptr; ASSERT_NO_FATAL_FAILURE(Check()); } // фиксируем транзакцию и измененные данные EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn_guard.release(), false)); txn = nullptr; //-------------------------------------------------------------------------- /* При добавлении строк значения полей были перемешаны (сгенерированы в * нелинейном порядке), поэтому из container их можно брать просто * последовательно. Однако, для параметризируемой стохастичности теста * порядок будет еще раз перемешан посредством mesh_order4delete(). */ nn = 0; /* за четыре подхода удаляем половину от добавленных строк. */ const int ndel = NNN / 2 / 4; // начинаем транзакцию для проверочных удалений EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db_quard.get(), fpta_write, &txn)); ASSERT_NE(nullptr, txn); txn_guard.reset(txn); /* удаляем строки без курсора */ { SCOPED_TRACE("delete.without-cursor"); for (int i = 0; i < ndel; ++i) { const auto n = mesh_order4delete(nn++, NNN); SCOPED_TRACE("item " + std::to_string(n) + " of [0.." + std::to_string(NNN) + "), step #" + std::to_string(i)); crud_item *item = container[n].get(); ASSERT_NE(nullptr, item); SCOPED_TRACE("row: pk " + std::to_string(item->pk_uint) + ", str \"" + item->se_str + "\", real " + std::to_string(item->se_real) + ", time " + std::to_string(item->time)); ASSERT_EQ(FPTU_OK, fptu_clear(row)); ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_str, fpta_value_str(item->se_str))); ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_real, fpta_value_float(item->se_real))); ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_uint, fpta_value_uint(item->pk_uint))); /* пробуем удалить без одного поля */ EXPECT_EQ(FPTA_NOTFOUND, fpta_delete(txn, &table, fptu_take_noshrink(row))); /* пробуем удалить с различием в данных (поле time) */ ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_time, fpta_value_datetime(NOW_FINE()))); EXPECT_EQ(FPTA_NOTFOUND, fpta_delete(txn, &table, fptu_take_noshrink(row))); /* пробуем удалить с другим различием в данных (поле real) */ ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_time, fpta_value_datetime(item->time))); ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_real, fpta_value_float(item->se_real + 42))); EXPECT_EQ(FPTA_NOTFOUND, fpta_delete(txn, &table, fptu_take_noshrink(row))); /* устряняем расхождение и удаляем */ ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_real, fpta_value_float(item->se_real))); EXPECT_EQ(FPTA_OK, fpta_delete(txn, &table, fptu_take_noshrink(row))); container[n].reset(); ndeleted++; ASSERT_NO_FATAL_FAILURE(Check()); } ASSERT_NO_FATAL_FAILURE(Check()); } /* удаляем строки через курсор по col_str. */ { SCOPED_TRACE("delete.cursor-ordered_unique_reverse_str"); // открываем курсор по col_str: на всю таблицу, без фильтра fpta_cursor *cursor; EXPECT_EQ(FPTA_OK, fpta_cursor_open(txn, &col_str, fpta_value_begin(), fpta_value_end(), nullptr, fpta_unsorted_dont_fetch, &cursor)); ASSERT_NE(nullptr, cursor); cursor_guard.reset(cursor); for (int i = 0; i < ndel; ++i) { const auto n = mesh_order4delete(nn++, NNN); SCOPED_TRACE("item " + std::to_string(n) + " of [0.." + std::to_string(NNN) + "), step #" + std::to_string(i)); crud_item *item = container[n].get(); ASSERT_NE(nullptr, item); SCOPED_TRACE("row: pk " + std::to_string(item->pk_uint) + ", str \"" + item->se_str + "\", real " + std::to_string(item->se_real) + ", time " + std::to_string(item->time)); fpta_value key = fpta_value_str(item->se_str); ASSERT_EQ(FPTA_OK, fpta_cursor_locate(cursor, true, &key, nullptr)); EXPECT_EQ(FPTA_OK, fpta_cursor_eof(cursor)); // ради проверки считаем повторы size_t dups; EXPECT_EQ(FPTA_OK, fpta_cursor_dups(cursor, &dups)); EXPECT_EQ(1u, dups); ASSERT_EQ(FPTA_OK, fpta_cursor_delete(cursor)); ASSERT_EQ(FPTA_NODATA, fpta_cursor_locate(cursor, true, &key, nullptr)); EXPECT_EQ(FPTA_NODATA, fpta_cursor_eof(cursor)); EXPECT_EQ(FPTA_ECURSOR, fpta_cursor_dups(cursor, &dups)); EXPECT_EQ((size_t)FPTA_DEADBEEF, dups); /* LY: удалять элемент нужно после использования key, так как * в key просто указатель на данные std::string, которые будут * освобождены при удалении. */ container[n].reset(); ndeleted++; ASSERT_NO_FATAL_FAILURE(Check()); } // закрываем курсор EXPECT_EQ(FPTA_OK, fpta_cursor_close(cursor_guard.release())); cursor = nullptr; ASSERT_NO_FATAL_FAILURE(Check()); } /* удаляем строки через курсор по col_real. */ { SCOPED_TRACE("delete.cursor-se-unordered_withdups_real"); // открываем курсор по col_real: на всю таблицу, без фильтра fpta_cursor *cursor; EXPECT_EQ(FPTA_OK, fpta_cursor_open(txn, &col_real, fpta_value_begin(), fpta_value_end(), nullptr, fpta_unsorted_dont_fetch, &cursor)); ASSERT_NE(nullptr, cursor); cursor_guard.reset(cursor); for (int i = 0; i < ndel; ++i) { const auto n = mesh_order4delete(nn++, NNN); SCOPED_TRACE("item " + std::to_string(n) + " of [0.." + std::to_string(NNN) + "), step #" + std::to_string(i)); crud_item *item = container[n].get(); ASSERT_NE(nullptr, item); SCOPED_TRACE("row: pk " + std::to_string(item->pk_uint) + ", str \"" + item->se_str + "\", real " + std::to_string(item->se_real) + ", time " + std::to_string(item->time)); // считаем сколько должно быть повторов unsigned expected_dups = 0; for (auto const &scan : container) if (scan && item->se_real == scan->se_real) expected_dups++; fptu_ro row_value; fpta_value key = fpta_value_float(item->se_real); if (expected_dups == 1) { ASSERT_EQ(FPTA_OK, fpta_cursor_locate(cursor, true, &key, nullptr)); } else { /* больше одного значения, точное позиционирование возможно * только по ключу не возможно, создаем фейковую строку с PK * и искомым значением для поиска */ ASSERT_EQ(FPTU_OK, fptu_clear(row)); ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_uint, fpta_value_uint(item->pk_uint))); ASSERT_EQ(FPTA_OK, fpta_upsert_column(row, &col_real, key)); row_value = fptu_take_noshrink(row); /* теперь поиск должен быть успешен */ ASSERT_EQ(FPTA_OK, fpta_cursor_locate(cursor, true, nullptr, &row_value)); } EXPECT_EQ(FPTA_OK, fpta_cursor_eof(cursor)); // проверяем кол-во повторов size_t dups; EXPECT_EQ(FPTA_OK, fpta_cursor_dups(cursor, &dups)); EXPECT_EQ(expected_dups, dups); ASSERT_EQ(FPTA_OK, fpta_cursor_delete(cursor)); container[n].reset(); ndeleted++; if (--expected_dups == 0) { ASSERT_EQ(FPTA_NODATA, fpta_cursor_locate(cursor, true, &key, nullptr)); EXPECT_EQ(FPTA_NODATA, fpta_cursor_eof(cursor)); EXPECT_EQ(FPTA_ECURSOR, fpta_cursor_dups(cursor, &dups)); EXPECT_EQ((size_t)FPTA_DEADBEEF, dups); } else { ASSERT_EQ(FPTA_OK, fpta_cursor_locate(cursor, true, &key, nullptr)); EXPECT_EQ(FPTA_OK, fpta_cursor_eof(cursor)); EXPECT_EQ(FPTA_OK, fpta_cursor_dups(cursor, &dups)); EXPECT_EQ(expected_dups, dups); } ASSERT_NO_FATAL_FAILURE(Check()); } // закрываем курсор EXPECT_EQ(FPTA_OK, fpta_cursor_close(cursor_guard.release())); cursor = nullptr; ASSERT_NO_FATAL_FAILURE(Check()); } /* удаляем строки через курсор по col_uint (PK). */ { SCOPED_TRACE("delete.cursor-pk_uint"); // открываем курсор по col_uint: на всю таблицу, без фильтра fpta_cursor *cursor; EXPECT_EQ(FPTA_OK, fpta_cursor_open(txn, &col_uint, fpta_value_begin(), fpta_value_end(), nullptr, fpta_unsorted_dont_fetch, &cursor)); ASSERT_NE(nullptr, cursor); cursor_guard.reset(cursor); for (int i = 0; i < ndel; ++i) { const auto n = mesh_order4delete(nn++, NNN); SCOPED_TRACE("item " + std::to_string(n) + " of [0.." + std::to_string(NNN) + "), step #" + std::to_string(i)); crud_item *item = container[n].get(); ASSERT_NE(nullptr, item); SCOPED_TRACE("row: pk " + std::to_string(item->pk_uint) + ", str \"" + item->se_str + "\", real " + std::to_string(item->se_real) + ", time " + std::to_string(item->time)); fpta_value key = fpta_value_uint(item->pk_uint); ASSERT_EQ(FPTA_OK, fpta_cursor_locate(cursor, true, &key, nullptr)); EXPECT_EQ(FPTA_OK, fpta_cursor_eof(cursor)); // ради проверки считаем повторы size_t dups; EXPECT_EQ(FPTA_OK, fpta_cursor_dups(cursor, &dups)); EXPECT_EQ(1u, dups); ASSERT_EQ(FPTA_OK, fpta_cursor_delete(cursor)); container[n].reset(); ndeleted++; ASSERT_EQ(FPTA_NODATA, fpta_cursor_locate(cursor, true, &key, nullptr)); EXPECT_EQ(FPTA_NODATA, fpta_cursor_eof(cursor)); EXPECT_EQ(FPTA_ECURSOR, fpta_cursor_dups(cursor, &dups)); EXPECT_EQ((size_t)FPTA_DEADBEEF, dups); ASSERT_NO_FATAL_FAILURE(Check()); } // закрываем курсор EXPECT_EQ(FPTA_OK, fpta_cursor_close(cursor_guard.release())); cursor = nullptr; ASSERT_NO_FATAL_FAILURE(Check()); } // фиксируем транзакцию и удаление данных EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn_guard.release(), false)); txn = nullptr; //-------------------------------------------------------------------------- // начинаем транзакцию для финальной проверки EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db_quard.get(), fpta_read, &txn)); ASSERT_NE(nullptr, txn); txn_guard.reset(txn); ASSERT_NO_FATAL_FAILURE(Check()); // закрываем транзакцию EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn_guard.release(), false)); txn = nullptr; free(row); row = nullptr; } //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- TEST(SmokeCrud, OneRowOneColumn) { const bool skipped = GTEST_IS_EXECUTION_TIMEOUT(); if (skipped) return; if (REMOVE_FILE(testdb_name) != 0) { ASSERT_EQ(ENOENT, errno); } if (REMOVE_FILE(testdb_name_lck) != 0) { ASSERT_EQ(ENOENT, errno); } // открываем/создаем базульку в 1 мегабайт fpta_db *db = nullptr; ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_weak, fpta_regime_default, 1, true, &db)); ASSERT_NE(nullptr, db); // описываем простейшую таблицу с одним PK fpta_column_set def; fpta_column_set_init(&def); ASSERT_EQ(FPTA_OK, fpta_column_describe("StrColumn", fptu_cstr, fpta_primary_unique_ordered_obverse, &def)); ASSERT_EQ(FPTA_OK, fpta_column_set_validate(&def)); // запускам транзакцию и создаем таблицу с обозначенным набором колонок fpta_txn *txn = nullptr; ASSERT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_schema, &txn)); ASSERT_EQ(FPTA_OK, fpta_table_create(txn, "Table", &def)); ASSERT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); txn = nullptr; // разрушаем описание таблицы EXPECT_EQ(FPTA_OK, fpta_column_set_destroy(&def)); EXPECT_NE(FPTA_OK, fpta_column_set_validate(&def)); // инициализируем идентификаторы таблицы и её колонок fpta_name table, col_pk; ASSERT_EQ(FPTA_OK, fpta_table_init(&table, "Table")); ASSERT_EQ(FPTA_OK, fpta_column_init(&table, &col_pk, "StrColumn")); // начинаем транзакцию для вставки данных ASSERT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_write, &txn)); // ради теста делаем привязку вручную ASSERT_EQ(FPTA_OK, fpta_name_refresh_couple(txn, &table, &col_pk)); // создаем кортеж, который станет первой записью в таблице fptu_rw *pt1 = fptu_alloc(1, 42); ASSERT_NE(nullptr, pt1); ASSERT_EQ(nullptr, fptu::check(pt1)); // добавляем значения колонки ASSERT_EQ(FPTA_OK, fpta_upsert_column(pt1, &col_pk, fpta_value_cstr("login"))); ASSERT_EQ(nullptr, fptu::check(pt1)); // вставляем строку в таблицу ASSERT_EQ(FPTA_OK, fpta_upsert_row(txn, &table, fptu_take(pt1))); // освобождаем кортеж/строку free(pt1); pt1 = nullptr; // фиксируем изменения ASSERT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); txn = nullptr; ASSERT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_read, &txn)); fpta_cursor *cursor = nullptr; ASSERT_EQ(FPTA_OK, fpta_cursor_open(txn, &col_pk, fpta_value_begin(), fpta_value_end(), nullptr, fpta_unsorted_dont_fetch, &cursor)); size_t count = size_t(UINT64_C(0xBADBADBAD) & SIZE_MAX); ASSERT_EQ(FPTA_OK, fpta_cursor_count(cursor, &count, INT_MAX)); ASSERT_EQ(1u, count); ASSERT_EQ(FPTA_OK, fpta_cursor_close(cursor)); ASSERT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); // разрушаем привязанные идентификаторы fpta_name_destroy(&table); fpta_name_destroy(&col_pk); // закрываем базу ASSERT_EQ(FPTA_OK, fpta_db_close(db)); ASSERT_TRUE(REMOVE_FILE(testdb_name) == 0); ASSERT_TRUE(REMOVE_FILE(testdb_name_lck) == 0); } //---------------------------------------------------------------------------- TEST(Smoke, DirectDirtyDeletions) { /* Smoke-проверка удаления строки из "грязной" страницы, при наличии * вторичных индексов. * * Сценарий: * 1. Создаем базу с одной таблицей, в которой несколько колонок * и есть хотя-бы один вторичный индекс. * * 2. Вставляем 11 строки, при этом некоторые значения близкие * и точно попадут в одну страницу БД. * * 3. Удаляем одну строку, затем в той-же транзакции ищем и удаляем * вторую строку, которая после первого удаления должна располагаться * в измененной "грязной" страницы. * * 4. Завершаем операции и освобождаем ресурсы. */ const bool skipped = GTEST_IS_EXECUTION_TIMEOUT(); if (skipped) return; if (REMOVE_FILE(testdb_name) != 0) { ASSERT_EQ(ENOENT, errno); } if (REMOVE_FILE(testdb_name_lck) != 0) { ASSERT_EQ(ENOENT, errno); } // создаем базу fpta_db *db = nullptr; ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_sync, fpta_regime_default, 1, true, &db)); ASSERT_NE(nullptr, db); // начинаем транзакцию с добавлениями fpta_txn *txn = (fpta_txn *)&txn; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_schema, &txn)); ASSERT_NE(nullptr, txn); // описываем структуру таблицы и создаем её fpta_column_set def; fpta_column_set_init(&def); EXPECT_EQ(FPTA_OK, fpta_column_describe("Nnn", fptu_int64, fpta_primary_unique_ordered_obverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe( "_createdAt", fptu_datetime, fpta_secondary_withdups_ordered_obverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe("_id", fptu_int64, fpta_secondary_unique_ordered_obverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_set_validate(&def)); ASSERT_EQ(FPTA_OK, fpta_table_create(txn, "bugged", &def)); // разрушаем описание таблицы EXPECT_EQ(FPTA_OK, fpta_column_set_destroy(&def)); EXPECT_NE(FPTA_OK, fpta_column_set_validate(&def)); // готовим идентификаторы для манипуляций с данными fpta_name table, col_num, col_date, col_str; EXPECT_EQ(FPTA_OK, fpta_table_init(&table, "bugged")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &col_num, "Nnn")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &col_date, "_createdAt")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &col_str, "_id")); ASSERT_EQ(FPTA_OK, fpta_name_refresh_couple(txn, &table, &col_num)); ASSERT_EQ(FPTA_OK, fpta_name_refresh(txn, &col_date)); ASSERT_EQ(FPTA_OK, fpta_name_refresh(txn, &col_str)); // выделяем кортеж и вставляем 11 строк fptu_rw *pt = fptu_alloc(3, 8 + 8 + 8); ASSERT_NE(nullptr, pt); ASSERT_STREQ(nullptr, fptu::check(pt)); // 1 fptu_time datetime; datetime.fixedpoint = 1492170771; EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_num, fpta_value_sint(100))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_date, fpta_value_datetime(datetime))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_str, fpta_value_sint(6408824664381050880))); ASSERT_STREQ(nullptr, fptu::check(pt)); fptu_ro row = fptu_take_noshrink(pt); ASSERT_STREQ(nullptr, fptu::check(row)); EXPECT_EQ(FPTA_OK, fpta_put(txn, &table, row, fpta_insert)); // 2 EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_num, fpta_value_sint(101))); datetime.fixedpoint = 1492170775; EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_date, fpta_value_datetime(datetime))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_str, fpta_value_sint(6408824680314742784))); row = fptu_take_noshrink(pt); EXPECT_EQ(FPTA_OK, fpta_put(txn, &table, row, fpta_insert)); // 3 EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_num, fpta_value_sint(102))); datetime.fixedpoint = 1492170777; EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_date, fpta_value_datetime(datetime))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_str, fpta_value_sint(6408824688070591488))); row = fptu_take_noshrink(pt); EXPECT_EQ(FPTA_OK, fpta_put(txn, &table, row, fpta_insert)); // 4 EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_num, fpta_value_sint(103))); datetime.fixedpoint = 1492170778; EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_date, fpta_value_datetime(datetime))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_str, fpta_value_sint(6408824693901869056))); row = fptu_take_noshrink(pt); EXPECT_EQ(FPTA_OK, fpta_put(txn, &table, row, fpta_insert)); // 5 EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_num, fpta_value_sint(104))); datetime.fixedpoint = 1492170779; EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_date, fpta_value_datetime(datetime))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_str, fpta_value_sint(6408824699339551744))); row = fptu_take_noshrink(pt); EXPECT_EQ(FPTA_OK, fpta_put(txn, &table, row, fpta_insert)); // 6 EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_num, fpta_value_sint(105))); datetime.fixedpoint = 1492170781; EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_date, fpta_value_datetime(datetime))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_str, fpta_value_sint(6408824705469209600))); row = fptu_take_noshrink(pt); EXPECT_EQ(FPTA_OK, fpta_put(txn, &table, row, fpta_insert)); // 7 EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_num, fpta_value_sint(106))); datetime.fixedpoint = 1492170782; EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_date, fpta_value_datetime(datetime))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_str, fpta_value_sint(6408824710579991552))); row = fptu_take_noshrink(pt); EXPECT_EQ(FPTA_OK, fpta_put(txn, &table, row, fpta_insert)); // 8 EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_num, fpta_value_sint(107))); datetime.fixedpoint = 1492170784; EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_date, fpta_value_datetime(datetime))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_str, fpta_value_sint(6408824719167151104))); row = fptu_take_noshrink(pt); EXPECT_EQ(FPTA_OK, fpta_put(txn, &table, row, fpta_insert)); // 9 EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_num, fpta_value_sint(108))); datetime.fixedpoint = 1492170786; EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_date, fpta_value_datetime(datetime))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_str, fpta_value_sint(6408824727095985152))); row = fptu_take_noshrink(pt); EXPECT_EQ(FPTA_OK, fpta_put(txn, &table, row, fpta_insert)); // 10 EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_num, fpta_value_sint(109))); datetime.fixedpoint = 1492170788; EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_date, fpta_value_datetime(datetime))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_str, fpta_value_sint(6408824736249964544))); row = fptu_take_noshrink(pt); EXPECT_EQ(FPTA_OK, fpta_put(txn, &table, row, fpta_insert)); // 11 EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_num, fpta_value_sint(110))); datetime.fixedpoint = 1492170790; EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_date, fpta_value_datetime(datetime))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_str, fpta_value_sint(6408824744270998528))); row = fptu_take_noshrink(pt); EXPECT_EQ(FPTA_OK, fpta_put(txn, &table, row, fpta_insert)); // завершаем транзакцию с добавлениями ASSERT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); txn = nullptr; //-------------------------------------------------------------------------- // начинаем транзакцию с удалениями EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_write, &txn)); ASSERT_NE(nullptr, txn); fptu_ro row2; fpta_value num2; // читаем вторую строку для проверки что сейчас она НЕ в грязной странице. num2 = fpta_value_sint(6408824736249964544); EXPECT_EQ(FPTA_OK, fpta_get(txn, &col_str, &num2, &row2)); EXPECT_EQ(MDBX_RESULT_FALSE, mdbx_is_dirty(txn->mdbx_txn, row2.sys.iov_base)); // читаем и удаляем первую строку num2 = fpta_value_sint(6408824727095985152); EXPECT_EQ(FPTA_OK, fpta_get(txn, &col_str, &num2, &row2)); EXPECT_EQ(MDBX_RESULT_FALSE, mdbx_is_dirty(txn->mdbx_txn, row2.sys.iov_base)); EXPECT_EQ(FPTA_OK, fpta_delete(txn, &table, row2)); // снова читаем вторую строку (теперь она должна быть в "грязной" странице) // и удаляем её num2 = fpta_value_sint(6408824736249964544); EXPECT_EQ(FPTA_OK, fpta_get(txn, &col_str, &num2, &row2)); EXPECT_EQ(MDBX_RESULT_TRUE, mdbx_is_dirty(txn->mdbx_txn, row2.sys.iov_base)); EXPECT_EQ(FPTA_OK, fpta_delete(txn, &table, row2)); ASSERT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); txn = nullptr; //-------------------------------------------------------------------------- // освобождаем ресурсы fpta_name_destroy(&table); fpta_name_destroy(&col_num); fpta_name_destroy(&col_date); fpta_name_destroy(&col_str); free(pt); pt = nullptr; EXPECT_EQ(FPTA_SUCCESS, fpta_db_close(db)); ASSERT_TRUE(REMOVE_FILE(testdb_name) == 0); ASSERT_TRUE(REMOVE_FILE(testdb_name_lck) == 0); } //---------------------------------------------------------------------------- TEST(Smoke, UpdateViolateUnique) { /* Smoke-проверка обновления строки с нарушением уникальности по * вторичному ключу. * * Сценарий: * 1. Создаем базу с одной таблицей, в которой две колонки и два * индекса с контролем уникальности. * * 2. Вставляем 2 строки с уникальными значениями всех полей. * * 3. Пытаемся обновить одну из строк с нарушением уникальности. * * 4. Завершаем операции и освобождаем ресурсы. */ const bool skipped = GTEST_IS_EXECUTION_TIMEOUT(); if (skipped) return; if (REMOVE_FILE(testdb_name) != 0) { ASSERT_EQ(ENOENT, errno); } if (REMOVE_FILE(testdb_name_lck) != 0) { ASSERT_EQ(ENOENT, errno); } // создаем базу fpta_db *db = nullptr; ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_sync, fpta_regime_default, 1, true, &db)); ASSERT_NE(nullptr, db); // начинаем транзакцию с добавлениями fpta_txn *txn = (fpta_txn *)&txn; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_schema, &txn)); ASSERT_NE(nullptr, txn); // описываем структуру таблицы и создаем её fpta_column_set def; fpta_column_set_init(&def); EXPECT_EQ(FPTA_OK, fpta_column_describe("key", fptu_int64, fpta_primary_unique_ordered_obverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe("value", fptu_int64, fpta_secondary_unique_ordered_obverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_set_validate(&def)); ASSERT_EQ(FPTA_OK, fpta_table_create(txn, "map", &def)); // разрушаем описание таблицы EXPECT_EQ(FPTA_OK, fpta_column_set_destroy(&def)); EXPECT_NE(FPTA_OK, fpta_column_set_validate(&def)); // готовим идентификаторы для манипуляций с данными fpta_name table, col_key, col_value; EXPECT_EQ(FPTA_OK, fpta_table_init(&table, "Map")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &col_key, "Key")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &col_value, "Value")); // начнём с добавления значений полей, поэтому нужен ручной refresh ASSERT_EQ(FPTA_OK, fpta_name_refresh_couple(txn, &table, &col_key)); ASSERT_EQ(FPTA_OK, fpta_name_refresh(txn, &col_value)); // выделяем кортеж и вставляем 2 строки fptu_rw *pt = fptu_alloc(2, 8 * 2); ASSERT_NE(nullptr, pt); ASSERT_STREQ(nullptr, fptu::check(pt)); // 1 EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_key, fpta_value_sint(1))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_value, fpta_value_sint(2))); ASSERT_STREQ(nullptr, fptu::check(pt)); fptu_ro row = fptu_take_noshrink(pt); ASSERT_STREQ(nullptr, fptu::check(row)); EXPECT_EQ(FPTA_OK, fpta_put(txn, &table, row, fpta_insert)); // 2 EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_key, fpta_value_sint(2))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_value, fpta_value_sint(3))); row = fptu_take_noshrink(pt); EXPECT_EQ(FPTA_OK, fpta_put(txn, &table, row, fpta_insert)); // завершаем транзакцию вставки ASSERT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); txn = nullptr; //-------------------------------------------------------------------------- // начинаем транзакцию обновления EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_write, &txn)); ASSERT_NE(nullptr, txn); // формируем строку с нарушением EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_key, fpta_value_sint(1))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt, &col_value, fpta_value_sint(3))); row = fptu_take_noshrink(pt); // пробуем с пред-проверкой EXPECT_EQ(FPTA_KEYEXIST, fpta_probe_and_update_row(txn, &table, row)); EXPECT_EQ(FPTA_KEYEXIST, fpta_probe_and_insert_row(txn, &table, row)); // пробуем сломать уникальность, транзакция должна быть отменена EXPECT_EQ(FPTA_KEYEXIST, fpta_update_row(txn, &table, row)); // транзакция должна быть уже отменена ASSERT_EQ(FPTA_TXN_CANCELLED, fpta_transaction_end(txn, false)); txn = nullptr; //-------------------------------------------------------------------------- // освобождаем ресурсы fpta_name_destroy(&table); fpta_name_destroy(&col_key); fpta_name_destroy(&col_value); free(pt); pt = nullptr; EXPECT_EQ(FPTA_SUCCESS, fpta_db_close(db)); ASSERT_TRUE(REMOVE_FILE(testdb_name) == 0); ASSERT_TRUE(REMOVE_FILE(testdb_name_lck) == 0); } //---------------------------------------------------------------------------- class SmokeNullable : public ::testing::Test { public: scoped_db_guard db_quard; scoped_txn_guard txn_guard; scoped_cursor_guard cursor_guard; scoped_ptrw_guard ptrw_guard; bool skipped; fpta_name table, c0_uint64, c1_date, c2_str, c3_int64, c4_uint32, c5_ip4, c6_sha1, c7_fp32, c8_enum, c9_fp64; fptu_ro MakeRow(int stepover) { EXPECT_EQ(FPTU_OK, fptu_clear(ptrw_guard.get())); if (stepover >= 0) { // формируем не пустую строку, со скользящим NIL if (stepover != 0) { EXPECT_EQ(FPTA_OK, fpta_upsert_column(ptrw_guard.get(), &c0_uint64, fpta_value_uint((unsigned)stepover))); } if (stepover != 1) { EXPECT_EQ(FPTA_OK, fpta_upsert_column(ptrw_guard.get(), &c1_date, fpta_value_datetime(NOW_FINE()))); } if (stepover != 2) { EXPECT_EQ(FPTA_OK, fpta_upsert_column(ptrw_guard.get(), &c2_str, fpta_value_str(std::to_string(stepover)))); } if (stepover != 3) { EXPECT_EQ(FPTA_OK, fpta_upsert_column(ptrw_guard.get(), &c3_int64, fpta_value_sint(-stepover))); } if (stepover != 4) { EXPECT_EQ(FPTA_OK, fpta_upsert_column(ptrw_guard.get(), &c4_uint32, fpta_value_uint((unsigned)stepover))); } if (stepover != 5) { EXPECT_EQ(FPTA_OK, fpta_upsert_column(ptrw_guard.get(), &c5_ip4, fpta_value_uint((unsigned)stepover + 42))); } if (stepover != 6) { uint8_t sha1[160 / 8]; memset(sha1, stepover + 1, sizeof(sha1)); EXPECT_EQ(FPTA_OK, fpta_upsert_column(ptrw_guard.get(), &c6_sha1, fpta_value_binary(sha1, sizeof(sha1)))); } if (stepover != 7) { EXPECT_EQ(FPTA_OK, fpta_upsert_column(ptrw_guard.get(), &c7_fp32, fpta_value_float(stepover * M_PI))); } if (stepover != 8) { EXPECT_EQ(FPTA_OK, fpta_upsert_column(ptrw_guard.get(), &c8_enum, fpta_value_sint(11 + stepover))); } if (stepover != 9) { EXPECT_EQ(FPTA_OK, fpta_upsert_column(ptrw_guard.get(), &c9_fp64, fpta_value_float(M_E * stepover))); } } return fptu_take_noshrink(ptrw_guard.get()); } void OpenCursor(int colnum) { if (cursor_guard) { EXPECT_EQ(FPTA_OK, fpta_cursor_close(cursor_guard.release())); } // выбираем колонку по номеру fpta_name *colptr = nullptr; switch (colnum) { case 0: colptr = &c0_uint64; break; case 1: colptr = &c1_date; break; case 2: colptr = &c2_str; break; case 3: colptr = &c3_int64; break; case 4: colptr = &c4_uint32; break; case 5: colptr = &c5_ip4; break; case 6: colptr = &c6_sha1; break; case 7: colptr = &c7_fp32; break; case 8: colptr = &c8_enum; break; case 9: colptr = &c9_fp64; break; } // открываем простейщий курсор: на всю таблицу, без фильтра fpta_cursor *cursor = nullptr; EXPECT_EQ(FPTA_OK, fpta_cursor_open(txn_guard.get(), colptr, fpta_value_begin(), fpta_value_end(), nullptr, fpta_unsorted_dont_fetch, &cursor)); cursor_guard.reset(cursor); } virtual void SetUp() { SCOPED_TRACE("setup"); skipped = GTEST_IS_EXECUTION_TIMEOUT(); if (skipped) return; // инициализируем идентификаторы таблицы и её колонок EXPECT_EQ(FPTA_OK, fpta_table_init(&table, "xyz")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &c0_uint64, "c0_uint64")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &c1_date, "c1_date")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &c2_str, "c2_str")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &c3_int64, "c3_int64")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &c4_uint32, "c4_uint32")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &c5_ip4, "c5_ip4")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &c6_sha1, "c6_sha1")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &c7_fp32, "c7_fp32")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &c8_enum, "c8_enum")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &c9_fp64, "c9_fp64")); // чистим if (REMOVE_FILE(testdb_name) != 0) { ASSERT_EQ(ENOENT, errno); } if (REMOVE_FILE(testdb_name_lck) != 0) { ASSERT_EQ(ENOENT, errno); } // создаем базу fpta_db *db = nullptr; ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_sync, fpta_regime_default, 1, true, &db)); ASSERT_NE(nullptr, db); db_quard.reset(db); // начинаем транзакцию с созданием таблицы fpta_txn *txn = (fpta_txn *)&txn; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_schema, &txn)); ASSERT_NE(nullptr, txn); txn_guard.reset(txn); // описываем структуру таблицы и создаем её fpta_column_set def; fpta_column_set_init(&def); EXPECT_EQ(FPTA_OK, fpta_column_describe( "c0_uint64", fptu_uint64, fpta_primary_unique_ordered_obverse_nullable, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe( "c1_date", fptu_datetime, fpta_secondary_unique_ordered_obverse_nullable, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe( "c2_str", fptu_cstr, fpta_secondary_withdups_ordered_obverse_nullable, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe( "c3_int64", fptu_int64, fpta_secondary_withdups_unordered_nullable_obverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe( "c4_uint32", fptu_uint32, fpta_secondary_withdups_ordered_reverse_nullable, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe( "c5_ip4", fptu_uint32, fpta_secondary_withdups_ordered_obverse_nullable, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe( "c6_sha1", fptu_160, fpta_secondary_unique_unordered_nullable_obverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe( "c7_fp32", fptu_fp32, fpta_secondary_unique_ordered_obverse_nullable, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe( "c8_enum", fptu_uint16, fpta_secondary_withdups_unordered_nullable_reverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe( "c9_fp64", fptu_fp64, fpta_secondary_withdups_ordered_obverse_nullable, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe("_", fptu_opaque, fpta_noindex_nullable, &def)); EXPECT_EQ(FPTA_OK, fpta_column_set_validate(&def)); ASSERT_EQ(FPTA_OK, fpta_table_create(txn, "xyz", &def)); // завершаем транзакцию ASSERT_EQ(FPTA_OK, fpta_transaction_end(txn_guard.release(), false)); txn = nullptr; // разрушаем описание таблицы EXPECT_EQ(FPTA_OK, fpta_column_set_destroy(&def)); EXPECT_NE(FPTA_OK, fpta_column_set_validate(&def)); // начинаем транзакцию изменения данных EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_write, &txn)); ASSERT_NE(nullptr, txn); txn_guard.reset(txn); //------------------------------------------------------------------------ // нужен ручной refresh, так как начинать будем с добавления полей в кортеж EXPECT_EQ(FPTA_OK, fpta_name_refresh(txn, &table)); EXPECT_EQ(FPTA_OK, fpta_name_refresh(txn, &c0_uint64)); EXPECT_EQ(FPTA_OK, fpta_name_refresh(txn, &c1_date)); EXPECT_EQ(FPTA_OK, fpta_name_refresh(txn, &c2_str)); EXPECT_EQ(FPTA_OK, fpta_name_refresh(txn, &c3_int64)); EXPECT_EQ(FPTA_OK, fpta_name_refresh(txn, &c4_uint32)); EXPECT_EQ(FPTA_OK, fpta_name_refresh(txn, &c5_ip4)); EXPECT_EQ(FPTA_OK, fpta_name_refresh(txn, &c6_sha1)); EXPECT_EQ(FPTA_OK, fpta_name_refresh(txn, &c7_fp32)); EXPECT_EQ(FPTA_OK, fpta_name_refresh(txn, &c8_enum)); EXPECT_EQ(FPTA_OK, fpta_name_refresh(txn, &c9_fp64)); // выделяем кортеж fptu_rw *pt = fptu_alloc(10, 8 * 10 + 42); ASSERT_NE(nullptr, pt); ASSERT_STREQ(nullptr, fptu::check(pt)); ptrw_guard.reset(pt); } virtual void TearDown() { if (skipped) return; SCOPED_TRACE("teardown"); // разрушаем привязанные идентификаторы fpta_name_destroy(&table); fpta_name_destroy(&c0_uint64); fpta_name_destroy(&c1_date); fpta_name_destroy(&c2_str); fpta_name_destroy(&c3_int64); fpta_name_destroy(&c4_uint32); fpta_name_destroy(&c5_ip4); fpta_name_destroy(&c6_sha1); fpta_name_destroy(&c7_fp32); fpta_name_destroy(&c8_enum); fpta_name_destroy(&c9_fp64); // закрываем курсор и завершаем транзакцию if (cursor_guard) { EXPECT_EQ(FPTA_OK, fpta_cursor_close(cursor_guard.release())); } if (txn_guard) { ASSERT_EQ(FPTA_OK, fpta_transaction_end(txn_guard.release(), true)); } if (db_quard) { // закрываем и удаляем базу ASSERT_EQ(FPTA_SUCCESS, fpta_db_close(db_quard.release())); ASSERT_TRUE(REMOVE_FILE(testdb_name) == 0); ASSERT_TRUE(REMOVE_FILE(testdb_name_lck) == 0); } } }; TEST_F(SmokeNullable, AllNILs) { /* Smoke-проверка обновления строки с нарушением уникальности по * вторичному ключу. * * Сценарий: * 1. Создаем базу с одной таблицей, в которой 10 колонок, все они * индексированы и допускают NIL. При этом 5 колонок с контролем * уникальности, а остальные допускают дубликаты. * * 2. Вставляем строку, в которой только одни NIL-ы. * * 3. Удаляем вставленную строку. * * 4. Снова вставляем строку и удаляем её через через курсор. * * 5. Повторяем пункт 4 для курсора по каждой колонке. */ if (skipped) return; // формируем строку без колонок fptu_ro allNILs = MakeRow(-1); // вставляем строку со всеми NIL EXPECT_EQ(FPTA_OK, fpta_validate_insert_row(txn_guard.get(), &table, allNILs)); EXPECT_EQ(FPTA_OK, fpta_insert_row(txn_guard.get(), &table, allNILs)); EXPECT_EQ(FPTA_KEYEXIST, fpta_validate_insert_row(txn_guard.get(), &table, allNILs)); // обновляем строку без реального изменения данных EXPECT_EQ(FPTA_OK, fpta_validate_upsert_row(txn_guard.get(), &table, allNILs)); EXPECT_EQ(FPTA_OK, fpta_upsert_row(txn_guard.get(), &table, allNILs)); // удяляем строку со всеми нулями EXPECT_EQ(FPTA_OK, fpta_delete(txn_guard.get(), &table, allNILs)); // теперь вставляем строку через upsert EXPECT_EQ(FPTA_OK, fpta_validate_upsert_row(txn_guard.get(), &table, allNILs)); EXPECT_EQ(FPTA_OK, fpta_upsert_row(txn_guard.get(), &table, allNILs)); // повторяем что дубликат не лезет EXPECT_EQ(FPTA_KEYEXIST, fpta_validate_insert_row(txn_guard.get(), &table, allNILs)); //-------------------------------------------------------------------------- /* через курсор */ for (int colnum = 0; colnum < 10; ++colnum) { SCOPED_TRACE("cursor column #" + std::to_string(colnum)); OpenCursor(colnum); ASSERT_TRUE(cursor_guard.operator bool()); EXPECT_EQ(FPTA_OK, fpta_upsert_row(txn_guard.get(), &table, allNILs)); EXPECT_EQ(FPTA_OK, fpta_cursor_move(cursor_guard.get(), (colnum & 1) ? fpta_first : fpta_last)); EXPECT_EQ(FPTA_OK, fpta_cursor_delete(cursor_guard.get())); EXPECT_EQ(FPTA_NODATA, fpta_cursor_eof(cursor_guard.get())); } } TEST_F(SmokeNullable, Base) { /* Smoke-проверка обновления строки с нарушением уникальности по * вторичному ключу. * * Сценарий: * 1. Создаем базу с одной таблицей, в которой 10 колонок, все они * индексированы и допускают NIL. При этом 5 колонок с контролем * уникальности, а остальные допускают дубликаты. * * 2. Вставляем 10 строк со "скользящим" NIL и уникальными * значениям в остальных полях. * * 3. Удаляем 10 строк через курсор открываемый по каждой из колонок. * * 4. Добавляем и удаляем полностью заполненную строку. */ if (skipped) return; //-------------------------------------------------------------------------- for (int nilcol = 0; nilcol < 10; ++nilcol) { SCOPED_TRACE("NIL-column #" + std::to_string(nilcol)); fptu_ro row = MakeRow(nilcol); EXPECT_EQ(FPTA_OK, fpta_upsert_row(txn_guard.get(), &table, row)); // проверяем обновлени (без какого-либо зименения данных) EXPECT_EQ(FPTA_OK, fpta_probe_and_update_row(txn_guard.get(), &table, row)); EXPECT_EQ(FPTA_OK, fpta_probe_and_upsert_row(txn_guard.get(), &table, row)); // повторяем что дубликат не лезет EXPECT_EQ(FPTA_KEYEXIST, fpta_validate_insert_row(txn_guard.get(), &table, row)); } // проверяем что не лезет строка со всеми NIL EXPECT_EQ(FPTA_KEYEXIST, fpta_validate_insert_row(txn_guard.get(), &table, MakeRow(-1))); // удялем по одной строке через курсор открываемый по каждой из колонок for (int colnum = 0; colnum < 10; ++colnum) { SCOPED_TRACE("cursor column #" + std::to_string(colnum)); OpenCursor(colnum); ASSERT_TRUE(cursor_guard.operator bool()); EXPECT_EQ(FPTA_OK, fpta_cursor_move(cursor_guard.get(), (colnum & 1) ? fpta_first : fpta_last)); EXPECT_EQ(FPTA_OK, fpta_cursor_delete(cursor_guard.get())); } // вставляем и удаляем полностью заполненную строку (без NIL)/ fptu_ro row = MakeRow(11); EXPECT_EQ(FPTA_OK, fpta_upsert_row(txn_guard.get(), &table, row)); EXPECT_EQ(FPTA_OK, fpta_delete(txn_guard.get(), &table, row)); } //---------------------------------------------------------------------------- TEST(Smoke, ReOpenAfterAbort) { const bool skipped = GTEST_IS_EXECUTION_TIMEOUT(); if (skipped) return; // чистим if (REMOVE_FILE(testdb_name) != 0) { ASSERT_EQ(ENOENT, errno); } if (REMOVE_FILE(testdb_name_lck) != 0) { ASSERT_EQ(ENOENT, errno); } // открываем/создаем базу fpta_db *db = nullptr; ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_weak, fpta_regime4testing, 1, true, &db)); ASSERT_NE(nullptr, db); // описываем простейшую таблицу с одним PK (int64) и колонками (_last_changed, // fp64, int64, string, datetime) fpta_column_set def; fpta_column_set_init(&def); EXPECT_EQ(FPTA_OK, fpta_column_describe("host", fptu_cstr, fpta_primary_unique_ordered_obverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe( "_last_changed", fptu_datetime, fpta_secondary_withdups_ordered_obverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe("_id", fptu_int64, fpta_secondary_unique_unordered, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe("user_name", fptu_cstr, fpta_noindex_nullable, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe("date", fptu_datetime, fpta_noindex_nullable, &def)); ASSERT_EQ(FPTA_OK, fpta_column_set_validate(&def)); // запускам транзакцию и создаем таблицу с обозначенным набором колонок fpta_txn *txn = nullptr; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_schema, &txn)); ASSERT_NE(nullptr, txn); ASSERT_EQ(FPTA_OK, fpta_table_create(txn, "Table", &def)); EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); EXPECT_EQ(FPTA_OK, fpta_column_set_destroy(&def)); txn = nullptr; // закрываем базу EXPECT_EQ(FPTA_SUCCESS, fpta_db_close(db)); db = nullptr; // открываем базу ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_weak, fpta_regime_default, 1, false, &db)); ASSERT_NE(nullptr, db); fpta_name table_id; EXPECT_EQ(FPTA_OK, fpta_table_init(&table_id, "Table")); // открываем транзакцию на запись, позже мы ее абортируем EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_write, &txn)); ASSERT_NE(nullptr, txn); size_t row_count = 0; EXPECT_EQ(FPTA_OK, fpta_table_info(txn, &table_id, &row_count, nullptr)); EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn, true)); // открываем еще одну транзакцию на запись EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_write, &txn)); ASSERT_NE(nullptr, txn); // пытаемся сделать поиск fpta_name column_id; EXPECT_EQ(FPTA_OK, fpta_column_init(&table_id, &column_id, "host")); fpta_value value = fpta_value_cstr("administrator"); fptu_ro record; memset(&record, 0, sizeof(record)); EXPECT_EQ(FPTA_NOTFOUND, fpta_get(txn, &column_id, &value, &record)); EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn, true)); // закрываем базу fpta_name_destroy(&table_id); EXPECT_EQ(FPTA_SUCCESS, fpta_db_close(db)); ASSERT_TRUE(REMOVE_FILE(testdb_name) == 0); ASSERT_TRUE(REMOVE_FILE(testdb_name_lck) == 0); } //---------------------------------------------------------------------------- TEST(Smoke, Kamerades) { /* Smoke-проверка совместных операций. * * Сценарий: * 1. Открываем базу "коррелятором". * 2. Открываем базу "коммандером", создаём одну таблицу, * в которой одна колонка и один (primary) индекс. * 3. В "корреляторе" добавляем в эту таблицу одну запись. * 4. В "коммандере" получаем сведения о таблице. * 5. Завершаем операции и освобождаем ресурсы. */ const bool skipped = GTEST_IS_EXECUTION_TIMEOUT(); if (skipped) return; if (REMOVE_FILE(testdb_name) != 0) { ASSERT_EQ(ENOENT, errno); } if (REMOVE_FILE(testdb_name_lck) != 0) { ASSERT_EQ(ENOENT, errno); } fpta_db *correlator_db = nullptr; fpta_db *commander_db = nullptr; { // открываем/создаем базульку в 1 мегабайт ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_weak, fpta_regime_default, 1, true, &commander_db)); // таблица создаётся из "коммандера" ASSERT_NE(nullptr, commander_db); // описываем простейшую таблицу с одной колонкой fpta_column_set def; fpta_column_set_init(&def); EXPECT_EQ(FPTA_OK, fpta_column_describe("nnn", fptu_int64, fpta_primary_unique_ordered_obverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_set_validate(&def)); // запускам транзакцию и создаем таблицу fpta_txn *txn = (fpta_txn *)&txn; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(commander_db, fpta_schema, &txn)); ASSERT_NE(nullptr, txn); EXPECT_EQ(FPTA_OK, fpta_table_create(txn, "table_1", &def)); EXPECT_EQ(FPTA_OK, fpta_column_set_destroy(&def)); EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); txn = nullptr; // закрываем из коммандера (опционально) if (false) { EXPECT_EQ(FPTA_SUCCESS, fpta_db_close(commander_db)); commander_db = nullptr; } } { // создаем кортеж, который станет единственной записью в таблице fptu_rw *pt1 = fptu_alloc(1, 8); ASSERT_NE(nullptr, pt1); ASSERT_STREQ(nullptr, fptu::check(pt1)); // инициализируем идентификаторы таблицы fpta_name table, col_pk; EXPECT_EQ(FPTA_OK, fpta_table_init(&table, "table_1")); // открываем из коррелятора ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_weak, fpta_regime_default, 1, false, &correlator_db)); ASSERT_NE(nullptr, correlator_db); // начинаем транзакцию для вставки данных fpta_txn *txn = (fpta_txn *)&txn; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(correlator_db, fpta_write, &txn)); // вставляем запись из "коррелятора" ASSERT_NE(nullptr, txn); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &col_pk, "nnn")); ASSERT_EQ(FPTA_OK, fpta_name_refresh(txn, &table)); // ради теста делаем привязку вручную EXPECT_EQ(FPTA_OK, fpta_name_refresh_couple(txn, &table, &col_pk)); // добавляем нормальные значения EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt1, &col_pk, fpta_value_sint(567))); ASSERT_STREQ(nullptr, fptu::check(pt1)); fptu_ro taken_noshrink; taken_noshrink = fptu_take_noshrink(pt1); EXPECT_EQ(FPTA_OK, fpta_validate_put(txn, &table, taken_noshrink, fpta_insert)); EXPECT_EQ(FPTA_OK, fpta_put(txn, &table, taken_noshrink, fpta_insert)); free(pt1); pt1 = nullptr; // фиксируем изменения из коррелятора EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); txn = nullptr; // разрушаем привязанные идентификаторы fpta_name_destroy(&col_pk); fpta_name_destroy(&table); // закрываем из коррелятора (опционально) if (false) { EXPECT_EQ(FPTA_SUCCESS, fpta_db_close(correlator_db)); correlator_db = nullptr; } } { // инициализируем идентификаторы таблицы со стороны "коммандера" fpta_name same_table; EXPECT_EQ(FPTA_OK, fpta_table_init(&same_table, "table_1")); if (!commander_db) { // вновь открываем из коммандера ASSERT_EQ( FPTA_OK, test_db_open( testdb_name, fpta_weak, fpta_regime_default, 1, false, &commander_db)); // теперь пытаемся только читать из "коммандера" ASSERT_NE(nullptr, commander_db); } // и начинаем читающую транзакцию из "коммандера" fpta_txn *txn = (fpta_txn *)&txn; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(commander_db, fpta_read, &txn)); ASSERT_NE(nullptr, txn); EXPECT_EQ(FPTA_OK, fpta_name_refresh(txn, &same_table)); // здесь было MDBX_CORRUPTED size_t num; EXPECT_EQ(FPTA_OK, fpta_table_info(txn, &same_table, &num, NULL)); EXPECT_EQ(num, 1u); EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); txn = nullptr; // разрушаем привязанные идентификаторы fpta_name_destroy(&same_table); } // закрываем базульку из коррелятора if (correlator_db) { EXPECT_EQ(FPTA_SUCCESS, fpta_db_close(correlator_db)); correlator_db = nullptr; } // закрываем базульку из коммандера if (commander_db) { EXPECT_EQ(FPTA_SUCCESS, fpta_db_close(commander_db)); commander_db = nullptr; } // пока не удялем файлы чтобы можно было посмотреть и натравить mdbx_chk if (false) { if (REMOVE_FILE(testdb_name) != 0) { ASSERT_EQ(ENOENT, errno); } if (REMOVE_FILE(testdb_name_lck) != 0) { ASSERT_EQ(ENOENT, errno); } } } //---------------------------------------------------------------------------- TEST(Smoke, OverchargeOnCommit) { /* Smoke-проверка поведения при переполнении БД во время фиксации транзакции. * * Сценарий: * 1. Создаем базу с одной таблицей и некоторым кол-вом колонок. * * 2. Итеративно вставляем по одной строке за транзакцию, * пока не закончится место или не случится еще что-то плохое. * * 3. Параметры подобраны так, чтобы переполнение случилось при фиксации * транзакции (при добавлении записи в garbage-таблицу внутри libmdbx). */ bool skipped = GTEST_IS_EXECUTION_TIMEOUT(); if (skipped) return; if (REMOVE_FILE(testdb_name) != 0) { ASSERT_EQ(ENOENT, errno); } if (REMOVE_FILE(testdb_name_lck) != 0) { ASSERT_EQ(ENOENT, errno); } // открываем/создаем базу fpta_db *db = nullptr; ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_weak, fpta_regime_default, 1, true, &db)); ASSERT_NE(nullptr, db); // описываем простейшую таблицу с одним PK fpta_column_set def; fpta_column_set_init(&def); EXPECT_EQ(FPTA_OK, fpta_column_describe("primary_key", fptu_uint64, fpta_primary_unique_ordered_obverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe("user_name", fptu_cstr, fpta_noindex_nullable, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe("date", fptu_datetime, fpta_noindex_nullable, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe("host", fptu_cstr, fpta_noindex_nullable, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe( "_last_changed", fptu_datetime, fpta_secondary_withdups_ordered_obverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe("_id", fptu_uint64, fpta_secondary_unique_ordered_obverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_set_validate(&def)); // запускам транзакцию и создаем таблицу с обозначенным набором колонок fpta_txn *txn = nullptr; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_schema, &txn)); ASSERT_NE(nullptr, txn); EXPECT_EQ(FPTA_OK, fpta_table_create(txn, "Table", &def)); EXPECT_EQ(FPTA_OK, fpta_column_set_destroy(&def)); EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); txn = nullptr; // закрываем базу EXPECT_EQ(FPTA_SUCCESS, fpta_db_close(db)); db = nullptr; // открываем базу ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_weak, fpta_regime_default, 1, false, &db)); ASSERT_NE(nullptr, db); fpta_name table_id, primary_key, host, id, last_changed, name, date; EXPECT_EQ(FPTA_OK, fpta_table_init(&table_id, "Table")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table_id, &primary_key, "primary_key")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table_id, &host, "host")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table_id, &id, "_id")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table_id, &last_changed, "_last_changed")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table_id, &name, "user_name")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table_id, &date, "date")); fptu_rw *tuple = fptu_alloc(6, 1000); ASSERT_NE(nullptr, tuple); scoped_ptrw_guard ptrw_guard; ptrw_guard.reset(tuple); int err = FPTA_OK; for (uint64_t pk = 0; err == FPTA_OK; ++pk) { skipped = GTEST_IS_EXECUTION_TIMEOUT(); if (skipped) break; // открываем транзакцию на запись, записываем данные EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_write, &txn)); ASSERT_NE(nullptr, txn); EXPECT_EQ(FPTA_OK, fpta_name_refresh_couple(txn, &table_id, &primary_key)); EXPECT_EQ(FPTA_OK, fpta_name_refresh_couple(txn, &table_id, &host)); EXPECT_EQ(FPTA_OK, fpta_name_refresh_couple(txn, &table_id, &id)); EXPECT_EQ(FPTA_OK, fpta_name_refresh_couple(txn, &table_id, &last_changed)); EXPECT_EQ(FPTA_OK, fpta_name_refresh_couple(txn, &table_id, &name)); EXPECT_EQ(FPTA_OK, fpta_name_refresh_couple(txn, &table_id, &date)); const auto now = fpta_value_datetime(fptu_now_coarse()); fptu_clear(tuple); EXPECT_EQ(FPTA_OK, fpta_upsert_column(tuple, &primary_key, fpta_value_uint(pk))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(tuple, &date, now)); EXPECT_EQ(FPTA_OK, fpta_upsert_column( tuple, &name, fpta_value_cstr("qa-kolobok.mpqa.OoCa5Qua.ru"))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(tuple, &host, fpta_value_cstr("administrator"))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(tuple, &id, fpta_value_uint(pk))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(tuple, &last_changed, now)); err = fpta_probe_and_upsert_row(txn, &table_id, fptu_take(tuple)); if (err != FPTA_OK) { // отменяем если была ошибка ASSERT_EQ(FPTA_DB_FULL, err); err = fpta_transaction_end(txn, true); if (err != FPTA_OK) { ASSERT_EQ(FPTA_TXN_CANCELLED, err); } } else { // коммитим и ожидаем ошибку переполнения здесь err = fpta_transaction_end(txn, false); if (err != FPTA_OK) { ASSERT_EQ(FPTA_DB_FULL, err); } } } fpta_name_destroy(&host); fpta_name_destroy(&id); fpta_name_destroy(&last_changed); fpta_name_destroy(&table_id); fpta_name_destroy(&name); fpta_name_destroy(&date); fpta_name_destroy(&primary_key); // закрываем базу EXPECT_EQ(FPTA_SUCCESS, fpta_db_close(db)); ASSERT_TRUE(REMOVE_FILE(testdb_name) == 0); ASSERT_TRUE(REMOVE_FILE(testdb_name_lck) == 0); } //---------------------------------------------------------------------------- TEST(Smoke, AsyncSchemaChange) { /* Smoke-проверка поведения при асинхронном изменении схемы. * * Сценарий: * 1. Создаем базу с одной таблицей и некоторым кол-вом колонок. * * 2. Вставляем данные из контекста "коррелятора" для проверки * что с таблицей все хорошо. * * 3. Параллельно открываем базу в контексте "командера" и изменяем * схему таблицы. * * 4. Еще раз вставляем данные из контекста "коррелятора". */ const bool skipped = GTEST_IS_EXECUTION_TIMEOUT(); if (skipped) return; // создаем исходную базу { // чистим if (REMOVE_FILE(testdb_name) != 0) { ASSERT_EQ(ENOENT, errno); } if (REMOVE_FILE(testdb_name_lck) != 0) { ASSERT_EQ(ENOENT, errno); } fpta_db *db = nullptr; ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_weak, fpta_regime4testing, 1, true, &db)); ASSERT_NE(nullptr, db); // описываем простейшую таблицу с одним PK (int64) и колонками // (_last_changed, fp64, int64, string, datetime) fpta_column_set def1; fpta_column_set_init(&def1); EXPECT_EQ(FPTA_OK, fpta_column_describe("host", fptu_cstr, fpta_primary_unique_ordered_obverse_nullable, &def1)); EXPECT_EQ(FPTA_OK, fpta_column_describe( "_last_changed", fptu_datetime, fpta_secondary_withdups_ordered_obverse_nullable, &def1)); EXPECT_EQ(FPTA_OK, fpta_column_describe( "_id", fptu_int64, fpta_secondary_unique_ordered_obverse_nullable, &def1)); EXPECT_EQ(FPTA_OK, fpta_column_describe("user", fptu_cstr, fpta_noindex_nullable, &def1)); EXPECT_EQ(FPTA_OK, fpta_column_set_validate(&def1)); // запускам транзакцию и создаем таблицу с обозначенным набором колонок fpta_txn *txn = nullptr; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_schema, &txn)); ASSERT_NE(nullptr, txn); EXPECT_EQ(FPTA_OK, fpta_table_create( txn, "Success_bruteforce_on_host_table", &def1)); EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); txn = nullptr; EXPECT_EQ(FPTA_OK, fpta_column_set_destroy(&def1)); // закрываем базу EXPECT_EQ(FPTA_SUCCESS, fpta_db_close(db)); } // открываем базу в "корреляторе" fpta_db *db_correlator = nullptr; ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_weak, fpta_regime_default, 1, false, &db_correlator)); ASSERT_NE(nullptr, db_correlator); fpta_txn *txn_correlator = nullptr; fpta_name table_id_, host, last, id, user; fptu_rw *tuple = fptu_alloc(4, 1000); ASSERT_NE(nullptr, tuple); scoped_ptrw_guard ptrw_guard; ptrw_guard.reset(tuple); // выполняем пробное обновление в кореляторе { EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db_correlator, fpta_write, &txn_correlator)); EXPECT_EQ(FPTA_OK, fpta_table_init(&table_id_, "Success_bruteforce_on_host_table")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table_id_, &host, "host")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table_id_, &last, "_last_changed")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table_id_, &id, "_id")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table_id_, &user, "user")); EXPECT_EQ(FPTA_OK, fpta_name_refresh_couple(txn_correlator, &table_id_, &host)); EXPECT_EQ(FPTA_OK, fpta_name_refresh_couple(txn_correlator, &table_id_, &last)); EXPECT_EQ(FPTA_OK, fpta_name_refresh_couple(txn_correlator, &table_id_, &id)); EXPECT_EQ(FPTA_OK, fpta_name_refresh_couple(txn_correlator, &table_id_, &user)); EXPECT_EQ(FPTA_OK, fpta_upsert_column( tuple, &host, fpta_value_cstr("qa-kolobok.mpqa.OoCa5Qua.ru"))); EXPECT_EQ(FPTA_OK, fpta_upsert_column( tuple, &last, fpta_value_datetime(fptu_now_fine()))); uint64_t seq = 0; EXPECT_EQ(FPTA_OK, fpta_table_sequence(txn_correlator, &table_id_, &seq, 1)); EXPECT_EQ(FPTA_OK, fpta_upsert_column(tuple, &id, fpta_value_sint((int64_t)seq))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(tuple, &user, fpta_value_cstr("Administrator"))); fpta_value value = fpta_value_cstr("qa-kolobok.mpqa.OoCa5Qua.ru"); fptu_ro record; EXPECT_EQ(FPTA_NOTFOUND, fpta_get(txn_correlator, &host, &value, &record)); EXPECT_EQ(FPTA_OK, fpta_probe_and_upsert_row(txn_correlator, &table_id_, fptu_take(tuple))); fptu_clear(tuple); #if 0 /* лишние телодвижения */ fpta_name_destroy(&table_id_); fpta_name_destroy(&host); fpta_name_destroy(&last); fpta_name_destroy(&id); fpta_name_destroy(&user); #endif EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn_correlator, false)); txn_correlator = nullptr; } // изменяем схему в "коммандоре" { // открываем базу в "командоре" fpta_db *db_commander = nullptr; ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_weak, fpta_regime4testing, 1, true, &db_commander)); ASSERT_NE(nullptr, db_commander); fpta_txn *txn_commander = nullptr; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db_commander, fpta_schema, &txn_commander)); ASSERT_NE(nullptr, txn_commander); // удаляем существующую таблицу EXPECT_EQ(FPTA_OK, fpta_table_drop(txn_commander, "Success_bruteforce_on_host_table")); #if 0 /* лишние телодвижения */ EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn_commander, false)); txn_commander = nullptr; EXPECT_EQ(FPTA_SUCCESS, fpta_db_close(db_commander)); db_commander = nullptr; ASSERT_EQ(FPTA_OK, fpta_db_open(testdb_name, fpta_weak, fpta_regime4testing, 1, true, &db_commander)); ASSERT_NE(nullptr, db_commander); EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db_commander, fpta_schema, &txn_commander)); ASSERT_NE(nullptr, txn_commander); #endif // описываем новую структуру таблицы fpta_column_set def1; fpta_column_set_init(&def1); EXPECT_EQ(FPTA_OK, fpta_column_describe("host", fptu_cstr, fpta_primary_unique_ordered_obverse_nullable, &def1)); EXPECT_EQ(FPTA_OK, fpta_column_describe( "_id", fptu_int64, fpta_secondary_unique_ordered_obverse_nullable, &def1)); EXPECT_EQ(FPTA_OK, fpta_column_describe( "_last_changed", fptu_datetime, fpta_secondary_withdups_ordered_obverse_nullable, &def1)); EXPECT_EQ(FPTA_OK, fpta_column_describe("user", fptu_cstr, fpta_noindex_nullable, &def1)); EXPECT_EQ(FPTA_OK, fpta_column_set_validate(&def1)); // создаем новую таблицу EXPECT_EQ(FPTA_OK, fpta_table_create(txn_commander, "Success_bruteforce_on_host_table", &def1)); EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn_commander, false)); EXPECT_EQ(FPTA_SUCCESS, fpta_db_close(db_commander)); EXPECT_EQ(FPTA_OK, fpta_column_set_destroy(&def1)); } // выполняем контрольное обновление данных после изменения схемы { EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db_correlator, fpta_write, &txn_correlator)); #if 0 /* лишние телодвижения */ fpta_name table_id_, host, last, id, user; EXPECT_EQ(FPTA_OK, fpta_table_init(&table_id_, "Success_bruteforce_on_host_table")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table_id_, &host, "host")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table_id_, &last, "_last_changed")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table_id_, &id, "_id")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table_id_, &user, "user")); EXPECT_EQ(FPTA_OK, fpta_name_refresh(txn_correlator, &table_id_)); #endif EXPECT_EQ(FPTA_OK, fpta_name_refresh_couple(txn_correlator, &table_id_, &host)); EXPECT_EQ(FPTA_OK, fpta_name_refresh_couple(txn_correlator, &table_id_, &last)); EXPECT_EQ(FPTA_OK, fpta_name_refresh_couple(txn_correlator, &table_id_, &id)); EXPECT_EQ(FPTA_OK, fpta_name_refresh_couple(txn_correlator, &table_id_, &user)); EXPECT_EQ(FPTA_OK, fpta_upsert_column( tuple, &host, fpta_value_cstr("qa-kolobok.mpqa.OoCa5Qua.ru"))); EXPECT_EQ(FPTA_OK, fpta_upsert_column( tuple, &last, fpta_value_datetime(fptu_now_fine()))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(tuple, &id, fpta_value_sint(0))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(tuple, &user, fpta_value_cstr("Administrator"))); fpta_value value = fpta_value_cstr("qa-kolobok.mpqa.OoCa5Qua.ru"); fptu_ro record; EXPECT_EQ(FPTA_NOTFOUND, fpta_get(txn_correlator, &host, &value, &record)); EXPECT_EQ(FPTA_OK, fpta_probe_and_upsert_row(txn_correlator, &table_id_, fptu_take(tuple))); fptu_clear(tuple); EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn_correlator, false)); } fpta_name_destroy(&host); fpta_name_destroy(&last); fpta_name_destroy(&id); fpta_name_destroy(&user); fpta_name_destroy(&table_id_); EXPECT_EQ(FPTA_SUCCESS, fpta_db_close(db_correlator)); ASSERT_TRUE(REMOVE_FILE(testdb_name) == 0); ASSERT_TRUE(REMOVE_FILE(testdb_name_lck) == 0); } //---------------------------------------------------------------------------- #if FPTA_PRESERVE_GEOMETRY TEST(Smoke, Migration) { #else /* Тест невозможен, так как при FPTA_PRESERVE_GEOMETRY=OFF возникает deadlock */ TEST(Smoke, DISABLED_Migration) { #endif /* Smoke-проверка сценария миграции с уменьшением размера БД. * * Сценарий: * 1. Создаем базу "коммандером", в которой одна таблица * с тремя индексированными колонками. * 2. Открываем базу "коррелятором" и за 1000 транзакций * добавляем 1000 записей, сразу закрываем базу. * 3. В "коммандере" обновляем схему и данные в одной транзакции: * - сначала получаем и сверяем сведения о таблице; * - удаляем таблицу, создаем новую с одной колонкой; * - вставляем 1111 записей; * - до завершения транзакции снова открываем базу "коррелятором", * - коммитим транзакцию; * 4. В "корреляторе" стартуем транзакцию и получаем сведения о таблице. * 5. Закрываем БД в "коммандере", затем переоткрываем в "корреляторе" * и еще раз получаем сведения о таблице. * 6. Завершаем операции и освобождаем ресурсы. */ const bool skipped = GTEST_IS_EXECUTION_TIMEOUT(); if (skipped) return; if (REMOVE_FILE(testdb_name) != 0) { ASSERT_EQ(ENOENT, errno); } if (REMOVE_FILE(testdb_name_lck) != 0) { ASSERT_EQ(ENOENT, errno); } fpta_db *correlator_db = nullptr; fpta_db *commander_db = nullptr; // из "коммандера" создаем базу и таблицу { // создаем базу в 16 мегабайт ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_weak, fpta_regime_default, 16, true, &commander_db)); ASSERT_NE(nullptr, commander_db); // описываем таблицу с тремя колонками fpta_column_set def; fpta_column_set_init(&def); EXPECT_EQ(FPTA_OK, fpta_column_describe("x", fptu_int64, fpta_primary_unique_ordered_obverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe( "y", fptu_int64, fpta_secondary_withdups_ordered_obverse_nullable, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe( "z", fptu_cstr, fpta_secondary_withdups_ordered_reverse_nullable, &def)); EXPECT_EQ(FPTA_OK, fpta_column_set_validate(&def)); // запускам транзакцию и создаем таблицу с обозначенным набором колонок fpta_txn *txn = (fpta_txn *)&txn; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(commander_db, fpta_schema, &txn)); ASSERT_NE(nullptr, txn); EXPECT_EQ(FPTA_OK, fpta_table_create(txn, "table", &def)); EXPECT_EQ(FPTA_OK, fpta_column_set_destroy(&def)); EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); txn = nullptr; // закрываем в коммандере ASSERT_EQ(FPTA_SUCCESS, fpta_db_close(commander_db)); commander_db = nullptr; } // из "коррелятора" вставляем 1000 записей по одной в транзакции { // создаем кортеж для вставки записей fptu_rw *pt1 = fptu_alloc(3, 2048); ASSERT_NE(nullptr, pt1); ASSERT_STREQ(nullptr, fptu::check(pt1)); // инициализируем идентификаторы fpta_name table, col_x, col_y, col_z; EXPECT_EQ(FPTA_OK, fpta_table_init(&table, "table")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &col_x, "x")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &col_y, "y")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &col_z, "z")); // открываем из коррелятора ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_weak, fpta_regime_default, 16, false, &correlator_db)); ASSERT_NE(nullptr, correlator_db); for (unsigned n = 0; n < 1000; ++n) { SCOPED_TRACE("txn/record #" + std::to_string(n)); // начинаем транзакцию для вставки данных fpta_txn *txn = (fpta_txn *)&txn; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(correlator_db, fpta_write, &txn)); ASSERT_NE(nullptr, txn); ASSERT_EQ(FPTA_OK, fpta_name_refresh_couple(txn, &table, &col_x)); ASSERT_EQ(FPTA_OK, fpta_name_refresh_couple(txn, &table, &col_y)); ASSERT_EQ(FPTA_OK, fpta_name_refresh_couple(txn, &table, &col_z)); // добавляем значения EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt1, &col_x, fpta_value_sint(n))); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt1, &col_y, fpta_value_uint(n % 42))); std::string str = random_string(257u + n); EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt1, &col_z, fpta_value_str(str))); // вставляем запись ASSERT_STREQ(nullptr, fptu::check(pt1)); fptu_ro taken_noshrink; taken_noshrink = fptu_take_noshrink(pt1); ASSERT_EQ(FPTA_OK, fpta_put(txn, &table, taken_noshrink, fpta_insert)); ASSERT_EQ(FPTU_OK, fptu_clear(pt1)); // фиксируем изменения из коррелятора EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); txn = nullptr; } // освобождаем кортеж free(pt1); pt1 = nullptr; // разрушаем привязанные идентификаторы fpta_name_destroy(&col_x); fpta_name_destroy(&col_y); fpta_name_destroy(&col_z); fpta_name_destroy(&table); // закрываем в корреляторе ASSERT_EQ(FPTA_SUCCESS, fpta_db_close(correlator_db)); correlator_db = nullptr; } // из "коммандера" в одной транзакции обновляем схему и данные { // инициализируем идентификаторы таблицы со стороны "коммандера" fpta_name table; EXPECT_EQ(FPTA_OK, fpta_table_init(&table, "table")); // вновь открываем из коммандера ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_weak, fpta_regime_default, 16, true, &commander_db)); ASSERT_NE(nullptr, commander_db); // начинаем "толстую" транзакцию из "коммандера" fpta_txn *txn = (fpta_txn *)&txn; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(commander_db, fpta_schema, &txn)); ASSERT_NE(nullptr, txn); EXPECT_EQ(FPTA_OK, fpta_name_refresh(txn, &table)); // сверяем кол-во записей size_t num; EXPECT_EQ(FPTA_OK, fpta_table_info(txn, &table, &num, NULL)); EXPECT_EQ(num, 1000u); // удаляем таблицу EXPECT_EQ(FPTA_OK, fpta_table_drop(txn, "table")); // создаем таблицу с двумя колонками fpta_column_set def; fpta_column_set_init(&def); EXPECT_EQ(FPTA_OK, fpta_column_describe("a", fptu_int64, fpta_primary_unique_ordered_obverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe( "b", fptu_int64, fpta_secondary_withdups_ordered_obverse_nullable, &def)); EXPECT_EQ(FPTA_OK, fpta_column_set_validate(&def)); EXPECT_EQ(FPTA_OK, fpta_table_create(txn, "table", &def)); EXPECT_EQ(FPTA_OK, fpta_column_set_destroy(&def)); // инициализируем идентификаторы fpta_name col_a, col_b; EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &col_a, "a")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &col_b, "b")); ASSERT_EQ(FPTA_OK, fpta_name_refresh_couple(txn, &table, &col_a)); ASSERT_EQ(FPTA_OK, fpta_name_refresh_couple(txn, &table, &col_b)); // создаем кортеж для вставки записей fptu_rw *pt1 = fptu_alloc(2, 42); ASSERT_NE(nullptr, pt1); ASSERT_STREQ(nullptr, fptu::check(pt1)); for (unsigned n = 0; n < 1111; ++n) { SCOPED_TRACE("record #" + std::to_string(n)); // добавляем значения EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt1, &col_a, fpta_value_sint(n))); if (n & 1) { EXPECT_EQ(FPTA_OK, fpta_upsert_column(pt1, &col_b, fpta_value_uint(n + 10000))); } // вставляем запись ASSERT_STREQ(nullptr, fptu::check(pt1)); fptu_ro taken_noshrink = fptu_take_noshrink(pt1); ASSERT_EQ(FPTA_OK, fpta_put(txn, &table, taken_noshrink, fpta_insert)); ASSERT_EQ(FPTU_OK, fptu_clear(pt1)); } // до завершения транзакции снова открываем базу в "корреляторе" ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_weak, fpta_regime_default, 16, false, &correlator_db)); ASSERT_NE(nullptr, correlator_db); // фиксируем транзакцию EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); txn = nullptr; // освобождаем кортеж free(pt1); pt1 = nullptr; // разрушаем привязанные идентификаторы fpta_name_destroy(&col_a); fpta_name_destroy(&col_b); fpta_name_destroy(&table); } // В "корреляторе" стартуем транзакцию и получаем сведения о таблице { fpta_txn *txn = (fpta_txn *)&txn; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(correlator_db, fpta_read, &txn)); ASSERT_NE(nullptr, txn); // инициализируем идентификатор таблицы fpta_name table; EXPECT_EQ(FPTA_OK, fpta_table_init(&table, "table")); ASSERT_EQ(FPTA_OK, fpta_name_refresh(txn, &table)); // сверяем кол-во записей size_t num; EXPECT_EQ(FPTA_OK, fpta_table_info(txn, &table, &num, NULL)); EXPECT_EQ(num, 1111u); // завершает транзакцию коррелятора ASSERT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); txn = nullptr; // разрушаем идентификатор fpta_name_destroy(&table); } // закрываем базу в коммандере ASSERT_EQ(FPTA_SUCCESS, fpta_db_close(commander_db)); commander_db = nullptr; // переоткрываем базу в корреляторе ASSERT_EQ(FPTA_SUCCESS, fpta_db_close(correlator_db)); correlator_db = nullptr; ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_weak, fpta_regime_default, 16, false, &correlator_db)); ASSERT_NE(nullptr, correlator_db); // В "корреляторе" снова стартуем транзакцию и получаем сведения о таблице { fpta_txn *txn = (fpta_txn *)&txn; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(correlator_db, fpta_read, &txn)); ASSERT_NE(nullptr, txn); // инициализируем идентификатор таблицы fpta_name table; EXPECT_EQ(FPTA_OK, fpta_table_init(&table, "table")); ASSERT_EQ(FPTA_OK, fpta_name_refresh(txn, &table)); // сверяем кол-во записей size_t num; EXPECT_EQ(FPTA_OK, fpta_table_info(txn, &table, &num, NULL)); EXPECT_EQ(num, 1111u); // завершает транзакцию коррелятора ASSERT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); txn = nullptr; // разрушаем идентификатор fpta_name_destroy(&table); } // закрываем базу в корреляторе ASSERT_EQ(FPTA_SUCCESS, fpta_db_close(correlator_db)); correlator_db = nullptr; ASSERT_TRUE(REMOVE_FILE(testdb_name) == 0); ASSERT_TRUE(REMOVE_FILE(testdb_name_lck) == 0); } //---------------------------------------------------------------------------- static ptrdiff_t intersect(ptrdiff_t b1, ptrdiff_t e1, ptrdiff_t b2, ptrdiff_t e2) { ptrdiff_t b = std::max(b1, b2); ptrdiff_t e = std::min(e1, e2); return (e > b) ? e - b : 0; } static void check_estimation(const ptrdiff_t gap, fpta_txn *txn, const fpta_table_stat &stat, fpta_name &id, fpta_name &padding) { const ptrdiff_t blunt = 3; const ptrdiff_t begin_key = gap; const ptrdiff_t end_key = begin_key + stat.row_count; const ptrdiff_t step = (stat.btree_depth < 3) ? 1 : 1 + (ptrdiff_t)(stat.row_count / stat.branch_pages / 2); for (ptrdiff_t from = 0; from <= end_key + gap; from += (from > begin_key && from < end_key) ? step : 1) { for (ptrdiff_t width = stat.row_count - from + gap * 2; width >= 0; width -= (width > step + (int)gap) ? step : 1) { char from_buf[32], to_buf[32]; ASSERT_GT(sizeof(from_buf), (size_t)snprintf(from_buf, sizeof(from_buf), "%08" PRIuSIZE, from)); const auto to = from + width; ASSERT_GT(sizeof(to_buf), (size_t)snprintf(to_buf, sizeof(to_buf), "%08" PRIuSIZE, to)); fpta_estimate_item vector[] = { /* 0 */ {&id, fpta_value_cstr(from_buf), fpta_value_cstr(to_buf), INT_MIN, FPTA_ENOIMP}, /* 1 */ {&id, fpta_value_cstr(to_buf), fpta_value_cstr(from_buf), INT_MIN, FPTA_ENOIMP}, /* 2 */ {&id, fpta_value_begin(), fpta_value_cstr(from_buf), INT_MIN, FPTA_ENOIMP}, /* 3 */ {&id, fpta_value_cstr(from_buf), fpta_value_end(), INT_MIN, FPTA_ENOIMP}, /* 4 */ {&id, fpta_value_begin(), fpta_value_end(), INT_MIN, FPTA_ENOIMP}, /* 5 */ {&padding, fpta_value_begin(), fpta_value_end(), INT_MIN, FPTA_ENOIMP}, }; ASSERT_EQ(FPTA_OK, fpta_estimate(txn, FPT_ARRAY_LENGTH(vector), vector, fpta_zeroed_range_is_point)); // [0] from..to: range/2 <= estimated <= range*2 const auto range = intersect(begin_key, end_key, from, to); EXPECT_EQ(FPTA_OK, vector[0].error); if (range < 2) { // отсутствие или одно значение EXPECT_EQ(range, vector[0].estimated_rows); } else { EXPECT_LE(range, vector[0].estimated_rows * blunt); EXPECT_GE(range * blunt, vector[0].estimated_rows); } // [1] to..from (inverted range): inverted_range == estimated const auto inverted_range = -range; if (inverted_range > -2) { // отсутствие или одно значение EXPECT_EQ(inverted_range, vector[1].estimated_rows); } else { EXPECT_GE(inverted_range, vector[1].estimated_rows * blunt); EXPECT_LE(inverted_range * blunt, vector[1].estimated_rows); } // [2] begin..from: before/2 <= estimated <= before*2 const auto before = intersect(begin_key, end_key, 0, from); EXPECT_EQ(FPTA_OK, vector[2].error); EXPECT_LE(before, vector[2].estimated_rows * blunt); EXPECT_GE(before * blunt, vector[2].estimated_rows); // [3] from..end: after/2 <= estimated <= after*2 const auto after = intersect(begin_key, end_key, from, INT_MAX); EXPECT_EQ(FPTA_OK, vector[3].error); EXPECT_LE(after, vector[3].estimated_rows * blunt); EXPECT_GE(after * blunt, vector[3].estimated_rows); // [4] begin..end: estimated == number of rows EXPECT_EQ(FPTA_OK, vector[4].error); EXPECT_EQ((ptrdiff_t)stat.row_count, vector[4].estimated_rows); // [5] non-intexed 'padding' field: estimated >= INT_MAX EXPECT_EQ(FPTA_NO_INDEX, vector[5].error); EXPECT_LE(INT_MAX, vector[5].estimated_rows); } } } TEST(Smoke, Estimate) { bool skipped = GTEST_IS_EXECUTION_TIMEOUT(); if (skipped) return; if (REMOVE_FILE(testdb_name) != 0) { ASSERT_EQ(ENOENT, errno); } if (REMOVE_FILE(testdb_name_lck) != 0) { ASSERT_EQ(ENOENT, errno); } // создаем и открываем базу 128 Mb c минимальным размером страницы fpta_db_creation_params creation_params; creation_params.params_size = sizeof(creation_params); creation_params.file_mode = 0644; creation_params.pagesize = 512; creation_params.size_lower = creation_params.size_upper = 8 << 20; creation_params.growth_step = creation_params.shrink_threshold = 0; fpta_db *db = nullptr; ASSERT_EQ(FPTA_OK, fpta_db_create_or_open(nullptr, testdb_name, fpta_weak, fpta_regime4testing, true, &db, &creation_params)); ASSERT_NE(nullptr, db); // создаем простую таблицу fpta_column_set def; fpta_column_set_init(&def); EXPECT_EQ(FPTA_OK, fpta_column_describe( "id", fptu_cstr, fpta_primary_withdups_ordered_obverse_nullable, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe("padding", fptu_cstr, fpta_noindex_nullable, &def)); fpta_txn *txn = nullptr; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_schema, &txn)); ASSERT_NE(nullptr, txn); EXPECT_EQ(FPTA_OK, fpta_table_create(txn, "linear", &def)); EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); txn = nullptr; EXPECT_EQ(FPTA_OK, fpta_column_set_destroy(&def)); // готовим причиндалы fpta_name table, id, padding; EXPECT_EQ(FPTA_OK, fpta_table_init(&table, "linear")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &id, "id")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &padding, "padding")); fptu_rw *tuple = fptu_alloc(9, 2000); ASSERT_NE(nullptr, tuple); // заполняем таблицу пока в БД есть место, // сохраняя кол-во элементов при изменении высоты b-дерева std::deque<unsigned> edges; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_write, &txn)); ASSERT_NE(nullptr, txn); EXPECT_EQ(FPTA_OK, fpta_name_refresh_couple(txn, &table, &id)); EXPECT_EQ(FPTA_OK, fpta_name_refresh(txn, &padding)); fpta_table_stat stat; memset(&stat, 0, sizeof(stat)); const unsigned gap = 2; ASSERT_EQ(FPTA_OK, fpta_table_sequence(txn, &table, nullptr, gap)); // пара простых проверок обработки fpta_null() в качестве границ диапазона fpta_cursor *cursor = nullptr; ASSERT_EQ(FPTA_NODATA, fpta_cursor_open(txn, &id, fpta_value_null(), fpta_value_null(), nullptr, fpta_zeroed_range_is_point, &cursor)); fpta_estimate_item item = {&id, fpta_value_null(), fpta_value_null(), INT_MIN, FPTA_ENOIMP}; ASSERT_EQ(FPTA_OK, fpta_estimate(txn, 1, &item, fpta_zeroed_range_is_point)); EXPECT_EQ(FPTA_OK, item.error); EXPECT_EQ(0, item.estimated_rows); while (1) { uint64_t sequence = 0; ASSERT_EQ(FPTA_OK, fpta_table_sequence(txn, &table, &sequence, 1)); std::string tail(random_string(42)); char buf[256]; ASSERT_GT(sizeof(buf), (size_t)snprintf(buf, sizeof(buf), "%08" PRIu64 " %s", sequence, tail.c_str())); ASSERT_EQ(FPTA_OK, fpta_upsert_column(tuple, &id, fpta_value_cstr(buf))); int err = fpta_insert_row(txn, &table, fptu_take(tuple)); if (err == FPTA_DB_FULL) { edges.push_back((unsigned)sequence); break; } ASSERT_EQ(FPTA_OK, err); const unsigned prev_height = stat.btree_depth; ASSERT_EQ(FPTA_OK, fpta_table_info(txn, &table, nullptr, &stat)); if (prev_height != stat.btree_depth) edges.push_back((unsigned)sequence); skipped = GTEST_IS_EXECUTION_TIMEOUT(); if (skipped) break; } // отменяем эту транзакцию и начинаем новую ASSERT_EQ(FPTA_OK, fpta_transaction_end(txn, true)); txn = nullptr; // теперь при наполнении таблицы прогоняем цикл проверки estimation, // перед каждым изменением высоты дерева и сразу после него. EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_write, &txn)); ASSERT_NE(nullptr, txn); ASSERT_EQ(FPTA_OK, fpta_table_info(txn, &table, nullptr, &stat)); ASSERT_EQ(FPTA_OK, fpta_table_sequence(txn, &table, nullptr, gap)); while (1) { uint64_t sequence = 0; ASSERT_EQ(FPTA_OK, fpta_table_sequence(txn, &table, &sequence, 1)); if (sequence == edges.front()) { if (edges.size() == 1) break; SCOPED_TRACE(fptu::format("Probe at three-depth %u, before growth by @%u", stat.btree_depth, edges.front())); check_estimation(gap, txn, stat, id, padding); } std::string tail(random_string(42)); char buf[256]; ASSERT_GT(sizeof(buf), (size_t)snprintf(buf, sizeof(buf), "%08" PRIu64 " %s", sequence, tail.c_str())); ASSERT_EQ(FPTA_OK, fpta_upsert_column(tuple, &id, fpta_value_cstr(buf))); ASSERT_EQ(FPTA_OK, fpta_insert_row(txn, &table, fptu_take(tuple))); const unsigned prev_height = stat.btree_depth; ASSERT_EQ(FPTA_OK, fpta_table_info(txn, &table, nullptr, &stat)); if (prev_height != stat.btree_depth) { EXPECT_EQ(edges.front(), sequence); SCOPED_TRACE(fptu::format("Probe after growth three-depth to %u by @%u", stat.btree_depth, edges.front())); check_estimation(gap, txn, stat, id, padding); edges.pop_front(); } else { EXPECT_NE(edges.front(), sequence); if (stat.btree_depth < 4) { SCOPED_TRACE(fptu::format("Probe for small three-depth %u at %u items", stat.btree_depth, (unsigned)stat.row_count)); check_estimation(gap, txn, stat, id, padding); } } skipped = skipped || GTEST_IS_EXECUTION_TIMEOUT(); if (skipped) goto skip; } // должен остаться только элемент (вызывающий переполнение БД) ASSERT_EQ(1u, edges.size()); skip: ASSERT_EQ(FPTA_OK, fpta_transaction_end(txn, true)); txn = nullptr; // освобождаем ресурсы EXPECT_EQ(FPTU_OK, fptu_clear(tuple)); free(tuple); fpta_name_destroy(&table); fpta_name_destroy(&id); fpta_name_destroy(&padding); // закрываем и удаляем базу EXPECT_EQ(FPTA_SUCCESS, fpta_db_close(db)); ASSERT_TRUE(REMOVE_FILE(testdb_name) == 0); ASSERT_TRUE(REMOVE_FILE(testdb_name_lck) == 0); } //---------------------------------------------------------------------------- TEST(Smoke, TransacionRestart) { /* Smoke-тест перезапуска читающей транзакции. * * 1. Создаем базу и после создания сразу параллельно открываем её, * запускам читающую транзакцию. * 2. Создаем таблицу и проверяем её отсутствие в читающей транзакции, * запущенной ранее в другом экземпляре. * 3. Перезапускаем транзакцию чтения и проверяем что таблица появилась. * 4. Наполняем таблицу в отдельной транзакции и проверяем что в читающей * транзакции таблица осталось пустой. * 5. Перезапускаем читающую транзакцию и проверям наличие данных в таблице. * 6. Удаляем таблицу и проверяем что таблица осталась в читающей транзакции. * 7. Перезапускам читающую транзакицю и проверяем отсутствие таблицы. */ const bool skipped = GTEST_IS_EXECUTION_TIMEOUT(); if (skipped) return; if (REMOVE_FILE(testdb_name) != 0) { ASSERT_EQ(ENOENT, errno); } if (REMOVE_FILE(testdb_name_lck) != 0) { ASSERT_EQ(ENOENT, errno); } // взводим флажок MDBX_DBG_LEGACY_OVERLAP, чтобы иметь возмоность наложить // читающую и пишущую транзакцию в одном потоке const MDBX_debug_flags_t debug_flags = MDBX_debug_flags_t(mdbx_setup_debug( MDBX_LOG_DONTCHANGE, MDBX_DBG_DONTCHANGE, MDBX_LOGGER_DONTCHANGE)); mdbx_setup_debug(MDBX_LOG_DONTCHANGE, debug_flags | MDBX_DBG_LEGACY_OVERLAP, MDBX_LOGGER_DONTCHANGE); // создаем базу fpta_db *rw_db = nullptr; ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_weak, fpta_regime_default, 1, true, &rw_db)); ASSERT_NE(nullptr, rw_db); // параллельно открываем базу для чтения fpta_db *ro_db = nullptr; ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_readonly, fpta_regime_default, 1, true, &ro_db)); ASSERT_NE(nullptr, ro_db); // сразу запускаем транзакцию чтения fpta_txn *ro_txn = nullptr; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(ro_db, fpta_read, &ro_txn)); ASSERT_NE(nullptr, ro_txn); uint64_t initial_db_version = 42, initial_schema_version = 42; EXPECT_EQ(FPTA_OK, fpta_transaction_versions(ro_txn, &initial_db_version, &initial_schema_version)); EXPECT_NE(0u, initial_db_version); EXPECT_EQ(0u, initial_schema_version); // инициализируем идентификаторы таблицы и её колонок fpta_name rw_table, rw_col_pk; EXPECT_EQ(FPTA_OK, fpta_table_init(&rw_table, "table")); EXPECT_EQ(FPTA_OK, fpta_column_init(&rw_table, &rw_col_pk, "pk_str_uniq")); // тоже самое для читающей транзакции fpta_name ro_table, ro_col_pk; EXPECT_EQ(FPTA_OK, fpta_table_init(&ro_table, "table")); EXPECT_EQ(FPTA_OK, fpta_column_init(&ro_table, &ro_col_pk, "pk_str_uniq")); // запускам транзакцию и создаем таблицу с обозначенным набором колонок fpta_txn *rw_txn = nullptr; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(rw_db, fpta_schema, &rw_txn)); ASSERT_NE(nullptr, rw_txn); // шаг приращения номера транзакций: обычно равен 1, но равен 2 на 32-битных // архитектурах без 64-битных атомарных операций. const unsigned txnid_step = unsigned(mdbx_txn_id(fpta_mdbx_txn(rw_txn)) - initial_db_version); ASSERT_TRUE(txnid_step == 1 || txnid_step == /* 32-bit arch without 64-bit atomic ops */ 2); // описываем простейшую таблицу с одним PK fpta_column_set def; fpta_column_set_init(&def); EXPECT_EQ(FPTA_OK, fpta_column_describe("pk_str_uniq", fptu_cstr, fpta_primary_unique_ordered_obverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_set_validate(&def)); EXPECT_EQ(FPTA_OK, fpta_table_create(rw_txn, "Table", &def)); ASSERT_EQ(FPTA_OK, fpta_transaction_commit(rw_txn)); rw_txn = nullptr; // разрушаем описание таблицы EXPECT_EQ(FPTA_OK, fpta_column_set_destroy(&def)); EXPECT_NE(FPTA_OK, fpta_column_set_validate(&def)); // в запущенной читающей транзакции таблицы еще не должно быть size_t lag = ~42u; EXPECT_EQ(FPTA_OK, fpta_transaction_lag_ex(ro_txn, &lag, nullptr, nullptr)); EXPECT_EQ(txnid_step, lag); EXPECT_EQ(FPTA_NOTFOUND, fpta_table_info(ro_txn, &ro_table, nullptr, nullptr)); // перезапускаем транзакцию чтения, теперь таблица должна появиться ASSERT_EQ(FPTA_OK, fpta_transaction_restart(ro_txn)); EXPECT_EQ(FPTA_OK, fpta_table_info(ro_txn, &ro_table, nullptr, nullptr)); uint64_t db_version = 42, schema_version = 42; EXPECT_EQ(FPTA_OK, fpta_transaction_versions(ro_txn, &db_version, &schema_version)); EXPECT_EQ(initial_db_version + 1 * txnid_step, db_version); EXPECT_EQ(db_version, schema_version); // начинаем транзакцию для вставки данных EXPECT_EQ(FPTA_OK, fpta_transaction_begin(rw_db, fpta_write, &rw_txn)); ASSERT_NE(nullptr, rw_txn); // создаем кортеж и наполняем таблицу данными fptu_rw *pt = fptu_alloc(1, 42); ASSERT_NE(nullptr, pt); EXPECT_EQ(FPTA_OK, fpta_name_refresh_couple(rw_txn, &rw_table, &rw_col_pk)); for (int i = 0; i < 42; i++) { ASSERT_EQ(FPTA_OK, fpta_upsert_column(pt, &rw_col_pk, fpta_value_str(random_string(21)))); ASSERT_EQ(FPTA_OK, fpta_insert_row(rw_txn, &rw_table, fptu_take(pt))); } // завершаем транзакцию записи ASSERT_EQ(FPTA_OK, fpta_transaction_commit(rw_txn)); rw_txn = nullptr; // проверяем пустоту таблицы в параллельной читающей транзакции, // которая была запущена до наполнения таблицы size_t row_count; fpta_table_stat stat; memset(&row_count, 42, sizeof(row_count)); memset(&stat, 42, sizeof(stat)); EXPECT_EQ(FPTA_OK, fpta_table_info(ro_txn, &ro_table, &row_count, &stat)); EXPECT_EQ(0u, row_count); EXPECT_EQ(row_count, stat.row_count); EXPECT_EQ(0u, stat.btree_depth); EXPECT_EQ(0u, stat.large_pages); EXPECT_EQ(0u, stat.branch_pages); EXPECT_EQ(0u, stat.leaf_pages); EXPECT_EQ(0u, stat.total_bytes); lag = ~42u; EXPECT_EQ(FPTA_OK, fpta_transaction_lag_ex(ro_txn, &lag, nullptr, nullptr)); EXPECT_EQ(txnid_step, lag); // перезапускаем транзакцию чтения ASSERT_EQ(FPTA_OK, fpta_transaction_restart(ro_txn)); EXPECT_EQ(FPTA_OK, fpta_transaction_lag_ex(ro_txn, &lag, nullptr, nullptr)); EXPECT_EQ(0u, lag); // теперь в таблице должны появиться данные EXPECT_EQ(FPTA_OK, fpta_table_info(ro_txn, &ro_table, &row_count, &stat)); EXPECT_EQ(42u, row_count); EXPECT_EQ(row_count, stat.row_count); EXPECT_EQ(FPTA_OK, fpta_transaction_versions(ro_txn, &db_version, &schema_version)); EXPECT_EQ(initial_db_version + 2 * txnid_step, db_version); EXPECT_EQ(db_version - 1 * txnid_step, schema_version); // начинаем транзакцию для удаления таблицы EXPECT_EQ(FPTA_OK, fpta_transaction_begin(rw_db, fpta_schema, &rw_txn)); ASSERT_NE(nullptr, rw_txn); ASSERT_EQ(FPTA_OK, fpta_table_drop(rw_txn, "table")); // завершаем транзакцию удаляющую таблицу ASSERT_EQ(FPTA_OK, fpta_transaction_commit(rw_txn)); rw_txn = nullptr; // в запущенной читающей транзакции таблица должа остаться EXPECT_EQ(FPTA_OK, fpta_table_info(ro_txn, &ro_table, nullptr, nullptr)); // перезапускаем транзакцию чтения, теперь таблица пропасть ASSERT_EQ(FPTA_OK, fpta_transaction_restart(ro_txn)); EXPECT_EQ(FPTA_NOTFOUND, fpta_table_info(ro_txn, &ro_table, nullptr, nullptr)); // завершаем транзакцию чтения EXPECT_EQ(FPTA_OK, fpta_transaction_end(ro_txn, false)); ro_txn = nullptr; // разрушаем привязанные идентификаторы fpta_name_destroy(&rw_table); fpta_name_destroy(&rw_col_pk); fpta_name_destroy(&ro_table); fpta_name_destroy(&ro_col_pk); // разрушаем созданный кортежи, на всякий случай предварительно проверяя его ASSERT_STREQ(nullptr, fptu::check(pt)); free(pt); pt = nullptr; // закрываем базу EXPECT_EQ(FPTA_SUCCESS, fpta_db_close(rw_db)); EXPECT_EQ(FPTA_SUCCESS, fpta_db_close(ro_db)); ASSERT_TRUE(REMOVE_FILE(testdb_name) == 0); ASSERT_TRUE(REMOVE_FILE(testdb_name_lck) == 0); // восстанавливаем отладочные флажки mdbx_setup_debug(MDBX_LOG_DONTCHANGE, debug_flags, MDBX_LOGGER_DONTCHANGE); } //---------------------------------------------------------------------------- class Smoke_CursorRERERE : public ::testing::TestWithParam< GTEST_TUPLE_NAMESPACE_::tuple<fpta_index_type, fpta_cursor_options>> { public: fpta_index_type index; fpta_cursor_options ordering; bool skipped; scoped_db_guard rw_db_guard, ro_db_guard; scoped_txn_guard ro_txn_guard; scoped_cursor_guard cursor_guard; fptu::tuple_ptr tuple; fpta_name rw_table, rw_col_pk, rw_col_se, rw_col_order; fpta_name ro_table, ro_col_pk, ro_col_se, ro_col_order; fpta_column_set def; std::map<unsigned, unsigned> map_pk2se; unsigned linear_pk; MDBX_debug_flags_t debug_flags; virtual void SetUp() { index = GTEST_TUPLE_NAMESPACE_::get<0>(GetParam()); ordering = GTEST_TUPLE_NAMESPACE_::get<1>(GetParam()); SCOPED_TRACE("index " + std::to_string(index) + ", ordering " + std::to_string(ordering)); skipped = GTEST_IS_EXECUTION_TIMEOUT(); if (skipped) return; // взводим флажок MDBX_DBG_LEGACY_OVERLAP, чтобы иметь возмоность наложить // читающую и пишущую транзакцию в одном потоке debug_flags = MDBX_debug_flags_t(mdbx_setup_debug( MDBX_LOG_DONTCHANGE, MDBX_DBG_DONTCHANGE, MDBX_LOGGER_DONTCHANGE)); mdbx_setup_debug(MDBX_LOG_DONTCHANGE, debug_flags | MDBX_DBG_LEGACY_OVERLAP, MDBX_LOGGER_DONTCHANGE); // чистим if (REMOVE_FILE(testdb_name) != 0) { ASSERT_EQ(ENOENT, errno); } if (REMOVE_FILE(testdb_name_lck) != 0) { ASSERT_EQ(ENOENT, errno); } // инициализируем идентификаторы таблицы и её колонок EXPECT_EQ(FPTA_OK, fpta_table_init(&rw_table, "table")); EXPECT_EQ(FPTA_OK, fpta_column_init(&rw_table, &rw_col_pk, "pk")); EXPECT_EQ(FPTA_OK, fpta_column_init(&rw_table, &rw_col_se, "se")); EXPECT_EQ(FPTA_OK, fpta_column_init(&rw_table, &rw_col_order, "order")); // тоже самое для читающей транзакции EXPECT_EQ(FPTA_OK, fpta_table_init(&ro_table, "table")); EXPECT_EQ(FPTA_OK, fpta_column_init(&ro_table, &ro_col_pk, "pk")); EXPECT_EQ(FPTA_OK, fpta_column_init(&ro_table, &ro_col_se, "se")); EXPECT_EQ(FPTA_OK, fpta_column_init(&ro_table, &ro_col_order, "order")); // описываем простейшую таблицу с одним PK fpta_column_set_init(&def); if (fpta_index_is_primary(index)) { EXPECT_EQ(FPTA_OK, fpta_column_describe("pk", fptu_uint32, index, &def)); } else { EXPECT_EQ(FPTA_OK, fpta_column_describe("pk", fptu_uint32, fpta_primary_unique_unordered, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe("se", fptu_uint32, index, &def)); } if (!fpta_index_is_unique(index)) { EXPECT_EQ(FPTA_OK, fpta_column_describe("order", fptu_uint32, fpta_index_none, &def)); } EXPECT_EQ(FPTA_OK, fpta_column_set_validate(&def)); // создаем базу fpta_db *db = nullptr; ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_weak, fpta_regime_default, 1, true, &db)); ASSERT_NE(nullptr, db); rw_db_guard.reset(db); // параллельно открываем базу для чтения db = nullptr; ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_readonly, fpta_regime_default, 1, true, &db)); ASSERT_NE(nullptr, db); ro_db_guard.reset(db); // сразу запускаем транзакцию чтения, дальше будем её только перезапускать fpta_txn *txn = nullptr; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(ro_db_guard.get(), fpta_read, &txn)); ASSERT_NE(nullptr, txn); ro_txn_guard.reset(txn); // создаем кортеж для формирования строк таблицы fptu_rw *pt = fptu_alloc(3, 42); ASSERT_NE(nullptr, pt); tuple.reset(pt); } virtual void TearDown() { if (skipped) return; // закрываем курсор и завершаем транзакцию чтения if (cursor_guard) { EXPECT_EQ(FPTA_OK, fpta_cursor_close(cursor_guard.release())); } if (ro_txn_guard) { ASSERT_EQ(FPTA_OK, fpta_transaction_end(ro_txn_guard.release(), true)); } // разрушаем привязанные идентификаторы fpta_name_destroy(&rw_table); fpta_name_destroy(&rw_col_pk); fpta_name_destroy(&rw_col_se); fpta_name_destroy(&rw_col_order); fpta_name_destroy(&ro_table); fpta_name_destroy(&ro_col_pk); fpta_name_destroy(&ro_col_se); fpta_name_destroy(&ro_col_order); // разрушаем описание таблицы EXPECT_EQ(FPTA_OK, fpta_column_set_destroy(&def)); EXPECT_NE(FPTA_OK, fpta_column_set_validate(&def)); // закрываем и удаляем базу if (ro_db_guard) { ASSERT_EQ(FPTA_SUCCESS, fpta_db_close(ro_db_guard.release())); } if (rw_db_guard) { ASSERT_EQ(FPTA_SUCCESS, fpta_db_close(rw_db_guard.release())); ASSERT_TRUE(REMOVE_FILE(testdb_name) == 0); ASSERT_TRUE(REMOVE_FILE(testdb_name_lck) == 0); } // восстанавливаем отладочные флажки mdbx_setup_debug(MDBX_LOG_DONTCHANGE, debug_flags, MDBX_LOGGER_DONTCHANGE); } void Debug(const char *oper, const fptu_ro &row) { fprintf(stderr, "[ %8s ] ", oper); fpta_value value; if (FPTA_OK == fpta_get_column(row, &rw_col_order, &value)) fprintf(stderr, " order=%u", (unsigned)value.uint); if (FPTA_OK == fpta_get_column(row, &rw_col_se, &value)) fprintf(stderr, " se=%u", (unsigned)value.uint); if (FPTA_OK == fpta_get_column(row, &rw_col_pk, &value)) fprintf(stderr, " pk=%u", (unsigned)value.uint); fprintf(stderr, "\n"); fflush(nullptr); } void Prepare(const unsigned N, const unsigned dup = 0) { scoped_txn_guard rw_txn_guard; // запускам транзакцию и создаем таблицу с обозначенным набором колонок fpta_txn *txn = nullptr; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(rw_db_guard.get(), fpta_schema, &txn)); ASSERT_NE(nullptr, txn); rw_txn_guard.reset(txn); // очищаем таблицу, либо создаем если её еще нет int err = fpta_table_clear(txn, &rw_table, true); if (err) { ASSERT_EQ(FPTA_NOTFOUND, err); ASSERT_EQ(FPTA_OK, fpta_table_create(txn, "Table", &def)); } map_pk2se.clear(); // наполняем таблицу данными EXPECT_EQ(FPTU_OK, fptu_clear(tuple.get())); EXPECT_EQ(FPTA_OK, fpta_name_refresh_couple(txn, &rw_table, &rw_col_pk)); if (fpta_index_is_secondary(index)) { EXPECT_EQ(FPTA_OK, fpta_name_refresh_couple(txn, &rw_table, &rw_col_se)); } if (!fpta_index_is_unique(index)) { EXPECT_EQ(FPTA_OK, fpta_name_refresh_couple(txn, &rw_table, &rw_col_order)); } for (unsigned order = 1; order <= N; order++) { ASSERT_EQ(FPTA_OK, fpta_upsert_column(tuple.get(), &rw_col_pk, fpta_value_uint(order))); if (fpta_index_is_secondary(index)) { map_pk2se[order] = fpta_index_is_unique(index) ? order : dup; ASSERT_EQ(FPTA_OK, fpta_upsert_column(tuple.get(), &rw_col_se, fpta_value_uint(map_pk2se.at(order)))); } if (!fpta_index_is_unique(index)) { ASSERT_EQ(FPTA_OK, fpta_upsert_column(tuple.get(), &rw_col_order, fpta_value_uint(order))); } ASSERT_EQ(FPTA_OK, fpta_insert_row(txn, &rw_table, fptu_take(tuple.get()))); // Debug("create", fptu_take_noshrink(tuple.get())); } ASSERT_EQ(FPTA_OK, fpta_transaction_commit(rw_txn_guard.release())); // перезапускаем транзакцию чтения и открываем курсор ASSERT_EQ(FPTA_OK, fpta_transaction_restart(ro_txn_guard.get())); fpta_cursor *cursor = nullptr; EXPECT_EQ( FPTA_OK, fpta_cursor_open(ro_txn_guard.get(), fpta_index_is_primary(index) ? &ro_col_pk : &ro_col_se, fpta_value_begin(), fpta_value_end(), nullptr, ordering, &cursor)); ASSERT_NE(nullptr, cursor); cursor_guard.reset(cursor); if (!fpta_index_is_unique(index)) { EXPECT_EQ(FPTA_OK, fpta_name_refresh_couple(ro_txn_guard.get(), &ro_table, &ro_col_order)); } // проверяем кол-во записей за курсором (в таблице). size_t row_count = ~42u; EXPECT_EQ(FPTA_OK, fpta_cursor_count(cursor, &row_count, INT_MAX)); EXPECT_EQ(N, row_count); // переходим к первой записи EXPECT_EQ(FPTA_OK, fpta_cursor_move(cursor, fpta_first)); } unsigned Current() { fptu_ro row; fpta_value order; EXPECT_EQ(FPTA_OK, fpta_cursor_get(cursor_guard.get(), &row)); // Debug("current", row); const auto col = fpta_index_is_primary(index) ? &ro_col_pk : fpta_index_is_unique(index) ? &ro_col_se : &ro_col_order; EXPECT_EQ(FPTA_OK, fpta_get_column(row, col, &order)); EXPECT_EQ(fpta_unsigned_int, order.type); return (unsigned)order.uint; } void Delete(const unsigned order) { scoped_txn_guard rw_txn_guard; fpta_txn *txn = nullptr; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(rw_db_guard.get(), fpta_write, &txn)); ASSERT_NE(nullptr, txn); rw_txn_guard.reset(txn); ASSERT_EQ(FPTA_OK, fpta_upsert_column(tuple.get(), &rw_col_pk, fpta_value_uint(order))); if (fpta_index_is_secondary(index)) { ASSERT_EQ(FPTA_OK, fpta_upsert_column(tuple.get(), &rw_col_se, fpta_value_uint(map_pk2se.at(order)))); map_pk2se.erase(order); } if (!fpta_index_is_unique(index)) { ASSERT_EQ(FPTA_OK, fpta_upsert_column(tuple.get(), &rw_col_order, fpta_value_uint(order))); } ASSERT_EQ(FPTA_OK, fpta_delete(txn, &rw_table, fptu_take(tuple.get()))); // Debug("delete", fptu_take_noshrink(tuple.get())); ASSERT_EQ(FPTA_OK, fpta_transaction_commit(rw_txn_guard.release())); } void Insert(const unsigned order, const unsigned dup = 0) { scoped_txn_guard rw_txn_guard; fpta_txn *txn = nullptr; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(rw_db_guard.get(), fpta_write, &txn)); ASSERT_NE(nullptr, txn); rw_txn_guard.reset(txn); ASSERT_EQ(FPTA_OK, fpta_upsert_column(tuple.get(), &rw_col_pk, fpta_value_uint(order))); if (fpta_index_is_secondary(index)) { map_pk2se[order] = fpta_index_is_unique(index) ? order : dup; ASSERT_EQ(FPTA_OK, fpta_upsert_column(tuple.get(), &rw_col_se, fpta_value_uint(map_pk2se.at(order)))); } if (!fpta_index_is_unique(index)) { ASSERT_EQ(FPTA_OK, fpta_upsert_column(tuple.get(), &rw_col_order, fpta_value_uint(order))); } ASSERT_EQ(FPTA_OK, fpta_insert_row(txn, &rw_table, fptu_take(tuple.get()))); // Debug("insert", fptu_take_noshrink(tuple.get())); ASSERT_EQ(FPTA_OK, fpta_transaction_commit(rw_txn_guard.release())); } }; TEST_P(Smoke_CursorRERERE, following_unique) { /* Smoke-тест "рестарта" курсора с перезапуском читающей транзакции * для индексов с контролем уникальности. * * Проверяет корректность позиции курсора после перезапуска: * - при вставке записей до и после текущей позиции курсора; * - при удалении записей перед, после и в текущей позиции курсора. */ if (skipped) return; SCOPED_TRACE("index " + std::to_string(index) + ", ordering " + std::to_string(ordering)); // создаем записи с order = 1, 2, 3, 4, 5 Prepare(5); const unsigned first = (ordering != fpta_descending) ? 1 : 5; const unsigned last = (ordering != fpta_descending) ? 5 : 1; const unsigned before_first = (ordering != fpta_descending) ? 0 : 6; const unsigned after_first = (ordering != fpta_descending) ? 2 : 4; const unsigned before_last = (ordering != fpta_descending) ? 4 : 2; // курсор должен быть на "первой" записи, проверям ключ EXPECT_EQ(first, Current()); // вставляем запись перед первой и передергиваем курсор Insert(before_first); // курсор должен остаться на прежней строке EXPECT_EQ(FPTA_OK, fpta_cursor_rerere(cursor_guard.get())); EXPECT_EQ(first, Current()); // делаем шаг вперед EXPECT_EQ(FPTA_OK, fpta_cursor_move(cursor_guard.get(), fpta_next)); EXPECT_EQ(after_first, Current()); // удаляем первый ключ, передергиваем курсор и проверяем ключ // курсор должен остаться на прежней строке Delete(first); EXPECT_EQ(FPTA_OK, fpta_cursor_rerere(cursor_guard.get())); EXPECT_EQ(after_first, Current()); // удаляем текущий ключ, передергиваем курсор и проверяем ключ // курсор должен перескочить на следующую запись после удаленной Delete(after_first); EXPECT_EQ(FPTA_OK, fpta_cursor_rerere(cursor_guard.get())); EXPECT_EQ(3u, Current()); // еще раз удаляем, но также вставляем предыдущую запись // курсор должен перескочить на следующую запись после удаленной Delete(3); Insert(after_first); EXPECT_EQ(FPTA_OK, fpta_cursor_rerere(cursor_guard.get())); EXPECT_EQ(before_last, Current()); // удаляем строку после курсора, передергиваем курсор и проверям // позиция курсора должна сохраниться Delete(last); EXPECT_EQ(FPTA_OK, fpta_cursor_rerere(cursor_guard.get())); EXPECT_EQ(before_last, Current()); // удаляем текущую строку и передергиваем курсор, теперь в порядке // сортировке курсора после его предыдущей позиции НЕТ записей (FPTA_NODATA) Delete(before_last); EXPECT_EQ(FPTA_NODATA, fpta_cursor_rerere(cursor_guard.get())); } TEST_P(Smoke_CursorRERERE, following_multival) { /* Smoke-тест "рестарта" курсора с перезапуском читающей транзакции * для индексов с множественными значениями (дубликатами). * * Проверяет корректность позиции курсора после перезапуска: * - при вставке записей до и после текущей позиции курсора; * - при удалении записей перед, после и в текущей позиции курсора. * * Корректность поведения при удалении записей с уникальными значениями * ключа уже проверена предыдущим тестом. Поэтому здесь проверяется * три дополнительных набора ситуаций: * - сохранение позиции при вставке мульти-значений до/после текущего * для текущего значения ключа. * - (не)переходы к следующему мульти-значению при удалении (не)текущего. * - переходы к первому мульти-значению следующего ключа удалении всех * значений у текущего ключа. */ if (skipped || fpta_index_is_unique(index)) return; SCOPED_TRACE("index " + std::to_string(index) + ", ordering " + std::to_string(ordering)); // создаем записи с pk/order = 1, 2, 3 и se/dup = 2 Prepare(3, 2); const unsigned first = (ordering != fpta_descending) ? 1 : 3; const unsigned last = (ordering != fpta_descending) ? 3 : 1; const unsigned before_first = (ordering != fpta_descending) ? 0 : 4; const unsigned after_last = (ordering != fpta_descending) ? 4 : 0; // курсор должен быть на "первой" записи, проверям ключ EXPECT_EQ(first, Current()); // вставляем запись перед первой и передергиваем курсор Insert(before_first, first); // курсор должен остаться на прежней строке EXPECT_EQ(FPTA_OK, fpta_cursor_rerere(cursor_guard.get())); EXPECT_EQ(first, Current()); // делаем шаг назад EXPECT_EQ(FPTA_OK, fpta_cursor_move(cursor_guard.get(), fpta_prev)); EXPECT_EQ(before_first, Current()); // удаляем текущий ключ, передергиваем курсор и проверяем ключ // курсор должен перескочить на следующую запись после удаленной Delete(before_first); EXPECT_EQ(FPTA_OK, fpta_cursor_rerere(cursor_guard.get())); EXPECT_EQ(first, Current()); // вставляем запись после последней и передергиваем курсор // курсор должен остаться на прежней строке Insert(after_last, last); EXPECT_EQ(FPTA_OK, fpta_cursor_rerere(cursor_guard.get())); EXPECT_EQ(first, Current()); // удаляем строку после курсора // курсор должен остаться на прежней строке Delete(2); EXPECT_EQ(FPTA_OK, fpta_cursor_rerere(cursor_guard.get())); EXPECT_EQ(first, Current()); // удаляем текущий ключ, передергиваем курсор и проверяем ключ // курсор должен перескочить на следующую запись после удаленной Delete(first); EXPECT_EQ(FPTA_OK, fpta_cursor_rerere(cursor_guard.get())); EXPECT_EQ(last, Current()); // удаляем текущий ключ, передергиваем курсор и проверяем ключ // курсор должен прейти к следующей ранее вставленной строке, // уже с другим значением multival-ключа Delete(last); EXPECT_EQ(FPTA_OK, fpta_cursor_rerere(cursor_guard.get())); EXPECT_EQ(after_last, Current()); } #ifdef INSTANTIATE_TEST_SUITE_P INSTANTIATE_TEST_SUITE_P( Combine, Smoke_CursorRERERE, ::testing::Combine( ::testing::Values(fpta_primary_withdups_ordered_obverse, fpta_primary_unique_ordered_obverse, fpta_secondary_unique_ordered_obverse, fpta_secondary_withdups_ordered_obverse), ::testing::Values(fpta_ascending, fpta_descending, fpta_unsorted))); #else INSTANTIATE_TEST_CASE_P( Combine, Smoke_CursorRERERE, ::testing::Combine( ::testing::Values(fpta_primary_withdups_ordered_obverse, fpta_primary_unique_ordered_obverse, fpta_secondary_unique_ordered_obverse, fpta_secondary_withdups_ordered_obverse), ::testing::Values(fpta_ascending, fpta_descending, fpta_unsorted))); #endif //---------------------------------------------------------------------------- TEST(Smoke, CursorRERERE_drop_table) { /* Smoke-тест удаления таблицы "из-под курсора" с перезапуском * читающей транзакции и курсора. */ const bool skipped = GTEST_IS_EXECUTION_TIMEOUT(); if (skipped) return; if (REMOVE_FILE(testdb_name) != 0) { ASSERT_EQ(ENOENT, errno); } if (REMOVE_FILE(testdb_name_lck) != 0) { ASSERT_EQ(ENOENT, errno); } // взводим флажок MDBX_DBG_LEGACY_OVERLAP, чтобы иметь возмоность наложить // читающую и пишущую транзакцию в одном потоке const MDBX_debug_flags_t debug_flags = MDBX_debug_flags_t(mdbx_setup_debug( MDBX_LOG_DONTCHANGE, MDBX_DBG_DONTCHANGE, MDBX_LOGGER_DONTCHANGE)); mdbx_setup_debug(MDBX_LOG_DONTCHANGE, debug_flags | MDBX_DBG_LEGACY_OVERLAP, MDBX_LOGGER_DONTCHANGE); // создаем базу fpta_db *rw_db = nullptr; ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_weak, fpta_regime_default, 1, true, &rw_db)); ASSERT_NE(nullptr, rw_db); // параллельно открываем базу для чтения fpta_db *ro_db = nullptr; ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_readonly, fpta_regime_default, 1, true, &ro_db)); ASSERT_NE(nullptr, ro_db); // сразу запускаем транзакцию чтения fpta_txn *ro_txn = nullptr; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(ro_db, fpta_read, &ro_txn)); ASSERT_NE(nullptr, ro_txn); uint64_t initial_db_version = 42, initial_schema_version = 42; EXPECT_EQ(FPTA_OK, fpta_transaction_versions(ro_txn, &initial_db_version, &initial_schema_version)); EXPECT_NE(0u, initial_db_version); EXPECT_EQ(0u, initial_schema_version); // инициализируем идентификаторы таблицы и её колонок fpta_name rw_table, rw_col_pk; EXPECT_EQ(FPTA_OK, fpta_table_init(&rw_table, "table")); EXPECT_EQ(FPTA_OK, fpta_column_init(&rw_table, &rw_col_pk, "pk_str_uniq")); // тоже самое для читающей транзакции fpta_name ro_table, ro_col_pk; EXPECT_EQ(FPTA_OK, fpta_table_init(&ro_table, "table")); EXPECT_EQ(FPTA_OK, fpta_column_init(&ro_table, &ro_col_pk, "pk_str_uniq")); // запускам транзакцию и создаем таблицу с обозначенным набором колонок fpta_txn *rw_txn = nullptr; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(rw_db, fpta_schema, &rw_txn)); ASSERT_NE(nullptr, rw_txn); // шаг приращения номера транзакций: обычно равен 1, но равен 2 на 32-битных // архитектурах без 64-битных атомарных операций. const unsigned txnid_step = unsigned(mdbx_txn_id(fpta_mdbx_txn(rw_txn)) - initial_db_version); ASSERT_TRUE(txnid_step == 1 || txnid_step == /* 32-bit arch without 64-bit atomic ops */ 2); // описываем простейшую таблицу с одним PK fpta_column_set def; fpta_column_set_init(&def); EXPECT_EQ(FPTA_OK, fpta_column_describe("pk_str_uniq", fptu_cstr, fpta_primary_unique_ordered_obverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_set_validate(&def)); EXPECT_EQ(FPTA_OK, fpta_table_create(rw_txn, "Table", &def)); ASSERT_EQ(FPTA_OK, fpta_transaction_commit(rw_txn)); rw_txn = nullptr; // разрушаем описание таблицы EXPECT_EQ(FPTA_OK, fpta_column_set_destroy(&def)); EXPECT_NE(FPTA_OK, fpta_column_set_validate(&def)); // в запущенной читающей транзакции таблицы еще не должно быть size_t lag = ~42u; EXPECT_EQ(FPTA_OK, fpta_transaction_lag_ex(ro_txn, &lag, nullptr, nullptr)); EXPECT_EQ(txnid_step, lag); scoped_cursor_guard cursor_guard; fpta_cursor *cursor = (fpta_cursor *)&cursor; EXPECT_EQ(FPTA_NOTFOUND, fpta_cursor_open(ro_txn, &ro_col_pk, fpta_value_begin(), fpta_value_end(), nullptr, fpta_unsorted_dont_fetch, &cursor)); ASSERT_EQ(nullptr, cursor); // перезапускаем транзакцию чтения, теперь таблица должна появиться ASSERT_EQ(FPTA_OK, fpta_transaction_restart(ro_txn)); EXPECT_EQ(FPTA_OK, fpta_cursor_open(ro_txn, &ro_col_pk, fpta_value_begin(), fpta_value_end(), nullptr, fpta_unsorted_dont_fetch, &cursor)); ASSERT_NE(nullptr, cursor); cursor_guard.reset(cursor); // но данных в таблице пока нет EXPECT_EQ(FPTA_NODATA, fpta_cursor_move(cursor, fpta_first)); // начинаем транзакцию для вставки данных EXPECT_EQ(FPTA_OK, fpta_transaction_begin(rw_db, fpta_write, &rw_txn)); ASSERT_NE(nullptr, rw_txn); // создаем кортеж и наполняем таблицу данными fptu::tuple_ptr tuple; fptu_rw *pt = fptu_alloc(1, 42); ASSERT_NE(nullptr, pt); tuple.reset(pt); EXPECT_EQ(FPTA_OK, fpta_name_refresh_couple(rw_txn, &rw_table, &rw_col_pk)); for (int i = 0; i < 42; i++) { ASSERT_EQ(FPTA_OK, fpta_upsert_column(pt, &rw_col_pk, fpta_value_str(random_string(21)))); ASSERT_EQ(FPTA_OK, fpta_insert_row(rw_txn, &rw_table, fptu_take(pt))); } // завершаем транзакцию записи ASSERT_EQ(FPTA_OK, fpta_transaction_commit(rw_txn)); rw_txn = nullptr; // передергиваем курсор и считаем кол-во записей // ожидаем FPTA_ECURSOR, так как до этого курсор не был установлен // из-за отсутствия данных EXPECT_EQ(FPTA_ECURSOR, fpta_cursor_rerere(cursor)); EXPECT_NE(nullptr, cursor->mdbx_cursor); EXPECT_EQ(FPTA_OK, fpta_transaction_lag_ex(ro_txn, &lag, nullptr, nullptr)); EXPECT_EQ(0u, lag); size_t row_count; ASSERT_EQ(FPTA_OK, fpta_cursor_count(cursor, &row_count, INT_MAX)); EXPECT_EQ(42u, row_count); // удаляем таблицу EXPECT_EQ(FPTA_OK, fpta_transaction_begin(rw_db, fpta_schema, &rw_txn)); ASSERT_NE(nullptr, rw_txn); ASSERT_EQ(FPTA_OK, fpta_table_drop(rw_txn, "table")); ASSERT_EQ(FPTA_OK, fpta_transaction_commit(rw_txn)); rw_txn = nullptr; // в запущенной читающей транзакции таблица должа остаться EXPECT_EQ(FPTA_OK, fpta_cursor_move(cursor, fpta_first)); // передергиваем курсор, теперь таблица должна пропасть ASSERT_EQ(FPTA_BAD_DBI, fpta_cursor_rerere(cursor)); EXPECT_NE(nullptr, cursor->mdbx_cursor); EXPECT_EQ(FPTA_OK, fpta_cursor_close(cursor_guard.release())); // завершаем транзакцию чтения EXPECT_EQ(FPTA_OK, fpta_transaction_end(ro_txn, false)); ro_txn = nullptr; // разрушаем привязанные идентификаторы fpta_name_destroy(&rw_table); fpta_name_destroy(&rw_col_pk); fpta_name_destroy(&ro_table); fpta_name_destroy(&ro_col_pk); // закрываем базу EXPECT_EQ(FPTA_SUCCESS, fpta_db_close(rw_db)); EXPECT_EQ(FPTA_SUCCESS, fpta_db_close(ro_db)); ASSERT_TRUE(REMOVE_FILE(testdb_name) == 0); ASSERT_TRUE(REMOVE_FILE(testdb_name_lck) == 0); // восстанавливаем отладочные флажки mdbx_setup_debug(MDBX_LOG_DONTCHANGE, debug_flags, MDBX_LOGGER_DONTCHANGE); } //---------------------------------------------------------------------------- TEST(SmokeCrud, TableVersion) { const bool skipped = GTEST_IS_EXECUTION_TIMEOUT(); if (skipped) return; if (REMOVE_FILE(testdb_name) != 0) { ASSERT_EQ(ENOENT, errno); } if (REMOVE_FILE(testdb_name_lck) != 0) { ASSERT_EQ(ENOENT, errno); } // открываем/создаем базульку в 1 мегабайт fpta_db *db = nullptr; ASSERT_EQ(FPTA_OK, test_db_open(testdb_name, fpta_weak, fpta_regime_default, 1, true, &db)); ASSERT_NE(nullptr, db); // описываем простейшую таблицу с одним PK fpta_column_set def; fpta_column_set_init(&def); ASSERT_EQ(FPTA_OK, fpta_column_describe("StrColumn", fptu_cstr, fpta_primary_unique_ordered_obverse, &def)); ASSERT_EQ(FPTA_OK, fpta_column_set_validate(&def)); // инициализируем идентификаторы таблицы и её колонок fpta_name table, col_pk; ASSERT_EQ(FPTA_OK, fpta_table_init(&table, "Table")); ASSERT_EQ(FPTA_OK, fpta_column_init(&table, &col_pk, "StrColumn")); // запускам транзакцию и создаем таблицу с обозначенным набором колонок fpta_txn *txn = nullptr; ASSERT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_schema, &txn)); ASSERT_EQ(FPTA_OK, fpta_table_create(txn, "Table", &def)); // проверяем mod_txnid сразу после создания uint64_t txnid_creation = 0; ASSERT_EQ(FPTA_OK, fpta_transaction_versions(txn, &txnid_creation, nullptr)); ASSERT_NE(0u, txnid_creation); fpta_table_stat stat; ASSERT_EQ(FPTA_OK, fpta_table_info(txn, &table, nullptr, &stat)); EXPECT_EQ(txnid_creation, stat.mod_txnid); // фиксируем транзакцию создания таблицы ASSERT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); txn = nullptr; // разрушаем описание таблицы EXPECT_EQ(FPTA_OK, fpta_column_set_destroy(&def)); EXPECT_NE(FPTA_OK, fpta_column_set_validate(&def)); // начинаем транзакцию для вставки данных ASSERT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_write, &txn)); // проверяем mod_txnid до изменений uint64_t txnid_update = 0; ASSERT_EQ(FPTA_OK, fpta_transaction_versions(txn, &txnid_update, nullptr)); ASSERT_GT(txnid_update, txnid_creation); ASSERT_EQ(FPTA_OK, fpta_table_info(txn, &table, nullptr, &stat)); EXPECT_EQ(txnid_creation, stat.mod_txnid); // создаем кортеж, который станет первой записью в таблице fptu_rw *pt1 = fptu_alloc(1, 42); ASSERT_NE(nullptr, pt1); ASSERT_EQ(nullptr, fptu::check(pt1)); // refresh нужен для использвание col_pk в fpta_upsert_column(), // ибо fpta_upsert_column() не принимает транзакцию в параметрах // и не может сделать reshresh автоматически. ASSERT_EQ(FPTA_OK, fpta_name_refresh_couple(txn, &table, &col_pk)); // добавляем значения колонки ASSERT_EQ(FPTA_OK, fpta_upsert_column(pt1, &col_pk, fpta_value_cstr("login"))); ASSERT_EQ(nullptr, fptu::check(pt1)); // вставляем строку в таблицу ASSERT_EQ(FPTA_OK, fpta_upsert_row(txn, &table, fptu_take(pt1))); // освобождаем кортеж/строку free(pt1); pt1 = nullptr; // проверяем mod_txnid после изменений, но до фиксации транзакции ASSERT_EQ(FPTA_OK, fpta_table_info(txn, &table, nullptr, &stat)); EXPECT_EQ(txnid_creation, stat.mod_txnid); // фиксируем изменения ASSERT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); txn = nullptr; // проверяем в читающей транзакции ASSERT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_read, &txn)); ASSERT_EQ(FPTA_OK, fpta_table_info(txn, &table, nullptr, &stat)); EXPECT_EQ(txnid_update, stat.mod_txnid); ASSERT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); // проверяем в пишуей транзакции c последующей очисткой ASSERT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_write, &txn)); ASSERT_EQ(FPTA_OK, fpta_table_info(txn, &table, nullptr, &stat)); EXPECT_EQ(txnid_update, stat.mod_txnid); // проверяем после очистки ASSERT_EQ(FPTA_OK, fpta_table_clear(txn, &table, true)); ASSERT_EQ(FPTA_OK, fpta_table_info(txn, &table, nullptr, &stat)); EXPECT_EQ(txnid_update, stat.mod_txnid); uint64_t txnid_clear = 0; ASSERT_EQ(FPTA_OK, fpta_transaction_versions(txn, &txnid_clear, nullptr)); ASSERT_GT(txnid_clear, txnid_update); ASSERT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); // проверяем в пишуей транзакции c последующим удалением ASSERT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_schema, &txn)); ASSERT_EQ(FPTA_OK, fpta_table_info(txn, &table, nullptr, &stat)); EXPECT_EQ(txnid_clear, stat.mod_txnid); // проверяем после удаления ASSERT_EQ(FPTA_OK, fpta_table_drop(txn, "Table")); EXPECT_EQ(FPTA_NOTFOUND, fpta_table_info(txn, &table, nullptr, &stat)); ASSERT_EQ(FPTA_OK, fpta_transaction_end(txn, true)); // разрушаем привязанные идентификаторы fpta_name_destroy(&table); fpta_name_destroy(&col_pk); // закрываем базу ASSERT_EQ(FPTA_OK, fpta_db_close(db)); ASSERT_TRUE(REMOVE_FILE(testdb_name) == 0); ASSERT_TRUE(REMOVE_FILE(testdb_name_lck) == 0); } //----------------------------------------------------------------------------- /* The workaround for OSX where size_t is neither uint32_t nor uint64_t */ static char *u2a(size_t v, char *const buffer) { return (sizeof(v) > 4) ? erthink::u2a(uint64_t(v), buffer) : erthink::u2a(uint32_t(v), buffer); } TEST(Smoke, DISABLED_IndexCosts) { /* Псевдо-тест оценки стоимости операций. * * 1. Создаем большую базу с одной таблицей, в которой три колонки: * - pk_i32 с первичным индексом; * - str_uniq с вторичным индексом с контролем уникальности; * - str_dups с вторичным индексом без контроля уникальности * и низкой кардинальностью. * * 2. Таблица наполняется до ~10 миллионов записей, при этом в ~40 точках * по геометрической прогрессии (с коэффициентом ~1.4) делается замер * стоимости операций (cost_scan_O1N, cost_search_OlogN, * cost_uniq_MOlogN, cost_alter_MOlogN, в том числе для каждого индекса). * * 3. В тех же точках для индексов прогоняется бенчмарки * замеряющих реальную стоимость операций scan и search/seek. * * 4. В консоль выводится сводная таблица собранных значений, в которой * в сталбцах "EST" (estimated) и "ACT" (actual) выводится отношения * прогнозируемых и актуальных стоимостей поиска и сканирования. * * 5. Проверяется что оценочная стоимость отличается не более чем в 2 раза * от реальной стоимости при больших размерах таблицы (>100K строк), * и не более чем в 3 раза при меньших размерах. */ const bool skipped = GTEST_IS_EXECUTION_TIMEOUT(); if (skipped) return; if (REMOVE_FILE(testdb_name) != 0) { ASSERT_EQ(ENOENT, errno); } if (REMOVE_FILE(testdb_name_lck) != 0) { ASSERT_EQ(ENOENT, errno); } // выясняем доступный объем ОЗУ intptr_t pagesize, total_pages, avail_pages; ASSERT_EQ(FPTA_OK, mdbx_get_sysraminfo(&pagesize, &total_pages, &avail_pages)); ASSERT_GT(pagesize, 1024); ASSERT_GT(total_pages, 32); ASSERT_GT(avail_pages, 16); ASSERT_GT(total_pages, avail_pages); const size_t ram_avail_mb = size_t((uint64_t(pagesize) * avail_pages) >> 20); if (ram_avail_mb < 256) { GTEST_SKIP() << "Not enough available RAM"; return; } // создаем БД размером немного меньше половины ОЗУ, но не более 100 Гб const size_t less_than_half = ram_avail_mb / 16 * 7; fpta_db *db = nullptr; const int large_db_open_err = test_db_open( testdb_name, fpta_weak, fpta_regime4testing, (less_than_half > 100 * 1024) ? 100 * 1024 : less_than_half, true, &db); if (large_db_open_err == FPTA_ETOO_LARGE) { GTEST_SKIP() << "Not enough memory for the test database"; return; } ASSERT_EQ(FPTA_OK, large_db_open_err); ASSERT_NE(nullptr, db); // описываем простейшую таблицу с тремя колонками fpta_column_set def; fpta_column_set_init(&def); EXPECT_EQ(FPTA_OK, fpta_column_describe("pk_i32", fptu_int32, fpta_primary_unique_ordered_obverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe("str_uniq", fptu_cstr, fpta_secondary_unique_ordered_obverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_describe( "str_dups", fptu_cstr, fpta_secondary_withdups_ordered_obverse, &def)); EXPECT_EQ(FPTA_OK, fpta_column_set_validate(&def)); // запускам транзакцию и создаем таблицу с обозначенным набором колонок fpta_txn *txn = (fpta_txn *)&txn; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_schema, &txn)); ASSERT_NE(nullptr, txn); EXPECT_EQ(FPTA_OK, fpta_table_create(txn, "table", &def)); EXPECT_EQ(FPTA_OK, fpta_transaction_commit(txn)); txn = nullptr; // разрушаем описание таблицы EXPECT_EQ(FPTA_OK, fpta_column_set_destroy(&def)); EXPECT_NE(FPTA_OK, fpta_column_set_validate(&def)); //--------------------------------------------------------------------------- // инициализируем идентификаторы таблицы и её колонок fpta_name table, col_pk_i32, col_str_uniq, col_str_dups; EXPECT_EQ(FPTA_OK, fpta_table_init(&table, "table")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &col_pk_i32, "pk_i32")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &col_str_uniq, "str_uniq")); EXPECT_EQ(FPTA_OK, fpta_column_init(&table, &col_str_dups, "str_dups")); // начинаем транзакцию для вставки данных EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_write, &txn)); ASSERT_NE(nullptr, txn); // для вставки делаем привязку вручную EXPECT_EQ(FPTA_OK, fpta_name_refresh_couple(txn, &table, &col_pk_i32)); EXPECT_EQ(FPTA_OK, fpta_name_refresh(txn, &col_str_uniq)); EXPECT_EQ(FPTA_OK, fpta_name_refresh(txn, &col_str_dups)); // создаем кортеж для наполнения таблицы fptu_rw *tuple = fptu_alloc(3, 256); ASSERT_NE(nullptr, tuple); ASSERT_STREQ(nullptr, fptu::check(tuple)); struct point { size_t row_count; size_t total_items; size_t total_bytes; unsigned btree_depth; size_t branch_pages; size_t leaf_pages; size_t large_pages; unsigned cost_uniq_MOlogN; unsigned cost_alter_MOlogN; fpta_table_stat::index_cost_info index_costs[3]; struct { double scan, search; } index_bench[3]; }; std::pair<unsigned, unsigned> minmax_cost = {~0u, 0u}; std::pair<double, double> minmax_bench = {DBL_MAX, 0u}; std::vector<point> bunch; int err = FPTA_OK; // генератор значений колонок struct generator { char buf[64]; fpta_value pk(size_t n) { return fpta_value_uint(n); } fpta_value str_uniq(const size_t n) { const auto v = n; const auto w = unsigned(n + 22621) % 23 + 1; memset(buf, '0', 24); const auto e = u2a(v, buf + 24); *e = 0; const auto b = (e - w < buf + 24) ? e - w : buf + 24; #ifndef NDEBUG static char xbuf[64]; snprintf(xbuf, sizeof(xbuf), "%0*zu", w, v); assert(strcmp(xbuf, b) == 0); #endif /* !NDEBUG */ return fpta_value_cstr(b); } fpta_value str_dups(const size_t n) { const auto v = n % 5; const auto w = unsigned(n % 11 + 1); memset(buf, ' ', 16); const auto e = u2a(v, buf + 16); *e = 0; const auto b = (e - w < buf + 16) ? e - w : buf + 16; #ifndef NDEBUG static char xbuf[64]; snprintf(xbuf, sizeof(xbuf), "%*zu", w, v); assert(strcmp(xbuf, b) == 0); #endif /* !NDEBUG */ return fpta_value_cstr(b); } }; bool db_full = false; const unsigned char smalls[] = {0, 1, 2, 34, 156, 255}; for (size_t n = 0, i = 0, count = 0; !db_full;) { n = (i < sizeof(smalls)) ? smalls[i++] : size_t(n * 1.378240772) + 3; //------------------------------------------------------------------------- if (!txn) { EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_write, &txn)); ASSERT_NE(nullptr, txn); } // наполняем до следующей границы while (count < n) { generator maker; fptu_clear(tuple); ASSERT_EQ(FPTA_OK, fpta_upsert_column(tuple, &col_pk_i32, maker.pk(count))); ASSERT_EQ(FPTA_OK, fpta_upsert_column(tuple, &col_str_uniq, maker.str_uniq(count))); ASSERT_EQ(FPTA_OK, fpta_upsert_column(tuple, &col_str_dups, maker.str_dups(count))); ASSERT_EQ(nullptr, fptu::check(tuple)); err = fpta_upsert_row(txn, &table, fptu_take(tuple)); if (err != FPTA_OK) { db_full = err == FPTA_DB_FULL; EXPECT_EQ(err, FPTA_DB_FULL); break; } count++; } if (err != FPTA_OK && err != FPTA_DB_FULL) break; err = fpta_transaction_commit(txn); if (err != FPTA_OK && err != FPTA_TXN_CANCELLED) { EXPECT_EQ(err, FPTA_DB_FULL); break; } txn = nullptr; EXPECT_EQ(FPTA_OK, fpta_transaction_begin(db, fpta_read, &txn)); ASSERT_NE(nullptr, txn); //----------------------------------------------------------------------- // получаем метрики union { fpta_table_stat stat; char space[sizeof(fpta_table_stat) + sizeof(fpta_table_stat::index_cost_info) * 2]; } snap; ASSERT_EQ(FPTA_OK, fpta_table_info_ex(txn, &table, nullptr, &snap.stat, sizeof(snap))); if (!db_full) { ASSERT_EQ(size_t(n), snap.stat.row_count); } else if (snap.stat.row_count - bunch.back().row_count < 1000) break; bunch.emplace_back(); point &y = bunch.back(); y.row_count = snap.stat.row_count; y.total_items = snap.stat.total_items; y.total_bytes = snap.stat.total_bytes; y.btree_depth = snap.stat.btree_depth; y.branch_pages = snap.stat.branch_pages; y.leaf_pages = snap.stat.leaf_pages; y.large_pages = snap.stat.large_pages; y.cost_uniq_MOlogN = snap.stat.cost_uniq_MOlogN; y.cost_alter_MOlogN = snap.stat.cost_alter_MOlogN; /* avoid warning out of bounds array access */ static_assert(sizeof(y.index_costs[0]) == sizeof(snap.stat.index_costs[0]), "WTF?"); memcpy(y.index_costs, &snap.stat.index_costs, sizeof(y.index_costs)); EXPECT_GE(y.index_costs[0].search_OlogN, y.index_costs[0].scan_O1N); EXPECT_GE(y.index_costs[1].search_OlogN, y.index_costs[1].scan_O1N); EXPECT_GE(y.index_costs[2].search_OlogN, y.index_costs[2].scan_O1N); EXPECT_GE(y.cost_alter_MOlogN, y.cost_uniq_MOlogN); if (y.row_count) { const auto minmax = std::minmax( {/* y.cost_uniq_MOlogN, y.cost_alter_MOlogN, */ y.index_costs[0].scan_O1N, y.index_costs[0].search_OlogN, y.index_costs[1].scan_O1N, y.index_costs[1].search_OlogN, y.index_costs[2].scan_O1N, y.index_costs[2].search_OlogN}); minmax_cost.first = std::min(minmax_cost.first, minmax.first); minmax_cost.second = std::max(minmax_cost.second, minmax.second); } //----------------------------------------------------------------------- // замеряем реальные затраты struct bench { static double probe(int (*proba)(fpta_cursor *, size_t, fpta_value (generator::*)(size_t)), fpta_txn *txn, fpta_name *col, size_t count, fpta_value (generator::*make)(size_t)) { fpta_cursor *cursor; int err = fpta_cursor_open(txn, col, fpta_value_begin(), fpta_value_end(), nullptr, fpta_unsorted_dont_fetch, &cursor); scoped_cursor_guard cursor_guard; cursor_guard.reset(cursor); const auto start = std::chrono::steady_clock::now(); std::chrono::nanoseconds duration; size_t i = 0; do { err = proba(cursor, count, make); EXPECT_EQ(count ? FPTA_OK : FPTA_NODATA, err); ++i; duration = std::chrono::steady_clock::now() - start; } while (err == FPTA_OK && duration < std::chrono::milliseconds(100)); return count ? double(duration.count()) / (i * count) : 0; } static int scan(fpta_cursor *cursor, size_t count, fpta_value (generator::*make)(size_t)) { (void)make; int err = fpta_cursor_move(cursor, fpta_first); for (size_t i = 1; i < count && err == FPTA_OK; ++i) err = fpta_cursor_move(cursor, fpta_next); return err; } static int search(fpta_cursor *cursor, size_t count, fpta_value (generator::*make)(size_t)) { const uint64_t mixer = UINT64_C(3131777041); assert(mixer > count); generator maker; for (size_t i = 0; i < count; ++i) { size_t n = ((i + 49057) * mixer) % count; const auto key = (maker.*make)(n); int err = fpta_cursor_locate(cursor, true, &key, nullptr); if (err != FPTA_OK) return err; } return count ? FPTA_OK : FPTA_NODATA; } }; const auto index_1_col = (y.index_costs[1].column_shove == col_str_uniq.shove) ? &col_str_uniq : &col_str_dups; const auto index_2_col = (y.index_costs[2].column_shove == col_str_dups.shove) ? &col_str_dups : &col_str_uniq; const auto index_1_gen = (y.index_costs[1].column_shove == col_str_uniq.shove) ? &generator::str_uniq : &generator::str_dups; const auto index_2_gen = (y.index_costs[2].column_shove == col_str_dups.shove) ? &generator::str_dups : &generator::str_uniq; ASSERT_NE(index_1_col, index_2_col); ASSERT_NE(index_1_gen, index_2_gen); y.index_bench[0].scan = bench::probe(bench::scan, txn, &col_pk_i32, snap.stat.row_count, &generator::pk); y.index_bench[0].search = bench::probe(bench::search, txn, &col_pk_i32, snap.stat.row_count, &generator::pk); y.index_bench[1].scan = bench::probe(bench::scan, txn, index_1_col, snap.stat.row_count, index_1_gen); y.index_bench[1].search = bench::probe(bench::search, txn, index_1_col, snap.stat.row_count, index_1_gen); y.index_bench[2].scan = bench::probe(bench::scan, txn, index_2_col, snap.stat.row_count, index_2_gen); y.index_bench[2].search = bench::probe(bench::search, txn, index_2_col, snap.stat.row_count, index_2_gen); if (y.row_count) { const auto minmax = std::minmax({y.index_bench[0].scan, y.index_bench[0].search, y.index_bench[1].scan, y.index_bench[1].search, y.index_bench[2].scan, y.index_bench[2].search}); minmax_bench.first = std::min(minmax_bench.first, minmax.first); minmax_bench.second = std::max(minmax_bench.second, minmax.second); } EXPECT_GT(y.index_bench[0].search, y.index_bench[0].scan); EXPECT_GT(y.index_bench[1].search, y.index_bench[1].scan); EXPECT_GT(y.index_bench[2].search, y.index_bench[2].scan); EXPECT_EQ(FPTA_OK, fpta_transaction_end(txn, false)); txn = nullptr; if (err != FPTA_OK || GTEST_IS_EXECUTION_TIMEOUT()) break; } fpta_transaction_abort(txn); txn = nullptr; //--------------------------------------------------------------------------- // вывод результатов struct scale { const double base, ratio; double operator()(double value) const { return (value - base) * ratio; } }; const scale sc{0, 99.9 / minmax_cost.second}; const scale sb{0, 99.9 / minmax_bench.second}; const auto index_1_name = (bunch.front().index_costs[1].column_shove == col_str_uniq.shove) ? "str_uniq" : "str_dups"; const auto index_2_name = (bunch.front().index_costs[2].column_shove == col_str_dups.shove) ? "str_dups" : "str_uniq"; /* *INDENT-OFF* */ /* clang-format off */ std::cout << " " " pk_i32____________________________________ " << index_1_name << "__________________________________ " << index_2_name << "__________________________________ " "overall___\n"; std::cout << "########## " "__bench__ ___estimate___ _______tree_______ " "__bench__ ___estimate___ _______tree_______ " "__bench__ ___estimate___ _______tree_______ " "__________\n"; std::cout << " " "scan seek scan seek lge H B L O " "scan seek scan seek lge H B L O " "scan seek scan seek lge H B L O " "uniq alter\n"; /* *INDENT-ON* */ /* clang-format on */ struct { double operator()(const unsigned v) const { return v ? v : 1; } double operator()(const double v) const { return v ? v : 1; } } nz; for (const auto &i : bunch) { fptu::format( std::cout, "%10zu" " %4.1f %4.1f %4.1f %4.1f %+3.1f %u %6zu %7zu %zu" " %4.1f %4.1f %4.1f %4.1f %+3.1f %u %6zu %7zu %zu" " %4.1f %4.1f %4.1f %4.1f %+3.1f %u %6zu %7zu %zu" " %4.f %5.f\n", i.row_count, sb(i.index_bench[0].scan), sb(i.index_bench[0].search), sc(i.index_costs[0].scan_O1N), sc(i.index_costs[0].search_OlogN), log2(nz(i.index_costs[0].search_OlogN / nz(i.index_costs[0].scan_O1N)) / nz(i.index_bench[0].search / nz(i.index_bench[0].scan))), i.index_costs[0].btree_depth, i.index_costs[0].branch_pages, i.index_costs[0].leaf_pages, i.index_costs[0].large_pages, sb(i.index_bench[1].scan), sb(i.index_bench[1].search), sc(i.index_costs[1].scan_O1N), sc(i.index_costs[1].search_OlogN), log2(nz(i.index_costs[1].search_OlogN / nz(i.index_costs[1].scan_O1N)) / nz(i.index_bench[1].search / nz(i.index_bench[1].scan))), i.index_costs[1].btree_depth, i.index_costs[1].branch_pages, i.index_costs[1].leaf_pages, i.index_costs[1].large_pages, sb(i.index_bench[2].scan), sb(i.index_bench[2].search), sc(i.index_costs[2].scan_O1N), sc(i.index_costs[2].search_OlogN), log2(nz(i.index_costs[2].search_OlogN / nz(i.index_costs[2].scan_O1N)) / nz(i.index_bench[2].search / nz(i.index_bench[2].scan))), i.index_costs[2].btree_depth, i.index_costs[2].branch_pages, i.index_costs[2].leaf_pages, i.index_costs[2].large_pages, sc(i.cost_uniq_MOlogN), sc(i.cost_alter_MOlogN)); } for (const auto &i : bunch) { const auto ratio_pk_i32_est = i.index_costs[0].search_OlogN / nz(i.index_costs[0].scan_O1N); const auto ratio_pk_act = i.index_bench[0].search / nz(i.index_bench[0].scan); const auto ratio_1_est = i.index_costs[1].search_OlogN / nz(i.index_costs[1].scan_O1N); const auto ratio_1_act = i.index_bench[1].search / nz(i.index_bench[1].scan); const auto ratio_2_est = i.index_costs[2].search_OlogN / nz(i.index_costs[2].scan_O1N); const auto ratio_2_act = i.index_bench[2].search / nz(i.index_bench[2].scan); const auto info_1 = fptu::format( " pk_i32: rows %zu, depth %u, branch %zu, leaf %zu => scan %4.f, " "seek " "%4.f, est " "%3.f, act %3.f", i.row_count, i.index_costs[0].btree_depth, i.index_costs[0].branch_pages, i.index_costs[0].leaf_pages, sc(i.index_costs[0].scan_O1N), sc(i.index_costs[0].search_OlogN), ratio_pk_i32_est, ratio_pk_act); const auto info_2 = fptu::format( "%s: rows %zu, depth %u, branch %zu, leaf %zu => scan %4.f, " "seek " "%4.f, est " "%3.f, act %3.f", index_1_name, i.row_count, i.index_costs[1].btree_depth, i.index_costs[1].branch_pages, i.index_costs[1].leaf_pages, sc(i.index_costs[1].scan_O1N), sc(i.index_costs[1].search_OlogN), ratio_1_est, ratio_1_act); const auto info_3 = fptu::format( "%s: rows %zu, depth %u, branch %zu, leaf %zu => scan %4.f, " "seek " "%4.f, est " "%3.f, act %3.f", index_2_name, i.row_count, i.index_costs[2].btree_depth, i.index_costs[2].branch_pages, i.index_costs[2].leaf_pages, sc(i.index_costs[2].scan_O1N), sc(i.index_costs[2].search_OlogN), ratio_2_est, ratio_2_act); // Для отладки SCOPED_TRACE(info_1); SCOPED_TRACE(info_2); SCOPED_TRACE(info_3); EXPECT_GE(ratio_pk_i32_est * 4, ratio_pk_act); EXPECT_LE(ratio_pk_i32_est, ratio_pk_act * 4); EXPECT_GE(ratio_1_est * 4, ratio_1_act); EXPECT_LE(ratio_1_est, ratio_1_act * 4); EXPECT_GE(ratio_2_est * 4, ratio_2_act); EXPECT_LE(ratio_2_est, ratio_2_act * 4); if (i.row_count > 999) { EXPECT_GE(ratio_pk_i32_est * 3, ratio_pk_act); EXPECT_LE(ratio_pk_i32_est, ratio_pk_act * 3); EXPECT_GE(ratio_1_est * 3, ratio_1_act); EXPECT_LE(ratio_1_est, ratio_1_act * 3); EXPECT_GE(ratio_2_est * 3, ratio_2_act); EXPECT_LE(ratio_2_est, ratio_2_act * 3); } if (i.row_count > 9999) { EXPECT_GE(ratio_pk_i32_est * 2, ratio_pk_act); EXPECT_LE(ratio_pk_i32_est, ratio_pk_act * 2); EXPECT_GE(ratio_1_est * 2, ratio_1_act); EXPECT_LE(ratio_1_est, ratio_1_act * 2); EXPECT_GE(ratio_2_est * 2, ratio_2_act); EXPECT_LE(ratio_2_est, ratio_2_act * 2); } if (i.row_count > 99999) { EXPECT_GE(ratio_pk_i32_est * 1.5, ratio_pk_act); EXPECT_LE(ratio_pk_i32_est, ratio_pk_act * 1.5); EXPECT_GE(ratio_1_est * 1.5, ratio_1_act); EXPECT_LE(ratio_1_est, ratio_1_act * 1.5); EXPECT_GE(ratio_2_est * 1.5, ratio_2_act); EXPECT_LE(ratio_2_est, ratio_2_act * 1.5); } } //--------------------------------------------------------------------------- // освобождаем ресурсы EXPECT_EQ(FPTU_OK, fptu_clear(tuple)); free(tuple); fpta_name_destroy(&table); fpta_name_destroy(&col_pk_i32); fpta_name_destroy(&col_str_uniq); fpta_name_destroy(&col_str_dups); // закрываем и удаляем базу EXPECT_EQ(FPTA_SUCCESS, fpta_db_close(db)); ASSERT_TRUE(REMOVE_FILE(testdb_name) == 0); ASSERT_TRUE(REMOVE_FILE(testdb_name_lck) == 0); } //---------------------------------------------------------------------------- int main(int argc, char **argv) { testing::InitGoogleTest(&argc, argv); mdbx_setup_debug(MDBX_LOG_WARN, MDBX_DBG_ASSERT | MDBX_DBG_AUDIT | MDBX_DBG_DUMP | MDBX_DBG_LEGACY_MULTIOPEN | MDBX_DBG_JITTER, nullptr); return RUN_ALL_TESTS(); }
import { TableTransform } from '../interfaces'; export declare function makeFlattenTransform(): TableTransform;
/** * If there is a next pair, move to it and returns true. Otherwise, returns false. * @return whether it was possible to increment to a next pair. */ public boolean increment() { recordWhetherHadPreviousAndItWasLastOfRowBeforeUpdatingIAndJ(); if (j == n - 1) { if ( ! makeSureToBeAtRowBeginning()) { return false; } } else { j++; next = pairOf(i, j); onNext = true; } return true; }
/** * * @author Marvin Sun * @since 1.0.0 */ @Component public class AppUtil { private static final Logger logger = LogManager.getLogger(AppUtil.class); public static final DateFormat defaulDateStringFormat = new SimpleDateFormat("yyyy-MM-dd"); public static final DateFormat defaulDateTimeStringFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); public static final String REQUEST_POSTFIX = "Request"; public static final String RESPONSE_POSTFIX = "Response"; public static final String PROCESSOR_POSTFIX = "Processor"; private static String springActiveProfile = null; private static String deploymentRootDir = null; private static final String DEFAULT_BACKEND_ENV = "DEFAULT"; private static Date startupDate; static { init(); } public static void init() { logger.info("AppUtil.init() - start........"); startupDate = new Date(); logger.info("AppUtil.init() - end........"); } public static Date getStartupDate() { return startupDate; } public static BaseResponse createBaseResponse(String status, String message) { BaseResponse response = new BaseResponse(); ResponseStatus responseStatus = createResponseStatus(status, message); response.setResponseStatus(responseStatus); TransactionContext tcContext = AppThreadContext.getTransactionContext(); String txId = tcContext == null ? null : tcContext.getTransactionId(); response.setServerTxId(txId); return response; } public static BaseResponse createBaseResponse(String command, String status, String message) { BaseResponse response = new BaseResponse(); response.setCommand(command); ResponseStatus responseStatus = createResponseStatus(status, message); response.setResponseStatus(responseStatus); TransactionContext tcContext = AppThreadContext.getTransactionContext(); String txId = tcContext == null ? null : tcContext.getTransactionId(); response.setServerTxId(txId); return response; } public static ResponseStatus createResponseStatus(String status, String message) { ResponseStatus responseStatus = new ResponseStatus(status, message); return responseStatus; } public static <T> T GsonDeepCopy(Object sourceObj, Class<T> outputClass) { if (sourceObj == null || outputClass == null) { return null; } T targetObj; Gson gson = null; try { gson = new GsonBuilder().serializeNulls().create(); String jsonStr = gson.toJson(sourceObj); targetObj = gson.fromJson(jsonStr, outputClass); return targetObj; } catch (Throwable t) { t.printStackTrace(); logger.error(AppUtil.getStackTrace(t)); return null; } } public static <T> T GsonDeepCopy(T sourceObj) { if (sourceObj == null) { return null; } return GsonDeepCopy(sourceObj, (Class<T>)sourceObj.getClass()); } public static String getStackTrace(Throwable t) { if (t == null) { return null; } StringWriter sw = new StringWriter(); t.printStackTrace(new PrintWriter(sw)); return t.getMessage() + "\n" + sw.toString(); } public static RuntimeException throwRuntimeException(Throwable e) { if (e == null) { throw new RuntimeException("AppUtil.throwRuntimeException() --- Throwable is null!"); } else if (e instanceof RuntimeException) { throw (RuntimeException) e; } else { throw new RuntimeException(e); } } /** * parse a String to a X.509 Certificate object. * */ public static Certificate getCertificateFromString(String certStr) { if (StringUtils.isEmpty(certStr)) { return null; } ByteArrayInputStream in = null; BufferedInputStream bis = null; try { certStr = "-----BEGIN CERTIFICATE-----\n" + certStr + "\n-----END CERTIFICATE-----"; // logger.debug(".........certStr=" + certStr); in = new ByteArrayInputStream(certStr.getBytes(StandardCharsets.UTF_8)); bis = new BufferedInputStream(in); CertificateFactory cf = CertificateFactory.getInstance("X.509"); while (bis.available() <= 0) { // logger.debug(".........certStr=" + certStr); String err = "Can't Parse certificate: ...Stop....!!!!!!!!!!!!!!"; logger.error(err); throw new RuntimeException(err); } Certificate cert = cf.generateCertificate(bis); bis.close(); bis = null; in.close(); in = null; return cert; } catch (Exception e) { e.printStackTrace(); logger.error(e); if (e instanceof RuntimeException) { throw (RuntimeException) e; } else { throw new RuntimeException(e); } } finally { if (bis != null) { try { bis.close(); } catch (IOException e) { e.printStackTrace(); } } if (in != null) { try { in.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } } public static PublicKey getPublicKeyFromCertificate(Certificate certificate) { if (certificate == null) { return null; } return certificate.getPublicKey(); } public static boolean isSameBigDecimal(BigDecimal b1, BigDecimal b2) { if (b1 == null && b2 == null) { return true; } else if (b1 == null) { return false; } else if (b2 == null) { return false; } else { return b1.longValue() == b2.longValue(); } } public static boolean isSameTimestamp(Timestamp ts1, Timestamp ts2) { if (ts1 != null && ts2 != null) { return ts1.equals(ts2); } else if (ts1 != null) { return false; } else { return ts2 == null; } } public static String getQuestionMarks1(List list) { if (list == null || list.size() == 0) { return null; } StringBuilder result = new StringBuilder("?"); int size = list.size() - 1; for (int i = 0; i < size; i++) { result.append(", ?"); } return result.toString(); } public static String getIdentifier1(int count) { String result = null; if (count < 10) { result = "000" + count; } else if (count < 100) { result = "00" + count; } else if (count < 1000) { result = "0" + count; } return result; } public static String getSpringActiveProfile() { if (StringUtil.isEmptyOrNull(springActiveProfile)) { String env = System.getenv("spring.profiles.active"); if (StringUtil.isEmptyOrNull(env)) { logger.info("getSpringActiveProfile().....get spring.profiles.active from Java Option.... "); env = System.getProperty("spring.profiles.active"); } if (StringUtil.isEmptyOrNull(env)) { env = DEFAULT_BACKEND_ENV; } springActiveProfile = env; logger.info("getSprintActiveProfile().....spring.profiles.active = " + springActiveProfile); } return springActiveProfile; } public static String getDeploymentRootDir() { if (StringUtil.isEmptyOrNull(deploymentRootDir)) { String env = System.getenv("jappcore.deployment.root.dir"); if (StringUtil.isEmptyOrNull(env)) { logger.info("getDeploymentRootDir().....get jappcore.deployment.root.dir from Java Option.... "); env = System.getProperty("jappcore.deployment.root.dir"); } deploymentRootDir = env; if (StringUtil.isEmptyOrNull(deploymentRootDir)) { return "./"; } if (!StringUtil.isEmptyOrNull(deploymentRootDir) && !deploymentRootDir.endsWith(File.separator)) { deploymentRootDir = deploymentRootDir + File.separator; } } logger.info("getDeploymentRootDir().....jappcore.deployment.root.dir = " + deploymentRootDir); return deploymentRootDir; } public static String getCorrespondingCommand(Object object) { String classSimpleName = object.getClass().getSimpleName(); int idx = classSimpleName.indexOf(REQUEST_POSTFIX); if (idx <= 0) { idx = classSimpleName.indexOf(RESPONSE_POSTFIX); if (idx <= 0) { idx = classSimpleName.indexOf(PROCESSOR_POSTFIX); } } if (idx <= 0) { return null; } String command = classSimpleName.substring(0, idx); if (StringUtil.isEmptyOrNull(command)) { return null; } if (command.equalsIgnoreCase("Base")) { return null; } return command; } public static void setPropertyValue(Class<?> targetClass, Object targetObj, String targetPropertyName, Object targetValue) { if (targetObj == null && targetClass == null) { logger.error("setPropertyValue() - object and targetClass can not be both null, do nothing..."); } if (StringUtil.isEmptyOrNull(targetPropertyName)) { logger.error("setPropertyValue() - propertyName can not be null, do nothing..."); } //object class override target class targetClass = (targetObj == null?targetClass:targetObj.getClass()); while (targetClass != null) { try { Field field = targetClass.getDeclaredField(targetPropertyName); if (field != null) { field.setAccessible(true); field.set(targetObj, targetValue); } else { logger.error("setPropertyValue() - propertyName <" + targetPropertyName + "> is not defined in class " + targetClass.getSimpleName() + ", do nothing..."); } return; } catch (NoSuchFieldException e) { targetClass = targetClass.getSuperclass(); } catch (Exception e) { logger.error("setPropertyValue() - failed, exception: " + AppUtil.getStackTrace(e)); return; } } return; } public static String[] parseHttpBasicAuthString(ServletRequest request) { if (request == null || !(request instanceof HttpServletRequest)) { logger.error( "parseHttpBasicAuthString() - request is null or not instanceof HttpServletRequest, return null... "); return null; } HttpServletRequest httpRequest = (HttpServletRequest) request; String authorization = httpRequest.getHeader("Authorization"); if (authorization != null && authorization.startsWith("Basic")) { // Authorization: Basic base64credentials String base64Credentials = authorization.substring("Basic".length()).trim(); String credentials = new String(Base64.getDecoder().decode(base64Credentials), Charset.forName("UTF-8")); // credentials = username:password String[] values = credentials.split(":", 2); return values; } else { return null; } } public static String parseHttpCodeAuthString(ServletRequest request) { if (request == null || !(request instanceof HttpServletRequest)) { logger.error( "parseHttpCodeAuthString() - request is null or not instanceof HttpServletRequest, return null... "); return null; } HttpServletRequest httpRequest = (HttpServletRequest) request; String code; try { code = httpRequest.getReader().lines().collect(Collectors.joining(System.lineSeparator())); } catch (IOException e) { logger.error(AppUtil.getStackTrace(e)); return null; } // logger.debug("verification code = " + code); return code; } public static String getClientHost(HttpServletRequest request) { String remoteHost = null; if (request != null) { remoteHost = request.getRemoteAddr(); } return remoteHost; } public static String getClientIp(HttpServletRequest request) { String remoteAddr = null; if (request != null) { remoteAddr = request.getHeader("X-FORWARDED-FOR"); if (StringUtil.isEmptyOrNull(remoteAddr)) { remoteAddr = request.getRemoteAddr(); }else { logger.debug("-------------remoteAddr 1-----X-FORWARDED-FOR-----" + remoteAddr); int idx = remoteAddr.indexOf(","); if(idx > 0) { //client part remoteAddr = remoteAddr.substring(0, idx); } idx = remoteAddr.lastIndexOf(":"); if(idx > 0) { remoteAddr = remoteAddr.substring(0, idx); } logger.debug("-------------remoteAddr 2-------------------------" + remoteAddr); } } if(InetAddressValidator.getInstance().isValid(remoteAddr)) { return remoteAddr; }else { return "n/a"; } } public static void setHttpResponse(HttpServletResponse httpResponse, int httpStatus, String statusCode, String message) { if (StringUtil.isEmptyOrNull(statusCode)) { statusCode = "" + httpStatus; } BaseResponse jappBaseResponse = AppUtil.createBaseResponse(null, statusCode, message); Gson gson = new GsonBuilder().serializeNulls().create(); String jsonResponseStr = gson.toJson(jappBaseResponse); httpResponse.setStatus(httpStatus); PrintWriter out; try { out = httpResponse.getWriter(); } catch (Exception e) { logger.error(AppUtil.getStackTrace(e)); return; } httpResponse.setContentType("application/json"); httpResponse.setCharacterEncoding("UTF-8"); out.print(jsonResponseStr); // out.flush(); } public static String getJwtTokenFromRequest(HttpServletRequest httpRequest) { if (httpRequest == null) { logger.debug("getJwtTokenFromRequest - httpRequest is null........."); return null; } String authoHeader = httpRequest.getHeader(AppConstant.HTTP_AUTHORIZATION_HEADER_NAME); String token = null; if ((authoHeader != null) && (authoHeader.startsWith("Bearer "))) { token = authoHeader.substring(7); logger.debug("getJwtTokenFromRequest - found token in request header........."); return token; } else { logger.debug("getJwtTokenFromRequest - can not found token in request header........."); return null; } } public static SecondFactorInfo getSecondFactorInfoFromToken(String jwtToken) { SecondFactorInfo secondFactorInfo = new SecondFactorInfo(); Map<String, Object> claims = parseJwtClaims(jwtToken); if (claims == null) { return null; } String tmpV = "" + claims.get(AppConstant.JWT_CLAIM_KEY_2NDFACTOR_VERIFIED); // logger.debug("getSecondFactorInfoFromToken() - tmpV = " + tmpV); boolean isVerified = Boolean.valueOf(StringUtil.isEmptyOrNull(tmpV) ? "false" : tmpV); String type = "" + claims.get(AppConstant.JWT_CLAIM_KEY_2NDFACTOR_TYPE); String value = "" + claims.get(AppConstant.JWT_CLAIM_KEY_2NDFACTOR_VALUE); // logger.error("hashed 2nd factor value in token (1) - " + value); tmpV = "" + claims.get(AppConstant.JWT_CLAIM_KEY_2NDFACTOR_RETRY_COUNT); int retryCount = Integer.valueOf((NumberUtils.isCreatable(tmpV) ? tmpV : "0")); secondFactorInfo.setVerified(isVerified); secondFactorInfo.setType(StringUtil.isEmptyOrNull(type) ? AppConstant.IAA_2NDFACTOR_TYPE_NONE : type); secondFactorInfo.setValue(value); secondFactorInfo.setRetryCount(retryCount); return secondFactorInfo; } public static Map<String, Object> parseJwtClaims(String jwtToken) { try { if (jwtToken == null || jwtToken.trim().isEmpty()) { return null; } int idx = jwtToken.lastIndexOf('.'); String tokenWithoutSignature = jwtToken.substring(0, idx + 1); Jwt<Header, Claims> jwtWithoutSignature = Jwts.parser().parseClaimsJwt(tokenWithoutSignature); Claims claims = jwtWithoutSignature.getBody(); Set<String> keySet = claims.keySet(); if (keySet == null || keySet.isEmpty()) { return null; } Map<String, Object> map = new HashMap<String, Object>(); for (String key : keySet) { map.put(key, claims.get(key)); } return map; } catch (Exception e) { logger.error(AppUtil.getStackTrace(e)); return null; } } public static String getSubjectFromJwt(String jwtToken) { try { if (jwtToken == null || jwtToken.trim().isEmpty()) { return null; } int idx = jwtToken.lastIndexOf('.'); String tokenWithoutSignature = jwtToken.substring(0, idx + 1); Jwt<Header, Claims> jwtWithoutSignature = Jwts.parser().parseClaimsJwt(tokenWithoutSignature); Claims claims = jwtWithoutSignature.getBody(); String subject = claims.getSubject(); logger.info("subject ====== " + subject); if (claims.containsKey("upn")) { String upn = (String) claims.get("upn"); logger.info("convert subject to upn ====== " + upn); subject = (String) claims.get("upn"); } return subject; } catch (Exception e) { logger.error(AppUtil.getStackTrace(e)); return null; } } public static void initTransactionContext(HttpServletRequest request) { logger.debug("initTransactionContext()...init transaction context........"); TransactionContext txnCtx = new TransactionContext(); String txId = UUID.randomUUID().toString(); txnCtx.setTransactionId(txId); txnCtx.setRequestReceivedTimeStamp(new Timestamp(new Date().getTime())); txnCtx.setServerTimezoneId(TimeZone.getDefault().getID()); if (request != null) { String host = getClientHost(request); host = (StringUtil.isEmptyOrNull(host) ? "n/a" : host); txnCtx.setClientHostName(host); String ip = getClientIp(request); ip = (StringUtil.isEmptyOrNull(ip) ? "n/a" : ip); txnCtx.setClientIP(ip); } // for request processor AppThreadContext.setTransactionContext(txnCtx); // for log4j2 ThreadContext.put(AppConstant.JAPPCORE_TX_ID, txId); } public static void clearTransactionContext() { logger.debug("clearTransactionContext()...clear transaction context........"); AppThreadContext.clean(); ThreadContext.clearAll(); } }
<reponame>ee06b056/Stevens_CS_570<gh_stars>0 const fs = require('fs'); const promptSync = require('prompt-sync')(); class MaxHeap { private arr: number[]; constructor () { this.arr = new Array<number>(); } public testOutput (): void { while (this.arr.length > 0) { console.log(this.arr); console.log(this.pop()); } } public push (num: number): void { this.arr.push(num); let index = this.arr.length - 1, parIndex = Math.floor((index - 1) / 2); while (parIndex >= 0) { if (this.arr[index] > this.arr[parIndex]) { this.swap(index, parIndex); index = parIndex, parIndex = Math.floor((index - 1) / 2); } else { break; } } console.log(this.arr); } public pop (): number { this.swap(0, this.arr.length - 1); let output = this.arr.pop(); this.maximaze(0); return <number>output; } private swap (index_1: number, index_2: number): void { if (index_1 >= this.arr.length || index_2 >= this.arr.length) return; let temp = this.arr[index_1]; this.arr[index_1] = this.arr[index_2]; this.arr[index_2] = temp; } private maximaze (index:number): void { let left_child = index * 2 + 1, right_child = index * 2 + 2, maxIndex = index; while (left_child < this.arr.length) { if (this.arr[left_child] > this.arr[maxIndex]) maxIndex = left_child; if (this.arr[right_child] > this.arr[maxIndex]) maxIndex = right_child; if (maxIndex != index) { this.swap(maxIndex, index); index = maxIndex; left_child = index * 2 + 1, right_child = index * 2 + 2; } else { break; } } } } function main() { let maxHeap = new MaxHeap(); for (let i = 0; i < 5; i++) { let input = parseInt(promptSync('please input one number')); maxHeap.push(input); } maxHeap.testOutput(); } main();
Why Cairanne and Rasteau? These are two of the new stars of the southern Rhône, the climatically distinct, Mediterranean portion of a river that is lined with vineyards much of the way back to its source in a much cooler place, the Rhône Glacier in the Swiss Alps. For a long time, the southern part of the valley was known mainly for Châteauneuf-du-Pape and for bargeloads of rustic Côtes-du-Rhône from the sprawling vineyards all around it. Eventually, the French winemaking authorities elevated other individual villages to “cru” status, starting in 1971 with Gigondas. This meant they, like Châteauneuf-du-Pape, could display their own names on the label, unaccompanied by the humbler regional designation. Photo The most recent to be promoted was Rasteau, in 2010. (Rasteau was previously a standalone cru for a small amount of fortified wine, but the new designation covers the village’s main output — dry red table wine.) Cairanne, a few kilometers to the west, has applied for promotion and, if all goes well, could receive it within a few years. (For now, it is a so-called Côtes-du-Rhône Villages, an in-between designation.) Now that we’ve dispensed with the bureaucratic formalities, let’s get down to what really matters: the hedonistic appeal, and the great value, of these wines. The reds of Cairanne and Rasteau, while subtly different, are archetypal southern Rhône wines — fruity, heady and powerful. They are infused with the region’s signature herbal, spicy notes, redolent of the fragrant garrigue, or underbrush, that covers the parched, Provençal hills anywhere where no vineyards or vacation homes have been planted. These wines are at their best in vintages like 2010, when the jammy fruit and substantial doses of alcohol — 15 percent or more is not unusual — are balanced by fresh acidity and complemented by ripe, refined tannins. Unlike the 2009s from the southern Rhône, which sometimes seem a bit too big, a bit too dry, the 2010s are all about elegance. Yet there are none of the negative connotations — thinness, a lack of ripeness — that “elegance” sometimes implies. 2010 was helped, paradoxically, by a malady called coulure, in which the grapes fail to develop properly after flowering in the spring. As a result, the harvest was tiny — down by one-third or more for many southern Rhône growers. Advertisement Continue reading the main story “We didn’t count the bunches, we counted the grapes,” said Romain Duvernay, a producer and merchant in the region. The remaining grapes ripened beautifully, helped by hot days — but not too hot — and cool nights, which preserved freshness. The 2010s are exceptionally polished, banishing any notion that Rhône wines are rustic or simple. The only flaw is the lack of quantity. Photo “It’s a vintage that will make wine drinkers very happy, vignerons less so,” said Robert Charavin of Domaine des Côteaux des Travers in Rasteau. That is because producers in the southern Rhône, unlike some of their counterparts in regions like Bordeaux or Burgundy, are not able to raise prices much to compensate for a small harvest, even when quality is exceptional. This is an area that makes a lot of wine, and while exports and sales are robust, there has been no speculative hoarding. There are plenty of good wines from Rasteau and Cairanne at less than €10, and only a few bottles cost more than €20. Which to choose, Cairanne or Rasteau? The vignerons typically describe Rasteau as more powerful, or “masculine,” and Cairanne as more elegant, or “feminine.” (When growers say they favor a traditional approach, they aren’t referring only to their winemaking techniques.) Newsletter Sign Up Continue reading the main story Please verify you're not a robot by clicking the box. Invalid email address. Please re-enter. You must select a newsletter to subscribe to. Sign Up You will receive emails containing news content , updates and promotions from The New York Times. You may opt-out at any time. You agree to receive occasional updates and special offers for The New York Times's products and services. Thank you for subscribing. An error has occurred. Please try again later. View all New York Times newsletters. The differences stem largely from the terroir. The Rasteau vineyards stretch across several south-facing canyons with various kinds of clayey soils, whose vineyards bake in the Mediterranean sun. In Cairanne, the expositions and the soils are more varied, with some sandy plots alongside the clay. But, as is often the case with neighboring — and sometime rival — wine villages in France, it strikes me that the vignerons may overstate these differences. Both villages feature largely the same grape varieties, with grenache playing the key role in the red wines, complemented by syrah, mourvèdre, carignan and other varieties. Rasteau is the quintessential grenache village, with large stocks of ancient, gnarly vines bearing this variety, which provides the brambly garrigue flavors. Many of these vines were once used for vin doux naturel, a kind of fortified wine, but now give the red wine of Rasteau its alcoholic kick. In separate tastings of roughly three dozen wines from each village, I found the wines of Rasteau to be more consistent in quality than those of Cairanne. Yet Rasteau showed a greater variety of winemaking styles, from traditional and slightly austere to fruit-driven and forward to modern and richly oaky. Photo Compared with other Old World winemaking regions, this is still something of a frontier area. “When my grandfather bought this property in 1953, nobody wanted to make wine here,” said Gilles Ferran of Domaine des Escaravailles, which is perched atop a hill, near the highest point in the Rasteau apellation. At 320 meters’ altitude, or about 1,000 feet, the land was considered too rustic. Advertisement Continue reading the main story Now Mr. Ferran makes some of the most polished red wine in the appellation, with a striking purity of fruit and great freshness. The wines have found favor around the world, and more than 70 percent are exported. Other Rasteau producers, like La Soumade, Côteaux des Travers, Bressy Masson and Trapadis, have also built up a strong reputation. One estate, Gourt de Mautens, has attracted a cult following, with critical acclaim and prices that match the big names of Châteauneuf-du-Pape. (The 2010 red from Gourt de Mautens had not yet been bottled when I visited). Cairanne is still working on raising its profile, and the wines are more heterogeneous in quality than those of Rasteau. But a handful of producers, led by l’Oratoire Saint Martin and Marcel Richaud, have received deserved international recognition. Some newcomers, like Domaine Roche, created in 2009, have quickly made an impression. The 2010s from l’Oratoire Saint Martin are something special. The estate has a lot of mourvèdre in its vineyards; this gives its higher-end cuvées a savory aroma and a multilayered texture that reminds me of Cháteauneuf-du- Pape. If Cairanne gets the same labeling rights as its neighbor, it is easy to imagine the wines catching up in quality with those of Rasteau and other nearby villages, like Vacqueyras and Gigondas. The application for cru status includes new steps to improve quality, like a ban on mechanical harvesting. “Of course we’d rather be in the first division than first in the second division, but it’s not the end of the story,” said Fréderic Alary of Domaine de l’Oratoire Saint Martin. In other words, 2010 might still be topped by future vintages. But that will take some doing.
<reponame>mateusz-garlacz/cs3api4lab import os from jupyter_core.paths import jupyter_config_path from notebook.services.config import ConfigManager from traitlets.config import LoggingConfigurable class Config(LoggingConfigurable): config = { "reva_host": "", "client_id": "", "client_secret": "", "auth_token_validity": "3<PASSWORD>", "endpoint": "/", "home_dir": "/home", "root_dir_list": "/home,/reva", # List of root dirs. Example: Exaple config "/home,/reva" for storage-references: https://developer.sciencemesh.io/docs/iop/deployment/kubernetes/providers/ "chunk_size": "4194304", "secure_channel": False, "client_cert": "", "client_key": "", "ca_cert": "", "login_type": "basic", "authenticator_class": "cs3api4lab.auth.RevaPassword" } __config_dir = "\\jupyter-config" __config_file_name = 'jupyter_cs3_config' def __init__(self): config_path = jupyter_config_path() if self.__config_dir not in config_path: # add self.config_dir to the front, if set manually config_path.insert(0, os.getcwd() + self.__config_dir) cm = ConfigManager(read_config_path=config_path) config_file = cm.get(self.__config_file_name) config = config_file.get("cs3") # overwriting default values with config file if config is not None: for key in self.config.keys(): if key in config.keys(): self.config[key] = config[key] # overwriting the values with env vars for key in self.config.keys(): env_name = "CS3_" + key.upper() if env_name in os.environ: self.config[key] = os.environ[env_name] if len(self.config["root_dir_list"]) > 0: root_dir_list = tuple(k.strip() for k in self.config["root_dir_list"].split(',')) self.config["root_dir_list"] = root_dir_list else: self.config["root_dir_list"] = tuple() if not self.config["reva_host"]: raise KeyError("Reva host not provided") if not self.config["client_id"]: raise KeyError("Client ID not provided") class Cs3ConfigManager: __config_instance = None @classmethod def get_config(cls): if not cls.__config_instance: cls.__config_instance = Config() return cls.__config_instance.config