int IflySTT::next(unsigned int cmd, void *data, int len) { if (0 == cmd) { return stt(data, len); } if (999 == cmd) { audio_stat_ = MSP_AUDIO_SAMPLE_LAST; return stt(data, len); } return Chain::next(cmd, data, len); }
int main() { float BA,SA,Q,TBA,TSA,BR_b,BR_s,ST,STT,T_b,T_s,X,P,BP,profit; if(input()==1) { BR = arr[0]; BA = arr[1]; SA = arr[2]; Q = arr[3]; TBA = BA * Q; TSA = SA * Q; BR_b = brokerage(TBA); BR_s = brokerage(TSA); ST = servicetax(BR_b); STT = stt(TSA); T_b = BR_b + ST; T_s = BR_s + STT + ST; X = T_b + T_s; P = X + (TBA+TSA) *(0.006/100); BP = TSA - TBA; profit = BP - P; if(profit > 0) printf("Profit\n%f",profit); else printf("Loss\n%f",profit*-1); } else printf("Invalid Input"); free(arr); return 1; }
void LineExtract::drawLine(const cv::Mat &src, cv::Mat &output, std::vector<LineFeature> &LineFeatures) { output = src.clone(); for (auto line : LineFeatures) { cv::Point stt(line.mStartPt(0), line.mStartPt(1)); cv::Point end(line.mEndPt(0), line.mEndPt(1)); cv::line(output, stt, end, Scalar(0, 0, 255), 1, 8, 0); } }
util_error_t stt_c_locale(const char *s, const char *format, time_t *t, double *tfrac) { char *saved_locale; util_error_t err; saved_locale = strdup(setlocale(LC_ALL, NULL)); if (saved_locale == NULL) { return ALLOC_FAILED; } setlocale(LC_ALL, "C"); err = stt(s, format, t, tfrac); setlocale(LC_ALL, saved_locale); free(saved_locale); return err; }