- 博客(36)
- 资源 (2)
- 收藏
- 关注
原创 Ubuntu16.04 两步安装 Nvidia驱动(简单快速)
Ubuntu16.04 两步安装 Nvidia驱动(简单快速)1. 安装显卡驱动ubuntu-drivers devices # 检测当前驱动 显示系统推荐的驱动sudo ubuntu-drivers autoinstall #安装系统推荐的驱动 GTX1060推荐驱动为 nvidia-3842.更新系统内核并重启sudo update-initramfs -u #更新Utuntu内核...
2019-11-27 16:12:35 834 1
原创 JVM内存模型简析
JVM内存模型字节码和类加载器Java Class:Java二进制字节码文件ClassLoader:类加载器(双亲委托加载机制)JVM内存模型Method Area(方法区):ClassLoder加载之后的类信息Heap(堆):类实例的存放位置JVM Stacks(虚拟机栈):类实例的方法相关,存放临时变量PC Register(程序计数器):类实例的方法相关,记录程序运行...
2019-10-08 22:32:37 279
原创 C++实现数组类
//头文件//#pragma onceclass Array_Class { private: int capcity; int size; int *Array; public: Array_Class(); Array_Class(int capcity); Array_Class(const Array_Cla...
2019-03-06 21:08:14 5177
原创 C语言二叉树的非递归遍历
#include <iostream>#include <stack>using namespace std;/* 1、将根节点 压入栈中 2、只要 栈size> 0 执行循环 2.1 拿出栈顶元素 2.2 如果栈顶元素的标志位 真 直接输出 执行下一次循环 2.3 如果不是真 该flag的标志位真 2.4 将 右子节点 和 ...
2019-02-26 23:14:04 912
原创 C语言二叉树的递归遍历、节点数目、二叉树高度、拷贝及释放
#include <stdio.h>#include <stdlib.h>typedef struct BinaryTree { int value; struct BinaryTree* Left; struct BinaryTree* Right; }BinaryTrees;void pre_trival(BinaryTrees *...
2019-02-26 21:47:56 567
原创 C语言队列的链式存储结构
#include <stdio.h>#include <stdlib.h>typedef struct LinkNode{ struct LinkNode* Next;}LinkNodes;typedef struct Mes{ LinkNodes* Use_Node; int id; int age; char na...
2019-02-19 20:01:48 370
原创 C语言队列的顺序存储结构
//头文件#pragma once#include &lt;stdio.h&gt;#include &lt;stdlib.h&gt;#include &lt;string.h&gt;typedef struct info { int id; int age; char name[20];}info_s;typedef struct AArray { ...
2019-02-19 03:53:53 347
原创 C语言栈的链式存储结构
#include <stdio.h>#include <stdlib.h>#define MAX_SIZE 40typedef struct Linknode{ struct Linknode *next;}LinkNodes;typedef struct Stack{ LinkNodes *Stack_Head; int Size;...
2019-02-18 21:05:24 214
原创 C语言栈的顺序存储结构
#include <stdio.h>#include <stdlib.h>#define MAX_SIZE 40typedef struct Stack{ void* value[MAX_SIZE]; int Size;}SeqStack;typedef struct node{ int id; int age; ch...
2019-02-18 18:56:31 326
原创 C语言企业级单向链表——只维护地址域
//区别在于只维护地址域,内存释放需要用户自己来完成#include <stdio.h>#include <stdlib.h>typedef struct Linknode{ struct Linknode *next;}Linknodes;typedef struct LinkList{ Linknodes *p_head; in...
2019-02-18 05:16:38 243
原创 C语言单向链表的数据结构实现——创建、插入、删除、销毁
#include &lt;stdio.h&gt;#include &lt;stdlib.h&gt;typedef struct node { int id; int age; char name[20];} nodes;typedef struct Linknode{ void* value; struct Linknode *next;}L...
2019-02-18 01:23:35 816
原创 C语言创建线性表的基本操作_建立、插入、删除、清空、销毁(操作结构体)
#include &amp;lt;stdio.h&amp;gt;#include &amp;lt;stdlib.h&amp;gt;#include &amp;lt;string.h&amp;gt;typedef struct node { void **Array; int size; int capacity;}nodes;typedef struct info {
2019-02-17 16:36:34 6746
原创 C语言使用同回调函数——打印不同类型的数据
#include &lt;stdio.h&gt;#include &lt;stdlib.h&gt;typedef struct node { int age; char name[20];} nodes;void Fuc_Print(void* data, int p_len, int len, void (*my_print)(void*)) { for(in...
2019-02-17 02:25:29 564
原创 C语言单向链表的反转实现
#include &lt;stdio.h&gt;#include &lt;stdlib.h&gt;typedef struct node{ int value; struct node *next;} nodes;nodes *LinkList_Init();void Insert_value(int value_in, nodes *P_node);void ...
2019-02-17 00:27:59 2623
原创 C语言创建链表的基本操作——建立、插入、删除、清空、销毁
#include &amp;lt;stdio.h&amp;gt;#include &amp;lt;stdlib.h&amp;gt;struct node { int value; struct node * next;};typedef struct node nodes;nodes *LinkList_Init();void Insert_value(int value_in, nodes *...
2019-02-16 23:23:51 4989
原创 二叉树的创建和(递归)遍历
#include &lt;iostream&gt;#include &lt;stack&gt;using namespace std;struct BitNode { int value; BitNode *left; BitNode *right;};BitNode *Creat_BitNode() { BitNode *P_node; int ...
2019-01-09 21:51:43 306
原创 C++单向链表中的荷兰国旗问题
#include <iostream>using namespace std;struct node { int value; node *next;};node *add(node *head, int value) { node *new_node = new node(); new_node -> value = value; ...
2018-10-14 22:46:01 468
原创 C++链表:判断一个链表是否为回文结构
#include &lt;iostream&gt;#include &lt;string&gt;#include &lt;stack&gt;using namespace std;struct node { int value; node *next;};node *add_node(node *head, int value) { node *new
2018-10-05 18:18:57 723
原创 C++链表:打印两个有序链表的公共部分
#include &lt;iostream&gt;#include &lt;string&gt;using namespace std;struct node { int value; node *next;};node *add_node(node *head, int value) { node *new_node = new node(); ne...
2018-10-05 16:39:38 446
原创 C++单向链表的创建、插入、删除、打印、销毁
#include &lt;iostream&gt;#include &lt;stack&gt;#include &lt;string&gt;using namespace std;struct node { int value; node *next;};//add a node at the end of the listnode *add_node(
2018-10-04 22:25:13 319
原创 矩阵的“之”形打印
#include &lt;iostream&gt;using namespace std;void round_print(int **a, int x_temp1, int y_temp1, int x_temp2, int y_temp2, bool reverse){ if(reverse) while(x_temp1 &lt;= x_temp2) ...
2018-10-03 11:58:03 125
原创 矩阵的90度旋转
#include &lt;iostream&gt;using namespace std;void shift_print(int **a, int temp1, int temp2){ //shift_square for(int i = 0; i &lt; temp2 - temp1; i++) { int temp_s = a[temp1][t...
2018-10-02 22:54:47 288
原创 矩阵的“回”形打印
#include &lt;iostream&gt;using namespace std;void square_print(int **a, int x_temp1, int y_temp1, int x_temp2, int y_temp2){ if(x_temp1 == x_temp2) { for(int i = y_temp1; i &lt;= y...
2018-10-02 22:54:03 448
原创 C++比较器_重载运算符
#include &amp;lt;iostream&amp;gt;#include &amp;lt;algorithm&amp;gt;using namespace std;struct student{ int ID; int Age; int Score;};student stu [3] = { {1, 18, 88}, {2, 19, 90}, {3,
2018-10-02 22:01:48 925
原创 C++比较器的实现_函数
#include &lt;iostream&gt;#include &lt;algorithm&gt;using namespace std;struct student{ int ID; int Age; int Score;};student stu [3] = { {1, 18, 88}, {2, 19, 90}, {3, 20, ...
2018-10-02 21:59:39 3829
原创 用队列实现栈(基于数组)
#include &lt;iostream&gt;#include &lt;string&gt;using namespace std;void push(int *queue, int num, int &amp;end_index, int &amp;queue_size, int queue_len){ if (queue_size == queue_len) .
2018-09-30 11:44:17 138
原创 用栈实现队列(基于数组)
#include&lt;iostream&gt;#include&lt;string&gt;using namespace std;void push(int *stack, int num, int &amp;index, int stack_len){ if (index &gt; stack_len - 1) cout &lt;&am
2018-09-30 11:43:21 198
原创 用数组实现队列
//用数组实现队列#include &amp;lt;iostream&amp;gt;#include &amp;lt;string&amp;gt;using namespace std;void push(int *queue, int num, int &amp;amp;end_index, int &amp;amp;queue_size, int queue_len){ if
2018-09-26 11:24:33 260
原创 用数组实现栈结构
//用数组实现栈结构#include&lt;iostream&gt;#include&lt;string&gt;using namespace std;void push(int *stack, int num, int &amp;index, int stack_len){ if (index &gt;= stack_len - 1) cout &a
2018-09-26 10:17:02 332
原创 C++排序(6)——堆排序
#include &amp;amp;lt;iostream&amp;amp;gt;#include &amp;amp;lt;vector&amp;amp;gt;using namespace std;void swap (int &amp;amp;amp;a, int &amp;amp;amp;b){ int temp = a; a = b; b = temp;
2018-09-25 11:12:59 179
原创 C++排序(5)——快速排序
#include &amp;amp;lt;iostream&amp;amp;gt;#include &amp;amp;lt;vector&amp;amp;gt;#include &amp;amp;lt;ctime&amp;amp;gt;#include &amp;amp;lt;cstdlib&amp;amp;gt;using namespace std;//
2018-09-25 11:11:50 284
原创 C++排序(4)——归并排序
#include &lt;iostream&gt;#include &lt;vector&gt;using namespace std;//归并排序//算法时间复杂度 O(N*logN)//算法额外空间复杂度 O(N)void Merge(vector &lt;int&gt; &amp;num_s, int left, int mid, int right){
2018-09-25 11:10:21 149
原创 C++排序(3)——插入排序
#include &amp;amp;lt;iostream&amp;amp;gt;#include &amp;amp;lt;vector&amp;amp;gt;using namespace std;//插入排序//算法时间复杂度 log(n*n)//额外空间复杂度 O(1)void Insert_Sort(vector &amp;amp;lt;int&amp;amp;gt; &
2018-09-25 11:09:34 143
原创 C++排序(2)——选择排序
#include &amp;lt;iostream&amp;gt;#include &amp;lt;vector&amp;gt;using namespace std;//选择排序//算法时间复杂度 O(n*n)//额外空间复杂度 O(1)void Selection_Sort(vector &amp;lt;int&amp;gt; &amp;amp;num_s){
2018-09-25 11:08:51 145
原创 C++排序(1)——冒泡排序
#include &amp;amp;lt;iostream&amp;amp;gt;#include &amp;amp;lt;vector&amp;amp;gt;using namespace std;//冒泡排序//算法时间复杂度 O(n*n)//额外空间复杂度 O(1)void Bubble_Sort(vector &amp;amp;lt;int&amp;amp;gt; &a
2018-09-25 11:03:57 193
原创 C#中使用DrawString绘制文本对齐方式
C#中使用DrawString绘制文本时的对齐方式C#代码:void 绘制文字(Graphics 画家){ StringFormat 格式 = new StringFormat(); 格式.Alignment = StringAlignment.Center; //居中 格式.Alignment = StringAlignment.Far; //右对齐 strin...
2018-05-14 16:54:52 7640
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人