2017年7月21日

启动mysql时报不报错,但是mysql服务就是启动不起来的解决方法:

摘要: 问题原因:没有mysqld --initialize 解决方法:执行mysqld --initialize,然后重新启动mysql服务即可 阅读全文

posted @ 2017-07-21 15:54 阿兴的平凡世界 阅读(337) 评论(0) 推荐(0) 编辑

2017年6月6日

std::string 转uint64方法:

摘要: #include <string>#include <sstream> uint64 stringToUINT64(const std::string s){ std::stringstream a; a << s; UINT64 ret = 0; a >> ret; return ret;} 阅读全文

posted @ 2017-06-06 14:42 阿兴的平凡世界 阅读(5939) 评论(0) 推荐(0) 编辑

2017年5月19日

Qt 登录面板demo

摘要: QLabel *pImageLabel = new QLabel(this); QLineEdit *pUserLineEdit = new QLineEdit(this); QLineEdit *pPasswordLineEdit = new QLineEdit(this); QCheckBox 阅读全文

posted @ 2017-05-19 17:08 阿兴的平凡世界 阅读(249) 评论(0) 推荐(0) 编辑

c++ _popen读取管道内容(输出内容)例子

摘要: FILE * pPipe = _popen(_postExEPath.toStdString().c_str(), "rb");QString strData;if (pPipe){ while (!feof(pPipe)){std::string tempStr(1024, '\0');fgets 阅读全文

posted @ 2017-05-19 15:27 阿兴的平凡世界 阅读(6524) 评论(0) 推荐(0) 编辑

2017年5月11日

git配置代理命令

摘要: // 查看当前代理设置 git config --global http.proxy // 设置当前代理为 http://127.0.0.1:1080 或 socket5://127.0.0.1:1080 git config --global http.proxy 'http://127.0.0. 阅读全文

posted @ 2017-05-11 12:47 阿兴的平凡世界 阅读(9598) 评论(0) 推荐(0) 编辑

2017年5月9日

Qt设置阻塞式网络请求,和超时处理

摘要: QNetworkProxy proxy; proxy.setType(QNetworkProxy::Socks5Proxy); proxy.setHostName(LOCAPROXYIP); proxy.setPort(LOCAPROXYPORT); proxy.setUser(PROXYUSERN 阅读全文

posted @ 2017-05-09 18:38 阿兴的平凡世界 阅读(5819) 评论(0) 推荐(0) 编辑

2017年5月4日

c++根据进程名称kill进程(不保险,最好根据进程id)

摘要: BOOL ClientApp::KillProcessByName(const TCHAR *lpszProcessName) { unsigned int pid = -1; BOOL retval = TRUE; if (lpszProcessName == NULL) return -1; D 阅读全文

posted @ 2017-05-04 21:35 阿兴的平凡世界 阅读(2811) 评论(0) 推荐(0) 编辑

c++检测本机网络

摘要: bool checkProxyNetwork(){ WSADATA wsaData; if (WSAStartup(MAKEWORD(2, 2), &wsaData) != 0) { qDebug() << "找不到可使用的WinSock dll!" << endl; return false; } 阅读全文

posted @ 2017-05-04 21:34 阿兴的平凡世界 阅读(772) 评论(0) 推荐(0) 编辑

2017年4月20日

ShellExecuteEx 阻塞和异步调用进程的两种方法

摘要: 阻塞: SHELLEXECUTEINFO ShExecInfo = { 0 }; ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO); ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS; ShExecInfo.hwnd = N 阅读全文

posted @ 2017-04-20 17:52 阿兴的平凡世界 阅读(804) 评论(0) 推荐(0) 编辑

2017年4月19日

QImage 转base64

摘要: QImage img = pix.toImage(); QByteArray ba; QBuffer buf(&ba); img.save(&buf, "png"); QString base64String = ba.toBase64(); 阅读全文

posted @ 2017-04-19 16:33 阿兴的平凡世界 阅读(875) 评论(0) 推荐(0) 编辑

导航