自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(48)
  • 收藏
  • 关注

原创 Astar寻路 Python示例

Astar原始寻路算法python代码示例,无讲解

2023-12-25 17:53:28 300

原创 [其他]CCNA网络工程学习笔记

1.计算机网络体系1.1 网络定义以及分类:局域网 LAN 不超过几十公里广域网 WAN 企业或全球城域网 MAN 覆盖一个城市1.2 网络要素网络服务:上网计算机进行资源共享的能力,通过硬件与软件来实现。传输介质:用来联系网络实体之间的通路,包括 导向性传输介质:信号沿着一定的方向传输。如双绞线、同轴电缆、光纤非导向性传输介质:信号无法按照确定方向传播。如无线网协议:网络产品所以

2017-01-02 18:47:13 783

原创 [Python]DJango部署在Apache服务器配置示例

1.Django安装1.1. 安装python。 1.2. 设置环境变量,把python的路径和python下边的scripts路径放在系统的path中。 1.3. 使用pip install django安装django。 1.4. 安装mysqldb。(数据库使用MySQL) 1.5. 使用python的shell import mysqldb,查看安装是否成功。 1.6. 安装VC库

2016-11-06 10:31:52 1168

原创 [其他]Git常用指令

一、仓库初始化git init 将当前目录初始化为git仓库或直接克隆远程仓库(见四)二、本地仓库提交查看git add [DIR] 将目标文件、目录添加到本地仓库暂存区,目标可以是“.”git commit -m "xxxx" 将add到暂存区的文件提交到本地仓库当前分支,并做xxxx的记录提醒git status 查看仓库当前状态git diff 查看仓库变动细节git log

2016-08-03 18:18:39 381

原创 [Ruby]Rails的MVC部分理解

1. controller对数据库的间接操作在大多数情况下,controller对数据库的操作,都是以model的形式写代码的,如下例子:给id为params[:id]的kindergarten创建一个新的bill@bill = Kindergarten.find_by(id: params[:id]).bills.build(bill_params)这里,我们首先看到的是大写的Kindergart

2016-07-25 17:11:50 347

原创 [Rails]route.rb理解积累

首先,想要使用route里面的resources,切记,module的名字为单数,但controller的名字为负数,resources后面的接负数,既和controller名字相同。否则将无法正常使用自动提供的路由。

2016-07-23 19:00:21 355

原创 [Rails]表单提交时,post与patch的内部转化

在route.rb中,写下resourses :adminuser后,routes match产生了如下内容:update和creat同样作为表单提交调用的action,却使用着不同的协议:post/patch(put)。

2016-07-21 12:47:35 1931

原创 [其他]计算机网络-自顶向下方法 学习笔记

计算机网络与因特网应用层传输层网络层数据链路层

2016-07-01 20:20:14 4572 1

原创 [Linux]生产者与消费者 三种模型 C

“生产者/消费者”问题描述:有一个有限缓冲区和两个线程:生产者和消费者。他们分别把产品放入缓冲区和从缓冲区中拿走产品。当一个生产者在缓冲区满时必须等待,当一个消费者在缓冲区空时也必须等待。1.      单锁模型#include"stdio.h"#include"pthread.h"int buffer[10];int top = 0;int itime

2016-06-09 23:25:07 4742 2

转载 [javaEE]Java中JSON的简单使用与前端解析

一、JSON  JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式。 JSON采用完全独立于语言的文本格式。这些特性使JSON成为理想的数据交换语言。易于人阅读和编写,同时也易于机器解析和生成。  JSON与XML的对比(引用自:sanpintian的CSDN博客):  1、可读性:JSON和XML的可读性可谓不相上下,一边是建议的

2016-01-26 21:40:06 2275

原创 [JavaEE]JaveEE遇到的的问题

报错:File: AbstractPlainSocketImpl.javaMethod: connectCaused by: Unable to load configuration. - Class: java.net.AbstractPlainSocketImpl File: AbstractPlainSocketImpl.javaMethod: connectCaused

2016-01-23 23:24:01 870

原创 [Java]入门遇到的问题

//问题如下:class FileStruct{ int intPara; FileStruct(){ intPara=0; } public void setintPara(int i){ intPara=i; } public int getintPara(){

2016-01-06 17:23:34 301

原创 [Web]Mybatis的一些使用心得

错误:java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for...原因:命名空间没写对,如果使用mapper,则空间中一定要写上Mapper的名称,否则就会报错。错误:Cannot add or update a child row: a fore

2015-12-30 11:56:53 438

原创 [算法]堆排序

/*Name:堆排序Actor:HTTime:2015年12月23日Error Reporte: 1.每次调整的时候,注意size变量! */#include #include #include #include #include #include #define N 200int a[N];int sum = 10;void heapadjust(in

