自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Doubly

静心尽力!

  • 博客(28)
  • 资源 (1)
  • 收藏
  • 关注

原创 QT5.5连接mysql5.6

QT5.5虽然自带mysql驱动,不再需要像QT4那样自己进行编译。但是QT对mysql总归不是那么友好,在连接过程中,遇到了一坨又一坨的问题,参考了一坨又一坨的资料,用了将近一整天的时间,终于搞定了。直接上干货:照着QT官方文档提供的方法(按F1),进行mysql数据库的连接:QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL"...

2017-04-30 12:08:16 22805 28

原创 Dev-C++连接mysql数据库

一直挺喜欢Dev-C++的小巧,日常写点小代码都能满足。今天有个需求需要连一下数据库,索性直接开发一下Dev-C++怎么搞。前提:已经安装Dev-C++,已经安装mysql1. 下载MySQL.DevPakhttps://sourceforge.net/projects/dev-cpp/files/webupdate/webupdate/2. 打开Dev,工具=》Package ...

2020-02-18 12:35:43 9718 10

原创 mysql指令大全

导入txt文件:load data infile 'D:/Master_graduate/w2v_small_small.txt' into table w2v_server;导出备份数据库表:(1)管理员启动cmd(2)C:\Program Files\MySQL\MySQL Server 5.6\bin(3)mysqldump -u root -p tju_social_com...

2019-12-31 11:20:33 219

原创 Echarts关系图扩展分类默认颜色数量

最近做的东西中要用到Echarts画关系图,遇到一个挺DT的问题,在gexf文件中指定每个node的所属类别后,如果不为这些node自定义颜色的话,会在生成的画像中会为每一个类别默认设置一个颜色,每个类别的node拥有同一种颜色,如下图:可以看到明显有一个问题就是当你的分类数量大于11时,颜色会再次重复回去,这样对于分类任务来说是没法接受的,解决方法之一是可以通过我上文提到的去自定义每个n...

2019-11-21 18:56:01 2724 3

原创 bootstrap-slider使用以及change获取当前值

1、引用相关库:<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css"><link rel="stylesheet" href="//cdn.bootcss.com/bootstrap-slider/9.4.1/css/bo...

2019-11-21 15:57:25 1612

原创 Mongodb常用指令大全及常见问题合集

最近在用Mongodb数据库,使用过的指令或问题在这里记录一下,方便日后查阅(随时更新):常用指令:1.导入json文件:mongoimport --db project --collection special_dictonary --jsonArray --file F:\Mongodb\bin\json\sgcc.special_dictionary.json2.创...

2019-02-20 15:13:34 332

原创 *36. Valid Sudoku

题目描述:Determine if a 9x9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules:Each row must contain the digits 1-9 without repetition. Each column mus...

2018-08-25 11:28:09 119

原创 *22. Generate Parentheses

题目描述:Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:[ "((()))", "(()())", "(())()", "...

2018-08-24 10:04:36 122

原创 34. Find First and Last Position of Element in Sorted Array

题目描述:Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the order of O(log n)....

2018-08-23 09:55:32 132

原创 33. Search in Rotated Sorted Array

题目描述:Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]).You are given a target value to search. If...

2018-08-22 11:22:23 112

原创 *32. Longest Valid Parentheses

题目描述:Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.Example 1:Input: "(()"Output: 2Explanation: The longes...

2018-08-21 15:19:42 133

原创 31. Next Permutation

题目描述:Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange it as the lowest pos...

2018-08-20 14:57:34 236

原创 28. Implement strStr()

题目分析:Implement strStr().Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Example 1:Input: haystack = "hello", needle = "ll"Output: 2...

2018-08-19 14:45:10 116

原创 25. Reverse Nodes in k-Group

题目描述:Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.k is a positive integer and is less than or equal to the length of the linked list. If the num...

2018-08-19 14:26:39 142

原创 27. Remove Element

题目描述:Given an array nums and a value val, remove all instances of that value in-place and return the new length.Do not allocate extra space for another array, you must do this by modifying the inp...

2018-08-18 15:52:43 113

原创 23. Merge k Sorted Lists

题目描述:Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.Example:Input:[  1-&gt;4-&gt;5,  1-&gt;3-&gt;4,  2-&gt;6]Output: 1-&gt;1-&gt;2-&gt;3...

2018-08-18 11:07:51 263

原创 24.Swap Nodes in Pairs

