自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Mybatis-Plus映射实现过程(附赠代码)

1.需要建立maven项目,导入jar包 <dependencies> <!--mybatis-plus依赖jar包--> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus</artifactId> <version>3.0.4</version>

2020-06-19 11:37:11 2330

原创 ajax实现基础增加交互代码实现

1.新建maven项目将相关包导入,结构如下:2.建立index.jsp<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" isELIgnored="false"%><html xmlns="http://www.w3.org/1999/xhtml"><head> <title>Insert</title> <script sr

2020-06-17 17:22:56 317

原创 Java时间问题

一。获取本月的起止时间 Calendar cal = Calendar.getInstance(); //当前日期月份 cal.add(Calendar.MONTH, 0); //创建当前时间 Date date = new Date(); //设置时间格式为yyyy-MM-dd HH:mm:ss...

2019-10-11 16:14:49 173

原创 经典排序算法

1、冒泡排序(Bubble Sort) 冒泡排序是一种简单的排序算法。它重复地走访过要排序的数列,一次比较两个元素,如果它们的顺序错误就把它们交换过来。走访数列的工作是重复地进行直到没有再需要交换,也就是说该数列已经排序完成。这个算法的名字由来是因为越小的元素会经由交换慢慢“浮”到数列的顶端。1.1 算法描述 比较相邻的元素。如果第一个比第二个大,就交换它们两个; ...

2019-05-17 16:17:21 151

原创 两步完成Source Insight 4.0 破解安装

第一步:将破解压缩包里的Source Insight 4.0.exe 文件替换掉安装路径中的Source Insight 4.0.exe;第二步:选择import 将si4.pediy.lic文件选中,破解完成。 破解资源路径:https://download.csdn.net/download/lieyingzhiyan/10749321...

2018-10-28 16:30:32 1041

原创 git 笔记

注意:千万不要用Windows自带的记事本编辑任何文本文件。原因是Microsoft开发记事本的团队使用了一个非常弱智的行为来保存UTF-8编码的文件,他们自作聪明地在每个文件开头添加了0xefbbbf(十六进制)的字符,你会遇到很多不可思议的问题,比如,网页第一行可能会显示一个“?”,明明正确的程序一编译就报语法错误,等等,都是由记事本的弱智行为带来的。建议你下载Notepad++代替记事本,不...

2018-10-13 16:50:21 312 1

原创 Visual Studio 连接sql数据库 将结果存储到文件

初次使用visual studio 2013很舒心,下面先讲存入到文件中的方法:一:存入文件string result1 = @"D:\result1.txt";//结果保存到D:\result1.txtFileStream fs = new FileStream(result1, FileMode.Append);//检测文件StreamWriter wr = null;wr ...

2018-09-28 09:31:57 2770

原创 大数相加

#include#includeint main(){ char a1[1100],b1[1100]; int T,a[1100],b[1100],c[1100]; int n,i,j,k,k1,La1,Lb1,t,L; scanf("%d",&T); for(n=1;n<=T;n++) { memset(a,0,sizeof(

2015-04-12 20:31:20 378

原创 C语言 拓扑排序基础

#include#includeint in[1000],match[1000][1000];//in[]存储点的入度 ,match[]存储图的临界阵 int main(){ int m,n,i,j,p,q,k; while(scanf("%d%d",&n,&m)!=EOF) { memset(match,0,sizeof(match));

2015-03-03 10:51:11 636

原创 最小生成树末班

http://paste.ubuntu.com/10495671/#userconsent#http://paste.ubuntu.com/10495644/#userconsent#

2015-03-02 18:59:24 408

原创 C语言 最小生成树

#include#include#includeusing namespace std;int m,n,i,j,pre[5005];struct M{ int x; int y; int mo;}money[5005];int cmp(M a,M b){ return a.mo<b.mo;}void init(){ for(i=0;

2015-03-02 16:59:21 559

原创 C语言 最小生成树

#include#includeusing namespace std;int pre[10000],sum;struct road{ int star; int end; int cost;}r[10000];void make_set(){/*创建一个单元集*/ for(int i=0;i<10000;i++) pre[i]=i

2015-03-02 11:12:20 885

原创 C语言 Floyd最短路

#includeint map[2000][2000];int main(){ int n,i,j,m,k,a,b,c,; while(scanf("%d%d",&n,&m)&&m>0&&n>0) { for(i=1;i<=n;i++) for(j=1;j<=n;j++) { ma

