首页 > 编程语言
KMP算法
#include <iostream> #include <string> using namespace std; //获取next数组 int* getNext(string T) { int len = T.size(); //获取T的长度 int* next = new int[len]; ...
分类:编程语言   时间:2020-07-28 22:04:20    收藏:0  评论:0  赞:0  阅读:52
Kruskal算法
#include<iostream> #include<algorithm> #define maxn 10005 using namespace std; int fa[maxn]; void init(){ for(int i=0;i<maxn;i++){ fa[i]=i; } } int ge ...
分类:编程语言   时间:2020-07-28 22:03:27    收藏:0  评论:0  赞:0  阅读:67
Prim算法
#include<iostream> #define INF 100 //找一个合适的值作为最大值,表示无边 using namespace std; int n=4; //顶点数 int G[4][4]={ {INF,1,3,5}, {1,INF,2,INF}, {3,2,INF,4}, {5,I ...
分类:编程语言   时间:2020-07-28 22:01:46    收藏:0  评论:0  赞:0  阅读:59
二叉排序树
#include<iostream> #include<queue> using namespace std; struct BSTNode{ int data; BSTNode *left,*right; BSTNode(int x,BSTNode* L=NULL,BSTNode* R=NULL) ...
分类:编程语言   时间:2020-07-28 22:01:06    收藏:0  评论:0  赞:0  阅读:49
二维数组建图
//vector建图,顶点是数字,本质是邻接表;二维数组建图,顶点是数字,本质是邻接矩阵 #include<iostream> #define maxn 100 //定义一个合适的值作为无边的标志 using namespace std; int main(){ int n,e,w,v1,v2;// ...
分类:编程语言   时间:2020-07-28 21:59:31    收藏:0  评论:0  赞:0  阅读:60
Python 文件之间的循环调用问题
运行A.py,会发现报错:ImportError: cannot import name b 运行B.py,会发现报错:ImportError: cannot import name a 代码: A .py # coding:utf-8from B import bdef a(): print "A ...
分类:编程语言   时间:2020-07-28 21:59:18    收藏:0  评论:0  赞:0  阅读:102
归并排序
#include<iostream> #include<stdio.h> #define maxn 100 using namespace std; void merge(int arr[],low,mid,high){ int i,j,k; int n1=mid-low+1; int n2=hig ...
分类:编程语言   时间:2020-07-28 21:58:29    收藏:0  评论:0  赞:0  阅读:67
Halcon的OCR字符识别算法技巧总结
一、重要算子 OCR分类器其实有很多,如下图所示。但是通常mlp分类器效果较好,使用较多。 主要算子如下: ① append_ocr_trainf(Character, Image : : Class, TrainingFile : ) 四个参数分别是:字符Region、字符Image、字符文本、O ...
分类:编程语言   时间:2020-07-28 21:55:02    收藏:0  评论:0  赞:0  阅读:324
C# 数据结构和算法-数组队列
队列: 队列是一个有序列表,遵循先入先出原则,可以用数组或链表实现 使用场景 用于排队,按顺序执行 public static void Main(string[] args) { ArrayQueue<int> queue = new ArrayQueue<int>(1000); queue.Pu ...
分类:编程语言   时间:2020-07-28 21:54:09    收藏:0  评论:0  赞:0  阅读:60
C++ 特性
C++ 是高级语言,但是高级语言运行的时候都需要翻译。 翻译的方式有两种:解释器和编译器 解释器:解释器读取高级语言程序并执行程序语句,采取的是逐行翻译的方式,每读一行就执行该行,然后读取下一行,交替进行的。 编译器:编译器读取高级语言程序,并在执行程序命令之前将源代码全部编译好。这种情况下,高级语 ...
分类:编程语言   时间:2020-07-28 21:52:00    收藏:0  评论:0  赞:0  阅读:55
(六)多线程之 GIL全局解释器锁
一、引言 定义: ''' 定义: In CPython, the global interpreter lock, or GIL, is a mutex that prevents multiple native threads from executing Python bytecodes at ...
分类:编程语言   时间:2020-07-28 21:50:16    收藏:0  评论:0  赞:0  阅读:54
<数据结构>常见的数据结构和算法
001.二分查找 # 二分查找 ''' 1.end问题 2.44对应的end<start 找不到情况 3.返回值递归的情况 4,611,aim太大的情况 ''' l = [2, 3, 5, 10, 15, 16, 18, 22, 26, 30, 32, 35, 41, 42, 43, 55, 56, ...
分类:编程语言   时间:2020-07-28 21:48:29    收藏:0  评论:0  赞:0  阅读:64
面试题21_2:调整数组顺序使奇数位于偶数之前(各数之间的相对位置不变)
数组问题。输入一个整数数组,实现一个函数来调整该数组中数字的顺序,使得所有奇数位于数组的前半部分,所有偶数位于数组的后半部分。并且保证奇数与奇数、偶数与偶数之间的相对位置不变。 C++版本 #include <iostream> #include <vector> #include <stack> ...
分类:编程语言   时间:2020-07-28 21:47:59    收藏:0  评论:0  赞:0  阅读:73
springboot使用多线程任务
1、config目录下创建线程池对象 import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; import org.spri ...
分类:编程语言   时间:2020-07-28 21:45:33    收藏:0  评论:0  赞:0  阅读:63
Win搭建JAVA环境
一:下载JDK 下载链接:https://www.oracle.com/java/technologies/javase-downloads.html 选择你的系统环境进行下载 二:安装JDK 直接运行exe可执行程序选择下一步,默认安装即可;备注:路径可以选其他盘符,不建议路径包含中文名及特殊符号 ...
分类:编程语言   时间:2020-07-28 21:45:18    收藏:0  评论:0  赞:0  阅读:51
小根堆的建立及siftDown与siftUp算法
//最大堆的构建、结点的插入和删除与此完全类似 #include<iostream> using namespace std; class MinHeap { public: int* heap;//存放最小堆中元素的数组 int maxHeapSize;//最小堆最多允许元素个数 int curr ...
分类:编程语言   时间:2020-07-28 21:43:13    收藏:0  评论:0  赞:0  阅读:101
【python】+操作yaml文件
一、yaml配置文件 二、读取yaml配置文件 import yaml # 配置文件路径 globel_path = 'D:\code\Auto\project\BackedManageSystem\config\global.yaml' class Login: def do_login(self ...
分类:编程语言   时间:2020-07-28 21:40:31    收藏:0  评论:0  赞:0  阅读:57
一个简单的python发送邮件脚本
# -*- coding=utf-8 -*- import sys import smtplib from email.mime.text import MIMEText from email.header import Header class MAILTo: def __init__(self, ...
分类:编程语言   时间:2020-07-28 21:38:00    收藏:0  评论:0  赞:0  阅读:60
SpringBoot+Thymeleaf+集成Swagger2+Druid数据监控
@(SpringBoot) SpringBoot概述 什么是Spring Boot http://spring.io/projects SpringBoot是Spring项目中的一个子工程 与我们所熟知的Spring-framework 同属于spring的产品 设计目的是用来简化新Spring应用 ...
分类:编程语言   时间:2020-07-28 21:37:06    收藏:0  评论:0  赞:0  阅读:74
Java-泛型
#一、泛型的概念 ●所谓泛型,就是允许在定义类、接口时通过一个标识表示类中某个属性的类型或者是某个方法的返回值及参数类型。这个类型参数将在使用时(例如,继承或实现这个接口,用这个类型声明变量、创建对象时)确定(即传入实际的类型参数,也称为类型实参)。 ●从JDK1.5以后,Java引入 了“参数化类 ...
分类:编程语言   时间:2020-07-28 21:35:39    收藏:0  评论:0  赞:0  阅读:62
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!