2015-12-23 21:19:24 275

原创 [算法]归并排序

/*Name:归并排序Actor:HTTime:2015年12月14日Error Reporte:*/#include"stdio.h"#include"iostream"#include"string.h"#include"stdlib.h"#include"string"#include"map"using namespace std;int tempe

2015-12-14 19:07:28 263

原创 [图论]最短路(Dijkstra算法)

/*Name:最短路(Dijkstra)Actor:HTTime:2015年11月8日Error Reporte: 1.map 字符串做下标时,别用char*,用string,记得加头文件*/#include"stdio.h"#include"iostream"#include"string.h"#include"stdlib.h"#include"string"#

2015-11-08 20:43:06 474

原创 [算法]动态规划 多重背包 二进制优化

/*Name:多重背包 二进制优化 (DP)Actor:HTTime:2015年11月2日Error Reporte:*/#include #include #include #include #include #include #include #include #include #define N 10010using namespace std;

2015-11-02 20:42:11 864

原创 [算法]动态规划 0-1背包 完全背包

/*Name:01背包 (DP)Actor:HTTime:2015年11月1日Error Reporte: 1.循环开始点 是1不是0*/#include #include #include #include #include #include #include #include #include #define N 10010using namesp

2015-11-01 17:43:44 491

转载 背包九讲

目录第一讲 01背包问题第二讲 完全背包问题第三讲 多重背包问题第四讲 混合三种背包问题第五讲 二维费用的背包问题第六讲 分组的背包问题第七讲 有依赖的背包问题第八讲 泛化物品第九讲 背包问题问法的变化附:USACO中的背包问题前言本篇文章是我(dd_engi)正在进行中的一个雄心勃勃的写作

2015-10-27 20:49:41 270

原创 [动态规划]POJ3616(dp入门题)

/*Name:POJ3616 (DP入门)Actor:HTTime:2015年10月13日Error Reporte: 1.好好想清楚dp思路...要先会写出明确的dp式子,再理清楚各种条件*/#include #include #include #include #include #include #include #define N 1010using

2015-10-13 21:21:40 355

原创 [数据结构]字符串匹配(KMP方法)

/*Name:字符串匹配(KMP方法)Actor:HTTime:2015年10月12日Error Reporte: */#include"stdio.h"#include"string.h"#include"stdlib.h"#define N 10010//只走一遍原串//每次不匹配,将子串往回移动到一定位置//移动的位置是提前根据“循环节”计算得出//O

2015-10-12 19:07:55 501

原创 [数据结构]二叉查找树 简单实现

/*Name:二叉查找树 简单实现 Actor:HTTime:2015年10月11日Error Reporte: 1.子函数中给指针赋予新的地址的时候,不要忘记引用... 2.找前驱,删点的时候,一定要搞清楚逻辑*/#include"stdio.h"#include"string.h"#include"stdlib.h"#define N 10010str

2015-10-11 00:13:39 319

原创 [数论]矩阵快速幂

/*Name:BjfuOJ1440 (矩阵快速幂)Actor:HTTime:2015年10月9日Error Reporte: 1.求模运算,一定要有最后一次!*/#include #include #include #include #include #include #include #define N 1010#define G 1000000007

2015-10-09 22:01:43 331

原创 [算法]快排

/*Name:QucikSort Actor:HTTime:2015年10月8日Error Reporte: 1.注意处理相等的情况,小心下标越界*/#include"stdio.h"#include"string.h"#include"stdlib.h"#define N 10010//最优 O(nlogn)//最差 O(n^2)int a[N];vo

2015-10-08 21:04:07 280

原创 [数据结构]并查集水体POJ2236(并查集)

/*Name:POJ2236 (并查集)Actor:HTTime:2015年9月30日Error Reporte: 1.记住,合并的时候,一定是将一个的“父亲”的父亲改变成另一个的父亲!!*/#include #include #include #include #include #include #include #define N 1010 using

2015-09-30 23:38:47 286

原创 [数据结构]hash小题HD1496(hash开放寻址)

/*Name:HDOJ1496 (暴力 hash开放寻址)Actor:HTTime:2015年9月29日Error Reporte: 1.后面俩循环从1开始...题意 2.hash时候注意处理负号! 3.最后别忘了乘16*/#include #include #include #include #include #include #include

2015-09-29 20:03:20 274

原创 [数据结构]Hash表初学(开放寻址法 )

/*Name:Hash表初学 (数组实现链表 开放寻址法 )Actor:HTTime:2015年9月29日Error Reporte: */#include"stdio.h"#include"string.h"#include"stdlib.h"int hash[9000]; int value[9000];int f1(int x){ return x

2015-09-29 17:36:21 2233