题目描述:Given a linked list, swap every two adjacent nodes and return its head.Example:Given 1-&gt;2-&gt;3-&gt;4, you should return the list as 2-&gt;1-&gt;4-&gt;3.Note:Your algorithm should u...

2018-08-16 15:38:39 280

原创 利用C++模板功能实现栈,并进一步实现10以内带括号的表达式求值

ImprovedStack.h#ifndef ImprovedStack_H#define ImprovedStack_H#include&lt;iostream&gt;using namespace std;template&lt;typename T&gt;class Stack{public: Stack(); ~Stack(); bool empty() const;...

2018-04-30 15:45:40 274

原创 C++类模板

C++类模板中,类的声明和类方法的实现(包括构造函数,析构函数等)不能分离,也就是说类模板不能分开应用于.h文件和.cpp文件,必须写在一起。

2018-04-30 11:16:48 302

原创 QT隐藏最大化和最小化按钮

隐藏(不显示)最大化最小化按钮:MainWindow w;w.setWindowFlags(w.windowFlags()&~Qt::WindowMinMaxButtonsHint);使窗口可以最大化,但不能最小化:MainWindow w;w.setWindowFlags(w.windowFlags()&~Qt::WindowMinMaxButtonsHint|Qt:

2017-04-26 13:39:30 18281 5

原创 node.js微信公众平台开发之Token验证

进行微信公众平台的开发,进行token验证是第一步,如下图所示。url填写自己的服务器地址。Token这里可以自定义,但是要和代码中的Token保持一致。node.js代码如下:var crypto = require('crypto');var url = require('url');exports.wechat = function(req,res){ var quer

2017-04-10 16:21:28 4947 2

原创 node.js服务端和QT客户端简单Socket通讯

node.js服务端和QT客户端进行简单的Socket通讯

2017-04-09 15:27:12 2403 1

原创 MPI多进程求行列式值

#include#include#includeusing namespace std;#define Matrix_Size_Max 1000double Matrix[Matrix_Size_Max][Matrix_Size_Max];double det_cal(double mmatrix[][20], int size){ if (size == 1){ return

2016-06-12 18:38:52 1925

原创 多线程求行列式值

#include#include#include#include#include#include#include#includeusing namespace std;#define Max_Matrix_size 1000#define Max_pthread_size 100double Matrix[Max_Matrix_size][Max_Matrix_size];

2016-05-31 09:37:18 1981 1

原创 蒙特卡洛法多线程求圆周率

#include#include#include#include#include#include#include#include#define MAX 100000000using namespace std;double result = 0;int thread_num;int Every_P;pthread_mutex_t mut;void *t_hread(vo

2016-05-31 09:35:02 3437

原创 DES加密算法

笔者找到一个学习DES加密算法的很好很详细很全面的PPT教程,自认为写的不会超越这位作者,所以直接给大家分享链接:点击打开链接在之后的AES加密算法中,笔者会为大家献上AES算法具体实现的C++代码!另外,笔者在自己学习完DES加密算法后做了一些总结,是纸质版的,怕我自己把这几页纸丢了,在这里保存一下,以后自己看,大家不嫌字丑也可以参考一下- -!

2016-04-25 18:43:02 735

原创 C/C++连接mysql数据库(vs)

注:本篇只介绍在VS上C/C++与Mysql数据库的连接,默认已经搭建好数据库,如果没有,请先学习相关资料搭建好数据库后再来阅读本文。开门见山,直入主题。我们要做的其实只有两步:(1)将工程的头文件路径指向Mysql安装目录的mysql.h头文件所在位置。(2)将链接库路径指向libmysql.lib所在路径。笔者这里数据库使用的是Mariadb,连接方法与mysql相同。首先找到my

2016-04-16 17:09:25 8605

原创 NLPIR汉语分词系统在VS中使用

首先去官网下载NLPIR(ICTCALS)包。   点我下载  由于笔者在项目中需要用到mysql数据库,而笔者数据库是64位的,所以,笔者这里下载了32位的NLPIR下载包后,又下载了64位的补充包。下载解压后会得到下列文件夹:(每个文件夹包含东西的具体用途请自行Baidu/Google)还有64位补充包解压后的东西:(同样,具体用途请自行Baidu/Google)到

2016-04-15 19:13:12 2762 1

AES加密算法

C++实现AES加密算法,包括C++可运行源代码以及完整的实验报告(AES加密算法实现过程的详细解释),源代码文件中还有较为清楚的注释!

2016-08-29

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除