上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 42 下一页
摘要: tomcat访问的还是原来的页面,找了半天终于在work目录下面找到了页面的缓存,直接shift+delete,ok,搞定! 阅读全文
posted @ 2010-11-21 18:32 qiang.xu 阅读(388) 评论(0) 推荐(0) 编辑
摘要: The Constructor Date(String) is Deprecated since of JDK 1.1 you should not use itYou should use java.text.SimpleDateFormat to convert String value to Date. E.g.1private static final SimpleDateFormat sdf = new SimpleDateFormat(”yyyy-MM-dd”);2String birthDate = “1981-12-3 阅读全文
posted @ 2010-11-20 11:22 qiang.xu 阅读(2042) 评论(0) 推荐(0) 编辑
摘要: 每日一题:编写一个函数,不使用算术运算符,实现比较两个数的大小问题描述:编写一个函数f,在函数f中,不能够使用算术运算符,实现比较输入两个整数的功能。思路:1.考虑使用绝对值来实现,但是这中方法其实还是在间接地使用了算术运算符,因为在abs函数中,存在数值的判定。实现代码:int max1_large(int a, int b){ return ( (a + b) + abs(a - b) ) / 2;}int max1_small(int a, int b){ return ( (a + b) - abs(a - b) ) / 2;} 阅读全文
posted @ 2010-11-20 09:54 qiang.xu 阅读(926) 评论(0) 推荐(0) 编辑
摘要: 每日一题:给定n, 求出小于n的所有数中1的位数问题描述:给定整数 n,要求编写函数f,返回[1, n]中所有数中1的位数。例如,如果f输入10的话,函数返回2,其中1中含有一个1,10中含有一个1.思路:这里首先想到的是对于给定一个整数 i,如果分解出i的各个数位。这个算法是比较简单的,取模10,然后除10即可。实现的代码如下:// 这个函数直接输入的顺序和原来的数字// 相反的,下面使用递归的形式正序输出void integer2Bit(int i){ while(i > 0) { printf("%d", i % 10); i = i / 阅读全文
posted @ 2010-11-20 09:04 qiang.xu 阅读(577) 评论(0) 推荐(0) 编辑
摘要: 每日一题 -- 不适用变量实现c语言的strlen函数问题描述:编写一个c语言函数strlen,要求在其中不能够使用任何的变量思路:如果在函数体重不能使用变量,同时考虑到斐波那契数列的递归求解的过程,可以联想到使用“递归”来实现。实现代码:#include<stdio.h>#include<stdlib.h>//strlen实现,但是在其中不能使用任何变量intmyStrlen(char*str){if('\0'==*str){return0;}else{return(1+myStrlen(str+1));}}intmain(){char*str=&qu 阅读全文
posted @ 2010-11-19 15:49 qiang.xu 阅读(471) 评论(0) 推荐(0) 编辑
摘要: 每日一题:不适用第三个变量,实现交换两个输入参数问题描述:编写一个函数swap,输入两个参数a, b,要求函数中不能够使用第三个变量,函数输出交换之后的a和b。思路:如果程序中不能够使用另外的第三个变量的话,只能够通过所谓的“技巧"来实现。这里使用的技巧如下:a ^ 0 = a. a ^ a = 0(异或运算)实现代码:#include<stdio.h>#include<stdlib.h>//交换两个数据,但是不适用第三个变量voidswap(int*a,int*b){*b=(*a)^(*b);*a=(*a)^(*b);*b=(*a)^(*b);}intmai 阅读全文
posted @ 2010-11-18 21:49 qiang.xu 阅读(341) 评论(0) 推荐(1) 编辑
摘要: /*Some SMTP servers require a username and password authentication before youcan use their Server for Sending mail. This is most common with coupleof ISP's who provide SMTP Address to Send Mail.This Program gives any example on how to do SMTP Authentication(User and Password verification)This is 阅读全文
posted @ 2010-11-17 22:05 qiang.xu 阅读(419) 评论(0) 推荐(0) 编辑
摘要: spring邮件服务1.spring邮件服务体系2.demos3.可能出现的问题1.spring的邮件服务体系The Spring Framework provides a helpful utility library for sending email that shields the user from the specifics of the underlying mailing system and is responsible for low level resource handling on behalf of the client.Theorg.springframework 阅读全文
posted @ 2010-11-17 22:01 qiang.xu 阅读(2423) 评论(0) 推荐(0) 编辑
摘要: // 测试用例:// 直角三角形:3 4 5// 钝角三角形:3 5 7// 锐角三角形:6 6 6#include &lt;stdio.h&gt;#include &lt;stdlib.h&gt;// test if the three number is a triangleint isTriangle(int a, int b, int c){ if ((a &gt; 0) &amp;&amp; (b &gt; 0) &amp;&amp; (c &gt; 0) &amp;&amp; ( 阅读全文
posted @ 2010-11-17 19:48 qiang.xu 阅读(6802) 评论(0) 推荐(0) 编辑
摘要: 使用Sencha Designer来快速开发web用户界面 -- 页面布局1.what is layout?2.basic layout?3.如何配置容器的layout?4.some useful demo?1.what is layout ?In ExtJS, layouts control the size and position of the components within an application.其中需要注意的是一个子容器的layout是默认继承自它的父容器的layout的。有时候,一些container是存在default layout,例如像FormPanel默认使用的 阅读全文
posted @ 2010-11-16 21:42 qiang.xu 阅读(1646) 评论(0) 推荐(0) 编辑
摘要: 使用Sencha Designer来快速开发web用户界面 -- 初识Designer1.为什么使用Designer2.Designer说&ldquo;我能这么干&rdquo;3.Designer简单特性1.为什么使用Designer?最初使用Designer的动机,还是因为在web应用程序中界面的构建往往占据了应用程序开发的很大部分时间,而一个gui的工具如果能够通过drag and drop的形式实现整个界面的构建的话,那将极大的提高程序的开发效率。简而言之&ldquo;高效的偷懒&rdquo;。2.Designer说&ldquo;我能这么干& 阅读全文
posted @ 2010-11-16 20:36 qiang.xu 阅读(746) 评论(0) 推荐(0) 编辑
摘要: 菜单project-&gt;properties-&gt;java compiler改成与你JDK相同的版本。 阅读全文
posted @ 2010-11-16 19:49 qiang.xu 阅读(534) 评论(0) 推荐(0) 编辑
摘要: spring系列博客总结spring step 1 : 什么是springspring getstart贯穿spring的核心理念spring中的相关design patternspring核心:bean工厂的装配 1spring核心:bean工厂的装配 2spring核心:bean工厂的装配 3 spring核心:bean工厂的装配 4spring核心:bean工厂的装配 5spring核心:bean工厂的装配 6applicationContext高级特性spring的持久化数据库访问spring数据库操作配置实例spring web框架spring web框架 2spring终结篇 -- 阅读全文
posted @ 2010-11-16 16:41 qiang.xu 阅读(318) 评论(0) 推荐(0) 编辑
摘要: spring终结篇 -- 使用spring web应用程序配置,整合所有部分(数据库)1.web.xml中添加spring的dispatch servlet &lt;servlet&gt; &lt;servlet-name&gt;controller&lt;/servlet-name&gt; &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt; &lt;init-para 阅读全文
posted @ 2010-11-16 16:36 qiang.xu 阅读(1134) 评论(1) 推荐(0) 编辑
摘要: 用来同步eclipse环境内外的文件结构。比如,你需要把一些jar自包含到工程中,你通过资源管理器将jar文件拷到工程目录下。此时,在eclipse的工程中添加jar包,是找不到刚才拷的那个包的。这是就需要用LZ说的命令刷新一下这个工程。 相对的,如果在资源管理器里选中欲包含的jar包,在eclipse的workspace窗口的一个目录上点右键,选粘贴。此时就不需要刷新工程直接就可以看到这个文件... 阅读全文
posted @ 2010-11-16 15:30 qiang.xu 阅读(4560) 评论(0) 推荐(1) 编辑
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 42 下一页