12 2013 档案

摘要:在mysql中查询5条不重复的数据,使用以下: SELECT * FROM `table` ORDER BY RAND() LIMIT 5 就可以了。但是真正测试一下才发现这样效率非常低。一个15万余条的库,查询5条数据,居然要8秒以上 搜索Google,网上基本上都是查询max(id) * r... 阅读全文
posted @ 2013-12-30 10:53 N3verL4nd 阅读(203) 评论(0) 推荐(0) 编辑
摘要:比如: 中国 388955 发展 327033 我们 322533 经济 321193 新华社 316631 工作 306773 国家 299998 问题 281797 一个 258903 这样的数据,我想删除空格数字。 方法: \s+([0-9]+) \s+ 匹配任意空白符1个至... 阅读全文
posted @ 2013-12-30 10:26 N3verL4nd 阅读(529) 评论(0) 推荐(0) 编辑
摘要:http://blog.csdn.net/reborntercel/article/details/6991147 #include QT += sql QSqlDatabase类实现了数据库连接的操作 QSqlQuery类执行SQL语句 QSqlRecord类封装数据库所有记录 QS... 阅读全文
posted @ 2013-12-23 19:19 N3verL4nd 阅读(665) 评论(0) 推荐(0) 编辑
摘要:qt5.2版本已经封装进去了mysql驱动,所以省去了我们现编译的麻烦!!! #include #include #include #include int main(int argc, char *argv[]){ QCoreApplication a(argc, argv); Q... 阅读全文
posted @ 2013-12-22 15:20 N3verL4nd 阅读(702) 评论(0) 推荐(0) 编辑
摘要:建库 在VS下新建qt console appication 代码: #include #include #include #include #include #pragma comment(lib, "Qt5Sql.lib")int main(int argc, char *argv[]... 阅读全文
posted @ 2013-12-22 13:03 N3verL4nd 阅读(608) 评论(0) 推荐(0) 编辑
摘要:SetCookie、GetCookie 自行设定有效日期: Response.Cookies(CookieName).Expires=#日期# 页面转发区别: 在Servlet中两种实现: forward方式:request.getRequestDi... 阅读全文
posted @ 2013-12-20 00:27 N3verL4nd 阅读(252) 评论(0) 推荐(0) 编辑
摘要:题目1043:Day of Week 时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:1544 解决:609 题目描述: We now use the Gregorian style of dating in Russia. The leap years are... 阅读全文
posted @ 2013-12-19 18:52 N3verL4nd 阅读(217) 评论(0) 推荐(0) 编辑
摘要:这些都是小编在网络大海中艰难寻找的资源,和亲测的安装方法,走过路过的给个掌声哈~ 你们的支持是我前进的动力! 主要用到的软件: (1)Rational Rose 2003 下载地址:http://pan.baidu.com/share/link?shareid=3737214... 阅读全文
posted @ 2013-12-15 09:47 N3verL4nd 阅读(171) 评论(0) 推荐(0) 编辑
摘要:layout.h #ifndef LAYOUT_H#define LAYOUT_H#include #include #include #include #include #include #include #include #include #include "ui_layout.h"cla... 阅读全文
posted @ 2013-12-10 23:36 N3verL4nd 阅读(394) 评论(0) 推荐(0) 编辑
摘要:stackdlg.h #ifndef STACKDLG_H#define STACKDLG_H#include #include #include #include #include "ui_stackdlg.h"class StackDlg : public QDialog{ Q_OBJE... 阅读全文
posted @ 2013-12-08 15:21 N3verL4nd 阅读(1116) 评论(0) 推荐(0) 编辑
摘要:Wireshark是一个非常好用的抓包工具,当我们遇到一些和网络相关的问题时,可以通过这个工具进行分析,不过要说明的是,这只是一个工具,用法是非常灵活的,所以今天讲述的内容可能无法直接帮你解决问题,但是只要你有解决问题的思路,学习用这个软件就非常有用了。 Wireshark官方下载地址:htt... 阅读全文
posted @ 2013-12-06 21:28 N3verL4nd 阅读(179) 评论(0) 推荐(0) 编辑
摘要:http://chenzhou123520.iteye.com/blog/1836961 最近把Eclipse的maven插件从m2eclipse更新到m2e后出了一些莫名其妙的的问题。今天又出了一个,就是Eclipse新建的Maven Web project在tomcat里启动后报错,具... 阅读全文
posted @ 2013-12-05 21:46 N3verL4nd 阅读(198) 评论(0) 推荐(0) 编辑
摘要:麻烦到不能再麻烦的实现,简单到不能再简单的思路。 calc.h #ifndef CALC_H#define CALC_H#include #include "ui_calc.h"class calc : public QMainWindow{ Q_OBJECTpublic: calc(QWid... 阅读全文
posted @ 2013-12-05 15:08 N3verL4nd 阅读(522) 评论(1) 推荐(0) 编辑
摘要:itemwidget.h #ifndef ITEMWIDGET_H#define ITEMWIDGET_H#include #include #include "ui_itemwidget.h"class itemWidget : public QWidget{ Q_OBJECTpublic:... 阅读全文
posted @ 2013-12-04 21:08 N3verL4nd 阅读(299) 评论(0) 推荐(0) 编辑
摘要:#include #include #include #include int main(int argc, char *argv[]){ QApplication a(argc, argv); QSplitter *splitterMain = new QSplitter(Qt::Horizo... 阅读全文
posted @ 2013-12-04 21:04 N3verL4nd 阅读(300) 评论(0) 推荐(0) 编辑
摘要:修改了wd的文章: 如何使用Qt5,设置QLabel中字体的颜色。 大致有几种做法: 一是使用setPalette()方法; 二是使用样式表; 三是可以使用QStyle; 四是可以在其中使用一些简单的HTML样式。 第一种,使用setPalette()方法如下: QPalett... 阅读全文
posted @ 2013-12-03 21:11 N3verL4nd 阅读(1405) 评论(0) 推荐(0) 编辑
摘要:qttimer.h #ifndef QTTIMER_H#define QTTIMER_H#include #include "ui_qttimer.h"class qttimer : public QDialog{ Q_OBJECTpublic: qttimer(QWidget *parent... 阅读全文
posted @ 2013-12-02 21:12 N3verL4nd 阅读(365) 评论(0) 推荐(0) 编辑
摘要:qApp A global pointer referring to the unique application object. It is equivalent to the pointer returned by the QCoreApplication::instance() funct... 阅读全文
posted @ 2013-12-02 21:06 N3verL4nd 阅读(338) 评论(0) 推荐(0) 编辑
摘要:dialog.h #ifndef DIALOG_H#define DIALOG_H#include #include #include #include #include const static double PI = 3.1416;class Dialog : public QDialog... 阅读全文
posted @ 2013-12-02 20:54 N3verL4nd 阅读(572) 评论(0) 推荐(0) 编辑
摘要:具体错误: 不能为虚拟电脑 Ubuntu 打开一个新任务. VT-x is disabled in the BIOS. (VERR_VMX_MSR_VMXON_DISABLED). 返回 代码: E_FAIL (0x80004005) 组件: Console 界面: ICon... 阅读全文
posted @ 2013-12-02 19:55 N3verL4nd 阅读(940) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示