自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(598)
  • 资源 (5)
  • 收藏
  • 关注

原创 new hdoj 1515 (pe)(但是我可以做出来了)(搜索,注意剪枝)

#include#include#includeusing namespace std;#define MAX 100char a[MAX];char b[MAX];char c[MAX];//出战的结果char s[MAX];//栈char path[MAX];int akey=-1;//指针指的是当前的元素int ckey=-1;

2013-05-05 01:16:00 603

原创 hdoj 1087

#include#includeusing namespace std;#define MAX 1008//#define MAX 10int N;int s[MAX];int b[MAX];int maxx;int max(int a,int b){ if(a>b) return a; else return b;}void dp(){ int i,j;

2013-04-28 20:03:43 694

原创 (new) hdoj 1003(dp)(很经典的题目)

#include#includeusing namespace std;#define MAX 100005//#define MAX 15int N;int num[MAX];int maxx=0;int besti;int bestj;void dp(){ int i,j; for(i=0;i<N;i++) { int sum=0; for(j=i;

2013-04-28 11:41:57 503

原创 (new)hdoj 2668 (dp,跟一般的不一样,应该多练练)

#include#includeusing namespace std;#define MAX 10000009int len;char s[MAX];int m[150];int main(){ while(scanf("%d",&len)!=EOF) { scanf("%s",s); memset(m,0,sizeof(m)); int max=0; in

2013-04-27 20:44:16 611

原创 hdoj 1501 (import,本来以为这是个搜索题,后来发现是一个dp,而且第一次还没有设置状态)

#include#include#includeusing namespace std;#define MAX 202int T;char a[MAX];int al;char b[MAX];int bl;char c[2*MAX];int cl;int v[MAX][MAX];int find;void dfs(int ax,int bx,int cx){ //

2013-04-26 21:11:05 625

原创 hdoj 1070

#include#includeusing namespace std;#define MAX 110class Point{public: char brand[MAX]; float price; float volume; float money;};Point milk[MAX];int compare(const void *a,const void *b)

2013-04-25 20:39:12 688

原创 hdoj 1017(水题)

#include#includeusing namespace std;int n,m;int N;int a,b;int main(){ //freopen("in.txt","r",stdin); scanf("%d",&N); char str[20]; while(N--) { gets(str); int times=0; while(scanf(

2013-04-25 19:10:35 832

原创 hdoj 1016 回溯分析(以前遇到解空间为阶乘的时候比较害怕,现在好多了)

重点在于我做了现场保护#include#include#includeusing namespace std;#define MAX 25int height;int list[MAX];int visited[MAX];int isPrimer(int n){ int i; for(i=2;i<=sqrt(n);i++) { if(n%i==0) retu

2013-04-25 18:38:32 740

原创 java 定时器

