自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(45)
  • 资源 (1)
  • 收藏
  • 关注

原创 cmd下查找文件

cmd下查找文件使用命令for /r c:\Users\Administrator\Desktop %i in (*程序*.xls) do echo %i其中c:\....可替换成查找的范围,*程序*.xls可替换成想要查找的文件名称

2014-12-18 14:06:47 7006

原创 笔试题目解答

问题描述:一个二维迷宫地图,0表示不可通行,1表示可以通行,2表示可以通行且为必经点,用集合S表示,3表示起点,用点A表示,4表示终点,用点B表示。求从A到B的最短路径。问题分析:(一)首先从点A出发,在S中找出距离点A最近的必经点s1,再从s1出发找出距离点s1最近的必经点s2,以此类推,最终找到sn。计算sn到终点B的距离,将这些距离循环叠加,就是整个的最短路径。(尚需要理论证明)

2014-10-07 13:42:57 502

原创 JNDI连接Oracle

/** *  */package tree;import java.sql.Connection;import java.sql.Statement;import javax.naming.Context;import javax.naming.InitialContext;import javax.sql.DataSource;/**

2014-09-10 20:35:10 936

原创 poj3978

#includeusing namespace std;#define SIZE 10000 #define MAX_SIZE 100000 int a[SIZE];int counts = 0; void getPrimeTable(){ counts = 0; for(int i=2;iMAX_SIZE;i++){ int flag =

2014-09-09 13:42:53 696

原创 斐波那契数列

//Fibonacci#includeint const SIZE = 50;int const INIT = 1;int const IADDR = 0;int arr[SIZE];using namespace std;int ff(int n){    if(n== 1  || n == 2)

2014-09-07 16:28:12 407

原创 字符串全排列

//对长度为n的zifuc#include#include#include "iomanip.h"//递归输出字符串的全排列 /**在没有重复字符的情况下 */using namespace std;int mycount = 0;/**prefix前缀 已经排列好的字符 sufix后缀 尚未排

2014-08-28 10:23:16 433

原创 poj1067

这是一个weizuofu#include#includeusing namespace std;int main(){ double x = (1.0 + sqrt(5.0))/2.0; int ak; int bk; while(cin>>ak>>bk){ if(ak > bk){//交换ak,bk

2014-08-07 10:37:21 982

原创 poj1046

#include#includeusing namespace std;#define SIZE 16#define LEN 3int main(){ int base[SIZE][LEN]; int r,g,b; double dis[SIZE]; for(int i=0;iSIZE;i++){ cin>>base[i

2014-08-01 13:50:19 924

原创 poj1011

这道题提交20多次才通过。主要原因是没有讲f#include#include#define SIZE 65using namespace std;int n;//木棒数目 int a[SIZE];//木棒长度数组 int visit[SIZE];//访问标志数组 int len;//当前测试的长度 int flag = 0;//完成标志 int co

2014-07-29 09:56:14 509

原创 poj1006

#include#includeusing namespace std; #define PI 3.1415926int main(void){ int a,b,c,d; int t=0; while( cin>>a>>b>>c>>d){ t++; if(a== -1 &&b==-1 &&c==-1&&d==-1

2014-07-29 09:36:28 441

原创 poj3979

#include#include#define SIZE 4 using namespace std;int  gcd( int m,int n ){    m = (m>=0)?m:(-1*m);     n = (n>=0)?n:(-1*n);    int temp;    if (m        temp = m

2014-07-13 14:29:13 634

原创 poj1017

#include#define SIZE 50000using namespace std;int newpacket(int a, int b, int c, int d,int e,int f){    int ans = 0;    int one = 0;    int two = 0;     ans += f;//装6*6的        a

2014-07-13 11:35:39 495

原创 poj1019

#include#include#define SIZE 50000using namespace std;int main(void){    int T;//test case     cin>>T;    if(T>10 || T       return 0;    long a[SIZE];    a[0] = 0;    //

2014-07-12 23:31:57 516

原创 poj1001

#include#includeusing namespace std;/** 计算字符串s和字符ch的乘积值 */string mutiple_ch(string s,char ch){    string ans;    int jinwei = 0;    int jieguo = 0;    for(int i=s.lengt

2014-07-11 18:35:24 467

原创 poj1002不会超时

#include#include#include#include#define SIZE 200000using namespace std;int formal(string s){ int ans = 0; char ch ; for(int i=0;is.length();i++){ if(s.at(i) != '-'){

2014-07-11 16:35:41 578

原创 poj1002会超时

#include#include#include#include#includeusing namespace std;string formal(string s){    string ans = "";    for(int i=0;i        if(s.at(i) == '0' || s.at(i) == '1'){     

2014-07-11 16:01:19 630

原创 poj1007

#include#include#define  MAX_LEN 50#define  MAX_NUM 100#define  MAX_SIZE 1000000using namespace std;//计算每个String序列的sizeint str_size(string s){    int length = s.l

2014-07-11 12:11:58 490

原创 poj1068

#include#include#include#define MAX_LEN 20using namespace std;//得到括号序列void get_str(int s[], int len ,int * a){    //0表示左括号,1表示右括号     int pos = 0;    for(int k=0;k   

2014-07-11 12:10:44 424

原创 poj1003

#include#include#include#includeusing namespace std;int main(void ){               float  a ;     while ( cin>>a){         if(fabs(a) 5.201)             return 0;     

2014-07-11 12:07:56 508

原创 poj 1095

#include #include #include#includeusing namespace std;#define SIZE 20//b[i]满足卡特兰递推公司公式//  1 2 5 14 ...int func(long *b,int n) {    //用数组代替递归     if(n==0 || n==1){       b

2014-07-11 10:35:48 438

原创 Web数据挖掘小论文

1、目的意义Web数据挖掘是利用数据挖掘技术从Web文档和Web服务器中发现并提取人们感兴趣的信息或知识的过程。涉及到Internet技术、人工智能、计算机语言学、信息学、统计学等多个领域。Web包含了丰富和动态的超链接信息,以及Web页面的访问和使用信息,这为数据挖掘提供了丰富的资源。然而,从以下的分析中可以看到,对Web进行有效的知识发现具有极大的挑战性:Web挖掘对象多样性;Web页

2014-07-05 16:51:32 4772

原创 更新web项目名称时

更新web项目名称时,应该更新项目中

2014-06-30 14:20:22 645

原创 严重: Exception starting filter struts2

严重: Exception starting filter struts2java.lang.ExceptionInInitializerErrorat com.opensymphony.xwork2.util.OgnlValueStack.reset(OgnlValueStack.java:42)at com.opensymphony.xwork2.util.OgnlValueSta

2014-06-30 10:52:58 912

原创 解决Tomcat使用80端口被占用的问题

首先在CMD命令下输入 netstat -ano | findstr 80

2014-06-20 08:48:28 857

原创 Strut传递List<Map<String,String>>

private List maplist = new ArrayList();

2014-06-17 21:32:36 669

原创 java.net.MalformedURLException: unknown protocol问题

将  File file=new File(xmlPath);  //将文件读取,这样路径如果有中文一样可以正常读取      Document document = builder.parse(file); //将file传给DocumentBuilder,

2014-06-06 16:11:20 1194

原创 注册表右键取得管理员权限

Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\runas] @="获取管理员权限" "NoWorkingDirectory"="" [HKEY_CLASSES_ROOT\*\shell\runas\command] @="cmd.exe /c takeown /f \"%1\" & icacls

2014-06-06 08:50:37 4274

原创 更改电脑时区注册表

Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\China Standard Time] "Display"="(GMT+08:00) 北京,重庆,香港特别行政区,乌鲁木齐" "Dlt"="中国夏季时间" 