2015-03-01 11:07:06 1322

原创 C语言 并查集 压缩路径

#include #include #include#includeusing namespace std;int pa[10000000];/*pa[x]表示x的父节点*/int num[10000000];void make_set(){/*创建一个单元集*/ for(int i=0;i<10000000;i++) { pa[i]=i;

2015-02-28 18:05:37 526

原创 C语言 并查集基础

#include #include #includeusing namespace std;int pa[3000];/*pa[x]表示x的父节点*/ int num[3000],e[3000];/*num[]存储该集合中元素个数,并在集合合并时更新num[]即可.e[]记录集合中元素的个数*/ void make_set(int x){/*创建一个单元集*/ pa[x

2015-02-28 15:21:31 642

原创 C语言 并查集

#include #include using namespace std;int pa[30001]; /*pa[x]表示x的父节点*/int rank[30001]; /*rank[x]是x的高度的一个上界*/int num[30001];/*num[]存储该集合中元素个数,并在集合合并时更新num[]即可*/void make_set(int x){/*创建一个

2015-02-28 10:59:16 607

原创 C语言对叉积的简单应用

#include#includeusing namespace std;#includechar s[1000010];int area(int x1,int y1,int x2,int y2){ return x1*y2-x2*y1;//叉积公式=平行四边形面积}int main(){ int n,m,i,t,a,b,p,x,y; long long k

2015-02-06 19:37:00 802

原创 已知两点坐标求等边三角形另一点

#include#includestruct point{    double x;    double y;}s[10];int main(){    int n,i,t,j;    double m,x0,y0;    scanf("%d",&t);    while(t--)    {        for(i=0;i       

2015-02-06 14:59:37 2492

