当前位置: 首页 > news >正文

网站建设与运维预算凡科建站和华为云哪个好

网站建设与运维预算,凡科建站和华为云哪个好,百度快速收录入口,前端直播网站怎么做qt自动生成的ts文件内部就是用xml写的&#xff0c;可以直接用txt文档编辑器打开。想要使用该代码需要更换文件路径&#xff0c;使用前可以强制更改后缀名将ts文件改成txt文件。 #include <iostream> #include <fstream> #include <string> #include <vec…

qt自动生成的ts文件内部就是用xml写的,可以直接用txt文档编辑器打开。想要使用该代码需要更换文件路径,使用前可以强制更改后缀名将ts文件改成txt文件。

#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <iosfwd>
#include<sstream>int Split(const std::string& s, std::vector<std::string>& sv, const char delim, int maxSplit = 0) {sv.clear();std::istringstream iss(s);std::string temp;int splitCount = maxSplit == 0 ? INT_MIN : 0;while (std::getline(iss, temp, delim) && (splitCount++ < maxSplit)) {sv.emplace_back(std::move(temp));}return static_cast<int>(sv.size());
}int main() {std::string file_name{ "" };file_name = "D:Chinese.txt";std::ifstream in_file;in_file.open(file_name.c_str(), std::ios::binary);if (in_file.is_open()) {//打开输出文件file_name = "D:Chinese.csv";std::ofstream out_file;out_file.open(file_name.c_str(), std::ios::binary);if (out_file.is_open()) {std::string str;std::vector<std::string> str_data;std::vector<double> data;//循环读取ts文件并输出到csv中bool need_endl = false;while (std::getline(in_file, str)) {str_data.clear();Split(str, str_data, '<');//把多行翻译排除if (str_data.size() >= 3) {str = str_data[1];str_data.clear();Split(str, str_data, '>');if (str_data.size() >= 2) {if (str_data[0] == "source") {out_file << str_data[1] << ",";need_endl = true;}else {//判断是否包含tanslation关键字std::vector<std::string> str_trans_symbol;Split(str_data[0], str_trans_symbol, ' ');if (str_trans_symbol[0] == "translation") {//将翻译中包含的逗号转为空格std::vector<std::string> str_translation;Split(str_data[1], str_translation, ',');for (auto temp : str_translation){out_file << temp << "   ";}out_file << std::endl;need_endl = false;}}}else {if (need_endl) {out_file << std::endl;need_endl = false;}}}else {if (need_endl) {out_file << std::endl;need_endl = false;}}}out_file.close();}in_file.close();}
}
http://www.yayakq.cn/news/715822/

相关文章:

  • 简述网站建设centos7怎么做网站服务器
  • 深圳网站建设的价格关于学校的网页设计
  • 营销网站建设需要多少钱wordpress主题 双语
  • 电子 网站模板网络优化的流程
  • 慢慢来做网站多少钱调研园区网站建设工作总结
  • 网站原创页面wordpress获取点击量
  • 网站怎么使用网站建设专题
  • Wordpress网站防止采集网站接入商排名
  • asp.net做的网站模板在线代理服务器免费
  • 网银网站建设银行直播app开发教程
  • 长沙公司核名网站肇庆住房和城乡建设部网站
  • 建设网站服务请示wordpress 常规选项
  • 如何进行企业营销型网站建设服务外包有哪些
  • 最好的书籍设计网站360网站建设企业
  • 重点实验室网站建设网站建设方案书应急处置方案
  • 微信网站对接页面设计的5个原则
  • 上海市工程信息网站设计网站会员哪个好用
  • 网站域名过期抖音开放平台申请
  • 辽宁建设厅官方网站徐州网站建设哪家专业
  • 企业网站功能清单网站模板大全官网
  • 海晏网站建设公司大公司的网站是怎么建的
  • 黑龙江建设局网站word用来做网站的
  • 自己的公网ip可以做网站上海网站建设怎么
  • 专业购物网站建设价格wordpress标题优化
  • 学校网站任务发布网站建设
  • 常州企业免费建站注册公司网站的步骤
  • 云南网站开发培训机构福田公司总部大厦
  • 做网站用百度地图和天地图外贸电商网站开发价格
  • 个人免费建网站方法我要建设一个网站
  • .net网站程序多用户商城购物系统