2014-06-06 08:48:15 7198 3

原创 注册表右键新建选项

Windows Registry Editor Version 5.00[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Discardable\PostSetup\ShellNew]"Classes"=hex(7):2e,00,61,00,63,00,63,00,64,00,62,00,00

2014-06-06 08:47:12 1010

原创 右键添加新建TXT文件注册表

Windows Registry Editor Version 5.00  [HKEY_CLASSES_ROOT\.txt]  @="txtfile"  "PerceivedType"="text"  "Content Type"="text/plain"  [HKEY_CLASSES_ROOT\.txt\PersistentHandler]  @="{5e

2014-06-06 08:46:10 1626

原创 Oracle学习

(1)Windows下配置ORACLE_HOME假定安装目录为

2014-05-29 13:01:05 675

原创 MyDate更加强大的时间函数

/** * @author rencongwhu * @date 2014-4-16 * @email rencongwhu@foxmail */package edu.whu.cs;import java.text.ParseException;import java.text.SimpleDateFormat;import java.util.Calen

2014-04-16 13:50:47 607

原创 Oracle SQL 语句

sum()

2014-04-14 17:34:08 408

原创 Java文件编码格式转换

默认被转换的格式为GBK,转换成的格式为UTF-8import info.monitorenter.cpdetector.CharsetPrinter;import java.io.BufferedReader;import java.io.BufferedWriter;import java.io.File;import java.io.FileInputStream;i

2014-04-01 19:42:32 5394 1

原创 SQL Server数据库连接

dbconnect.properties文件中定义DRIVER_NAME=com.microsoft.sqlserver.jdbc.SQLServerDriverDATABASE_URL=jdbc:sqlserver://localhost:1433;DatabaseName=JournalDATABASE_USER=saDATABASE_PASSWORD=123

2014-04-01 17:04:48 616

原创 达梦数据库连接

dbconnect.properties文件中定义DRIVER_NAME=dm.jdbc.driver.DmDriverDATABASE_URL=jdbc:dm://localhost/YourDbNameDATABASE_USER=SYSDBADATABASE_PASSWORD=SYSDBA使用ResourceBundle获得properties文件中定义static S

2014-04-01 16:31:32 19311 1

原创 String字符串转换成Double加减乘除

若想保证精度,可以使用BigDecimalString a = "167.000000000000060000000";String b = "167.0000000000000610000002";BigDecimal big = new BigDecimal(a);BigDecimal small = new BigDecimal(b);big = big.ad

2014-04-01 14:54:53 1785

原创 项目中常用问题

1.properties文件不在src目录下时,ResourceBundle.getBundle("com.ie.mypackage");2.正则表达式的常用问题懒惰匹配(.)*?汉字编码[\u3e00-\u9fa5] 不包含匹配[^.]

2014-03-19 18:16:55 476

原创 达梦数据库SQL

SUBSTRING()函数select * , substring(SONG_ID from 3) from TBL_SONG where SONG_ID like '11__';例如select * ,'04'+substring("DBNAME"."SCHAMENAME"."TABLENAME"."INDEX_ID" from 3 )from  "DBNAME"."SCHAMENA

2014-01-09 13:21:31 8479 1

原创 迭代输出Map键值对的几种方法

Map mymap = new HashMap();mymap.put("x1", "y1");mymap.put("x2", "y2");mymap.put("x3", "y3");Iterator it = mymap.entrySet().iterator();while(it.hasNext()){Map.Entry entry = (Map.Entry

2014-01-08 21:47:03 6556 1

zInherit.js

inheritFrom()和instanceOf()

2013-08-21

空空如也

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

TA关注的人

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