原创 C/C++連接mysql數據庫(vs)
注:本篇只介紹在VS上C/C++與Mysql數據庫的連接,默認已經搭建好數據庫,如果沒有,請先學習相關資料搭建好數據庫後再來閱讀本文。 開門見山,直入主題。 我們要做的其實只有兩步:(1)將工程的頭文件路徑指向Mysql安裝目錄的mysq
原创 Dev-C++連接mysql數據庫
一直挺喜歡Dev-C++的小巧,日常寫點小代碼都能滿足。今天有個需求需要連一下數據庫,索性直接開發一下Dev-C++怎麼搞。 前提:已經安裝Dev-C++,已經安裝mysql 1. 下載MySQL.DevPak https://sourc
原创 NLPIR漢語分詞系統在VS中使用
首先去官網下載NLPIR(ICTCALS)包。 點我下載 由於筆者在項目中需要用到mysql數據庫,而筆者數據庫是64位的,所以,筆者這裏下載了32位的NLPIR下載包後,又下載了64位的補充包。 下載解壓後會得到下列文件夾:(每
原创 bootstrap-slider使用以及change獲取當前值
1、引用相關庫: <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css"> <link
原创 Echarts關係圖擴展分類默認顏色數量
最近做的東西中要用到Echarts畫關係圖,遇到一個挺DT的問題,在gexf文件中指定每個node的所屬類別後,如果不爲這些node自定義顏色的話,會在生成的畫像中會爲每一個類別默認設置一個顏色,每個類別的node擁有同一種顏色,如下圖:
原创 DES加密算法
在學習DES加密算法的過程中,筆者發現一個很好很詳細很容易理解的PPT講解,自認爲寫的不會超越這位作者,所以直接給大家分享鏈接: 點擊打開鏈接 在之後的AES加密算法中,筆者會爲大家獻上AES算法具體實現的C++代碼! 另外,筆者在自己學
原创 mysql指令大全
導入txt文件:load data infile 'D:/Master_graduate/w2v_small_small.txt' into table w2v_server; 導出備份數據庫表: (1)管理員啓動cmd (2)C:\Pr
原创 Mongodb常用指令大全及常見問題合集
最近在用Mongodb數據庫,使用過的指令或問題在這裏記錄一下,方便日後查閱(隨時更新): 常用指令: 1.導入json文件:mongoimport --db project --collection special_dictonary
原创 蒙特卡洛法多線程求圓周率
#include<iostream> #include<string> #include<pthread.h> #include<cmath> #include<cstdlib> #include<iomanip> #include<cs
原创 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 targe
原创 QT5.5連接mysql5.6
QT5.5雖然自帶mysql驅動,不再需要像QT4那樣自己進行編譯。但是QT對mysql總歸不是那麼友好,在連接過程中,遇到了一坨又一坨的問題,參考了一坨又一坨的資料,用了將近一整天的時間,終於搞定了。直接上乾貨: 照着QT官方文檔提供的
原创 *22. Generate Parentheses
題目描述: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For examp
原创 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 no
原创 24.Swap Nodes in Pairs
題目描述: Given a linked list, swap every two adjacent nodes and return its head. Example: Given 1->2->3->4, you should re
原创 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