自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 资源 (2)
  • 收藏
  • 关注

原创 POJ1986,作为LCA模板

// Note:Your choice is C++ IDE#include #include #include #include using namespace std;const int mmax=100050;typedef struct sdlfj{ int u,v,next,w;}Edge;typedef struct gf{ int u,v,num; }Qu

2012-05-29 00:04:44 577

原创 CDOJ1208 作为求双连通分量的模板

// Note:Your choice is C++ IDE#include #include #include using namespace std;#define min(a,b) ((a)>(b)?(b):(a))typedef struct sldfj{ int u; int v; int next;}Edge;const int mmax=10050;Edg

2012-05-28 16:14:15 529

原创 找割点,桥以及求双连通分支的模板

void dfs(int u,int fa){ int i,cnt=0; bool tag=true; flag[u]=1; dfsnum[u]=low[u]=++Time; for(i=head[u];i!=-1;i=edge[i].next) { int v=edge[i].v; if(v==fa||dfsnum[v]>=dfsnum[u]) { tag

2012-05-27 20:07:07 4881

原创 强连通分量缩点的模板

#include #include #include #include using namespace std;#define inti(a) memset(a,0,sizeof(a))#define min(a,b) ((a)>(b)?(b):(a))#define max(a,b) ((a)>(b)?(a):(b))const int Max=1605;const i

2012-05-27 00:00:03 733

原创 匈牙利模板

bool find(int u){ flag[u]=1; for(int i=head[u];i!=-1;i=edge[i].next) { int v=edge[i].v; if(!flag[v]) { flag[v]=1; if(match[v]==0||find(match[v])) { match[v]=u; return true;

2012-05-26 00:59:46 347

原创 堆模板

大根堆typedef struct { int heap[205]; int size;}Heap;Heap s;void Insert(int x){ int i; for(i=++s.size;s.heap[i/2]<x;i/=2) s.heap[i]=s.heap[i/2]; s.heap[i]=x;}int DeleteMax(){ int i,ch

2012-05-26 00:09:46 432

原创 JACOB替换WORD中的字符串

//查找是否存在字符串,若存在则把要查找的字符串设置好。 public static boolean find(Dispatch selection,String text) { Dispatch find=Dispatch.call(selection, "Find").toDispatch(); Dispatch.put(find, "Text", text);//设置要查找的文本

2012-05-24 21:21:31 3131

转载 JACOB调用WORD宏

首先要下载JACOB 下载地址:http://sourceforge.net/projects/jacob-project/下载Jacob的发布包,里面应该包含一个jar包:jacob.jar(放在项目的classpath下)两个dll文件:jacob-1.15-M4-x64.dll、jacob-1.15-M4-x86.dll两个dll文件请根据系统架构属性选择其中一个然后放在

2012-05-16 15:21:13 3487 1

原创 JAVA选择文件夹路径的方法

JFileChooser cho=new JFileChooser();fcho.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);

2012-05-15 20:17:39 1401

转载 JAVA调用系统命令或可执行文件

通过 java.lang.Runtime 类可以方便的调用操作系统命令,或者一个可执行程序,下面的小例子我在windows和linux分别测试过,都通过。基本原理是,首先通过 Runtime.getRuntime() 返回与当前 Java 应用程序相关的运行时对象,然后调用run.exec(cmd)  另启一个进程来执行命令(cmd为要执行的命令)。 运行一个可执行程序    执行一个

2012-05-15 18:04:30 801

原创 java中让图片自己适应组件大小的两种方法

public void setIcon(String file,JButton com){ ImageIcon ico=new ImageIcon(file); Image temp=ico.getImage().getScaledInstance(com.getWidth(),com.getHeight(),ico.getImage().SCALE_DEFAULT); ico=new

2012-05-15 08:09:49 9996

原创 ADC0832的C程序(我怎么感觉网上的各种坑爹,还是自己YY了一个)

uchar Getdata(){ uchar data1=0,data2=0,i; CS=0; ; CLK=1; DIO=1; _nop_(); CLK=0;//第一次下降沿之前,DIO=1,表示开始. CLK=1; DIO=1; _nop_(); ; CLK=0; CLK=1; DIO=1; _nop_(); ; CLK=0;//第二三次下降沿,DIO=1

2012-05-13 13:06:47 1218

原创 巡线车程序(完整版,也是最先的版本)

#ifndef _Macro.h_#define _Macro.h_ #include #include #define uchar unsigned char #define uint unsigned int#define one 11.11#define LMAX 1999#define RMAX 3999#define CPU_F ((double)8000000)

2012-05-08 23:08:09 14513 3

原创 巡线小车源程序(MSP430,PID)

首先是各种宏定义的头文件"myhead.h"#ifndef xxxx_xxx#define xxxx_xxx#define P 43#define I 0.01#define D 100#define LeftMotorTurnNeg {P3OUT|=BIT0;P3OUT&=~BIT1;}#define LeftMotorTurnPos {P3OUT&=~BIT

2012-05-06 23:38:30 11834 2

原创 PID算法的C语言实现

float PIDcal(float setpoint,float actual_position){ static float pre_error = 0; // 定义前一次误差 static float integral = 0; // 定义积分项累加值 float error; // 定义最新误差 fl

2012-05-06 23:19:46 1920 1

转载 线段树 扫描线求矩阵面积并的模板(zz)

typedef struct x{ int left; int right; int cov; int len;}Tree;typedef struct Linex{ int x1; int x2; int y; int flag;}Line;const int MAX=50050;int linenum,n;Tree tree[MAX*4];Line line[

2012-05-06 22:48:48 601

ADS1115的STM32F407的驱动

基于STM32F407的ADS1115的驱动程序,移植到stm32f103里面也很容易,可以直接用,还加了一阶的卡尔曼滤波

2014-05-27

HX8347-A芯片资料(内含驱动程序)

3.2寸以及2.8寸液晶驱动程序。驱动芯片为HX8347-A。

2012-10-01

空空如也

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

TA关注的人

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