- 博客(44)
- 收藏
- 关注
原创 QT_仿王者荣耀抽奖
QT_仿王者荣耀抽奖关键代码:void Widget::funtion_1(){ //单抽模式 int after_pos = 0; QLabel* label; QLabel*after; if(pos > 13) { pos = 0; } if(0 == pos)...
2020-04-27 21:24:30
631
原创 QT_登录验证码
QT_登录验证码关键代码:void newcode::paintEvent(QPaintEvent *event){ code.clear(); QPainter painter(this); QPen pen; //画点 for(int i = 0;i < 100;++i) { pen = QPen(QColor(qr...
2020-04-27 21:21:04
2002
2
原创 C++_函数模板+希尔排序
C++_函数模板+希尔排序#include <iostream>#include <time.h>using namespace std;template<class T>void PrintArray(T*arr,int length) { for (int i = 0; i < length; i++) { cout <<...
2019-08-17 20:09:34
329
原创 c_win32窗体的创建
c_win32窗体的创建#include <Windows.h>//6、处理消息(窗口过程)回调函数//CALLBACK 代表__stdcall 参数传递顺序 从左到右 依次进栈 在函数返回前 清空栈LRESULT CALLBACK WindowProc( HWND hwnd,//消息所属的窗口句柄 UINT uMsg,//具体消息名称 WM_XXX消息名 ...
2019-08-17 20:08:08
242
原创 C_文件块读写
C_文件块读写#define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <string.h>#include <stdlib.h>typedef struct Student { char name[21]; int age; int score; char site[51];}st...
2019-08-07 20:39:06
319
原创 c_贪吃蛇
c_贪吃蛇#define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <string.h>#include <stdlib.h>#include <Windows.h>#include <time.h>#include <conio.h>#define ...
2019-08-07 20:37:50
157
原创 C++二叉树
C++二叉树#include <iostream>using namespace std;class TreeNode {public: char str; TreeNode* LeftNode; TreeNode* RightNode; };//遍历输出数节点void PrintTreeNode(TreeNode*node) { if (node==NULL)...
2019-07-27 14:33:21
605
原创 C++堆排序
C++堆排序#include <iostream>#include <time.h>#include <sys/timeb.h>using namespace std;#define MAX 10000void SwopArray(int arr[],int x,int y) { int temp = arr[x]; arr[x] = arr[y...
2019-07-27 14:31:24
159
原创 C++归并排序
C++归并排序#include <iostream>#include <time.h>#include <sys\timeb.h>using namespace std;#define MAX 10000void MergeArray(int arr[], int stack, int end,int mid, int temp[]) { ...
2019-07-17 21:49:24
105
原创 C++快速排序
C++快速排序#include <iostream>#include <time.h>#include <sys\timeb.h>using namespace std;#define MAX 10000void SortArrar(int arr[],int stack,int end) { int i = stack; int j = end...
2019-07-17 21:47:48
120
原创 C++希尔排序
C++希尔排序#include <iostream>#include <time.h>#include <sys/timeb.h>using namespace std;#define MAX 10000void SortArr(int arr[],int length) { int i = 0, j = 0, k = 0; int int...
2019-07-07 08:55:41
859
原创 C++插入排序
C++插入排序#include <iostream>#include <sys\timeb.h>#include <time.h>using namespace std;#define MAX 10000//插入排序:1、先把数组第一个元素当成有序序列// 2、从第二个元素开始,元素和当前元素的上一个元素进行比较,符合条...
2019-07-07 08:54:10
237
原创 C++栈的应用_就近匹配
C++栈的应用_就近匹配#include <iostream>using namespace std;#define MAX_SIZE 1024class Stack{public: Stack(); ~Stack(); void push_back(void*); void* Front(); void pop_front(); int GetSize();...
2019-06-27 20:44:10
236
原创 C++‘企业’链表
C++‘企业’链表#include <iostream>using namespace std;class Linked{public: Linked* next;};typedef void(*Print)(Linked*);//打印方法函数类型class LinkeStruct {public: LinkeStruct(); ~LinkeStruct();...
2019-06-27 20:42:43
292
原创 C++装饰器模式
C++装饰器模式#include <iostream>using namespace std;//装饰模式又叫包装模式,通过一种对客户端透明的方式来拓展对象功能,是继承关系的一种替代。//装饰模式就是要把附加的功能分别放在独立的类中,并让这个类包含要装饰的对象class Hero //英雄类{public: virtual void ShowProperty() = 0...
2019-06-18 08:30:51
605
1
原创 C++外观模式
C++外观模式#include <iostream>using namespace std;//外观模式就是将复杂的子类系统抽象到同一个接口进行管理,//外界只需要通过此接口与子类系统进行交互,//而不必要和复杂的子类系统进行交互class Television //电视机类{public: void On(){ cout << "电视机打开" <...
2019-06-18 08:28:57
248
原创 C++依赖倒转原则
C++依赖倒转原则#include <iostream>using namespace std;class Business {public: virtual void GeneralService() = 0;};class TransferAccounts :public Business//办理转账业务{public : void GeneralSer...
2019-06-09 16:50:01
374
1
原创 C++工厂方法模式
C++工厂方法模式#include <iostream>#include <fstream>#include <string>using namespace std;void main() { ifstream ifs; ifs.open("main.cpp", ios::in); if (!ifs) { cout << "文件...
2019-06-09 16:47:02
138
原创 C++代理模式实现验证登录
C++代理模式实现验证登录 #include <iostream>#include <fstream>#include <string>using namespace std;void main() { ifstream ifs; ifs.open("main.cpp", ios::in); if (!ifs) { cout <<...
2019-06-09 16:44:42
491
原创 C++文件流
C++文件流#include <iostream>#include <fstream>#include <string>using namespace std;void main() { ifstream ifs; ifs.open("main.cpp", ios::in); if (!ifs) { cout << "文件打开失...
2019-05-28 07:31:11
152
原创 C++嵌套vector容器
C++嵌套vector容器#include <iostream>#include <vector>using namespace std;class Test{public: Test() {}; Test(int x):x(x) {}; ~Test() {}; vector<int> x;//在类里使用动态数组作为成员变量};void...
2019-05-28 07:29:52
1721
2
原创 C++单例模式小案例
C++单例模式小案例#include <iostream>using namespace std;class Plural{public: ~Plural(); static Plural*getPort();//获取接口 void getXY();//打印XY void setXY(int, int); friend istream& operator...
2019-05-16 22:43:23
226
原创 C++单例模式实验多态
C++单例模式实验多态#include <iostream>using namespace std;class Ceshi{public: ~Ceshi(); //static Ceshi* getCeshi(); virtual void printf(); Ceshi*next;protected: Ceshi(); static Ceshi* ceshi...
2019-05-16 22:41:43
642
原创 C++随机数生成QQ号
C++随机数生成QQ号#include <iostream>#include <stdlib.h>#include <time.h>using namespace std;void main() { int num = 0;//QQ位数 int number = 0;//QQ个数 cout << "请输入QQ号的位数" <...
2019-05-08 22:13:33
1296
原创 C++递归斐波那契数列
C++递归斐波那契数列#include <iostream>using namespace std;int Fibonacci(int);//函数原型void main() { int a;cout << "请输入要递归的斐波那契数列的层数" << endl; cin >> a; cout << "----------...
2019-05-07 10:49:27
3261
1
原创 C++巴比伦算法
C++巴比伦算法#include <iostream>using namespace std;void test2();//函数原型void main() { test2();}//用于计算数字n的平方根的巴比伦算法如下://a.先猜一个答案guess(可以将n / 2作为第一个答案)//b.计算r = n / guess//c.令guess = (guess...
2019-05-07 10:47:30
687
原创 C++螺纹数组
C++螺纹数组//5x5螺纹void test4(int x) {// 5 4 4 3 3 2 2 1 1:运行次数(for里的第一个for与第二个for) int arr[5][5] = {0};//声明二维数组并初始化(要靠它来判断是否有值) int s=4,y=1,i=0,j=0;//j:第一个循环变量,i:第二个循环变量,y:赋值,s:控制第一个变量的次数 for (in...
2019-04-27 12:03:17
228
原创 C++指针引用和指向指针的指针传输结构体
C++指针引用和指向指针的指针传输结构体#include <iostream>using namespace std;struct teacher { int id; char name[64]; };int tea(struct teacher* &a) {//指针引用,a是c的别名 a = (struct teacher*)malloc(sizeof...
2019-04-18 08:52:54
1375
2
原创 JavaScript 进制相互转换器
JavaScript 进制相互转换器主要功能:2、4、8、10、16相互转换<html><head> @*不提供音频*@ <meta name="viewport" content="width=device-width" /> <title>ceshi14</title></head><...
2019-04-03 17:30:43
401
2
原创 JavaScript 音乐播放器
JavaScript 音乐播放器主要功能:快进、快退、暂停、上下一首、禁音、鼠标控制音量、自动下一首、显示歌名<html><head> @*不提供音频*@ <meta name="viewport" content="width=device-width" /> <title>ceshi14</title>...
2019-03-26 09:38:02
1354
2
原创 JavaScript模仿CF王者轮回
JavaScript模仿CF王者轮回<html><head> <meta name="viewport" content="width=device-width" /> <title>ceshi12</title> <style> * {
2019-03-14 14:46:05
643
1
原创 javaScript模仿CF占扑抽奖
javaScript模仿CF占扑抽奖<html><head> <meta name="viewport" content="width=device-width" /> <title>ceshi10</title> <style> *{
2019-03-05 14:49:48
1523
3
原创 javaScript实现微信随机红包
javaScript实现微信随机红包<html><head> <meta name="viewport" content="width=device-width" /> <title>ceshi9</title> <style> * {
2019-02-24 21:04:42
539
2
原创 css3实现红旗动漫制图
css3实现红旗动漫制图<html><head> <meta name="viewport" content="width=device-width" /> <title>ceshi7</title> <style> * { margi
2019-02-15 18:51:54
534
原创 JS实现时分秒日周毫秒转换
JS实现时分秒日周毫秒转换<body> <div id="as"style="width:300px;height:300px"> <select id="zhuan" style="width:300px;"> <option value="0">
2019-02-12 09:06:12
413
原创 c#随机生成IP地址
c#随机生成IP地址 public static string ipsite() { Random sj = new Random(); var s = ""; for (int i = 0; i <= 3; i++) { var q = sj.N...
2019-02-07 08:41:22
1858
原创 JavaScript实现数组储存与删除
JavaScript实现数组储存与删除<body> <div> <input type="checkbox"value="1" /> <input type="checkbox"value="2" /> <input type="chec
2019-02-01 21:46:05
321
原创 JavaScript实现全选input
JavaScript实现全选input<body> <div> <input type="checkbox"/> <input type="checkbox" /> <input type="checkbox" /> <i
2019-01-23 21:10:38
1436
1
原创 《GIS龙岗区项目部分展示》
《GIS龙岗区项目部分展示》1、定位:输入地址进行模糊和精确查询并实现定位周边功能2、工具箱测距3、工具箱:矩形(查询医院)4、工具箱:面积查询5、工具箱:圆形查询6、获取中心点的周边查询7、病人路径查询(以登记号和时间段筛选)8、最佳路径查询(在地图定2个以上的坐标,系统会根据定点顺序进行路径匹对)9、热力图(未完成)10、图层管理器:病原分布图11、图层管理器:预警(地区有2例以上病例就预警)...
2019-01-20 10:39:39
385
1
原创 JavaScript实现5星好评制作
JavaScript实现5星好评制作<style> .s { background: #808080; } i{ font-size:100px; } </style> <body> <div class="s"> ...
2019-01-19 17:45:43
684
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人