原创 C语言对DFS简单应用(Red and Black

#includeint dir[4][2]={{1,0},{0,-1},{0,1},{-1,0}};char maze[25][25];int num,m,n;void DFS(int x,int y){ num++; maze[x][y]='#';//防止重复记录 for(int k=0;k<4;k++) { int X=x+dir[k]

2015-02-03 19:56:20 1653

原创 C语言对深度搜索的简单应用(Oil Deposits

#include#includeint dir[8][2]={{0,1},{1,1},{1,0},{1,-1},{0,-1},{-1,-1},{-1,0},{-1,1}};int s[105][105];char map1[105][105]; int i,j,n,m,num;void dfs(int x,int y){    for(int i=0;i   

2015-02-02 19:01:53 602

原创 C语言对搜索的简单应用(迷宫问题

#include#includeusing namespace std;int dir[4][2]={{1,0},{0,1},{-1,0},{0,-1}};int maze[5][5],temproad[25][2],pos=0;struct road{ int r[30][2];//记录路径 int step;}s[50];int dfs(int x,int y,

2015-02-02 18:52:06 505

原创 c++输出某日是某年那天

#include#include#includeusing namespace std;int main(){ int a[]={31,0,31,30,31,30,31,31,30,31,30,31}; int i,j,num,k,l,t,year,month,day; scanf("%d",&t); while(t--) { s

2015-01-31 16:42:12 372

原创 c++对合数的简单应用

点击打开链接#include#include#include>using namespace std;int s[1000000];int main(){ int n,i,j,l,m,b; while(scanf("%d",&n)!=EOF) { memset(s,0,sizeof(s)); for(i=2;i<=n;

2015-01-31 14:27:55 1258

原创 c++二分法简单应用(Points in Segments)

#include#includeusing namespace std;int s[100010],b[50005];struct P{ int star; int stop;}a[50005];int main(){ int n,i,j,k,m,p,u=0,l,r,mid,q; scanf("%d",&k); while(k--)

2015-01-30 11:38:13 443

原创 遇到坑爹的黑点怎么让他少赚小费

#include#includeint max(int a1,int a2){ return a1=a1>a2?a1:a2;}int dp[10000];int main(){ int n,i,j,m,k,s[5]; scanf("%d",&n); while(n--) { scanf("%d",&m); s[1

2015-01-29 20:51:38 515

原创 C++背包01与完全背包

#include#includeint max(int a1,int a2){ return a1=a1>a2?a1:a2;}struct bag{ int v; int pay;}s[10006]; int dp[10005];int main(){ int n,i,j,m,k; while(scanf("%d%d",&n,&m)!

2015-01-28 16:12:55 1154

原创 小P寻宝记——粗心的基友(c++ 滚动数组的简单应用)

#includeint max(int a1,int a2){ return a1=a1>a2?a1:a2;}struct bag{ int v; int pay;}s[10006]; int dp[10005];int main(){ int n,i,j,m,k; while(scanf("%d%d",&n,&m)!=EOF)

2015-01-28 14:44:53 664

原创 c++ 异样斐波那契

#includeint main(){ int n,i,j,m,a[50]; scanf("%d",&m); while(m--) { a[1]=3;a[2]=9; scanf("%d",&n); for(i=3;i<=n;i++) a[i]=2*a[i-1]+a[i-2];

2015-01-27 15:59:47 349

原创 C++数塔问题

#includeint max(int a1,int a2){ return a1=a1>a2?a1:a2;}int main(){ int n,i,j,s[300][300],m,k; scanf("%d",&m); while(m--) { scanf("%d",&n); for(i=1;i<=n;i++)

2015-01-27 10:45:47 5077

原创 优先队列

#include#include#includeusing namespace std;struct P{ int x; friend bool operator<(P a,P b) { return a.x<b.x; }}s[1000000];int main(){ int n,i,j,a,m; while(sc

2015-01-26 18:56:18 378

原创 让字符串变数字怎么办,再排序呢?更何况遇某个字符要取之前的呢!

#include#include#includeusing namespace std;int main(){ char a[1004]; int i,j,n,k,l; int s[1005]; while(scanf("%s",a)!=EOF) { k=n=i=0; l=strlen(a); f

2015-01-26 18:17:17 410

原创 You Are All Excellent(余弦排比0~180)

#include#include#includeusing namespace std;struct loaction{ double x; double y;}s[101];int cmp(loaction a,loaction b){ double c,d; c=a.x/sqrt(a.x*a.x+a.y*a.y); d=b.x/sqrt(b.x*b.x+b.y*b.y

2015-01-26 15:48:34 551

原创 Train Problem I 战?栈:战

你是不是觉得自己代码很对,但提交却不对呢?你有没有考虑要清空 栈 呢?你没有吧!

2015-01-26 11:50:24 388

原创 C++对fabs的简单应用

#include#includeint main(){ int n,i,j,m; double s[105]; while(~scanf("%d",&n)&&n>0) { for(i=0;i<n;i++) scanf("%lf",&s[i]); for(i=0;i<n-1;i++) for(j=i+1;j<n

2015-01-26 11:29:29 987

原创 最简单的栈问题

#include#include#include#include#includeusing namespace std;stack p;int main(){ int i,j,n,m; char s[1000]; while(scanf("%s",s)!=EOF) { m=n=0; for(i=0;i<strlen(

2015-01-25 10:27:23 384

原创 没天理的贪心,做不完作业怎么少挨批

#include#include#includeusing namespace std;struct punish{ int deadline; int score;}s[1000];int cmp(punish a,punish b){ if(a.score==b.score) return a.deadline<b.deadline;

2015-01-24 19:20:16 404

原创 判断回文字符(包含去空格)

#include#includeint main(){ char s[100000],k[100000],t[100000],r; int i,j,m,n,p; while(gets(s)) { char a[5]="2013"; if(strcmp(a,s)==0) break; else {

2015-01-24 17:16:26 714

原创 选夫婿

#include#includeusing namespace std;struct E { char name [40]; int high; int weight; }s[1000];int cmp(E q,E w){ if(q.high==w.high) return q.weight<w.weight; else return

2015-01-24 17:12:29 387

原创 贪心买最多东西

#include#includeusing namespace std;struct P{ double weight; double pay;}s[1000];int cmp(P a,P b){ return a.pay/a.weight<b.pay/b.weight;}int main(){ int n,i,j; double sum,m;

2015-01-24 17:10:24 508

原创 C语言贪心看最多节目

#include#includeusing namespace std;struct time{ int start; int stop;}s[100];int cmp(time a,time b){ return a.stop<b.stop;}int main(){ int n,i,j,m,k,p,time; while(~scanf(

2015-01-24 15:36:15 1068

Mybatis-Plus映射实现过程

初次使用mybatis映射机制,很好用。文件生成后对于单表操作的SQL是可以直接调用的,不在xml文件中显示。

2020-06-19

HTML使用极简的方式通过ajax请求实现前后端交互代码实现

HTML使用极简的方式通过ajax请求实现前后端交互。文中不使用form表,为了方便ajax拼接其他参数。

2020-06-17

空空如也

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

TA关注的人

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