原创 [动态规划]整数拆分(纯DP)

/*Name:整数拆分 两种做法 (dp)Actor:HTTime:2015年9月28日Error Reporte: 1.初始化边界处理 没弄清*/#include #include #include #include #include #include using namespace std;#define N 125int dp[N][N];vo

2015-09-29 15:58:14 1320

原创 [数据结构]Hash表初学(数组链表)

/*Name:Hash表初学 (数组实现链表 h(x) = x mod n )Actor:HTTime:2015年9月27日Error Reporte: 1.add函数 来龙去脉理解清楚*/#include"stdio.h"#include"string.h"#include"stdlib.h"int hash[9]; //9位表int link[10000]

2015-09-27 11:31:45 381

原创 [图论]最大流问题(网络流最大流EK算法 BFS)

/*Name:最大流问题 (网络流最大流EK增广路 BFS)Actor:HTTime:2015年8月15日Error Reporte:*/#include #include #include #include #include #include #define N 50#define INF 0x3f3f3f3fusing namespace std;/

2015-08-15 17:25:21 946

原创 [图论]连接岛屿问题(MST.Kruskal算法 并查集)

/*Name:连接岛屿问题 (MST Kruskal算法)Actor:HTTime:2015年8月13日Error Reporte:*/#include #include #include #include #include #include #define N 50using namespace std;//最小生成树://依次选择可用的最小边连接,直

2015-08-13 20:51:52 1234

原创 [数论]快速幂取模

/*Name:快速幂取模Actor:HTTime:2015年8月11日Error Reporte:*/#include #include #include #include using namespace std;int pow(int a, int b, int c ){ int ans = 1; a %= c; for (;b!=1;) { a

2015-08-11 13:21:29 289

原创 [数论]唯一分解定理

/*Name:唯一分解定理Actor:HTTime:2015年8月11日Error Reporte:*/#include #include #include #include using namespace std;//任意整数可以化为一组素数积//n = p1^a1 * p2^a2 * p3^a3 ... ...int prise[1000];int

2015-08-11 12:37:35 651

原创 [数论]小于n且与n互素的个数(欧拉函数)

/*Name:小于n且与n互素的个数(欧拉函数)Actor:HTTime:2015年8月10日Error Reporte:*/#include #include #include #include using namespace std;//欧拉函数://f(n) = n*TT[ 1/p * (p-1) ]//其中 p 是 n 的质因数//实现:对于每一个质

2015-08-10 22:40:20 1460

原创 [数据结构]Angle迷宫(纯裸BFS)

/*Name:Angle迷宫(BFS)Actor:HTTime:2015年6月22日Error Reporte:1.时间的计数上要注意}*/#include #include #include #include #include using namespace std;char map[205][205];int ma[4] = { 1, -1, 0

2015-08-10 21:24:21 441

原创 [数论]青蛙约会 (扩展欧几里德)

#include "stdio.h"#include "string.h"#include "iostream"using namespace std;int x,y;//ax+by=gcd(a,b)int gcd(int a,int b){ if (b==0) { x = 1; y = 0; return a; //b==0时,gcd(a,0)==a

2015-07-31 10:53:37 403

原创 [MFC]MFC输出到EXCEL表格并画图表

// MFC_textDlg.cpp : 实现文件//#include "stdafx.h"#include "CApplication.h"#include "CRange.h"#include "CWorkbook.h"#include "CWorkbooks.h"#include "CWorksheet.h"#include "CWorksheets.h"#include

2015-07-27 16:37:40 2539 1

原创 [MFC]服务端客户端一对一聊天

客户端部分:Dlg.cpp:// MFC_ChatDlg.cpp : 实现文件///*Process:1.创建工程,允许windows库;2.画界面,设定变量;3.SetDlgItemText初始化IP,初始化端口值4.CSocket类派生出 Mysocket,并重载receive send connect函数;大主类增加id的CString和一个MySocket变量5.

2015-07-27 16:30:05 910

原创 [算法]树的最大独立集(动态规划 dfs刷表)

/* Name:树的最大独立集(动态规划 dfs刷表) Actor:HT Time:2015年7月25日 Error Reporte: 1.vector的方便之处!! attach[a].push_back(b); attach[b].push_back(a); 直接放在最后,无需单独计数 } */#include"stdio.h"#include"

2015-07-25 12:27:48 782

原创 [算法]最优矩阵链乘(动态规划 记忆化搜索)

/* Name:最优矩阵链乘(动态规划 记忆搜索) Actor:HT Time:2015年7月23日 Error Reporte: } */#include"stdio.h"#include"conio.h"#include"string.h"#include"iostream"using namespace std;int tab[300];int

2015-07-23 11:25:01 463

空空如也

空空如也

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

TA关注的人

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