import java.util.Timer;import java.util.TimerTask;public class Test{ static Timer timer = null; public static void main(String[] args) { timer = new Timer(); timer.schedul

2013-04-23 19:58:04 451

原创 mfc CValueTrack

class CValueTrack {public: CValueTrack(CWnd *pWnd); virtual ~CValueTrack(); void AddValue(double val); void Draw(); void Init() { m_nValue = 0; } CWnd *m_pWnd; //绘图窗体 CRect m_rt; //绘

2013-04-21 17:32:02 652

原创 mfc 试用技巧

1:使用vc开发项目时,常会遇到这种情况:     即明明只改动了一个文件,却要把整个项目全部重新编译连接一次。刚刚连接好,一运行,又提示重新编译连接一次,非常讨厌。这是因为出现了未来文件的缘故。    解决方法:     找出对应文件夹下的debug目录,将未来文件全部delete, 再rebuild all一次。(未来 文件即其创建和修改时间都比系统时间靠后)   2:有时

2013-04-21 10:25:14 471

原创 img sobel梯度

> i=imread('4.jpg');>> w1=fspecial('sobel')w1 = 1 2 1 0 0 0 -1 -2 -1>> w2=w1'w2 = 1 0 -1 2 0 -2 1 0 -1>> g1=imfilter(

2013-04-16 20:13:04 669

原创 img robert交叉梯度

>> i=imread('4.jpg');>> imshow(i);>> i=double(i);>> w1=[-1 0;0 1];>> w2=[0 -1;1 0];>> g1=imfilter(i,w1,'corr','replicate');>> g2=imfilter(i,w2,'corr','replicate');>> g=abs(g1)+abs(g2);>> figur

2013-04-16 20:07:53 1845

原创 img 中值滤波

>> i=imread('2.jpg');>> imshow(i);>> j=imnoise(i,'salt & pepper');>> figure,imshow(j);>> j=medfilt2(j,[3 3]);>> figure,imshow(j);>>

2013-04-16 19:38:24 696

原创 img 高斯平滑

i=imread('5.jpg');figure;imshow(i);h3_5=fspecial('gaussian',3,0.5);i3_5=imfilter(i,h3_5);figure,imshow(i3_5);h7_18=fspecial('gaussian',7,1.8);i7_18=imfilter(i,h7_18);figure,imshow(i7_18);

2013-04-16 11:34:40 555

原创 img 平均平滑

i=imread('3.jpg');figure,imshow(i);h=fspecial('average',3);i3=imfilter(i,h,'corr','replicate');figure,imshow(i3);h=fspecial('average',5);i3=imfilter(i,h,'corr','replicate');figure,imshow(i3);h

2013-04-16 11:14:22 494

原创 img 滤波

f=imread('1.jpg');imshow(f);w=[1.5 1 1.5;1.5 1 1.5;1 1 1]/9;g=imfilter(f,w,'corr','replicate');figure,imshow(g);

2013-04-16 10:22:35 459

原创 img 插值算法

a=imread('1.png');b=imrotate(a,30,'nearest');c=imrotate(a,30,'bilinear');d=imrotate(a,30,'bicubic');subplot(2,2,1);imshow(a);subplot(2,2,2);imshow(b);subplot(2,2,3);imshow(c);subplot(2,2,4);ims

2013-04-16 07:28:31 839

原创 img 图像旋转

>> a=imread('1.jpg');>> b=imrotate(a,30,'nearest','crop');>> subplot(1,2,1);imshow(a);>> subplot(1,2,2),imshow(b);>>

2013-04-16 07:11:52 1353

原创 img 镜像

a=imread('2.jpg');[height,width,dim]=size(a);tform=maketform('affine',[-1 0 0;0 1 0;width 0 1]);b=imtransform(a,tform,'nearest');tform2=maketform('affine',[1 0 0;0 -1 0; 0 height 1]);c=imtransfor

2013-04-15 22:46:33 702

原创 img 图像平移

>> a=imread('2.jpg');>> se=translate(strel(1),[80 50]);>> b=imdilate(a,se);>> figure;>> subplot(1,2,1);subimage(a);>> title('原图像');>> subplot(1,2,2);subimage(b);>> title('图像平移');

2013-04-15 22:31:10 847

原创 分割字符串

public class test { public static void main(String[] args) { String sb="7,9,9,9,9,9,9,1121111,55556,"; String string = sb.toString(); for (String s : string.split(",")) { System.out.printl

2013-04-15 15:42:40 456

原创 转化字符串的编码方式

import java.io.UnsupportedEncodingException;/** * 转换字符串的编码 */public class ChangeCharset { /** 7位ASCII字符,也叫作ISO646-US、Unicode字符集的基本拉丁块 */ public static final String US_ASCII = "US-ASCII"; /**

2013-04-15 15:13:25 755

原创 img 直方图均衡化

>> i=imread('4.jpg');>> i=im2double(i);>> %对于对比度较大的图像>> i1=2*i-55/255;>> subplot(4,4,1);>> imshow(i1);>> subplot(4,4,2);>> imhist(i1);>> subplot(4,4,3);>> imshow(histeq(i1));>> subplot(4,4,4

2013-04-14 22:28:54 792

原创 img 灰度阈值变化

>> i=imread('3.jpg');>> thresh=graythresh(i)thresh = 0.4824>> bw1=im2bw(i,thresh);>> bw2=im2bw(i,130/255);>> subplot(1,3,1);imshow(i);title('原图像');>> subplot(1,3,2);imshow(bw1);title('自动选

2013-04-14 11:26:53 934

原创 img 修改图片对比度

i=imread('3.jpg'); i=im2double(i);%转化数据类型为double figure(1); imshow(i); title('原图像'); %增加对比度 fa=2;fb=-55; o=fa.*i+fb/255; figure(3); subplot(2,2,1); imshow(o); title('增加对比度'); %

2013-04-14 11:06:04 730

原创 img gamma变化

i=imread('1.jpg'); subplot(1,3,1); imshow(imadjust(i,[],[],0.75)); title('Gamma 0.75'); subplot(1,3,2); imshow(imadjust(i,[],[],1)); title('Gamma 1'); subplot(1,3,3); imshow(imadjust(i,[],[],1

2013-04-14 09:29:42 581

原创 img 绘制灰度直方图

>> i=imread('img2.jpg');>> figure;>> imshow(i);title('source');>> figure;>> imhist(i);title('graph');>>

2013-04-13 22:12:43 716

原创 img rgb图片转化为灰度图片

>> imgrgb=imread('img.jpg');>> figure('Name','显示真彩图片')>> imshow(imgrgb) >> imggray=rgb2gray(imgrgb);>> figure('Name','显示灰度图像')>> imshow(imggray)

2013-04-13 21:55:29 1732

原创 httpclient

import java.io.InputStream;import org.apache.http.HttpEntity;import org.apache.http.HttpResponse;import org.apache.http.client.HttpClient;import org.apache.http.client.methods.HttpGet;impo

2013-03-28 08:58:47 697

原创 java 正则表达式2

import java.util.regex.Matcher;import java.util.regex.Pattern;public class Test { public static void main(String args[]) { //截取http://地址 //1开始必须有一个http://或者https:// //2\\w,首先第一个\转义\其实

2013-03-16 09:34:56 753

原创 java 正则表达式

import java.util.regex.Matcher;import java.util.regex.Pattern;public class Test { public static void main(String args[]) { Pattern pattern=Pattern.compile("^Java.*"); Matcher matcher=pa

2013-03-16 09:05:00 704

原创 zoj 1242(坑爹题)

#include #include #include int main(void){ int w,d,count = 1; int dec = 5730,result; double temp,a = 810,year; while(scanf("%d%d",&w,&d)!=EOF && w) { temp = a*w/d; year = dec* log(temp)/

2013-03-05 20:57:04 567

原创 zoj 1002 (深度优先搜索)(深入理解n皇后问题)(小感悟)

第一点,浙江大学oj上的题比杭电oj上的题难的多。第二点,这个问题跟n皇后问题完全不一样。主要有两点:n皇后问题每一行必须放一个。n皇后下一次选择的肯定是下一个。但是这个问题不是这样,首先,它第一次可以从任何地方放,第二,它不一定从第二行开始放,可能从墙边开始放,第三,不一定每一行都放。所以具体问题具体分析。第三点,学习能力固然重要,但是忘记能力也很重要。比如说诺基亚,谁会想到,它一下子又

2013-03-04 11:51:33 741

原创 hdoj 2719 (url在传输过程中的编码)

1 我在做web的时候发现,有时候递交一个aciton的时候,会有很多的变化,比如所sign!main.action?id=4562&pd=mm当我递交这个请求以后会出现很多的%Character  Encoding" " (space)  %20"!" (exclamation point)  %21"$" (dollar sign)  %24"%

2013-03-03 14:13:28 368

原创 hdoj 2700 (奇偶校验)(水题)

#include#include#include#includeusing namespace std;char inputstr[50];int main(){ //freopen("in.txt","r",stdin); while(scanf("%s",inputstr)) { //如果输入#代表结束 if(inputstr[0]=='#') { ret

2013-03-03 13:23:25 478

原创 jmf 播放wav文件

import java.applet.Applet;import java.awt.BorderLayout;import java.awt.Component; import javax.media.ControllerEvent;import javax.media.ControllerListener;import javax.media.Manager;import java

2013-01-13 18:42:04 809

原创 HtmlParser filter

import org.htmlparser.NodeFilter;import org.htmlparser.Parser;import org.htmlparser.filters.NodeClassFilter;import org.htmlparser.tags.LinkTag;import org.htmlparser.util.NodeList;public class

2013-01-13 12:39:55 408

原创 HtmlParser visitor

import org.htmlparser.Parser;import org.htmlparser.Tag;import org.htmlparser.util.ParserException;import org.htmlparser.visitors.NodeVisitor;public class spider { public static void main(String

2013-01-13 12:30:34 326

原创 httpclient 第一个

需要三个jar包commons-codec-1.3.jarcommons-httpclient-3.1.jarcommons-logging-1.1.1.import java.io.IOException; import org.apache.commons.httpclient.*; import org.apache.commons.httpclient.method

2013-01-04 17:08:56 280

StrutsTutorial

StrutsTutorial文件。很简单的例子

2012-03-01

struts所用的jar文件

用于struts开发的留个jar文件commons-fileupload.jar,commons-logging.jar,freemarker.jar,ognl.jar,struts2-core.jar,xwork-core.jar

2012-02-29

java api中文版

这是用用于java开发,经常用的api文档,而且是中文的啊

2012-02-19

java邮件所需的jar

用于java邮件开发所需的jar,包含smtp.jar,mailapi.jar

2012-02-19

键盘钢琴软件

利用键盘来弹钢琴,副件中有乐谱,满足经济条件一般,但是喜欢钢琴的用户,不妨试一试

2012-01-03

空空如也

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

TA关注的人

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